/* ============================================================
   TRIVYA.AI — COSMIC DARK THEME
   ============================================================ */

:root {
  --bg-0: #050216;
  --bg-1: #0a0422;
  --ink: #F5EFFF;
  --ink-dim: #B5A9D6;
  --ink-mute: #6E638C;
  --cyan: #22D3EE;
  --violet: #A855F7;
  --magenta: #EC4899;
  --coral: #FB7185;
  --gold: #FACC15;
  --stroke: rgba(255,255,255,.08);
  --stroke-2: rgba(255,255,255,.14);
}

* { box-sizing: border-box }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  background: linear-gradient(180deg, rgba(5,2,22,.8), rgba(5,2,22,0));
}
.nav .brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font-weight: 600;
  letter-spacing: -.01em; font-size: 18px;
}
.nav .brand img {
  width: 30px; height: 30px; object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(168,85,247,.6));
}
.nav-links { display: flex; gap: 32px; font-size: 13.5px; font-weight: 500 }
.nav-links a { color: var(--ink-dim); text-decoration: none; transition: color .2s }
.nav-links a:hover, .nav-links a.active { color: #fff }
.nav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-radius: 999px;
  background: #fff; color: #0A0620;
  font-weight: 600; text-decoration: none; font-size: 13.5px;
  transition: transform .15s;
}
.nav-cta:hover { transform: translateY(-1px) }

/* ============ BACKGROUND STACK ============ */
.bg-base {
  position: absolute; inset: 0; z-index: -10;
  background: linear-gradient(180deg, #050216 0%, #0a0428 40%, #12073d 100%);
}
.bg-aurora {
  position: absolute; inset: -20%; z-index: -8;
  background:
    radial-gradient(60% 50% at 30% 30%, rgba(34,211,238,.35), transparent 60%),
    radial-gradient(55% 55% at 70% 40%, rgba(168,85,247,.45), transparent 60%),
    radial-gradient(50% 50% at 50% 80%, rgba(236,72,153,.35), transparent 60%);
  filter: blur(80px); opacity: .85;
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate(0,0) scale(1) }
  50%  { transform: translate(4%,-3%) scale(1.05) }
  100% { transform: translate(-3%,2%) scale(.98) }
}
.bg-stars { position: absolute; inset: 0; z-index: -7; pointer-events: none }
.bg-stars span {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 6px #fff;
  animation: twinkle var(--dur,3s) ease-in-out infinite;
}
@keyframes twinkle {
  0%,100% { opacity: .15; transform: scale(.8) }
  50%     { opacity: .9; transform: scale(1.3) }
}
.bg-grain {
  position: absolute; inset: 0; z-index: -5; pointer-events: none;
  opacity: .4; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/></svg>");
}
.bg-vignette {
  position: absolute; inset: 0; z-index: -4; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(5,2,22,.7) 100%);
}

/* ============ HERO SHELL ============ */
.hero {
  position: relative; min-height: 100vh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 120px 40px 80px;
}

/* ============ SECTION 1 — THE WOW ============ */
.hero-1 { padding: 110px 40px 60px; min-height: 100vh; max-height: none }
.hero-1 .frame {
  position: relative; width: 100%; max-width: 1180px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
}

/* Logo stage */
.logo-stage {
  position: relative; width: clamp(140px, 18vh, 210px); aspect-ratio: 1;
  margin: 0 auto; display: grid; place-items: center;
}
.logo-stage::before {
  content: ""; position: absolute; inset: -10%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(236,72,153,.45), rgba(168,85,247,.3) 40%, transparent 70%);
  filter: blur(40px); animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .9; transform: scale(1) } 50% { opacity: 1; transform: scale(1.08) } }
.logo-stage img {
  width: 68%; height: auto;
  filter: drop-shadow(0 30px 60px rgba(168,85,247,.55)) drop-shadow(0 10px 20px rgba(236,72,153,.4));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(-10px) rotate(-1deg) } 50% { transform: translateY(10px) rotate(1deg) } }

