:root {
  color-scheme: only dark;
  --gold: #f6c455;
  --gold-deep: #c58d1d;
  --dark: #0b0702;
  --ease-out: cubic-bezier(0.12, 0.7, 0.18, 1);
}

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

body {
  font-family: "Georgia", "Times New Roman", serif;
  background: radial-gradient(circle at 60% 40%, #503600 0%, #120c04 70%, #050301 100%);
  color: #fff;
  min-height: 100vh;
}

.scene {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.scene__bg {
  position: absolute;
  inset: 0;
  background: url("source/desktop.png") center / cover no-repeat;
  opacity: 0.92;
  z-index: 0;
}

.header {
  position: absolute;
  top: 5vh;
  left: 5vw;
  right: 5vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 3;
}

.title {
  font-family: "Libre Caslon Text", "Georgia", "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 200;
}

.title__light {
  color: #fff;
  opacity: 0.95;
}

.title__accent {
  color: var(--gold);
}

.logo {
  position: relative;
  width: clamp(120px, 10vw, 180px);
  aspect-ratio: 1 / 1;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.55) 45%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 5s ease-in-out infinite;
  pointer-events: none;
}

.character {
  position: absolute;
  bottom: 0;
  left: 4vw;
  
  z-index: 4;
}

.character img {
  width: 100%;
  height: auto;
  display: block;
}

.wheel-area {
    position: absolute;
    right: 16vw;
    bottom: 0vh;
    width: min(65vw, 680px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    z-index: 2;
}

.wheel-glow {
     position: absolute;
    /* inset: -25%; */
    display: grid;
    place-items: center;
    opacity: 0.8;
    transition: opacity 0.4s ease;
    z-index: 0;
    width: 200%;
}

.wheel-glow img {
  width: 150%;
  height: auto;
}

.wheel {
    position: relative;
    width: 126%;
    height: 100%;
    display: grid;
    place-items: center;
    z-index: 1;
}

.wheel__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: idle-spin 322s linear infinite;
  transition: transform 4.8s var(--ease-out);
}

.wheel__center {
  position: absolute;
  width: 32%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
}

.wheel__center img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wheel__center:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

.wheel-pointer {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  width: 18%;
  z-index: 4;
}

.wheel-pointer img {
  width: 100%;
  height: auto;
  display: block;
}

.coin {
  position: absolute;
  display: grid;
  place-items: center;
  animation: pulse 2.8s ease-in-out infinite;
}

.coin img {
  width: 100%;
  height: auto;
  display: block;
}

.coin--back {
  z-index: 0;
  opacity: 0.8;
}

.coin--front {
  z-index: 3;
}

.coin--one {
    width: 25%;
    top: 3%;
    left: 8%;
    animation-delay: -0.6s;
    animation-duration: 4.9s;
}

.coin--two {
width: 33%;
    bottom: 2%;
    left: -8%;
    animation-delay: -1.4s;
    animation-duration: 7.3s;
    animation-name: pulse-soft;
}

.coin--three {
    width: 22%;
    bottom: 14%;
    right: -16%;
    animation-delay: -0.2s;
    animation-duration: 5.5s;
    animation-name: pulse-warm;
    rotate: 30deg;
}

.modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 5;
}

.modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 2, 0, 0.82);
}

.modal__content {
  position: relative;
  width: min(90vw, 1040px);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  z-index: 1;
}

.modal__frame {
  position: absolute;
  inset: 0;
  scale: .75;
}

.modal__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal__body {
  position: relative;
  text-align: center;
  color: #fff;
  font-family: "Arial", sans-serif;
  z-index: 2;
  padding: 1.5rem 2rem 2rem;
}

.modal__body h2 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.modal__body p {
  font-size: clamp(1rem, 3.2vw, 1.5rem);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.modal__button {
    border: none;
    background: linear-gradient(180deg, #ffcf5f 0%, #c88b15 100%);
    color: #5b1e00;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 1rem 2.2rem;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    margin: 20px;
}

.modal__coin {
  position: absolute;
  width: 22%;
  animation: pulse 6.6s ease-in-out infinite;
  z-index: 0;
}

.modal__coin--left {
    left: 9%;
    top: 2%;
    scale: .75;
}

.modal__coin--right {
    right: 15%;
    bottom: -3%;
    animation-delay: -1.4s;
    z-index: 4;
    scale: .8;
}

.wheel-area.is-winning .wheel-glow {
  animation: glow 1.2s ease-in-out infinite;
  opacity: 1;
}

.wheel-area.is-winning .wheel__img {
  animation: wheel-flash 0.6s steps(2, end) infinite;
}

@keyframes idle-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.05) rotate(3deg);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    transform: scale(0.98) rotate(-2deg);
  }
  45% {
    transform: scale(1.04) rotate(2deg);
  }
}

