/* =========================================================
   GRIDCUP — AI Formula 1 prediction markets
   Sidebar dashboard (matches betcup structure) skinned with
   the GLOWMON neon glow system, recolored red + cyan.
   ========================================================= */

:root {
  --deep:  #08060f;
  --bark:  #120a18;
  --panel: #150c1e;
  --moss:  #2a1430;
  --cyan:  #19e3ff;
  --red:   #ff2e54;
  --amber: #ff8a3d;
  --gold:  #ffd166;
  --purple:#b06bff;
  --green: #46e6a0;
  --cream: #f4eef6;
  --mist:  #b6a6c4;
  --line:  rgba(255,255,255,0.08);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 20px;
  --sidew: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); color: var(--cream); background: var(--deep);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 520px at 70% -8%, rgba(255,46,84, 0.16), transparent 60%),
    radial-gradient(720px 500px at 95% 8%, rgba(25,227,255, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bark) 0%, var(--deep) 60%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  padding: 0.75rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-primary { background: linear-gradient(180deg, var(--red), var(--amber)); color: #1a0610; box-shadow: 0 8px 26px rgba(255,46,84,.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(255,46,84,.46); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: rgba(25,227,255,.4); color: var(--cream); }
.btn-ghost:hover { background: rgba(25,227,255,.12); border-color: var(--cyan); }
.btn-sm { padding: .5rem .9rem; font-size: .8rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- brand mark ---------- */
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: .02em; }
.mark {
  width: 24px; height: 24px; border-radius: 7px; flex: none; position: relative; overflow: hidden;
  background: repeating-conic-gradient(#f4f4f4 0 25%, #0e0a14 0 50%) 0 0 / 12px 12px;
  border: 2px solid #0e0a14; box-shadow: 0 0 0 1px rgba(255,46,84,.5), 0 0 16px rgba(255,46,84,.5);
}

/* =========================================================
   LAYOUT — sidebar + content
   ========================================================= */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidew); z-index: 60;
  display: flex; flex-direction: column; padding: 22px 18px;
  background: rgba(12,8,20,.82); backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
}
.side-brand { padding: 4px 8px 22px; font-size: 1.2rem; }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  font-family: var(--font-display); font-size: .92rem; color: var(--mist); transition: all .14s;
}
.side-nav a .ni { font-size: 1rem; width: 20px; text-align: center; }
.side-nav a:hover { color: var(--cream); background: rgba(255,255,255,.04); }
.side-nav a.active { color: var(--cream); background: linear-gradient(90deg, rgba(255,46,84,.18), rgba(255,46,84,.04)); box-shadow: inset 2px 0 0 var(--red); }
.side-foot { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.wallet-btn { width: 100%; }
.side-social { display: flex; gap: 10px; justify-content: center; font-family: var(--font-display); font-size: .82rem; color: var(--mist); }
.side-social a:hover { color: var(--cyan); }

.content { flex: 1; margin-left: var(--sidew); padding: 36px 40px 80px; max-width: 1180px; width: 100%; }
.page-head { margin-bottom: 30px; }
.page-head .eyebrow { font-family: var(--font-display); font-size: .7rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--red); }
.page-head h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -.02em; margin-top: 8px; }
.page-head p { color: var(--mist); margin-top: 8px; font-size: 1.02rem; max-width: 620px; }
.page-head[hidden] { display: none; }

