:root {
  color-scheme: dark;
  --bg: #080a0e;
  --surface: #15181e;
  --graphite: #20252d;
  --red: #e7483f;
  --red-deep: #9d1213;
  --gold: #f2c65a;
  --gold-hi: #fff0b2;
  --teal: #42d5c2;
  --cream: #fff7e8;
  --muted: #aeb4be;
  --line: rgba(255, 255, 255, .12);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--cream);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.stage {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  overflow: hidden;
  padding: 40px 4.6vw 24px;
  isolation: isolate;
  background:
    linear-gradient(112deg, rgba(88, 11, 18, .36), transparent 34%),
    linear-gradient(292deg, rgba(2, 54, 55, .22), transparent 35%),
    var(--bg);
}

.stage::before,
.stage::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.stage::before {
  inset: 9% -10% -25% 37%;
  border: 1px dashed rgba(242, 198, 90, .18);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.stage::after {
  right: -10%;
  bottom: -55%;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(231, 72, 63, .16);
  border-radius: 50%;
}

.stage-lines {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background:
    linear-gradient(153deg, transparent 65%, rgba(66, 213, 194, .33) 65.1%, transparent 65.3%),
    linear-gradient(168deg, transparent 68%, rgba(242, 198, 90, .3) 68.1%, transparent 68.3%),
    linear-gradient(18deg, transparent 72%, rgba(231, 72, 63, .24) 72.1%, transparent 72.3%),
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(255, 255, 255, .045) 64px 65px);
}

.topbar,
.footer {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar {
  min-height: 72px;
}

.brand-lockup,
.live-summary,
.live-pill,
.eyebrow,
.qr-status,
.wheel-state,
.demo-button,
.phone-prompt {
  display: inline-flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
  color: var(--gold-hi);
  font-size: 20px;
  font-weight: 650;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
}

.brand-mark svg,
.pointer svg,
.prize-icon svg,
.phone-prompt svg,
.demo-button svg {
  width: 100%;
  height: 100%;
}

.live-summary {
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 16px;
  white-space: nowrap;
}

.live-summary strong {
  color: #d8dbe1;
}

.live-pill,
.qr-status,
.wheel-state {
  gap: 8px;
  border: 1px solid rgba(66, 213, 194, .35);
  border-radius: 999px;
  background: rgba(14, 49, 46, .88);
}

.live-pill {
  padding: 9px 16px;
  color: #c4fff5;
  font-weight: 650;
}

.live-pill i,
.qr-status i,
.wheel-state i,
.eyebrow i {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(66, 213, 194, .82);
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(460px, 650px) minmax(590px, 1fr);
  align-items: center;
  gap: 4.5vw;
  width: 100%;
  max-width: 1744px;
  margin: 8px auto 12px;
}

.intro-panel {
  align-self: center;
  min-width: 0;
}

.eyebrow {
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid rgba(231, 72, 63, .54);
  border-radius: 999px;
  background: rgba(88, 17, 23, .86);
  color: #ffe09a;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.eyebrow i {
  width: 7px;
  height: 7px;
  background: var(--gold);
  box-shadow: none;
}

h1 {
  max-width: 650px;
  margin: 16px 0 6px;
  color: var(--cream);
  font-size: 68px;
  line-height: 1.13;
  font-weight: 850;
  letter-spacing: 0;
}

.lead {
  margin: 0 0 22px;
  color: #bdc1ca;
  font-size: 24px;
  line-height: 1.62;
  font-weight: 550;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 520px);
  padding: 18px 24px 16px;
  border: 1px solid rgba(242, 198, 90, .42);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 0 24px 54px -20px rgba(231, 72, 63, .42);
  color: #101216;
}

.qr-card h2 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.35;
}

.qr-card > p {
  margin: 9px 0 0;
  color: #656971;
  font-size: 13px;
}

.qr-window {
  position: relative;
  display: block;
  width: min(31vh, 320px);
  min-width: 218px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #dadddf;
  border-radius: 4px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.qr-window:focus-visible,
.demo-button:focus-visible,
.draw-button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

.qr-code {
  display: block;
  width: 100%;
  height: 100%;
}

.scan-line {
  position: absolute;
  z-index: 2;
  top: 7%;
  left: 7%;
  width: 86%;
  height: 4px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  box-shadow: 0 0 10px 2px rgba(66, 213, 194, .72);
}

.scan-success {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  width: 78%;
  padding: 13px 16px;
  border: 1px solid rgba(66, 213, 194, .72);
  border-radius: 8px;
  background: rgba(246, 255, 252, .96);
  box-shadow: 0 12px 30px rgba(8, 48, 43, .24);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.88);
  color: #083f38;
  pointer-events: none;
}

.scan-success svg {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
}

.scan-success strong {
  font-size: 17px;
}

.scan-success small {
  color: #4c665f;
  font-size: 11px;
}

.qr-status {
  margin-top: 10px;
  padding: 6px 14px;
  border: 0;
  background: #edf1ef;
  color: #12534c;
  font-size: 14px;
  font-weight: 650;
  transition: background .2s ease, color .2s ease;
}

