/* =========================================================
   GEARHEAD CUSTOMS — Wheel of Fortune
   Palette: carbonio + cromo + blu elettrico (dal logo)
   ========================================================= */

/* ---------- 1. Reset & token ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }

:root {
  --bg:        #04060b;
  --bg-2:      #080d16;
  --panel:     rgba(255, 255, 255, .045);
  --panel-2:   rgba(255, 255, 255, .07);
  --line:      rgba(150, 190, 235, .14);
  --line-2:    rgba(150, 190, 235, .28);

  --blue:      #1e90ff;
  --blue-lt:   #4fc3ff;
  --blue-dk:   #0b57c9;
  --gold:      #ffb020;
  --purple:    #a855f7;

  --text:      #e9f1fb;
  --muted:     #8fa3bb;
  --muted-2:   #64778f;

  --chrome: linear-gradient(180deg, #ffffff 0%, #cfdcea 38%, #7d8fa4 55%, #eef5fd 78%, #b9c8d9 100%);
  --radius:  18px;
  --radius-lg: 28px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;
}

/* ---------- 2. Base ---------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -.02em; }
p { margin: 0; }

::selection { background: rgba(30, 144, 255, .35); }

.wrap { width: min(1240px, 92vw); margin-inline: auto; }
.center { text-align: center; }

/* la navbar è fissa: lascia spazio quando si salta a una sezione */
section[id] { scroll-margin-top: 88px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.chrome-text {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55));
}

.blue-text {
  background: linear-gradient(180deg, #a9dcff 0%, #2f9bff 48%, #0b57c9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(30, 144, 255, .5));
}

.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--blue-lt);
}

.lead { color: var(--muted); font-size: 1.02rem; max-width: 60ch; }

/* ---------- 3. Bottoni ---------- */
.btn {
  --btn-bg: linear-gradient(180deg, #2fa2ff, #0a5fd0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .85rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
  box-shadow: 0 10px 30px -10px rgba(30, 144, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .38);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(30, 144, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.6); }

.btn--ghost {
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: none;
  color: var(--text);
  backdrop-filter: blur(12px);
}
.btn--ghost:hover { background: var(--panel-2); box-shadow: 0 0 0 1px rgba(79, 195, 255, .3); }

.btn--chrome {
  background: linear-gradient(180deg, #f4f9ff 0%, #c3d2e2 45%, #8394a8 55%, #e8f1fb 100%);
  color: #06101d;
  box-shadow: 0 12px 34px -14px rgba(190, 220, 255, .7), inset 0 1px 0 #fff;
}

.btn--lg { padding: 1.05rem 2rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ---------- 4. Navbar ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding: .9rem 0;
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), border-color .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(4, 6, 11, .82);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.brand__logo { width: 46px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 0 14px rgba(30, 144, 255, .55)); }
.brand__text { line-height: 1.05; min-width: 0; }
.brand__name { font-weight: 900; font-size: 1.02rem; letter-spacing: -.01em; }
.brand__sub { font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted-2); }

