:root {
  color-scheme: only dark;
  --red-dark: #7a1215;
  --red: #b01c1f;
  --red-bright: #d33134;
  --gold: #f7c54d;
  --gold-deep: #cc8a2d;
  --cream: #fff2cc;
  --shadow: rgba(0, 0, 0, 0.35);
  --ease-out: cubic-bezier(0.12, 0.7, 0.18, 1);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


body {
  font-family: "Montserrat", "Arial", sans-serif;
  background: var(--red-dark);
  color: #fff;
  min-height: 100vh;
}

.scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.header {
  position: relative;
  z-index: 3;
  padding-top: 5vh;
  text-align: center;
}

.title {
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.wheel-area {
position: relative;
width: min(86vw, 420px);
aspect-ratio: 1 / 1;
margin-top: 6vh;
z-index: 2;
display: grid;
place-items: center;
}

.wheel-tips {
    position: absolute;
    inset: -15% -46% auto;
    width: 120%;
    z-index: 5;
    scale: 140%;
    pointer-events: none;
}

.wheel-tips img {
  width: 160%;
  height: auto;
  display: block;
}

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

.wheel__border {
  position: absolute;
  inset: 0;
  z-index: 3;
  scale: 105%;
}

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

.wheel__spin {
  position: absolute;
  inset: 6.5%;
  display: grid;
  place-items: center;
  z-index: 2;
  transition: transform 4.8s var(--ease-out);
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel__bg {
  width: 90%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.wheel__labels {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 2;
  pointer-events: none;
}

.wheel__label {
    position: absolute;
    left: 41%;
    top: 47%;
    --label-angle: calc(var(--i) * 30deg - 90deg);
    transform: rotate(var(--label-angle)) translateY(-350%) rotate(90deg);
    transform-origin: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: #d7ccca;
    text-shadow: 0 4px 5px rgb(14 13 13 / 30%), -1px 1px 0px rgb(172 0 0), 1px -1px 0px rgb(172 0 0), -1px -1px 0px rgb(172 0 0), 1px 1px 0px rgb(172 0 0);
    text-align: center;
    width: 3.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel__center {
  position: absolute;
  width: 34%;
  aspect-ratio: 1 / 1;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 4;
  color: #fff;
  font-weight: 700;
}

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

.wheel__center span {
  position: absolute;
  font-size: clamp(0.9rem, 3.4vw, 1.3rem);
  text-transform: uppercase;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  display: none;
}

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

.wheel-pointer {
  position: absolute;
  top: -4%;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 32px solid var(--gold);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
  z-index: 4;
  display: none;
}

.character {
    position: absolute;
    right: -94vw;
    bottom: -623px;
    width: 222vw;
    z-index: 3;
}

.character__shadow {
    position: absolute;
    bottom: -66%;
    right: -48%;
    width: 225%;
    opacity: 0.85;
    z-index: 0;
}

.character__shadow img,
.character__img {
  width: 100%;
  height: auto;
  display: block;
}

.character__img {
  position: relative;
  z-index: 1;
}

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

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

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.08), transparent 60%),
    rgba(53, 6, 8, 0.86);
  backdrop-filter: blur(6px);
}

.modal__content {
  position: relative;
   width: min(86vw, 360px);
  min-height: min(82vh, 680px);
  text-align: center;
  z-index: 1;
  display: grid;
  gap: 9rem;
  justify-items: center;
   padding: 5vh 0 6vh;
}



.modal__logo-image {
  width: min(62vw, 220px);
  height: auto;
  object-fit: contain;
}

.modal__bonus-image {
    width: min(78vw, 320px);
    height: auto;
    object-fit: contain;
    flex: 1;
    display: block;
    scale: 200%;
    top: -70px;
    position: relative;
}


.modal__gift {
  position: relative;
  width: 200px;
  height: 160px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.modal__gift-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 70px;
  background: linear-gradient(180deg, #fff, #f6e8ef);
  border-radius: 26px;
}

.modal__gift-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 110px;
  background: linear-gradient(180deg, #fff, #f5dfe5);
  border-radius: 30px;
}

.modal__gift-ribbon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 150px;
  background: linear-gradient(180deg, #ff6f7a, #d32a35);
  border-radius: 18px;
}

.modal__badge {
  background: linear-gradient(180deg, #f13a3f 0%, #b8141c 100%);
  padding: 0.8rem 1.2rem;
  border-radius: 18px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.modal__badge p {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.modal__badge span {
  font-size: 0.9rem;
}

.modal__button {
    border: none;
    background: linear-gradient(180deg, #ff5e63 0%, #c21921 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.9rem 2rem;
    border-radius: 30px;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 12px 18px rgba(0, 0, 0, 0.35);
    height: 70px;
}

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

@keyframes glow {
  0%,
  100% {
    filter: drop-shadow(0 0 6px rgba(255, 215, 120, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(255, 215, 120, 0.85));
  }
}

@media (min-width: 420px) {
  .wheel-pointer {
    border-left-width: 18px;
    border-right-width: 18px;
    border-bottom-width: 36px;
  }

  .modal__content {
    width: min(72vw, 380px);
  }
}

@media (max-width: 390px) {
  
.modal__content {
gap: 5.1rem;
}

}
@media (min-width: 768px) {
  .scene {

  }

  .wheel-area {
    width: min(55vw, 520px);
  }

  .character {
    width: min(40vw, 420px);
    right: 0;
    display: none;
  }
}