.qr-status i {
  width: 7px;
  height: 7px;
  box-shadow: none;
}

.wheel-zone {
  position: relative;
  min-width: 0;
}

.wheel-kicker {
  margin: 0 0 -18px 4%;
  color: var(--gold);
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.wheel-scene {
  position: relative;
  width: min(72vh, 760px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}

.wheel-scene::before,
.wheel-scene::after {
  position: absolute;
  inset: 5%;
  z-index: -1;
  content: "";
  border: 1px dashed rgba(242, 198, 90, .25);
  border-radius: 50%;
}

.wheel-scene::after {
  inset: 1%;
  border-style: solid;
  border-color: rgba(231, 72, 63, .15);
}

.rotor {
  position: absolute;
  inset: 3.6%;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .38));
  will-change: transform;
}

.wheel-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.prize-labels {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

.pointer {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 50%;
  width: 11.5%;
  max-width: 92px;
  transform: translateX(-50%);
  transform-origin: 50% 34%;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .5));
}

.draw-button {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 23.4%;
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid var(--gold-hi);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #f35b4f, var(--red-deep) 78%);
  box-shadow: 0 0 0 7px var(--gold), 0 0 25px rgba(242, 198, 90, .36), inset 0 3px 6px rgba(255, 240, 178, .25);
  color: var(--cream);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: filter .2s ease, transform .2s ease;
}

.draw-button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translate(-50%, -50%) scale(1.035);
}

.draw-button:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(.98);
}

.draw-button:disabled {
  cursor: wait;
}

.draw-button strong {
  font-family: Inter, system-ui, sans-serif;
  font-size: 44px;
  line-height: 1;
}

.draw-button span {
  margin-top: 5px;
  color: var(--gold-hi);
  font-size: 14px;
  font-weight: 800;
}

.wheel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: -12px;
}

.wheel-state {
  padding: 8px 15px;
  border-color: rgba(242, 198, 90, .3);
  background: rgba(31, 36, 44, .94);
  color: #dfe2e8;
  font-size: 14px;
}

.wheel-state i {
  width: 7px;
  height: 7px;
  background: var(--gold);
  box-shadow: none;
}

.demo-button {
  gap: 7px;
  min-height: 38px;
  padding: 7px 14px 7px 10px;
  border: 1px solid rgba(66, 213, 194, .32);
  border-radius: 999px;
  background: rgba(10, 57, 53, .6);
  color: #bcfff5;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.demo-button svg {
  width: 20px;
  height: 20px;
}

.demo-button:hover:not(:disabled) {
  background: rgba(12, 79, 72, .76);
}

.demo-button:disabled {
  opacity: .58;
  cursor: wait;
}

.confetti {
  position: absolute;
  z-index: 7;
  inset: 3%;
  opacity: 0;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: block;
  width: 8px;
  height: 30px;
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
  transform: rotate(var(--r)) scale(.6);
}

.winner-panel {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(70%, 560px);
  min-height: 43%;
  padding: 26px 32px;
  border: 2px solid rgba(242, 198, 90, .9);
  border-radius: 8px;
  background: rgba(13, 16, 22, .96);
  box-shadow: 0 0 40px rgba(242, 198, 90, .28), 0 24px 44px rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 28px)) scale(.86);
  text-align: center;
}

.winner-panel p {
  margin: 0 0 5px;
  color: var(--gold);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.winner-panel h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.3;
}

.prize-icon {
  display: block;
  width: 66px;
  height: 66px;
  margin: 12px 0 5px;
}

.winner-panel > strong {
  color: #ffe09a;
  font-size: 27px;
}

.winner-panel > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.phone-prompt {
  gap: 7px;
  margin-top: 13px;
  padding: 7px 13px;
  border: 1px solid rgba(231, 72, 63, .55);
  border-radius: 999px;
  background: rgba(94, 18, 24, .86);
  color: #ffe09a;
  font-size: 13px;
  font-weight: 650;
}

.phone-prompt svg {
  width: 16px;
  height: 16px;
}

.footer {
  min-height: 32px;
  color: #7f858f;
  font-size: 12px;
}

.footer p {
  margin: 0 auto 0 0;
}

.footer time {
  color: rgba(242, 198, 90, .8);
  white-space: nowrap;
}

.phase-idle .scan-line {
  opacity: .58;
  animation: idleScan 2.8s ease-in-out infinite;
}

.phase-scan .qr-window,
.phase-success .qr-window {
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(66, 213, 194, .38);
}

.phase-scan .scan-line {
  opacity: .88;
  animation: scanPass 1.15s ease-in-out forwards;
}

.phase-success .scan-success {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .2s ease, transform .32s cubic-bezier(.2, 1.35, .4, 1);
}

.phase-success .qr-status {
  background: #dcf7ef;
  color: #075e50;
}

.phase-spin .rotor {
  animation: wheelSpin 4.3s forwards;
}

.phase-spin .pointer {
  animation: pointerTick .22s ease-in-out infinite;
}

.phase-spin .draw-button {
  animation: hubPulse .65s ease-in-out infinite alternate;
}