@keyframes pulse-warm {
  0%,
  100% {
    transform: scale(1) rotate(1deg);
  }
  55% {
    transform: scale(1.08) rotate(-3deg);
  }
}

@keyframes glow {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 18px rgba(255, 199, 88, 0.3));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 35px rgba(255, 215, 120, 0.6));
  }
}

@keyframes wheel-flash {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

@keyframes shine {
  0% {
    transform: translateX(-140%);
  }
  30% {
    transform: translateX(140%);
  }
  100% {
    transform: translateX(140%);
  }
}


@media (min-width: 1920px) {
.wheel {
    width: 150%;
}

@media (min-width: 1439px) and (max-width: 1919px) {
.character {
    width: 38%;
}



@media (min-width: 380px) and (max-width: 768px) {
  .header {
    top: 4vh;
    left: 0;
    right: 0;
    justify-content: center;
  }

  .scene__bg {
      left: -270vw;
  }

  .title {
    font-size: 3.3rem;
    text-align: center;
    align-items: center;
    letter-spacing: 0;
  }

  .modal__frame {
    scale: 1.13;
    font-size: 1.1rem;
  }

  .modal__button {
    margin: 0;

  }

  .logo {
    position: fixed;
    right: 6vw;
    bottom: 4vh;
    width: clamp(90px, 18vw, 130px);
    z-index: 6;
  }

  .character {
    width: clamp(350px, 52vw, 340px);
    left: -22vw;
    bottom: -2vh;
  }

  .wheel-area {
    right: 50%;
    transform: translateX(50%);
    bottom: 26vh;
    width: min(92vw, 520px);
  }

  .coin--one {
    top: 13%;
    left: -2%;
  }

  .coin--two {
    left: 73%;
    top: -70%;
  }

  .coin--three {
    right: 4%;
    top: 75%;
  }

  .modal__content {
    width: min(92vw, 520px);
  }

  .modal__coin--left {
    left: -8%;
    top: -64%;
    scale: 0.42;
}
.modal__coin--right {
    right: 14%;
    bottom: -82%;
    animation-delay: -1.4s;
    z-index: 4;
    scale: 0.42;
}
}


@media (max-width: 380px) {

.title {
    font-size: clamp(2.2rem, 7vw, 3rem);
    text-align: center;
    align-items: center;
    }

.character {
    width: 75%;
    left: -22vw;
    bottom: -2vh;
    }

.wheel {
    position: relative;
    width: 116%;
    height: 100%;
    display: grid;
    place-items: center;
    z-index: 1;
}

.header {
    top: 4vh;
    left: 0;
    right: 0;
    justify-content: center;
  }

  .scene__bg {
      left: -270vw;
  }

  .modal__frame {
    scale: 1.13;
    font-size: 1.1rem;
  }

  .modal__button {
    margin: 0;

  }

  .logo {
    position: fixed;
    right: 6vw;
    bottom: 4vh;
    width: clamp(90px, 18vw, 130px);
    z-index: 6;
  }


  .wheel-area {
    right: 50%;
    transform: translateX(50%);
    bottom: 26vh;
    width: min(92vw, 520px);
  }

  .coin--one {
    top: 13%;
    left: -2%;
  }

  .coin--two {
    left: 73%;
    top: -70%;
  }

  .coin--three {
    right: 4%;
    top: 75%;
  }

  .modal__content {
    width: min(92vw, 520px);
  }

  .modal__coin--left {
    left: -8%;
    top: -64%;
    scale: 0.42;
}
.modal__coin--right {
    right: 14%;
    bottom: -82%;
    animation-delay: -1.4s;
    z-index: 4;
    scale: 0.42;
}

}


}