/* mobile top bar */
.topbar { display: none; position: sticky; top: 0; z-index: 55; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(12,8,20,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.hamb { background: none; border: none; color: var(--cream); font-size: 1.5rem; line-height: 1; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 58; }

/* =========================================================
   HOME / HERO
   ========================================================= */
.hero { text-align: center; padding: 30px 0 10px; position: relative; }
.hero .eyebrow { font-family: var(--font-display); font-size: .72rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--red); }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 5rem); line-height: .96; letter-spacing: -.03em; margin: 14px 0 0; }
.hero h1 .accent { background: linear-gradient(180deg, var(--red), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { max-width: 560px; margin: 18px auto 0; font-size: 1.1rem; color: var(--mist); }
.hero .lede b { color: var(--cream); font-weight: 600; }
.hero-cta { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.hero-meta { margin-top: 16px; font-family: var(--font-display); font-size: .8rem; color: var(--mist); letter-spacing: .05em; }
.hero-meta .dot { color: var(--cyan); }
.stage { position: relative; margin-top: 26px; display: flex; justify-content: center; }
.hero-banner-wrap { position: relative; width: 100%; max-width: 520px; }
.hero-banner-wrap::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -18px; height: 60px; background: radial-gradient(closest-side, rgba(255,46,84,.4), transparent); filter: blur(8px); z-index: -1; }
.hero-banner { width: 100%; height: auto; display: block; filter: drop-shadow(0 22px 34px rgba(0,0,0,.5)) drop-shadow(0 0 46px rgba(255,46,84,.26)); animation: 4.5s ease-in-out infinite carbob; }
@keyframes carbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.car { font-size: 130px; line-height: 1; filter: drop-shadow(0 24px 40px rgba(0,0,0,.6)) drop-shadow(0 0 60px rgba(255,46,84,.3)); position: relative; z-index: 2; }
@keyframes creature-float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-12px) scale(1.02); } }
.creature-float { animation: 3s ease-in-out infinite creature-float; }
.track { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(620px,92%); height: 12px; border-radius: 999px; z-index: 1; background: repeating-linear-gradient(90deg, var(--cyan) 0 20px, transparent 20px 42px); opacity: .45; }
.floor-glow { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 320px; height: 50px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,46,84,.45), transparent); filter: blur(7px); }

/* stat strip / grids */
.stat-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 36px; }
.stat { padding: 16px 20px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); text-align: left; }
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.stat .v.glow { color: var(--cyan); } .stat .v.win { color: var(--green); }
.stat .k { font-size: .76rem; color: var(--mist); letter-spacing: .04em; }

.home-section { margin-top: 56px; }
.home-section .hs-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.home-section .hs-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }
.home-section .hs-head a { font-family: var(--font-display); font-size: .85rem; color: var(--cyan); }

/* =========================================================
   SECTION HEAD (generic) + tabs
   ========================================================= */
.tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tabs button { font-family: var(--font-display); font-size: .85rem; color: var(--mist); background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 8px 15px; border-radius: 999px; transition: all .15s; }
.tabs button:hover { color: var(--cream); }
.tabs button.active { color: #1a0610; background: linear-gradient(180deg, var(--red), var(--amber)); border-color: transparent; }

/* feature trio */
.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.card { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.card:hover { transform: translateY(-4px); border-color: rgba(25,227,255,.5); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.card .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px; background: rgba(255,46,84,.14); border: 1px solid rgba(255,46,84,.35); }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.card p { margin-top: .55rem; color: var(--mist); font-size: .96rem; }

/* market chips */
.market-chips { display: flex; flex-wrap: wrap; gap: 11px; }
.market-chips .chip { padding: 10px 16px; border-radius: 999px; font-family: var(--font-display); font-size: .88rem; background: linear-gradient(180deg, rgba(25,227,255,.08), rgba(255,255,255,.015)); border: 1px solid rgba(25,227,255,.25); }
.market-chips .chip .e { margin-right: 7px; }

.faq { margin-top: 44px; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.faq summary { font-family: var(--font-display); font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--cyan); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--mist); margin-top: 10px; font-size: .94rem; }

/* =========================================================
   RACE CARDS
   ========================================================= */
.race-list { display: flex; flex-direction: column; gap: 22px; }
.race { border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); }
.race-top { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.race-flag { font-size: 2.2rem; line-height: 1; }
.race-id { flex: 1; min-width: 180px; }
.race-id .gp { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; }
.race-id .gp a:hover { color: var(--cyan); }
.race-id .circuit { color: var(--mist); font-size: .88rem; }
.race-when { text-align: right; font-family: var(--font-display); }
.race-when .d { font-size: .9rem; }
.race-when .pool { font-size: .76rem; color: var(--cyan); margin-top: 2px; }
.status { font-family: var(--font-display); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.status.upcoming { background: rgba(25,227,255,.16); color: var(--cyan); }
.status.live { background: rgba(255,46,84,.18); color: var(--red); }
.status.live::before { content: "● "; }
.status.settled { background: rgba(70,230,160,.16); color: var(--green); }

.market-tabs { display: flex; gap: 8px; padding: 15px 24px 0; flex-wrap: wrap; }
.market-tabs button { font-family: var(--font-display); font-size: .8rem; color: var(--mist); background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; transition: all .15s; }
.market-tabs button:hover { color: var(--cream); }
.market-tabs button.active { color: #1a0610; background: linear-gradient(180deg, var(--red), var(--amber)); border-color: transparent; }
.market-body { padding: 16px 24px 24px; }
.market-q { font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin-bottom: 3px; }
.market-sub { color: var(--mist); font-size: .84rem; margin-bottom: 15px; }

.preds { display: flex; flex-direction: column; gap: 10px; }
.pred { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 14px; padding: 12px 15px; border-radius: 13px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); transition: border-color .15s, background .15s; }
.pred:hover { border-color: rgba(25,227,255,.4); background: rgba(25,227,255,.05); }
.pred.win { border-color: rgba(70,230,160,.5); background: rgba(70,230,160,.07); }
.pred.lose { opacity: .55; }
.pred .model { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: .88rem; }
.pred .pick { min-width: 0; }
.pred .pick .p { font-weight: 600; font-size: .96rem; }
.pred .pick .why { color: var(--mist); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pred.detail .pick .why { white-space: normal; }
.pred .right { display: flex; align-items: center; gap: 14px; }
.pred .conf, .pred .odds { text-align: right; font-family: var(--font-display); }
.pred .conf .c { font-weight: 700; font-size: 1rem; }
.pred .odds .o { font-weight: 700; color: var(--cyan); }
.pred .conf .l, .pred .odds .l { font-size: .6rem; color: var(--mist); letter-spacing: .1em; text-transform: uppercase; }
.badge { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: .82rem; flex: none; font-family: var(--font-display); font-weight: 700; }
.tick { color: var(--green); font-size: 1.1rem; } .cross { color: var(--mist); font-size: 1.1rem; }

/* =========================================================
   TABLES (recent bets / activity)
   ========================================================= */
.table-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); }
.bet-row { display: grid; grid-template-columns: 1.1fr 1.2fr 1.1fr 1fr .8fr .9fr .7fr; gap: 12px; padding: 13px 20px; align-items: center; font-size: .86rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.bet-row .num { text-align: right; font-family: var(--font-display); }
.bet-head { font-family: var(--font-display); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); background: rgba(255,255,255,.02); }
.bet-row:last-child { border-bottom: none; }
.bet-row .who { font-family: var(--font-display); color: var(--cyan); }
.bet-row .who.you { color: var(--gold); }
.bet-row .backed { display: inline-flex; align-items: center; gap: 7px; }
.bet-row .backed .badge { width: 20px; height: 20px; border-radius: 5px; font-size: .62rem; }
.bet-row .stake { color: var(--cream); font-weight: 600; }
.bet-row .pot { color: var(--green); }
.bet-row.fresh { animation: 1.2s ease-out flashrow; }
@keyframes flashrow { 0% { background: rgba(255,46,84,.2); } 100% { background: transparent; } }

/* activity rows */
.act-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.05); }
.act-row:last-child { border-bottom: none; }
.act-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.act-row .txt { font-size: .9rem; } .act-row .txt b { font-family: var(--font-display); }
.act-row .txt .sub { color: var(--mist); font-size: .8rem; }
.act-row .when { font-family: var(--font-display); font-size: .8rem; color: var(--mist); text-align: right; }
.act-row .amt { font-family: var(--font-display); font-weight: 700; }
.act-row .amt.pos { color: var(--green); } .act-row .amt.neg { color: var(--red); }

