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

.container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  overflow: hidden;
}

.background {
  position: relative;
  width: 550px;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.background img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.main-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  max-width: 550px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.text {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.text img {
  width: 100%;
  height: 100%;
  max-width: 300px;
  object-fit: cover;
}

.backframe {
  position: absolute;
  top: 41%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.backframe img {
  width: 80%;
  height: 80%;
  object-fit: cover;
}
.backframe2 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  overflow: hidden;
}
.backframe2 img {
  width: 100%;
  height: auto;
  max-width: 500px;
}
.spingstyle {
  position: absolute;
  top: 46%;
  width: 90%;
  height: 250px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: transform 0.8s ease;
  z-index: 10;
}
.reward {
  position: absolute;
  top: 90%;
  left: 50%;
  width: 450px;
  height: 450px;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 4s cubic-bezier(0.15, 0, 0.15, 1);
}
.reward img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes rotateWheel {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.frame {
  position: absolute;
  top: calc(28% + 250px);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transform: translateY(-50%);
}

.frame img {
  width: 100%;
  height: auto;
  max-width: 500px;
}

.buttonPlay {
  position: absolute;
  top: 85%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.buttonPlay img {
  width: 100%;
  height: 100%;
  max-width: 300px;
  object-fit: cover;
  cursor: pointer;
}
/* Popup styles */
.popoutwin1 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.popoutwin1.active {
  display: flex;
  animation: fadeIn 0.5s ease-out;
}

.image-win {
  width: 100%;
  max-width: 500px;
  margin-top: 220px; /* Shift content down */
  text-align: center;
}

.image-win img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

.buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin-top: 130px;
}

.buttons img {
  width: 200px;
  cursor: pointer;
}
/* Popoutwin2 style */
.popoutwin2 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.popoutwin2.active {
  display: flex;
}
@media (max-width: 440px) {
  .text {
    top: 20%;
  }
  .text img {
    max-width: 250px;
  }
  .backframe {
    top: 43%;
  }
  .backframe img {
    width: 85%;
  }
  .backframe2 {
    top: 60%;
    width: 450px;
  }
  .backframe2 img {
    width: 95%;
  }
  .spingstyle {
    height: 230px;
    width: 500px;
    top: 54%;
  }
  .frame {
    top: 64%;
  }
  .reward {
    width: 400px;
    height: 400px;
  }
  .buttonPlay {
    top: 88%;
  }
  .buttonPlay img {
    max-width: 250px;
  }
}

@media (max-width: 390px) {
  .text {
    top: 19%;
  }
  .text img {
    max-width: 230px;
  }
  .backframe {
    top: 43%;
  }
  .backframe2 {
    top: 61%;
    width: 400px;
  }
  .spingstyle {
    height: 200px;
    top: 56%;
    width: 380px;
  }
  .frame {
    top: 64%;
  }
  .reward {
    width: 350px;
    height: 350px;
  }
  .buttonPlay {
    top: 88%;
  }
  .buttons {
    margin-top: 150px;
  }
  .buttons img {
    width: 170px;
  }
}
@media (max-width: 360px) {
  .text {
    top: 18%;
  }
  .text img {
    max-width: 230px;
  }
  .backframe {
    top: 44%;
  }
  .backframe2 {
    top: 61%;
    width: 380px;
  }
  .spingstyle {
    height: 190px;
    top: 55%;
    width: 350px;
  }
  .frame {
    top: 65%;
  }
  .reward {
    width: 350px;
    height: 350px;
  }
  .buttonPlay {
    top: 88%;
  }
  .buttons {
    margin-top: 140px;
  }
  .buttons img {
    width: 150px;
  }
}
