:root {
  --phone-w: min(92vw, 450px);
  --phone-h: min(94vh, 860px);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  background: #dcdcdc;
  display: grid;
  place-items: center;
  overflow: hidden;
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.page {
  width: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 14px;
}

.phone-shell {
  width: var(--phone-w);
  height: var(--phone-h);
  position: relative;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f9c6ae;
  box-shadow: var(--shadow);
}

.bg-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.14) 100%);
}

.spin-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  width: min(88%, 410px);
  padding: 28px 18px 22px;
  border-radius: 26px;
  background: rgba(67, 44, 31, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.hero {
  text-align: center;
  color: #fff;
  text-shadow: 0 4px 12px rgba(0,0,0,.32);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
  font-weight: 900;
}

.hero p {
  margin: 10px 0 0;
  font-size: clamp(1rem, 2.8vw, 1.45rem);
  font-weight: 800;
}

.wheel-wrap {
  position: relative;
  margin: 18px auto 0;
  width: min(100%, 365px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  isolation: isolate;
}

.wheel {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 5.9s cubic-bezier(0.12, 0.8, 0.18, 1);
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  clip-path: circle(49.82% at 50% 50%);
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.25));
}

.wheel-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(255, 210, 53, 0.9);
  z-index: 2;
  pointer-events: none;
}

.wheel-wrap::after {
  content: "";
  position: absolute;
  inset: 3.2%;
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(255, 184, 0, 0.18);
  z-index: 1;
  pointer-events: none;
}

.spin-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 25%;
  aspect-ratio: 1;
  background: transparent;
  padding: 0;
  z-index: 4;
}

.spin-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform .2s ease;
}

.spin-btn:hover img { transform: scale(1.05); }
.spin-btn:active img { transform: scale(.96); }
.spin-btn:disabled { cursor: not-allowed; }
.spin-btn:disabled img { filter: grayscale(.15) brightness(.96); }

.pointer-highlight {
  position: absolute;
  right: 10.5%;
  top: 50%;
  transform: translateY(-50%);
  width: 12%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,224,101,.55) 35%, rgba(255,208,0,0) 72%);
  filter: blur(2px);
  z-index: 1;
  pointer-events: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 30;
  transition: opacity .2s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.46);
}

.modal-panel {
  position: relative;
  width: min(92vw, 595px);
  background: #ececec;
  border-radius: 18px;
  padding: 22px 26px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.36);
  animation: popIn .28s ease;
}

.close-modal {
  position: absolute;
  top: -2px;
  right: 10px;
  background: transparent;
  color: #bdbdbd;
  font-size: 4rem;
  line-height: 1;
  padding: 0;
}

.modal-panel h2 {
  margin: 0 24px 8px;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  color: #534d4d;
}

.modal-prize {
  width: min(54%, 220px);
  display: block;
  margin: 10px auto 12px;
}

.modal-text {
  margin: 0 auto 24px;
  max-width: 90%;
  color: #171717;
  font-size: clamp(1.05rem, 2.7vw, 1.25rem);
  line-height: 1.55;
}

.claim-btn {
  min-width: min(86%, 345px);
  background: #72c272;
  color: #fff;
  font-weight: 900;
  font-size: clamp(1rem, 2.7vw, 1.2rem);
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.08);
}

.claim-btn:hover { filter: brightness(1.03); }

@keyframes popIn {
  from { transform: scale(.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 520px) {
  body { background: #d9d9d9; }
  .page { padding: 0; }
  .phone-shell { width: 100vw; height: 100vh; }
  .spin-card {
    width: calc(100% - 34px);
    top: 52%;
    padding-inline: 14px;
  }
  .modal-panel {
    width: calc(100vw - 18px);
    border-radius: 16px;
    padding-inline: 16px;
  }
  .close-modal {
    font-size: 3rem;
    right: 8px;
  }
}