.phase-win .rotor {
  transform: rotate(-2947.5deg);
}

.phase-win .winner-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .28s ease-out, transform .48s cubic-bezier(.2, 1.3, .35, 1);
}

.phase-win .confetti {
  opacity: 1;
}

.phase-win .confetti i {
  animation: confettiBurst .78s cubic-bezier(.15, .8, .2, 1) forwards;
  animation-delay: var(--d);
}

.phase-win .draw-button {
  visibility: hidden;
}

@keyframes idleScan {
  0%, 100% { transform: translateY(0); opacity: 0; }
  14%, 80% { opacity: .55; }
  86% { transform: translateY(calc(27vh - 32px)); opacity: 0; }
}

@keyframes scanPass {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: .88; }
  88% { opacity: .88; }
  100% { transform: translateY(calc(31vh - 36px)); opacity: 0; }
}

@keyframes wheelSpin {
  0% { transform: rotate(0); animation-timing-function: ease-in; }
  12% { transform: rotate(-450deg); animation-timing-function: linear; }
  55% { transform: rotate(-2430deg); animation-timing-function: cubic-bezier(.08, .72, .18, 1); }
  90% { transform: rotate(-2962.5deg); animation-timing-function: ease-out; }
  100% { transform: rotate(-2947.5deg); }
}

@keyframes pointerTick {
  0%, 100% { transform: translateX(-50%) rotate(0); }
  55% { transform: translateX(-50%) rotate(9deg); }
}

@keyframes hubPulse {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(-50%, -50%) scale(1.065); }
}

@keyframes confettiBurst {
  0% { opacity: 0; transform: translate(0, 0) rotate(var(--r)) scale(.6); }
  35% { opacity: 1; }
  100% { opacity: .9; transform: translate(0, 42px) rotate(calc(var(--r) + 120deg)) scale(1); }
}

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

@media (max-width: 1600px), (max-height: 850px) {
  .stage { padding-top: 26px; padding-bottom: 16px; }
  .topbar { min-height: 56px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-lockup { font-size: 17px; }
  .live-summary { font-size: 14px; }
  .live-pill { padding: 7px 13px; }
  .experience-grid { grid-template-columns: minmax(390px, 540px) minmax(520px, 1fr); gap: 3vw; margin-top: 0; }
  h1 { margin-top: 12px; font-size: 54px; }
  .lead { margin-bottom: 16px; font-size: 20px; line-height: 1.5; }
  .qr-card { width: 440px; padding-top: 13px; padding-bottom: 11px; }
  .qr-card h2 { margin-bottom: 7px; font-size: 18px; }
  .qr-window { width: min(29vh, 272px); min-width: 210px; }
  .wheel-scene { width: min(73vh, 670px, 100%); }
  .draw-button strong { font-size: 38px; }
  .winner-panel h2 { font-size: 27px; }
  .winner-panel > strong { font-size: 23px; }
  .footer { font-size: 11px; }
}

@media (max-width: 1050px) {
  .stage { min-height: 100svh; overflow: auto; padding: 22px 24px 18px; }
  .topbar { align-items: flex-start; }
  .live-summary { flex-wrap: wrap; max-width: 380px; }
  .experience-grid { grid-template-columns: 1fr; gap: 32px; max-width: 760px; margin: 32px auto; }
  .intro-panel { text-align: center; }
  h1 { margin-right: auto; margin-left: auto; }
  .qr-card { margin: 0 auto; }
  .wheel-zone { width: 100%; }
  .wheel-kicker { margin-left: 0; text-align: center; }
  .wheel-scene { width: min(82vw, 680px); }
  .footer { flex-wrap: wrap; justify-content: center; }
  .footer p { flex: 1 0 100%; margin: 0; text-align: center; }
}

@media (max-width: 640px) {
  .stage { padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); }
  .topbar { display: grid; gap: 12px; }
  .brand-lockup { font-size: 15px; }
  .brand-mark { width: 34px; height: 34px; }
  .live-summary { justify-content: flex-start; gap: 8px; font-size: 12px; white-space: normal; }
  .live-pill { padding: 6px 10px; }
  .experience-grid { margin-top: 22px; }
  .eyebrow { font-size: 12px; }
  h1 { font-size: 40px; }
  .lead { font-size: 17px; }
  .qr-card { width: 100%; padding-right: 16px; padding-left: 16px; }
  .qr-window { width: min(74vw, 300px); }
  .wheel-scene { width: min(92vw, 560px); }
  .wheel-kicker { margin-bottom: -8px; }
  .prize-labels { font-size: 18px; }
  .draw-button strong { font-size: 30px; }
  .draw-button span { font-size: 11px; }
  .wheel-controls { flex-wrap: wrap; margin-top: 2px; }
  .winner-panel { width: 82%; padding: 20px 18px; }
  .winner-panel h2 { font-size: 23px; }
  .winner-panel > strong { font-size: 20px; }
  .footer { margin-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .phase-spin .rotor,
  .phase-win .rotor {
    transform: rotate(-2947.5deg);
  }

  .confetti {
    display: none;
  }
}