/* =========================================================
   LEADERBOARD / AI MODELS
   ========================================================= */
.lb-grid { display: flex; flex-direction: column; gap: 12px; }
.lb { display: grid; grid-template-columns: 42px 1fr repeat(4, minmax(66px,auto)); gap: 16px; align-items: center; padding: 16px 22px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.lb:hover { transform: translateY(-3px); border-color: rgba(25,227,255,.4); }
.lb.top { border-color: rgba(255,209,102,.45); background: linear-gradient(180deg, rgba(255,209,102,.08), rgba(255,255,255,.015)); }
.lb .rank { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--mist); text-align: center; }
.lb.top .rank { color: var(--gold); }
.lb .who { display: flex; align-items: center; gap: 12px; }
.lb .who .badge { width: 36px; height: 36px; border-radius: 10px; font-size: .95rem; }
.lb .who .nm { font-family: var(--font-display); font-weight: 600; }
.lb .who .tag { font-size: .74rem; color: var(--mist); }
.lb .metric { text-align: right; font-family: var(--font-display); }
.lb .metric .v { font-weight: 700; font-size: 1.02rem; }
.lb .metric .v.win { color: var(--green); } .lb .metric .v.sol { color: var(--cyan); }
.lb .metric .k { font-size: .62rem; color: var(--mist); letter-spacing: .08em; text-transform: uppercase; }
.lb-head { display: grid; grid-template-columns: 42px 1fr repeat(4, minmax(66px,auto)); gap: 16px; padding: 0 22px 4px; font-family: var(--font-display); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
.lb-head span:nth-child(n+3) { text-align: right; }

.model-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.model-card { border-radius: var(--radius); padding: 22px 22px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); }
.model-card .mc-top { display: flex; align-items: center; gap: 12px; }
.model-card .mc-top .badge { width: 44px; height: 44px; border-radius: 12px; font-size: 1.1rem; }
.model-card .mc-top .nm { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.model-card .mc-top .tag { font-size: .8rem; color: var(--mist); }
.model-card .mc-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 18px; }
.model-card .mc-stats .s { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.model-card .mc-stats .s .v { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.model-card .mc-stats .s .v.win { color: var(--green); } .model-card .mc-stats .s .v.sol { color: var(--cyan); }
.model-card .mc-stats .s .k { font-size: .64rem; color: var(--mist); text-transform: uppercase; letter-spacing: .06em; }
.model-card .bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); margin-top: 16px; overflow: hidden; }
.model-card .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--red), var(--cyan)); }
.model-card .barlab { display: flex; justify-content: space-between; font-size: .72rem; color: var(--mist); margin-top: 7px; font-family: var(--font-display); }

/* =========================================================
   PORTFOLIO / REFERRAL
   ========================================================= */
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 26px; }
.kpi { padding: 18px 20px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); }
.kpi .v { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }
.kpi .v.pos { color: var(--green); } .kpi .v.neg { color: var(--red); } .kpi .v.glow { color: var(--cyan); }
.kpi .k { font-size: .76rem; color: var(--mist); margin-top: 2px; }

.empty { text-align: center; padding: 60px 20px; color: var(--mist); }
.empty .e { font-size: 3rem; } .empty h3 { font-family: var(--font-display); color: var(--cream); margin-top: 12px; }
.empty p { margin-top: 6px; } .empty .btn { margin-top: 20px; }

