.pill-container {
  position: relative;
  perspective: 1000px;
}
.pill-container .circle {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  -webkit-transition: 0.5s;
  -moz-transition: 0.5s;
  -o-transition: 0.5s;
  transition: 0.5s;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transition-timing-function: cubic-bezier(0.785, 0.135, 0.15, 0.86);
  box-shadow: 0px 10px 20px -10px rgb(0, 0, 0);
}
.pill-container .cfront,
.pill-container .cback {
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 50%;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -o-backface-visibility: hidden;
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
}
.pill-container .cfront {
  z-index: 2;
}
.pill-container .cback {
  -webkit-transform: rotate3d(45, 45, 0, 180deg);
  -ms-transform: rotate3d(45, 45, 0, 180deg);
  -o-transform: rotate3d(45, 45, 0, 180deg);
  transform: rotate3d(45, 45, 0, 180deg);
}
.pill-container .cfront img,
.pill-container .cback img {
  width: 100%;
}
.pill-container:hover .circle {
  -webkit-transform: rotate3d(45, 45, 0, 180deg);
  -ms-transform: rotate3d(45, 45, 0, 180deg);
  -o-transform: rotate3d(45, 45, 0, 180deg);
  transform: rotate3d(45, 45, 0, 180deg);
  box-shadow: 10px -10px 20px -10px rgb(0, 0, 0);
}
@media (min-width: 992px) {
  .pill-container {
    margin: 0px 15px 15px;
  }
  .pill-container .circle,
  .pill-container .cfront,
  .pill-container .cback {
    width: 50px;
    height: 50px;
  }
}