.nav__links { display: flex; gap: .3rem; align-items: center; }
.nav__links a {
  padding: .5rem .95rem;
  border-radius: 999px;
  font-size: .9rem;
  color: #c2d2e4;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.nav__links a:hover { background: var(--panel); color: #fff; }

.nav__right { display: flex; gap: .5rem; align-items: center; flex: none; }

.nav__burger {
  display: none; width: 46px; height: 46px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); cursor: pointer;
}
.nav__burger span { display: block; width: 18px; height: 2px; background: var(--text); margin: 3px auto; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 8rem 0 3rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg { position: absolute; inset: 0; z-index: -3; background: var(--bg); }
.hero__bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(30, 120, 255, .34) 0%, transparent 62%),
    radial-gradient(60% 45% at 12% 22%, rgba(79, 195, 255, .16) 0%, transparent 70%),
    radial-gradient(70% 50% at 88% 12%, rgba(120, 60, 255, .16) 0%, transparent 72%),
    linear-gradient(180deg, #060c18 0%, #04060b 55%, #04060b 100%);
}
/* pavimento a griglia in prospettiva */
.hero__bg::after {
  content: '';
  position: absolute;
  left: -25%; right: -25%; bottom: -12%; height: 62%;
  background-image:
    linear-gradient(rgba(90, 170, 255, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 170, 255, .16) 1px, transparent 1px);
  background-size: 64px 44px;
  transform: perspective(560px) rotateX(70deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(180deg, transparent 0%, #000 45%, transparent 96%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%, transparent 96%);
  opacity: .55;
}

/* fasci di luce */
.beam {
  position: absolute; z-index: -2; top: -25%;
  width: 42vw; height: 130%;
  background: linear-gradient(180deg, rgba(60, 160, 255, .22), transparent 70%);
  filter: blur(60px);
  animation: sway 14s ease-in-out infinite alternate;
}
.beam--a { left: -8vw; transform: rotate(14deg); }
.beam--b { right: -10vw; transform: rotate(-16deg); animation-delay: -6s; background: linear-gradient(180deg, rgba(150, 90, 255, .18), transparent 70%); }
@keyframes sway { from { transform: translateX(-3vw) rotate(12deg); } to { transform: translateX(3vw) rotate(18deg); } }

.hero__grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hero__inner { position: relative; text-align: center; display: grid; justify-items: center; gap: 1.6rem; }

.pill {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .42rem .95rem .42rem .45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px);
  font-size: .84rem; color: #d6e4f3;
  box-shadow: 0 8px 30px -12px rgba(0, 0, 0, .8);
}
.pill__avatars { display: flex; }
.pill__avatars i {
  width: 26px; height: 26px; border-radius: 50%; display: block;
  border: 2px solid #0a121e; margin-right: -9px;
  background-size: cover;
}
.pill__avatars i:nth-child(1) { background: linear-gradient(140deg, #2fa2ff, #0a5fd0); }
.pill__avatars i:nth-child(2) { background: linear-gradient(140deg, #ffb020, #d97706); }
.pill__avatars i:nth-child(3) { background: linear-gradient(140deg, #a855f7, #6d28d9); margin-right: 3px; }
.pill b { color: #fff; font-weight: 700; }

.hero h1 { font-size: clamp(2.7rem, 8.4vw, 6.4rem); font-weight: 900; letter-spacing: -.035em; }
.hero h1 .line-2 {
  display: block;
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.01em;
  font-size: .96em;
  margin-top: .06em;
}

.hero__sub { color: #a9bdd4; max-width: 62ch; font-size: clamp(.95rem, 1.6vw, 1.08rem); }

/* form token */
.tokenbar {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .5rem .5rem 1.35rem;
  border-radius: 999px;
  background: rgba(10, 16, 26, .72);
  border: 1px solid rgba(160, 200, 240, .22);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -22px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .08);
  width: min(560px, 94vw);
  transition: border-color .3s, box-shadow .3s;
}
.tokenbar:focus-within { border-color: rgba(79, 195, 255, .65); box-shadow: 0 24px 60px -22px rgba(0, 0, 0, .95), 0 0 0 4px rgba(30, 144, 255, .16); }
.tokenbar.is-error { border-color: rgba(255, 86, 86, .7); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

.tokenbar input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  font-size: 1rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .7rem 0;
}
.tokenbar input::placeholder { color: var(--muted-2); letter-spacing: .04em; font-weight: 500; text-transform: none; }

.tokenbar .btn { padding: .8rem 1.3rem; white-space: nowrap; }
.tokenbar .btn .arrow {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: .85rem;
}

.form-msg { font-size: .88rem; min-height: 1.2em; font-weight: 600; }
.form-msg.ok { color: #4ade80; }
.form-msg.err { color: #ff6b6b; }
.form-msg.info { color: var(--muted); font-weight: 500; }

.btn--icon { flex: none; width: 52px; padding-inline: 0; font-size: 1.05rem; }

.spin-row__extra { display: flex; gap: .5rem; }
.cta__actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; position: relative; }

/* ---------- 6. Sezioni ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section--alt { background:
  radial-gradient(80% 60% at 50% 0%, rgba(30, 120, 255, .10), transparent 65%),
  linear-gradient(180deg, #04060b, #070c15 45%, #04060b); }

.section__head { display: grid; gap: .9rem; justify-items: center; text-align: center; margin-bottom: 3rem; }
.section__head h2 { font-size: clamp(1.9rem, 4.6vw, 3.2rem); font-weight: 900; }
.section__head h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* ---------- 7. Card ruote ---------- */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 1180px) { .tiers { grid-template-columns: repeat(2, 1fr); } }

.tier {
  --accent: var(--blue);
  position: relative;
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  gap: 1.1rem;
  align-content: start;
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.tier::before {
  content: '';
  position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 65%, transparent), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .8; pointer-events: none;
}
.tier::after {
  content: '';
  position: absolute; top: -60%; left: 50%; width: 140%; height: 120%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%);
  filter: blur(30px); opacity: 0; transition: opacity .45s; pointer-events: none;
}
.tier:hover { transform: translateY(-7px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 36px 70px -34px color-mix(in srgb, var(--accent) 70%, transparent); }
.tier:hover::after { opacity: 1; }
.tier.is-active { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 30px 60px -30px color-mix(in srgb, var(--accent) 70%, transparent); }

.tier__badge {
  position: absolute; top: 1.1rem; right: 1.1rem;
  font-size: .6rem; font-weight: 800; letter-spacing: .18em;
  padding: .3rem .6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: #fff;
}

.tier__disc { position: relative; width: 92px; height: 92px; }
.tier__disc svg { width: 100%; height: 100%; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 55%, transparent)); animation: slowspin 22s linear infinite; }
@keyframes slowspin { to { transform: rotate(360deg); } }

.tier__name { font-size: 1.45rem; font-weight: 900; }
.tier__sub { color: var(--muted); font-size: .9rem; }
.tier__price { display: flex; align-items: baseline; gap: .4rem; }
.tier__price b { font-size: 2.05rem; font-weight: 900; color: #fff; letter-spacing: -.03em; }
.tier__price span { color: var(--muted-2); font-size: .82rem; }

.tier__list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.tier__list li { display: flex; gap: .55rem; align-items: center; font-size: .88rem; color: #c3d3e5; }
.tier__list li::before {
  content: ''; width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
}

.tier__top { border-top: 1px dashed var(--line); padding-top: .9rem; display: grid; gap: .45rem; }
.tier__top small { color: var(--muted-2); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; }
.tier__top div { display: flex; justify-content: space-between; font-size: .85rem; gap: 1rem; }
.tier__top div span:last-child { color: var(--gold); font-weight: 700; }

/* ---------- 8. Arena ruota ---------- */
.arena {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.wheelbox { position: relative; display: grid; place-items: center; }

.wheel-stage {
  position: relative;
  width: min(560px, 88vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(30, 120, 255, .2), transparent 62%);
}
.wheel-stage::before {
  content: '';
  position: absolute; inset: -12%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(30, 144, 255, .35), transparent 25%, rgba(168, 85, 247, .28) 50%, transparent 75%, rgba(30, 144, 255, .35));
  filter: blur(40px);
  opacity: .8;
  animation: slowspin 18s linear infinite;
  pointer-events: none;
}
#wheel { position: relative; z-index: 2; border-radius: 50%; }

.wheel-hub {
  position: absolute; z-index: 4;
  width: 22%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 28%, #26354a, #070b12 72%);
  border: 2px solid rgba(190, 220, 250, .35);
  box-shadow: 0 0 30px rgba(30, 144, 255, .5), inset 0 2px 10px rgba(0, 0, 0, .9);
  pointer-events: none;
}
.wheel-hub img { width: 78%; filter: drop-shadow(0 0 6px rgba(0, 0, 0, .8)); }
.wheel-hub span { font-weight: 900; font-size: clamp(.6rem, 1.6vw, .9rem); letter-spacing: .05em; color: var(--blue-lt); }

.wheel-pointer {
  position: absolute; z-index: 5; top: -2%; left: 50%;
  transform: translateX(-50%);
  width: 46px; height: 62px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .8)) drop-shadow(0 0 10px rgba(79, 195, 255, .8));
  transition: transform .08s;
}
.wheel-stage.is-spinning .wheel-pointer { animation: tickpoint .09s infinite alternate; }
@keyframes tickpoint { from { transform: translateX(-50%) rotate(-4deg); } to { transform: translateX(-50%) rotate(3deg); } }

.wheel-lock {
  position: absolute; inset: 0; z-index: 6;
  border-radius: 50%;
  display: grid; place-items: center; gap: .6rem;
  text-align: center; padding: 2rem;
  background: rgba(4, 7, 12, .78);
  backdrop-filter: blur(7px);
  border: 1px solid var(--line);
  transition: opacity .45s var(--ease), visibility .45s;
}
.wheel-lock[hidden] { display: none; }
.wheel-lock__icon { font-size: 2rem; }
.wheel-lock h3 { font-size: 1.15rem; }
.wheel-lock p { color: var(--muted); font-size: .88rem; max-width: 30ch; margin-inline: auto; }

/* pannello laterale */
.panel {
  padding: clamp(1.3rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  display: grid; gap: 1.15rem;
  box-shadow: var(--shadow);
}

.panel__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel__tier { display: grid; gap: .15rem; }
.panel__tier h3 { font-size: 1.5rem; font-weight: 900; }
.panel__tier small { color: var(--muted); font-size: .82rem; }
.panel__price {
  text-align: right; font-weight: 900; font-size: 1.35rem;
  background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.token-chip {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .7rem .9rem; border-radius: 14px;
  background: rgba(30, 144, 255, .1);
  border: 1px solid rgba(30, 144, 255, .3);
  font-size: .85rem;
}
.token-chip code { font-family: ui-monospace, 'Cascadia Mono', monospace; letter-spacing: .06em; color: var(--blue-lt); font-weight: 700; }
.token-chip.is-empty { background: var(--panel); border-color: var(--line); color: var(--muted); }
.token-chip button {
  background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .78rem;
  text-decoration: underline; padding: 0;
}
.token-chip button:hover { color: #fff; }

.prizes { display: grid; gap: .35rem; max-height: 268px; overflow-y: auto; padding-right: .3rem; }
.prizes::-webkit-scrollbar { width: 6px; }
.prizes::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
.prize {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem .7rem; border-radius: 11px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid transparent;
  font-size: .86rem;
  transition: background .2s, border-color .2s, transform .2s;
}
.prize:hover { background: rgba(255, 255, 255, .06); }
.prize.is-won { border-color: var(--gold); background: rgba(255, 176, 32, .12); transform: translateX(3px); }
.prize__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.prize__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prize__rarity { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }

.spin-row { display: grid; gap: .7rem; }
.spin-note { font-size: .76rem; color: var(--muted-2); text-align: center; }

.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- 9. Come funziona ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; counter-reset: s; }
.step {
  position: relative; padding: 1.8rem 1.5rem; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent);
  border: 1px solid var(--line);
  display: grid; gap: .6rem; align-content: start;
}
.step::before {
  counter-increment: s; content: '0' counter(s);
  font-size: 2.6rem; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, rgba(79, 195, 255, .85), rgba(30, 144, 255, .12));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { font-size: 1.12rem; }
.step p { color: var(--muted); font-size: .9rem; }

/* ---------- 10. Tabella premi ---------- */
.tabs { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.8rem; }
.tab {
  padding: .6rem 1.2rem; border-radius: 999px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line);
  font-size: .88rem; font-weight: 600; color: var(--muted);
  transition: all .25s var(--ease);
}
.tab:hover { color: #fff; }
.tab.is-active { background: linear-gradient(180deg, #2fa2ff, #0a5fd0); color: #fff; border-color: transparent; box-shadow: 0 10px 26px -12px rgba(30, 144, 255, .9); }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255, 255, 255, .022); }
.ptable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ptable th, .ptable td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); }
.ptable th { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; background: rgba(255, 255, 255, .025); }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable tbody tr:hover { background: rgba(30, 144, 255, .06); }
.ptable td:last-child, .ptable th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.rar { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .82rem; }
.rar i { width: 8px; height: 8px; border-radius: 50%; }
.bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; border-radius: 99px; }

/* ---------- 11. FAQ ---------- */
.faq { display: grid; gap: .7rem; max-width: 860px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255, 255, 255, .03); padding: 1.05rem 1.3rem;
  transition: border-color .3s, background .3s;
}
.faq details[open] { border-color: var(--line-2); background: rgba(30, 144, 255, .05); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--blue-lt); font-size: 1.3rem; font-weight: 400; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); font-size: .9rem; margin-top: .7rem; }

/* ---------- 12. CTA + footer ---------- */
.cta {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(2.4rem, 6vw, 4.5rem);
  text-align: center;
  display: grid; gap: 1.2rem; justify-items: center;
  background: linear-gradient(140deg, rgba(30, 120, 255, .22), rgba(120, 60, 255, .12) 45%, rgba(255, 255, 255, .03));
  border: 1px solid var(--line-2);
}
.cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(60% 100% at 50% 0%, rgba(79, 195, 255, .25), transparent 70%);
  pointer-events: none;
}
.cta h2 { font-size: clamp(1.8rem, 4.4vw, 3rem); font-weight: 900; position: relative; }
.cta p { color: #b9cbe0; position: relative; max-width: 52ch; }
.cta .btn { position: relative; }

.footer { border-top: 1px solid var(--line); padding: 2.6rem 0; margin-top: 4rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.footer small { color: var(--muted-2); font-size: .8rem; }
.footer__links { display: flex; gap: 1.3rem; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.footer__links a:hover { color: var(--blue-lt); }
.footer__admin {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .8rem; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted);
  transition: border-color .25s, color .25s, background .25s;
}
.footer__admin::before { content: '🔒'; font-size: .8em; }
.footer__admin:hover { color: #fff; border-color: var(--blue); background: rgba(30, 144, 255, .12); }

/* ---------- 13. Modale vincita ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 1.2rem;
  background: rgba(3, 5, 9, .78);
  backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}
.modal.is-open { opacity: 1; visibility: visible; }

.modal__card {
  --glow: var(--blue);
  position: relative;
  width: min(500px, 96vw);
  padding: 2.4rem 2rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  background: linear-gradient(180deg, #0d1524, #06090f);
  border: 1px solid color-mix(in srgb, var(--glow) 50%, transparent);
  box-shadow: 0 0 90px -20px var(--glow), 0 40px 90px -30px #000;
  display: grid; gap: 1rem; justify-items: center;
  transform: translateY(24px) scale(.96);
  transition: transform .5s var(--ease);
}
.modal.is-open .modal__card { transform: none; }
.modal__card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 45% at 50% 0%, color-mix(in srgb, var(--glow) 30%, transparent), transparent 70%);
}
.modal__rarity {
  font-size: .68rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
  color: var(--glow); position: relative;
}
.modal__title { font-size: 1rem; color: var(--muted); position: relative; }
.modal__prize { font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 900; position: relative; line-height: 1.1; }
.modal__tier { font-size: .82rem; color: var(--muted-2); position: relative; }

.redeem {
  position: relative; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .85rem 1rem; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px dashed var(--line-2);
}
.redeem span { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); }
.redeem code { font-family: ui-monospace, 'Cascadia Mono', monospace; font-weight: 800; letter-spacing: .12em; font-size: 1rem; }
.redeem button { background: none; border: 1px solid var(--line-2); border-radius: 8px; padding: .3rem .6rem; font-size: .74rem; cursor: pointer; color: var(--muted); }
.redeem button:hover { color: #fff; border-color: var(--blue); }

.modal__actions { display: flex; gap: .6rem; width: 100%; position: relative; }
.modal__actions .btn { flex: 1; }

#confetti { position: fixed; inset: 0; z-index: 190; pointer-events: none; }

/* ---------- 14. Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  z-index: 300; padding: .75rem 1.2rem; border-radius: 999px;
  background: rgba(12, 20, 32, .95); border: 1px solid var(--line-2);
  font-size: .87rem; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  box-shadow: var(--shadow);
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 15. Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 16. Responsive ---------- */
/* gli effetti hover valgono solo dove esiste un mouse:
   sul touch restavano "incollati" dopo il tap */
@media (hover: none) {
  .tier:hover { transform: none; }
  .btn:hover { transform: none; }
}

@media (max-width: 1080px) {
  .arena { grid-template-columns: 1fr; justify-items: center; }
  .panel { width: min(560px, 100%); }
  .wheel-stage { width: min(520px, 86vw); }
}

@media (max-width: 900px) {
  .tiers, .steps { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__inner { position: relative; }
  .nav.is-open .nav__links {
    display: flex; position: absolute; top: calc(100% + .7rem); left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: .5rem;
    background: rgba(8, 12, 20, .97); border: 1px solid var(--line); border-radius: var(--radius);
    backdrop-filter: blur(20px); box-shadow: var(--shadow);
  }
  .nav.is-open .nav__links a { padding: .85rem 1rem; }
  .hero { min-height: auto; padding: 6.5rem 0 3.5rem; }
  .section { padding: 4rem 0; }
}

@media (max-width: 700px) {
  .wrap { width: 90vw; }
  .brand__sub { display: none; }
  .nav__cta { padding: .7rem 1.05rem; font-size: .85rem; }
  .hero h1 { letter-spacing: -.03em; }
  .hero__sub { font-size: .95rem; }

  .tokenbar { flex-direction: column; padding: .8rem; border-radius: 22px; gap: .6rem; }
  .tokenbar input { text-align: center; padding: .55rem 0; font-size: 1.05rem; }
  .tokenbar .btn { width: 100%; padding: .95rem 1.2rem; }

  .wheel-stage { width: min(460px, 90vw); }
  .panel { padding: 1.2rem; }
  .prizes { max-height: 240px; }
  .spin-row__extra { flex-wrap: wrap; }

  /* le linguette delle ruote scorrono di lato invece di andare a capo */
  .tabs {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    padding-bottom: .4rem; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; scroll-snap-align: start; }

  .modal__card { padding: 2rem 1.3rem 1.5rem; }
  .redeem { flex-wrap: wrap; justify-content: center; text-align: center; gap: .5rem; }

  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .cta__actions .btn { width: 100%; }
}

@media (max-width: 420px) {
  .wrap { width: 92vw; }
  .nav__cta { display: none; }          /* resta il menu: niente affollamento */
  .brand__logo { width: 40px; height: 40px; }
  .hero { padding-top: 5.5rem; }
  .pill { font-size: .78rem; padding-right: .8rem; }
  .wheel-stage { width: 92vw; }
  .wheel-pointer { width: 38px; height: 52px; }
  .tier { padding: 1.3rem; }
  .prize__rarity { display: none; }
  .legend { font-size: .72rem; gap: .4rem .8rem; }
}

/* schermi bassi in orizzontale (telefono ruotato) */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 5.5rem 0 3rem; }
  .wheel-stage { width: min(360px, 60vh); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