/* Orbital rings */
.ring-orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(168,85,247,.25); pointer-events: none; animation: spin 28s linear infinite }
.ring-orbit.r2 { inset: -12%; border-color: rgba(34,211,238,.18); animation-duration: 42s; animation-direction: reverse; border-style: dashed }
.ring-orbit.r3 { inset: -25%; border-color: rgba(236,72,153,.12); animation-duration: 60s }
@keyframes spin { to { transform: rotate(360deg) } }
.ring-orbit .dot { position: absolute; top: 50%; left: -4px; width: 8px; height: 8px; border-radius: 50%; background: #22D3EE; box-shadow: 0 0 16px #22D3EE }
.ring-orbit.r2 .dot { background: #EC4899; box-shadow: 0 0 16px #EC4899; left: auto; right: -4px; top: 50% }
.ring-orbit.r3 .dot { background: #FACC15; box-shadow: 0 0 16px #FACC15; top: -4px; left: 50% }

/* Massive title */
.hero-1 .title {
  position: relative; z-index: 2; margin: 0; text-align: center;
  font-weight: 900; letter-spacing: -0.055em; line-height: .88;
  font-size: clamp(56px, 11vw, 160px);
  background: linear-gradient(180deg, #ffffff 0%, #C9B8F5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance;
}
.hero-1 .title .serif {
  display: inline-block;
  font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; letter-spacing: -0.025em;
  background: linear-gradient(92deg, #22D3EE 0%, #A855F7 45%, #EC4899 80%, #FB7185 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 40px rgba(168,85,247,.55));
  transform: translateY(.02em);
}

/* Kicker */
.hero-1 .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--stroke-2); background: rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: 600; margin-bottom: 2px;
}
.hero-1 .kicker .k-dot { width: 5px; height: 5px; border-radius: 50%; background: linear-gradient(135deg,#EC4899,#A855F7); box-shadow: 0 0 10px #A855F7 }

.hero-1 .tag {
  text-align: center; margin: 10px auto 0; max-width: 560px;
  color: var(--ink-dim); font-size: clamp(15px, 1.4vw, 18px); font-weight: 400; line-height: 1.55;
  text-wrap: balance;
}
.hero-1 .tag b { color: #fff; font-weight: 600 }

/* CTA row */
.cta-row { display: flex; gap: 14px; justify-content: center; align-items: center; margin-top: 22px; margin-bottom: 16px; flex-wrap: wrap; position: relative; z-index: 3 }

.btn-primary {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 34px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 16px; letter-spacing: .02em;
  color: #0A0620; background: #fff;
  box-shadow: 0 20px 50px -10px rgba(255,255,255,.35), 0 0 0 1px rgba(255,255,255,.2) inset;
  transition: transform .2s, box-shadow .25s; text-decoration: none;
}
.btn-primary::before {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; z-index: -1;
  background: linear-gradient(95deg,#22D3EE,#A855F7,#EC4899,#FB7185);
  opacity: .9; filter: blur(14px); animation: glow-pulse 3s ease-in-out infinite;
}
@keyframes glow-pulse { 0%,100% { opacity: .6 } 50% { opacity: 1 } }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 30px 70px -10px rgba(255,255,255,.5), 0 0 0 1px rgba(255,255,255,.3) inset }
.btn-primary svg { width: 14px; height: 14px; fill: currentColor }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 24px; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-family: inherit; font-weight: 500; font-size: 15px;
  color: var(--ink); background: transparent;
  border: 1px solid var(--stroke-2); transition: all .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.3) }
.btn-ghost svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2 }

/* Live pill */
.live-pill {
  position: absolute; top: 90px; right: 40px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--stroke-2); background: rgba(255,255,255,.03);
  backdrop-filter: blur(10px);
  font-size: 12px; letter-spacing: .06em; color: var(--ink-dim); z-index: 5;
}
.live-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #34D399; box-shadow: 0 0 8px #34D399; animation: pulse 1.8s ease-in-out infinite }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
.live-pill b { color: #fff; font-weight: 600 }

/* ============ SECTION HEADS ============ */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px }
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--stroke-2); background: rgba(255,255,255,.03);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 20px; font-weight: 500;
}
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: linear-gradient(135deg,#EC4899,#A855F7); box-shadow: 0 0 8px #A855F7; display: inline-block; vertical-align: middle; margin-right: 8px }
.h-big {
  font-weight: 800; font-size: clamp(38px,5vw,64px); line-height: 1;
  letter-spacing: -.025em; margin: 0 0 16px; text-wrap: balance; color: #fff;
}
.h-big .serif {
  font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: #C9B8F5;
}
.h-sub { font-size: 17px; color: var(--ink-dim); line-height: 1.55; margin: 0 auto; max-width: 560px; text-wrap: balance }

/* ============ HOW IT WORKS — 3-STEP LOOP ============ */
.how { padding: 120px 40px 60px }
.how-flow {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px;
  width: 100%; max-width: 1200px; align-items: stretch;
}
.step {
  position: relative;
  padding: 30px 34px 28px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid var(--stroke-2);
  overflow: hidden;
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .25s ease;
}
.step::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(150deg, var(--accent), transparent 60%, var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .5; pointer-events: none;
}
.step::after {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--accent), transparent 65%);
  filter: blur(50px); opacity: .28; pointer-events: none; transition: opacity .3s ease;
}
.step:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.26) }
.step:hover::after { opacity: .45 }

