body {
  margin: 0;
  padding: 0;
  background: #C7E5D0;
}

.magnet {
  position: absolute;
  width: 200px;
  height: 100px;
  background-color: #ff0000;
  border-radius: 50px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0px 0px 10px #000;
  background: linear-gradient(to right, #ff0000 50%, #000 50%);
  z-index: 1;
}

.object {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}
.circle {
  border: 3px solid #FFF;
}

.square {
  border: 3px solid #FFF;
}

.object.triangle {
  width: 0;
  height: 0;
  clip-path: polygon(0 0, 0 100%, 100% 0);
  background-color: #FFF;
  border-radius: 0;
  transform: rotate(45deg);
  border: 3px solid #FFF;
}