* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.container {
  display: flex;
  flex-direction: column;
  height: 80vh;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

#coin {
  height: 360px;
  width: 360px;
  position: relative;
  margin: 0;
  transform-style: preserve-3d;
}

#coin img {
  width: 360px;
}

.tails {
  transform: rotateX(180deg);
}

.heads,
.tails {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

@keyframes flip-heads {
  0% {
    transform: rotateX(0);
  }
  100% {
    transform: rotateX(2520deg);
  }
}

@keyframes flip-tails {
  0% {
    transform: rotateX(0);
  }
  100% {
    transform: rotateX(2340deg);
  }
}
