:root {
  --primary-gradient: linear-gradient(90deg, #00FFA8, #00C0FF);
  --gold-gradient: linear-gradient(90deg, #FFD166, #FFA500);
  --accent: #00FFA8;
  --secondary: #00C0FF;
  --gold: #FFD166;
  --gold-deep: #FFA500;
  --bg-primary: #070b12;
  --bg-secondary: #0d121e;
  --text: #ffffff;
  --text-2: #b0b7c3;
  --text-muted: #7e879a;
  --card-bg: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.08);
  --maxw: 1280px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 72% 34%, rgba(0, 192, 255, 0.12), transparent 60%),
    radial-gradient(760px 520px at 20% 18%, rgba(0, 255, 168, 0.10), transparent 60%),
    radial-gradient(700px 500px at 80% 95%, rgba(255, 165, 0, 0.07), transparent 65%),
    var(--bg-primary);
}
.grad { background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.grad-gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ── Buttons ── */
.btn {
  border: none; cursor: pointer; font-weight: 700; border-radius: 10px;
  padding: 10px 18px; font-size: .9rem; font-family: inherit; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary-gradient); color: #04121a; box-shadow: 0 6px 20px rgba(0,255,168,.3); }
.btn--ghost { background: transparent; color: #eaf6ff; border: 1px solid var(--card-border); }

/* ── Register banner ── */
.banner {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(90deg, rgba(0,255,168,.14), rgba(0,192,255,.14));
  border-bottom: 1px solid rgba(0,255,168,.25); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 11px 20px; flex-wrap: wrap; text-align: center;
}
.banner.hidden { display: none; }
.banner__text { font-size: .92rem; color: #eaf6ff; }
.banner__text b { color: var(--accent); }
.banner__cta { display: flex; gap: 10px; }

/* ── Site header ── */
.site-header {
  display: flex; align-items: center; gap: 24px;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 28px;
  border-bottom: 1px solid var(--card-border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__mark {            /* the official isotype shown bare, like the site header */
  width: 38px; height: 38px; flex-shrink: 0;
  background-image: url(../assets/logo-cryptonite.png);
  background-repeat: no-repeat;
  background-size: 88px auto;           /* zoom into the mascot glasses */
  background-position: -19px -3px;      /* crop to the glasses, no box */
}
.brand__mark img { display: none; }
.brand__name { font-family: "Sora", sans-serif; font-weight: 800; font-size: 1.18rem; letter-spacing: .5px; }
.site-nav { display: flex; gap: 26px; margin-left: 14px; }
.site-nav a { color: var(--text-2); text-decoration: none; font-size: .94rem; font-weight: 600; transition: color .2s; }
.site-nav a:hover { color: var(--accent); }
.header-cta { margin-left: auto; }

/* ── Layout: hero (left) + wheel (right) ── */
.layout {
  max-width: var(--maxw); margin: 0 auto; padding: 38px 28px 56px;
  display: grid; grid-template-columns: minmax(300px, 0.8fr) 1.2fr;
  gap: 40px; align-items: center;
}

/* hero */
.hero { display: flex; flex-direction: column; align-items: flex-start; }
.hero__eyebrow {
  font-size: .78rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(0,255,168,.3); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero__title { font-family: "Sora", sans-serif; font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.06; font-weight: 800; }
.hero__sub { color: var(--text-2); margin-top: 16px; font-size: 1.05rem; max-width: 460px; }
.hero__product {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 7px;
  font-size: .88rem; font-weight: 700; color: var(--gold); text-decoration: none;
  border: 1px solid rgba(255,209,102,.35); border-radius: 999px; padding: 8px 16px;
  transition: background .2s, transform .15s, border-color .2s;
}
.hero__product:hover { background: rgba(255,209,102,.10); transform: translateX(2px); border-color: var(--gold); }
.hero__product span { transition: transform .2s; }
.hero__product:hover span { transform: translateX(3px); }

.attempts-card {
  margin-top: 26px; display: flex; flex-direction: column; gap: 12px;
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px;
  padding: 16px 20px; width: 100%; max-width: 380px;
}
.attempts-card__label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.attempts-card__label span { color: var(--gold); font-weight: 800; }
.attempts-card__hint { color: var(--text-2); font-size: .9rem; margin-top: 3px; }

/* chips = reusable mini-roulette tokens */
.chips { display: flex; gap: 10px; flex-wrap: wrap; min-height: 38px; }
.chip {
  width: 38px; height: 38px; border-radius: 50%; position: relative; flex: 0 0 auto;
  transition: opacity .4s, filter .4s, box-shadow .4s;
}
.chip::after {                 /* center hub */
  content: ""; position: absolute; inset: 33%; border-radius: 50%;
  background: #0a0e17; box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.chip--filled {
  background: conic-gradient(#00FFA8 0 45deg, #0d2230 45deg 90deg, #00C0FF 90deg 135deg,
    #0d2230 135deg 180deg, #FFD166 180deg 225deg, #0d2230 225deg 270deg,
    #00C0FF 270deg 315deg, #0d2230 315deg 360deg);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.14), 0 2px 7px rgba(0,0,0,.5), 0 0 12px rgba(0,255,168,.25);
}
.chip--empty {                 /* stamped grey watermark = empty hole */
  background: repeating-conic-gradient(rgba(255,255,255,.07) 0 30deg, rgba(255,255,255,.02) 30deg 60deg);
  filter: grayscale(1); opacity: .45;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.10);
}
.chip--empty::after { background: #0d121e; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.08); }
.chip.spending { animation: chipOut .55s cubic-bezier(.3,1.2,.4,1); }
@keyframes chipOut {
  0% { transform: scale(1) rotate(0); filter: none; }
  35% { transform: scale(1.32) rotate(28deg); filter: brightness(1.7) drop-shadow(0 0 10px rgba(255,209,102,.8)); }
  100% { transform: scale(1) rotate(0); }
}

/* prize trail — 2 columns of squarish badges */
.trail { margin-top: 22px; width: 100%; max-width: 360px; }
.trail__title { font-size: .95rem; color: var(--text-2); margin-bottom: 12px; }
.trail__slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.trail-slot {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; aspect-ratio: 1.35; padding: 10px 8px; border-radius: 14px; text-align: center;
  background: rgba(255,255,255,.025); border: 1px dashed var(--card-border);
  transition: border-color .3s, background .3s;
}
.trail-slot.filled { border-color: transparent; background: rgba(255,255,255,.03); }
.trail-slot.win { background: rgba(255,209,102,.10); box-shadow: 0 0 20px rgba(255,209,102,.22); }
/* candy-cane border ring (CSS gradient + mask). Grey for water, vivid for prizes. */
.trail-slot.filled::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px; padding: 3px;
  background: repeating-linear-gradient(45deg, var(--c1, #5b6472) 0 7px, var(--c2, #8b94a4) 7px 14px);
  -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;
}
.trail-slot.win::before {
  --c1: #ffffff; --c2: #ff3b5c; opacity: 1;
  animation: candyMove 0.9s linear infinite, candyGlow 1.1s ease-in-out infinite;
}
.trail-slot.win.jackpot::before { --c2: #FFB300; }
@keyframes candyMove { to { background-position: 28px 28px; } }
@keyframes candyGlow { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.5) drop-shadow(0 0 6px rgba(255,80,110,.8)); } }
.trail-slot__icon { font-size: 1.7rem; line-height: 1; }
.trail-slot__text { font-size: .8rem; font-weight: 700; line-height: 1.1; }
.trail-slot__empty { color: var(--text-muted); font-size: .78rem; font-style: italic; }
.trail-slot.pop { animation: slotPop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes slotPop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ── Stage / wheel ── */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.stage::before {
  content: ""; position: absolute; top: 46%; left: 50%; width: 120%; height: 120%;
  transform: translate(-50%, -50%); z-index: -1;
  background: radial-gradient(circle, rgba(0,192,255,.10), transparent 62%);
}
.wheel-wrap { position: relative; width: min(84vw, 580px); aspect-ratio: 1; margin-top: 14px; }
#wheel { width: 100%; height: 100%; display: block; }

/* ── Arcade 3D spin button (GOLD) ── */
.spin-btn {
  --press: 0px; --depth: 14px;
  position: relative; margin-top: 54px;
  width: 132px; height: 132px; border-radius: 50%;
  border: none; cursor: pointer; padding: 0;
  font-family: "Sora", sans-serif; font-weight: 800; letter-spacing: 1px;
  font-size: 1.05rem; text-transform: uppercase; color: #3a1e00;
  background: radial-gradient(circle at 36% 28%, #fff6da 0%, #ffd86b 22%, #FFB52E 52%, #FF8A00 100%);
  transform: translateY(var(--press));
  transition: transform .09s cubic-bezier(.3,.7,.4,1), box-shadow .09s ease;
  box-shadow:
    0 0 0 5px #1a1206,
    0 0 0 8px #4a3a16,
    0 0 0 10px rgba(255,180,0,.25),
    0 calc(var(--depth) - var(--press)) 0 #9a5500,
    0 calc(var(--depth) - var(--press) + 8px) 28px rgba(0,0,0,.55),
    inset 0 6px 12px rgba(255,255,255,.85),
    inset 0 -12px 22px rgba(120,60,0,.4),
    inset 0 0 0 2px rgba(255,255,255,.35);
  -webkit-tap-highlight-color: transparent;
}
.spin-btn::before {
  content: ""; position: absolute; inset: -32px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, transparent 54%, rgba(255,170,0,.55) 64%, transparent 84%);
  animation: spinGlow 1.8s ease-in-out infinite;
}
@keyframes spinGlow { 0%,100% { opacity: .5; transform: scale(.96);} 50% { opacity: 1; transform: scale(1.06);} }
.spin-btn__label { position: relative; display: block; line-height: 1; }
.spin-btn__sub { display: block; font-size: .56rem; letter-spacing: 2px; opacity: .75; margin-top: 5px; font-family: "Inter", sans-serif; }
.spin-btn:hover:not(:disabled) { --press: -3px; }
.spin-btn:active:not(:disabled), .spin-btn.pressing:not(:disabled) { --press: calc(var(--depth) - 3px); transition-duration: .05s; }
.spin-btn.is-spinning { --press: calc(var(--depth) - 4px); pointer-events: none; }
.spin-btn.is-spinning::before { animation-duration: .7s; }
.spin-btn:disabled { cursor: not-allowed; filter: grayscale(.5) brightness(.72); }
.spin-btn:disabled::before { opacity: .25; animation: none; }

/* flying prize chip (wheel → slot) */
.fly-chip {
  position: fixed; z-index: 9998; pointer-events: none;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: 1rem; color: #04121a;
  background: var(--primary-gradient); box-shadow: 0 8px 30px rgba(0,255,168,.5);
  transition: transform .9s cubic-bezier(.5,0,.2,1), opacity .9s ease;
}
.fly-chip.win { background: var(--gold-gradient); box-shadow: 0 8px 34px rgba(255,165,0,.6); }

/* ── Toast ── */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 30px);
  z-index: 9997; pointer-events: none; opacity: 0; transition: opacity .3s, transform .3s;
  display: flex; align-items: center; gap: 10px; max-width: 90vw;
  padding: 14px 22px; border-radius: 14px; font-weight: 700;
  background: rgba(13,18,30,.94); border: 1px solid var(--card-border); backdrop-filter: blur(8px);
  box-shadow: 0 16px 50px rgba(0,0,0,.5); color: var(--text);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.win { border-color: var(--gold); box-shadow: 0 16px 50px rgba(255,165,0,.4); }
.toast__emoji { font-size: 1.5rem; }

/* ── Tasks wall ── */
.wall { max-width: var(--maxw); margin: 80px auto 60px; padding: 0 28px; }
.wall h2 { text-align: center; font-size: 1.7rem; font-family: "Sora", sans-serif; margin-bottom: 6px; }
.wall .sub { text-align: center; color: var(--text-2); margin-bottom: 28px; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.task {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px;
  padding: 22px; transition: transform .2s, border-color .2s, background .2s;
}
.task:hover { transform: translateY(-4px); border-color: rgba(0,255,168,.35); background: rgba(0,255,168,.04); }
.task__icon { font-size: 1.9rem; }
.task__title { font-weight: 700; margin: 10px 0 4px; }
.task__desc { color: var(--text-muted); font-size: .85rem; min-height: 38px; }
.task__reward { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--accent); font-size: .85rem; }
.task .btn { margin-top: 14px; width: 100%; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--card-border); background: rgba(0,0,0,.25); }
.site-footer__top {
  max-width: var(--maxw); margin: 0 auto; padding: 34px 28px 20px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.site-footer__brand { display: flex; align-items: center; gap: 11px; }
.site-footer__links { display: flex; gap: 22px; flex-wrap: wrap; margin-left: 10px; }
.site-footer__links a { color: var(--text-2); text-decoration: none; font-size: .9rem; transition: color .2s; }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__social { display: flex; gap: 12px; margin-left: auto; }
.site-footer__social a {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text);
  text-decoration: none; font-size: 1.1rem; transition: all .2s;
}
.site-footer__social a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.site-footer__copy { max-width: var(--maxw); margin: 0 auto; padding: 0 28px 34px; color: var(--text-muted); font-size: .8rem; }

/* ── Auth modal ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4,8,14,.82); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal-backdrop.show { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  border: 1px solid var(--card-border); border-radius: 22px; padding: 36px 32px; max-width: 420px; width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .35s cubic-bezier(.2,1.3,.4,1);
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.auth h3 { text-align: center; font-family: "Sora", sans-serif; }
.auth label { display: block; font-size: .8rem; color: var(--text-muted); margin: 14px 0 6px; }
.auth input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--card-border);
  background: rgba(255,255,255,.04); color: var(--text); font-size: .95rem; font-family: inherit;
}
.auth input:focus { outline: none; border-color: var(--accent); }
.auth .switch { text-align: center; margin-top: 16px; font-size: .85rem; color: var(--text-muted); }
.auth .switch a { color: var(--accent); cursor: pointer; }
.auth .note { font-size: .78rem; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; gap: 26px; }
  .hero { align-items: center; text-align: center; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .attempts-card, .trail { margin-left: auto; margin-right: auto; }
  .stage { order: -1; }
  .site-nav { display: none; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 560px) {
  .site-header { padding: 14px 16px; }
  .layout { padding: 18px 16px 30px; }
  .wall, .site-footer__top, .site-footer__copy { padding-left: 16px; padding-right: 16px; }
  .site-footer__social { margin-left: 0; }
}