.bet-status { font-family: var(--font-display); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.bet-status.open { background: rgba(25,227,255,.16); color: var(--cyan); }
.bet-status.won { background: rgba(70,230,160,.16); color: var(--green); }
.bet-status.lost { background: rgba(255,46,84,.16); color: var(--red); }

.referral-card { border-radius: var(--radius); padding: 28px; background: linear-gradient(180deg, rgba(255,46,84,.08), rgba(255,255,255,.015)); border: 1px solid rgba(255,46,84,.3); }
.referral-card h3 { font-family: var(--font-display); font-size: 1.15rem; }
.ref-link { display: flex; gap: 10px; margin-top: 16px; }
.ref-link input { flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--cream); border-radius: 12px; padding: 12px 14px; font-family: var(--font-display); }
.banner { padding: 16px 20px; border-radius: 14px; background: rgba(255,138,61,.1); border: 1px solid rgba(255,138,61,.3); color: var(--cream); font-size: .92rem; display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.banner .btn { margin-left: auto; }

/* =========================================================
   BET MODAL + TOAST
   ========================================================= */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 100; display: none; place-items: center; backdrop-filter: blur(4px); padding: 16px; }
.modal-back.open { display: grid; animation: .25s ease-out fade; }
@keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes modalpop { 0% { opacity: 0; transform: translateY(16px) scale(.97); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.modal-pop { animation: .32s cubic-bezier(.2,.9,.3,1.15) forwards modalpop; }
.modal-card { width: min(94vw,440px); border-radius: 22px; padding: 26px; background: linear-gradient(180deg, #1c1024, #0c0716); border: 1px solid rgba(255,46,84,.3); }
.modal-card .x { float: right; color: var(--mist); font-size: 1.4rem; line-height: 1; }
.modal-card .x:hover { color: var(--cream); }
.modal-card h3 { font-family: var(--font-display); font-size: 1.25rem; }
.modal-card .ctx { color: var(--mist); font-size: .88rem; margin-top: 4px; }
.backbox { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: rgba(25,227,255,.07); border: 1px solid rgba(25,227,255,.25); }
.backbox .lab { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
.backbox .val { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-top: 3px; display: flex; align-items: center; gap: 9px; }
.modal-card label { display: block; font-size: .76rem; color: var(--mist); margin: 18px 0 7px; }
.amount { display: flex; align-items: center; gap: 10px; }
.amount input { flex: 1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: var(--cream); border-radius: 12px; padding: 12px 14px; font-family: var(--font-display); font-size: 1.1rem; }
.amount input:focus { outline: none; border-color: var(--cyan); }
.chips-row { display: flex; gap: 8px; margin-top: 10px; }
.chips-row button { flex: 1; font-family: var(--font-display); font-size: .8rem; color: var(--mist); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 8px; }
.chips-row button:hover { color: var(--cream); border-color: var(--cyan); }
.payout { display: flex; justify-content: space-between; margin-top: 18px; font-family: var(--font-display); font-size: .9rem; }
.payout .pv { color: var(--green); font-weight: 700; }
.modal-card .place { width: 100%; margin-top: 20px; }
.modal-card .disclaimer { font-size: .72rem; color: var(--mist); opacity: .8; text-align: center; margin-top: 12px; }
.modal-card.done { text-align: center; }
.done-emoji { font-size: 58px; }
@keyframes popin { 0% { opacity: 0; transform: scale(0); } 70% { transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
.pop-in { animation: .4s cubic-bezier(.2,.9,.3,1.3) forwards popin; }

.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 13px 18px; border-radius: 13px; background: #1c1024; border: 1px solid rgba(25,227,255,.4); font-family: var(--font-display); font-size: .88rem; box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: .3s ease-out toastin; max-width: 320px; }
.toast.ok { border-color: rgba(70,230,160,.5); } .toast.err { border-color: rgba(255,46,84,.5); }
@keyframes toastin { 0% { opacity: 0; transform: translateX(30px); } 100% { opacity: 1; transform: none; } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) { .features, .model-grid { grid-template-columns: 1fr; } .stat-strip, .kpi-row { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 860px) {
  .topbar { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; }
  .side-brand { display: none; }
  .content { margin-left: 0; padding: 24px 18px 70px; }
  .pred { grid-template-columns: 108px 1fr; }
  .pred .right { grid-column: 1 / -1; justify-content: flex-end; }
  .bet-row { grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: .8rem; }
  .bet-row span:nth-child(3), .bet-head span:nth-child(3) { display: none; }
  .lb { grid-template-columns: 34px 1fr; row-gap: 12px; } .lb .metric { text-align: left; } .lb-head { display: none; }
}
@media (max-width: 480px) { .stat-strip, .kpi-row { grid-template-columns: 1fr 1fr; } .carart { width: 200px; } .stage { height: 170px; } }

/* =========================================================
   ICON SYSTEM  (replaces all emoji)
   ========================================================= */
.ic { width: 1.05em; height: 1.05em; vertical-align: -0.18em; flex: none; }
.btn .ic { width: 1.05em; height: 1.05em; }
.side-nav a .ni { display: inline-flex; align-items: center; }
.side-nav a .ni svg { width: 19px; height: 19px; }
.hamb svg { width: 24px; height: 24px; display: block; }

.market-tabs button, .tabs button { display: inline-flex; align-items: center; gap: 6px; }
.market-tabs button .ic, .tabs button .ic { width: 14px; height: 14px; }
.market-chips .chip { display: inline-flex; align-items: center; gap: 8px; }
.market-q { display: flex; align-items: center; gap: 8px; }
.market-q .ic { width: 18px; height: 18px; color: var(--red); }
.hs-head a { display: inline-flex; align-items: center; gap: 5px; }
.hs-head a .ic { width: 13px; height: 13px; }
.referral-card h3 { display: flex; align-items: center; gap: 8px; }

/* hero car art */
.carart { width: 260px; height: auto; position: relative; z-index: 2; filter: drop-shadow(0 22px 34px rgba(0,0,0,.55)) drop-shadow(0 0 50px rgba(255,46,84,.3)); }
.stage { height: 210px; }

/* country-code chip (replaces flag emoji) */
.cc-chip { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .07em; color: var(--cyan); background: rgba(25,227,255,.12); border: 1px solid rgba(25,227,255,.32); border-radius: 7px; padding: 4px 7px; line-height: 1; flex: none; }
.cc-chip.lg { font-size: 1.15rem; padding: 14px 14px; border-radius: 12px; letter-spacing: .05em; }
.bet-row .cc-chip { margin-right: 6px; }

/* race detail header */
.race-detail-head { display: flex; align-items: center; gap: 16px; margin: 16px 0 8px; flex-wrap: wrap; }
.race-detail-head h1 { font-family: var(--font-display); font-size: 2rem; letter-spacing: -.02em; }
.backlink { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); color: var(--mist); font-size: .85rem; }
.backlink:hover { color: var(--cyan); }
.backlink .ic { width: 15px; height: 15px; }

/* badges with 2-letter codes */
.badge { font-size: .62rem; font-weight: 700; letter-spacing: .02em; }
.bet-row .backed .badge { font-size: .5rem; }
.lb .who .badge { font-size: .8rem; } .model-card .mc-top .badge { font-size: .92rem; }
.ucode { background: rgba(25,227,255,.14) !important; border: 1px solid rgba(25,227,255,.4) !important; color: var(--cyan) !important; }

/* feature card icon */
.card .ico { color: var(--red); }
.card .ico .ic { width: 22px; height: 22px; }

/* verdict marks */
.tick, .cross { display: inline-flex; align-items: center; }
.tick .ic, .cross .ic { width: 18px; height: 18px; }
.tick { color: var(--green); } .cross { color: var(--mist); }

/* large icons (empty states / done) */
.ic-lg { width: 46px; height: 46px; }
.empty .e { display: flex; justify-content: center; color: var(--cyan); margin-bottom: 6px; }
.done-mark { color: var(--green); display: flex; justify-content: center; }
.done-mark .ic-lg { width: 56px; height: 56px; }
.claimed { color: var(--green); font-family: var(--font-display); font-size: .78rem; }

/* activity row icon color */
.act-ico .ic { width: 18px; height: 18px; color: var(--cyan); }

/* token bar (contract address + buy) */
.token-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 30px; padding: 14px 18px; border-radius: 14px; background: linear-gradient(180deg, rgba(255,138,61,.08), rgba(255,255,255,.015)); border: 1px solid rgba(255,138,61,.3); }
.tk-tick { font-family: var(--font-display); font-weight: 700; color: var(--amber); font-size: 1.05rem; letter-spacing: .02em; }
.tk-ca { display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, Menlo, monospace; font-size: .82rem; color: var(--mist); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; max-width: min(70vw, 430px); }
.tk-ca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ca .ic { width: 14px; height: 14px; flex: none; }
.tk-ca:hover { border-color: var(--amber); color: var(--cream); }
.tk-ca.pending { cursor: default; font-family: var(--font-display); }
.tk-ca.pending:hover { border-color: var(--line); color: var(--mist); }
.tk-buy { white-space: nowrap; }

/* docs page */
.docs { display: flex; flex-direction: column; gap: 18px; }
.doc-block h2 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 8px; }
.doc-block p { color: var(--mist); }
.doc-models { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.doc-model { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: .92rem; }
.doc-model em { color: var(--mist); font-style: normal; font-size: .76rem; }
.doc-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .9rem; }
.doc-table th { text-align: left; font-family: var(--font-display); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mist); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.doc-table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--cream); vertical-align: top; }
.doc-table td:first-child { white-space: nowrap; font-family: var(--font-display); font-weight: 600; }
.doc-table td .ic { width: 15px; height: 15px; color: var(--red); vertical-align: -2px; margin-right: 4px; }
.doc-table td:nth-child(2), .doc-table td:nth-child(3) { color: var(--mist); }
@media (max-width: 640px) { .doc-table td:nth-child(3), .doc-table th:nth-child(3) { display: none; } }

/* AI logo badges (real brand marks, rendered white on a brand tint) */
.badge .logo { width: 58%; height: 58%; object-fit: contain; display: block; filter: brightness(0) invert(1); }
.lb .who .badge .logo, .model-card .mc-top .badge .logo { width: 56%; height: 56%; }
.prev-row .badge { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; }
.prev-row .badge .logo { width: 58%; height: 58%; object-fit: contain; filter: brightness(0) invert(1); }

/* =========================================================
   COUNTDOWN — real timer to the next Grand Prix
   (vanilla port of the ShiftingCountdown component)
   ========================================================= */
.countdown { margin-top: 44px; padding: 24px 26px; border-radius: 20px; background: linear-gradient(180deg, rgba(255,46,84,.08), rgba(255,255,255,.015)); border: 1px solid rgba(255,46,84,.25); }
.cd-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cd-label { font-family: var(--font-display); font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: var(--red); }
.cd-race { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.cd-gp { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; }
.cd-circuit { color: var(--mist); font-size: .82rem; }
.cd-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: .85rem; color: var(--cyan); }
.cd-link .ic { width: 14px; height: 14px; }
.cd-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 18px 8px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.cd-num { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace; font-weight: 700; font-size: clamp(1.9rem, 5vw, 3.1rem); line-height: 1; color: var(--cream); }
.cd-unit { font-family: var(--font-display); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
@keyframes cdshift { 0% { transform: translateY(55%); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.cd-num.shift { animation: cdshift .35s cubic-bezier(.2,.8,.3,1); }
@media (max-width: 600px) { .cd-cells { gap: 8px; } .cd-cell { padding: 14px 4px; } }

/* =========================================================
   INTRO — scroll walkthrough (ports the framer-motion
   rotateX/scale/translate card effect to native scroll)
   ========================================================= */
#intro { display: none; }
body.intro-active #intro { display: block; }
body.intro-active .topbar, body.intro-active .shell { display: none !important; }

.intro { padding: 12vh 0 14vh; }
.intro-title { max-width: 820px; margin: 0 auto; padding: 0 20px; text-align: center; }
.intro-title .eyebrow { font-family: var(--font-display); font-size: .72rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--red); }
.intro-title h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 6.5vw, 4.8rem); line-height: .98; letter-spacing: -.03em; margin-top: 14px; }
.intro-title h1 .accent { background: linear-gradient(180deg, var(--red), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-lede { color: var(--mist); margin-top: 16px; font-size: 1.05rem; }

.intro-perspective { perspective: 1000px; width: 100%; max-width: 1000px; margin: 7vh auto 0; padding: 0 20px; }
.intro-card {
  width: 100%; max-width: 1000px; margin: 0 auto; border: 4px solid #2a2336; border-radius: 30px; padding: 14px;
  background: linear-gradient(180deg, #1a1224, #0c0716);
  box-shadow: 0 0 #0000004d, 0 9px 20px #0000004a, 0 37px 37px #00000042, 0 84px 50px #00000026, 0 149px 60px #0000000a, 0 233px 65px #00000003;
  will-change: transform; transform-origin: center top;
}
.intro-card-inner { border-radius: 18px; background: var(--panel); border: 1px solid var(--line); padding: 20px 22px; }

/* mini product preview inside the card */
.prev-top { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.prev-id { flex: 1; }
.prev-gp { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.prev-circuit { color: var(--mist); font-size: .82rem; }
.prev-q { font-family: var(--font-display); font-weight: 600; margin: 16px 0 12px; }
.prev-rows { display: flex; flex-direction: column; gap: 10px; }
.prev-rows { gap: 8px; }
.prev-row { display: grid; grid-template-columns: 30px 1fr 1fr auto; align-items: center; gap: 12px; padding: 8px 13px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); }

/* how-it-works steps now live inside the card */
.prev-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0 13px; color: var(--mist); font-family: var(--font-display); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; }
.prev-divider::before, .prev-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.prev-steps { display: flex; flex-direction: column; gap: 11px; }
.prev-step { display: flex; gap: 12px; align-items: flex-start; }
.prev-step .ps-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(255,46,84,.14); border: 1px solid rgba(255,46,84,.35); color: var(--red); }
.prev-step .ps-ic svg { width: 16px; height: 16px; }
.prev-step b { font-family: var(--font-display); font-size: .9rem; }
.prev-step p { color: var(--mist); font-size: .8rem; margin-top: 1px; line-height: 1.4; }
.intro-enter-cap { color: var(--mist); font-family: var(--font-display); margin-bottom: 16px; }
.prev-row .badge { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: .62rem; font-family: var(--font-display); font-weight: 700; }
.prev-name { font-family: var(--font-display); font-weight: 600; font-size: .9rem; }
.prev-pick { color: var(--cream); font-size: .92rem; }
.prev-odds { font-family: var(--font-display); font-weight: 700; color: var(--cyan); }

/* walkthrough features (revealed on scroll, below the card) + enter */
.intro-features { max-width: 720px; margin: 0 auto; padding: 30px 24px 0; display: flex; flex-direction: column; gap: 18px; }
.intro-feat-label { text-align: center; font-family: var(--font-display); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.intro-steps { max-width: 720px; margin: 16vh auto 0; padding: 28px 24px 60px; display: flex; flex-direction: column; gap: 26px; }
.intro-step { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); }
.intro-step .is-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255,46,84,.14); border: 1px solid rgba(255,46,84,.35); color: var(--red); }
.intro-step .is-ic svg { width: 22px; height: 22px; }
.intro-step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.intro-step p { color: var(--mist); margin-top: 6px; font-size: .95rem; }
.intro-enter { text-align: center; padding-top: 14px; }
.intro-enter .btn { font-size: 1.05rem; padding: 1rem 2.4rem; }
.intro-skip { color: var(--mist); font-size: .85rem; margin-top: 16px; cursor: pointer; font-family: var(--font-display); }
.intro-skip:hover { color: var(--cyan); }

.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.3,1); }

@media (max-width: 768px) {
  .intro-card { border-width: 3px; border-radius: 22px; padding: 10px; }
  .prev-row { grid-template-columns: 26px 1fr auto; }
  .prev-row .prev-pick { display: none; }
}
