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

body {
  background-color: #000;
  font-family: sans-serif;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
}

.background-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 100vh;
  overflow: hidden;
}

.bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.game-area {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 5vh 0 2vh 0;
}

/* Wheel Styling */
.wheel-container {
  position: relative;
  margin-top: 25vh;
  width: 90%;
  max-width: 400px;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reward {
  width: 92%;
  animation: idleSpin 1.5s linear infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reward img,
.frame img {
  width: 100%;
  height: auto;
  display: block;
}

.frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  pointer-events: none;
  z-index: 3;
}

/* Bottom Controls */
.bottom-controls {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 0px;
}

.models {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 500px;
  pointer-events: none;
  z-index: 4;
}

.models img {
  width: 100%;
  display: block;
}

.playButton {
  width: 65%;
  max-width: 250px;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.playButton:hover {
  transform: scale(1.05);
}

.playButton:active {
  transform: scale(0.95);
}

.playButton img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.arrow {
  position: absolute;
  bottom: 30px;
  width: 25px;
  z-index: 1;
  transform-origin: bottom center;
  animation: arrowSwing 2s ease-in-out infinite;
}

.arrow img {
  width: 50%;
  display: block;
  filter: drop-shadow(2px 4px 5px rgba(0, 0, 0, 0.6));
}

/* Animations */
@keyframes idleSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes arrowSwing {

  0%,
  100% {
    transform: translateX(-120px);
  }

  50% {
    transform: translateX(120px);
  }
}

@keyframes arrowShoot {
  0% {
    transform: rotate(0deg) translateY(0);
    opacity: 1;
  }
  100% {
    transform: rotate(0deg) translateY(-40vh);
    opacity: 1;
  }
}

/* Popups */
.popout-win1,
.popout-win2 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.popout-win1.show,
.popout-win2.show {
  display: flex;
  animation: popupFade 0.3s ease-out forwards;
}

@keyframes popupFade {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.image-win {
  width: 80%;
  max-width: 400px;
  animation: floatWin 3s ease-in-out infinite;
}

@keyframes floatWin {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.image-win img {
  width: 100%;
  display: block;
}

.buttons {
  width: 60%;
  max-width: 230px;
  margin-top: 30px;
  cursor: pointer;
  transition: transform 0.2s;
}

.buttons:hover {
  transform: scale(1.05);
}

.buttons:active {
  transform: scale(0.95);
}

.buttons img {
  width: 100%;
  display: block;
}