.ic-stage {
  position: relative; height: 170px;
  display: flex; align-items: center; justify-content: center;
  margin: -2px -8px 6px;
}
.ic-stage svg { overflow: visible; filter: drop-shadow(0 20px 40px color-mix(in oklab, var(--accent) 40%, transparent)) }
.step:hover .ic-stage .pop { animation-duration: 1.2s }

.step-num {
  position: absolute; top: 22px; right: 28px; z-index: 3;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 42px; line-height: 1; letter-spacing: -.03em;
  padding-right: .18em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .92; pointer-events: none;
}
.step-title { margin: 2px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.025em; color: #fff; line-height: 1.05 }
.step-desc { margin: 0; color: var(--ink-dim); font-size: 15px; line-height: 1.55; text-wrap: pretty }
.step-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--stroke-2); background: rgba(255,255,255,.04); font-size: 12px; color: var(--ink-dim); font-weight: 500; text-decoration: none }
.chip-dot { width: 6px; height: 6px; border-radius: 50% }
.chip-link { color: #fff; background: rgba(255,255,255,.08); transition: background .2s }
.chip-link:hover { background: rgba(255,255,255,.14) }
.arrow-sep { display: flex; align-items: center; justify-content: center; color: var(--ink-mute); min-width: 60px }
.arrow-sep svg { width: 70px; height: 22px }

/* ============ ICON ANIMATIONS ============ */
@keyframes halo-pulse { 0%,100% { transform: scale(1); opacity: .55 } 50% { transform: scale(1.12); opacity: .9 } }
@keyframes halo-pulse-slow { 0%,100% { transform: scale(1); opacity: .35 } 50% { transform: scale(1.2); opacity: .6 } }
@keyframes orb-spin { to { transform: rotate(360deg) } }
@keyframes pts-float { 0% { transform: translateY(0); opacity: 0 } 20% { opacity: 1 } 100% { transform: translateY(-60px); opacity: 0 } }
@keyframes answer-correct { 0%,20% { opacity: 0; transform: scale(.8) } 30%,70% { opacity: 1; transform: scale(1) } 80%,100% { opacity: 0; transform: scale(1.1) } }
@keyframes answer-wrong-shake { 0%,70% { opacity: 0; transform: translateX(0) } 75% { opacity: 1; transform: translateX(-3px) } 80% { transform: translateX(3px) } 85% { transform: translateX(-2px) } 90%,100% { opacity: 0; transform: translateX(0) } }
@keyframes check-draw { 0%,25% { stroke-dashoffset: 14 } 35%,65% { stroke-dashoffset: 0 } 75%,100% { stroke-dashoffset: 14 } }
@keyframes card-glow-cycle { 0%,25% { stroke: rgba(255,255,255,.18) } 35%,65% { stroke: #22D3EE } 75%,100% { stroke: rgba(255,255,255,.18) } }
@keyframes star-fly-a { 0% { transform: translate(0,0) scale(.6) rotate(0); opacity: 0 } 20% { opacity: 1 } 100% { transform: translate(-30px,-40px) scale(1.1) rotate(180deg); opacity: 0 } }
@keyframes star-fly-b { 0% { transform: translate(0,0) scale(.6) rotate(0); opacity: 0 } 20% { opacity: 1 } 100% { transform: translate(34px,-36px) scale(1.1) rotate(-180deg); opacity: 0 } }
@keyframes star-fly-c { 0% { transform: translate(0,0) scale(.6) rotate(0); opacity: 0 } 20% { opacity: 1 } 100% { transform: translate(-28px,30px) scale(1.1) rotate(160deg); opacity: 0 } }
@keyframes star-fly-d { 0% { transform: translate(0,0) scale(.6) rotate(0); opacity: 0 } 20% { opacity: 1 } 100% { transform: translate(30px,32px) scale(1.1) rotate(-160deg); opacity: 0 } }
@keyframes lid-bounce { 0%,100% { transform: translateY(0) rotate(-4deg) } 50% { transform: translateY(-6px) rotate(-10deg) } }
@keyframes beam-pulse { 0%,100% { opacity: .3; transform: scaleY(.9) } 50% { opacity: .85; transform: scaleY(1.1) } }
@keyframes confetti-burst { 0% { transform: translate(0,0) rotate(0); opacity: 0 } 15% { opacity: 1 } 100% { transform: translate(var(--tx,0), var(--ty,-40px)) rotate(var(--r,180deg)); opacity: 0 } }
@keyframes shimmer-mark { 0%,100% { opacity: .4; transform: scale(.8) } 50% { opacity: 1; transform: scale(1.2) } }
@keyframes num-burst {
  0%  { transform: translate(0,0) scale(.12); opacity: 0 }
  20% { opacity: 1 }
  55% { transform: translate(calc(var(--tx,0px) * .6), calc(var(--ty,0px) * .6)) scale(1.15); opacity: 1 }
  100% { transform: translate(var(--tx,0px), var(--ty,0px)) scale(1.6); opacity: 0 }
}
.ic2-num-rot { transform-box: fill-box }
.ic2-num-rot .nv { visibility: hidden; transform-box: fill-box; transform-origin: center }
.ic2-num-rot .nv.show { visibility: visible; animation: num-burst 1.4s cubic-bezier(.2,.7,.3,1) forwards }

/* ============ PREVIEW GRID ============ */
.preview-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px;
  width: 100%; max-width: 1120px; margin: 0 auto;
}
.ph-card {
  position: relative; padding: 22px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  border: 1px solid var(--stroke-2);
  display: flex; flex-direction: column; gap: 12px; min-height: 320px; overflow: hidden;
}
.ph-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.05) 50%, transparent 70%);
  transform: translateX(-100%); animation: shimmer-sweep 3.2s ease-in-out infinite;
}
@keyframes shimmer-sweep { 0% { transform: translateX(-100%) } 100% { transform: translateX(100%) } }
.ph-lg { min-height: 420px }
.ph-chrome { display: flex; gap: 6px; margin-bottom: 4px }
.ph-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.12) }
.ph-body { display: flex; flex-direction: column; gap: 12px; flex: 1 }
.shim {
  background: linear-gradient(90deg, rgba(255,255,255,.05) 0%, rgba(168,85,247,.16) 50%, rgba(255,255,255,.05) 100%);
  background-size: 300% 100%; animation: shimmer 2.4s linear infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.shim-line { height: 12px; width: 80% }

/* ============ REWARDS PAGE ============ */
.page {
  position: relative; min-height: 100vh; overflow: hidden; isolation: isolate;
  padding: 120px 40px 80px;
}

/* Header */
.rw-head { max-width: 1120px; margin: 0 auto 40px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap }
.rw-head-left { max-width: 680px }

/* Points balance card */
.pts {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 24px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(168,85,247,.18), rgba(34,211,238,.1));
  border: 1px solid var(--stroke-2);
  min-width: 230px; position: relative; overflow: hidden;
}
.pts::after {
  content: ""; position: absolute; inset: auto -30% -60% auto;
  width: 80%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle,#A855F7,transparent 65%); filter: blur(40px); opacity: .4;
}
.pts .lbl { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600 }
.pts .amt { font-size: 36px; font-weight: 800; letter-spacing: -.02em; color: #fff; font-feature-settings: "tnum" 1; line-height: 1 }
.pts .amt .u { font-size: 13px; color: var(--ink-dim); font-weight: 500; margin-left: 6px; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle }
.pts .sub { font-size: 12px; color: var(--ink-dim); display: flex; align-items: center; gap: 6px }
.pts .sub b { color: #fff; font-weight: 600 }

/* Filters */
.filters { max-width: 1120px; margin: 0 auto 22px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.filters .f {
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--stroke-2); background: rgba(255,255,255,.03);
  font-size: 13px; font-weight: 500; color: var(--ink-dim);
  cursor: pointer; transition: all .18s; font-family: inherit;
}
.filters .f:hover { color: #fff; border-color: rgba(255,255,255,.28) }
.filters .f.active { background: #fff; color: #0A0620; border-color: transparent; font-weight: 600 }
.filters .count { font-size: 11px; color: inherit; opacity: .6; margin-left: 4px }
.filters .f.active .count { opacity: .7 }

/* Rewards grid */
.rewards-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; width: 100%; max-width: 1120px; margin: 0 auto }
.rw {
  position: relative; padding: 22px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--stroke-2);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .2s, border-color .2s; cursor: pointer; overflow: hidden;
  text-decoration: none; color: inherit;
}
.rw:hover { transform: translateY(-3px); border-color: rgba(168,85,247,.45) }
.rw.feat { grid-column: span 2; min-height: 360px }
.rw.feat .rw-art { aspect-ratio: auto; flex: 1; min-height: 240px }
.rw-art {
  width: 100%; aspect-ratio: 16/10; border-radius: 14px;
  position: relative; overflow: hidden; background: #0f0630;
}
.rw-art::before { content: ""; position: absolute; inset: 0; background: var(--art); opacity: .9 }
.rw-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,transparent 40%, rgba(0,0,0,.45)) }
.rw-art .label {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #fff; font-weight: 600; opacity: .92;
}
.rw-art .badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(0,0,0,.4); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 600; color: #fff; letter-spacing: .02em;
  border: 1px solid rgba(255,255,255,.2);
}
.rw-body { display: flex; flex-direction: column; gap: 3px }
.rw-brand { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500 }
.rw-name { font-weight: 700; font-size: 17px; color: #fff; letter-spacing: -.01em }
.rw-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--stroke); margin-top: auto }
.rw-cost { display: flex; align-items: baseline; gap: 5px }
.rw-cost .n { font-weight: 700; color: #fff; font-size: 16px; font-feature-settings: "tnum" 1 }
.rw-cost .u { font-size: 11px; color: var(--ink-dim); letter-spacing: .12em; text-transform: uppercase }
.rw-arrow { color: var(--ink-dim); transition: transform .2s; font-size: 15px }
.rw:hover .rw-arrow { transform: translateX(4px); color: #fff }
.rw.locked { opacity: .55 }
.rw.locked:hover { transform: none; border-color: var(--stroke-2) }
.rw.locked .rw-cost .n { color: var(--ink-dim) }

/* Empty state */
.empty {
  grid-column: 1/-1; padding: 50px; text-align: center; color: var(--ink-dim);
  font-size: 15px; border: 1px dashed var(--stroke-2); border-radius: 18px;
  background: rgba(255,255,255,.015); display: none;
}
.empty.on { display: block }
.empty b { color: #fff; font-weight: 600; display: block; margin-bottom: 6px; font-size: 17px }

/* ============ FINAL CTA + FOOTER ============ */
.final-cta {
  max-width: 1120px; margin: 56px auto 0; padding: 36px 40px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--stroke-2);
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.final-cta h3 { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -.01em }
.final-cta p { margin: 0; color: var(--ink-dim); font-size: 14px }

.site-foot {
  max-width: 1120px; margin: 50px auto 0; padding-top: 24px;
  border-top: 1px solid var(--stroke);
  display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .1em;
  color: var(--ink-mute); flex-wrap: wrap; gap: 14px;
}
.site-foot a { color: var(--ink-mute); text-decoration: none; margin-left: 22px; cursor: pointer }
.site-foot a:hover { color: #fff }

/* ============ LOGIN PAGE ============ */
.login-container {
  max-width: 420px; margin: 0 auto; padding: 40px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  border: 1px solid var(--stroke-2); backdrop-filter: blur(14px);
  position: relative; z-index: 2;
}
.login-container h2 { text-align: center; font-weight: 800; font-size: 28px; color: #fff; margin: 0 0 8px }
.login-container .subtitle { text-align: center; color: var(--ink-dim); font-size: 14px; margin: 0 0 32px }

.form-group { margin-bottom: 20px }
.form-label { display: block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px; font-weight: 500 }
.form-input {
  width: 100%; padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--stroke-2); background: rgba(255,255,255,.04);
  color: #fff; font-family: inherit; font-size: 16px;
  transition: border-color .2s; outline: none;
}
.form-input:focus { border-color: var(--violet) }
.form-input::placeholder { color: var(--ink-mute) }

.phone-row { display: flex; align-items: stretch }
.country-code {
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px; min-width: 72px;
  border-radius: 14px 0 0 14px;
  border: 1px solid var(--stroke-2); border-right: 0;
  background: rgba(255,255,255,.08);
  color: #fff; font-weight: 600; font-size: 15px;
  letter-spacing: .02em; white-space: nowrap;
}

.otp-inputs { display: flex; gap: 10px; justify-content: center }
.otp-inputs input {
  width: 52px; height: 60px; text-align: center; font-size: 24px; font-weight: 700;
  border-radius: 14px; border: 1px solid var(--stroke-2); background: rgba(255,255,255,.04);
  color: #fff; font-family: inherit; outline: none; transition: border-color .2s;
}
.otp-inputs input:focus { border-color: var(--violet); background: rgba(168,85,247,.1) }

.btn-submit {
  width: 100%; padding: 16px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 16px;
  color: #0A0620; background: #fff;
  box-shadow: 0 20px 50px -10px rgba(255,255,255,.3);
  transition: transform .2s; margin-top: 8px;
}
.btn-submit:hover { transform: translateY(-2px) }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; transform: none }

.form-error { color: var(--coral); font-size: 13px; text-align: center; margin-top: 12px; min-height: 20px }
.form-step { display: none }
.form-step.active { display: block }

.resend-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--ink-dim) }
.resend-link a { color: var(--cyan); text-decoration: none; cursor: pointer; font-weight: 500 }
.resend-link a:hover { text-decoration: underline }

/* ============ GAME PAGE ============ */
.game-container {
  position: fixed; inset: 0; z-index: 40; background: var(--bg-0);
}
.game-container iframe {
  width: 100%; height: 100%; border: 0;
}
.game-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px; z-index: 41;
  background: var(--bg-0);
}
.game-loading img { width: 120px; height: auto; animation: float 6s ease-in-out infinite }
.game-loading .loading-text {
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: 600;
}
.game-loading .loading-bar {
  width: 200px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden;
}
.game-loading .loading-bar::after {
  content: ""; display: block; width: 40%; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  animation: loading-slide 1.5s ease-in-out infinite;
}
@keyframes loading-slide { 0% { transform: translateX(-100%) } 100% { transform: translateX(350%) } }

