/*-------------------------------------------Body & HTML---------------------------------------------*/
body, html {
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

/*-------------------------------------------Background Image---------------------------------------------*/
#bg {
  width: 100%;
  height: auto;
}

/*-------------------------------------------Redirect Button---------------------------------------------*/
.text {
  top: 20%;
}

.text img {
  width: 65%;
  animation: pulse 1.5s infinite linear;
}

.coin-bunga {
  top: 40%;
  position: absolute;
  width: 100%;
  text-align: center;
}

.coin-bunga img {
  width: 39%;
  opacity: 0;
  transform: rotateY(0deg);
}

.coin-kepala {
  top: 40%;
  position: absolute;
  width: 100%;
  text-align: center;
}

.coin-kepala img {
  width: 39%;
  opacity: 1;
  transform: rotateY(0deg);
}

.redirect-btn {
  top: 83%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}

.redirect-btn picture {
  flex: 0 0 auto;
  width: 45%;
  max-width: 320px;
}

.redirect-btn img {
  width: 100%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.coin-bunga.flip-to-bunga img {
  animation: fastFlipToBunga 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

.coin-kepala.flip-to-bunga img {
  animation: fastFlipToBungaBack 3s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    forwards !important;
}

.coin-bunga.flip-to-kepala img {
  animation: fastFlipToKepalaFront 3s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    forwards !important;
}

.coin-kepala.flip-to-kepala img {
  animation: fastFlipToKepala 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 998;
}

.popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.popup {
  top: 19%;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
  z-index: 999;
}

.popup.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.popup img {
  width: 90%;
}

.btn-popup {
  top: 64%;
  left: 2%;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
  transition-delay: 0.2s;
  z-index: 1000;
}

.btn-popup.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.btn-popup img {
  width: 55%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

/*-------------------------------------------Keyframe Animation---------------------------------------------*/
@keyframes pulse {
  0% {
    transform: scale(0.9);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(0.9);
  }
}

@keyframes flipFront {
  0% {
    transform: rotateY(0deg);
  }

  25% {
    transform: rotateY(90deg);
  }

  50% {
    transform: rotateY(180deg);
  }

  75% {
    transform: rotateY(270deg);
  }

  100% {
    transform: rotateY(360deg);
  }
}

@keyframes flipBack {
  0% {
    transform: rotateY(180deg);
  }

  25% {
    transform: rotateY(270deg);
  }

  50% {
    transform: rotateY(360deg);
  }

  75% {
    transform: rotateY(450deg);
  }

  100% {
    transform: rotateY(540deg);
  }
}

@keyframes fastFlipToBunga {
  0% {
    transform: rotateY(0deg);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  22% {
    opacity: 0;
  }
  28% {
    opacity: 1;
  }
  47% {
    opacity: 0;
  }
  53% {
    opacity: 1;
  }
  72% {
    opacity: 0;
  }
  78% {
    opacity: 1;
  }
  90% {
    transform: rotateY(1800deg);
    opacity: 1;
  }
  100% {
    transform: rotateY(1800deg);
    opacity: 1;
  }
}

@keyframes fastFlipToBungaBack {
  0% {
    transform: rotateY(0deg);
    opacity: 1;
  }
  22% {
    opacity: 1;
  }
  28% {
    opacity: 0;
  }
  47% {
    opacity: 1;
  }
  53% {
    opacity: 0;
  }
  72% {
    opacity: 1;
  }
  78% {
    opacity: 0;
  }
  90% {
    transform: rotateY(1800deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(1800deg);
    opacity: 0;
  }
}

@keyframes fastFlipToKepalaFront {
  0% {
    transform: rotateY(0deg);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  22% {
    opacity: 0;
  }
  28% {
    opacity: 1;
  }
  47% {
    opacity: 0;
  }
  53% {
    opacity: 1;
  }
  72% {
    opacity: 0;
  }
  78% {
    opacity: 1;
  }
  90% {
    transform: rotateY(1800deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(1800deg);
    opacity: 0;
  }
}

@keyframes fastFlipToKepala {
  0% {
    transform: rotateY(0deg);
    opacity: 1;
  }
  22% {
    opacity: 1;
  }
  28% {
    opacity: 0;
  }
  47% {
    opacity: 1;
  }
  53% {
    opacity: 0;
  }
  72% {
    opacity: 1;
  }
  78% {
    opacity: 0;
  }
  85% {
    opacity: 1;
  }
  90% {
    transform: rotateY(1800deg);
    opacity: 1;
  }
  100% {
    transform: rotateY(1800deg);
    opacity: 1;
  }
}

/*-------------------------------------------Multi Device Screen Size---------------------------------------------*/
/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  #bg {
    height: 100vh;
  }
}
