:root {
  color-scheme: only dark;
  --red: #e10b15;
  --red-dark: #a50810;
  --gold: #f5c04a;
  --cream: #f5efe6;
  --shadow: rgba(0, 0, 0, 0.55);
  --ease-out: cubic-bezier(0.12, 0.7, 0.18, 1);
}

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

body {
  font-family: "Montserrat", "Arial", sans-serif;
  min-height: 100vh;
  background: #0b0707;
  color: #fff;
}

button {
  font-family: inherit;
}

.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 top / cover no-repeat;
  z-index: 0;
}

.scene__shade {
  position: absolute;
  inset: 0;
  background: url("source/bg_sh.png") center bottom / cover no-repeat;
  z-index: 3;
  pointer-events: none;
}

.header {
  position: relative;
  /* width: min(92vw, 420px); */
  margin-top: 7vh;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  z-index: 5;
}

.logo {
  width: 72px;
  flex-shrink: 0;
  
}

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

.title {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 800;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.title__accent {
  color: var(--red);
  font-size: 3rem;
  font-weight: 700;
}

.title__value {
  color: var(--red);
  font-size: 2.9rem;
  font-weight: 900;
}

.title__sub {
  font-size: 1.28rem;
  font-weight: 600;
  color: #fff;
  margin-top: 5px;
}

.character {
    position: absolute;
    left: -200px;
    bottom: -130px;
    z-index: 2;
}

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

.wheel-area {
    position: relative;
    width: min(78vw, 340px);
    margin-top: 13vh;
    z-index: 4;
    right: -30vw;
    scale: 150%;
}

.wheel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.wheel__border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}

.wheel__spin {
  position: absolute;
  inset: 4.5%;
  display: grid;
  place-items: center;
  z-index: 1;
}

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

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

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

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

.spin-button {
  position: absolute;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%);
  width: min(74vw, 300px);
  padding: 0.95rem 1rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 10px 20px var(--shadow);
  z-index: 4;
}

.spin-button:active {

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

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

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

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 6, 0.88);
}

.modal__content {
  position: relative;
  width: min(86vw, 320px);
  background: #1a1212;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  padding: 1.8rem 1.5rem 1.6rem;
  text-align: center;
  z-index: 1;
}

.modal__content::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

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

.modal__body h2 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--gold);
  text-transform: uppercase;
}

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

.modal__button {
  border: none;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.wheel-area.is-winning .wheel__bg {
  filter: drop-shadow(0 0 20px rgba(255, 215, 120, 0.4));
}

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

@media (max-width: 380px) {
  .wheel-area {
    width: min(84vw, 300px);
  }

  .character img {
    width: 100%;
  }
.character {
  position: absolute;
    left: -200px;
    bottom: -270px;
    z-index: 2;
}
}


@media (min-width: 1200px) {



.wheel-area {

  width: 670px;

}

.spin-button {

  display: none;

}

.character {

        position: absolute;
        left: -350px;
        bottom: -900px;
        z-index: 2;
        scale: 90%;
}

.scene__shade {
      bottom: -520px;
}

}


}