.game-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(5,2,22,.9), rgba(5,2,22,0));
  opacity: 0; transition: opacity .3s;
}
.game-nav:hover { opacity: 1 }

/* ============ PROFILE PAGE ============ */
.profile-grid {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 24px;
  max-width: 1120px; margin: 0 auto;
}
.profile-card {
  padding: 28px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--stroke-2);
}
.profile-card h3 { margin: 0 0 20px; font-size: 18px; color: #fff; font-weight: 700 }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  display: grid; place-items: center; font-size: 32px; font-weight: 800;
  color: #fff; margin: 0 auto 16px;
}
.stat-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--stroke) }
.stat-row:last-child { border-bottom: 0 }
.stat-label { font-size: 13px; color: var(--ink-dim) }
.stat-value { font-size: 15px; font-weight: 600; color: #fff }
.stat-value.coins {
  background: linear-gradient(90deg, var(--gold), var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.history-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--stroke);
}
.history-item:last-child { border-bottom: 0 }
.history-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 18px; flex-shrink: 0;
}
.history-info { flex: 1 }
.history-info .title { font-size: 14px; font-weight: 600; color: #fff; margin: 0 }
.history-info .date { font-size: 12px; color: var(--ink-mute); margin-top: 2px }
.history-amount { font-weight: 700; font-size: 14px }
.history-amount.positive { color: #34D399 }
.history-amount.negative { color: var(--coral) }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .how-flow { grid-template-columns: 1fr; gap: 14px; max-width: 540px }
  .arrow-sep { transform: rotate(90deg); min-width: 0; height: 36px }
  .arrow-sep svg { width: 60px; height: 20px }
  .how { padding: 90px 30px 50px }
  .preview-grid { grid-template-columns: 1fr 1fr }
  .rewards-grid { grid-template-columns: repeat(2,1fr) }
  .rw.feat { grid-column: span 2 }
  .profile-grid { grid-template-columns: 1fr }
  .final-cta { padding: 28px; flex-direction: column; align-items: flex-start; text-align: left }
}

@media (max-width: 720px) {
  .nav { padding: 14px 18px }
  .nav-links { display: none }
  .nav .brand { font-size: 16px }
  .nav-cta { padding: 9px 16px; font-size: 12.5px }
  .hero { padding: 100px 20px 50px }
  .hero-1 { padding: 100px 20px 50px }
  .hero-1 .title { font-size: clamp(44px, 12vw, 80px) }
  .logo-stage { width: clamp(100px, 30vw, 160px) }
  .live-pill { display: none }
  .preview-grid { grid-template-columns: 1fr }
  .page { padding: 100px 20px 50px }
  .rw-head { margin-bottom: 28px; flex-direction: column; align-items: stretch }
  .pts { min-width: 0; width: 100% }
  .rewards-grid { grid-template-columns: 1fr; gap: 14px }
  .rw.feat { grid-column: auto; min-height: 320px }
  .filters { gap: 6px }
  .filters .f { padding: 8px 13px; font-size: 12px }
  .final-cta { padding: 24px; border-radius: 20px }
  .final-cta h3 { font-size: 22px }
  .cta-row { width: 100% }
  .btn-primary, .btn-ghost { flex: 1; justify-content: center; padding: 14px 18px }
  .site-foot { flex-direction: column; align-items: flex-start; gap: 10px; font-size: 11px }
  .site-foot a { margin-left: 0; margin-right: 18px }
  .login-container { padding: 28px 20px; margin: 0 16px }
  .otp-inputs input { width: 44px; height: 52px; font-size: 20px }
  .profile-grid { grid-template-columns: 1fr }
}
