/* AI SPORTS — design system: tokens, type, layout, shared components */
:root {
  --bg: #04060c;
  --bg-1: #070b15;
  --bg-2: #0b1120;
  --panel: #0c1322;
  --panel-2: #101a2d;
  --panel-hi: #14203a;
  --line: rgba(148, 170, 220, .10);
  --line-2: rgba(148, 170, 220, .18);
  --text: #eaf0fb;
  --text-2: #b6c2dc;
  --muted: #7d8aa6;
  --dim: #56617a;
  --accent: #2be4ff;
  --accent-2: #3d7bff;
  --accent-glow: rgba(43, 228, 255, .35);
  --red: #ff3448;
  --red-2: #b3112a;
  --red-glow: rgba(255, 52, 72, .35);
  --blue: #2f86ff;
  --blue-2: #1347b8;
  --blue-glow: rgba(47, 134, 255, .35);
  --gold: #ffc940;
  --gold-2: #c98a12;
  --green: #1fe08f;
  --green-dim: rgba(31, 224, 143, .14);
  --loss: #ff5d6c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .8), 0 2px 0 rgba(255, 255, 255, .02) inset;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --display: "Bahnschrift", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", "Segoe UI", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial, sans-serif;
  --impact: Impact, "Bahnschrift", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --topbar-h: 104px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(61, 123, 255, .13), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(43, 228, 255, .07), transparent 60%),
    linear-gradient(180deg, #060914 0%, var(--bg) 40%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #001018; }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.disp {
  font-family: var(--display);
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.disp-i { font-style: italic; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.red { color: var(--red); }
.blue { color: var(--blue); }
.gold { color: var(--gold); }
.accent { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(4, 6, 12, .96), rgba(6, 9, 18, .9));
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-2) 70%, transparent);
  opacity: .35;
}
.topbar-in { display: flex; align-items: center; gap: 22px; padding: 0 24px; height: 60px; max-width: 1680px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-badge {
  width: 38px; height: 38px; display: block;
  background: url(/assets/favicon.svg) center/contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(43, 228, 255, .35));
  transition: transform .5s var(--ease-out);
}
.brand:hover .brand-badge { transform: rotate(-12deg) scale(1.08); }
.brand-word { font-family: var(--display); font-variation-settings: "wdth" 75; font-stretch: 75%; font-size: 26px; line-height: 1; font-style: italic; letter-spacing: .01em; }
.brand-word b { font-weight: 800; background: linear-gradient(180deg, #fff, #9fdcff 60%, #4d8cff); -webkit-background-clip: text; background-clip: text; color: transparent; margin-right: 4px; }
.brand-word i { font-weight: 700; color: #dfe8ff; }
.sports { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.sports::-webkit-scrollbar { display: none; }
@media (max-width: 1500px) { .sports { mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); } }
.sport-tab {
  display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; white-space: nowrap;
  font-family: var(--display); font-variation-settings: "wdth" 80; font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); transition: color .2s, background .2s;
}
.sport-tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.sport-tab.on { color: #fff; background: rgba(43, 228, 255, .09); box-shadow: inset 0 0 0 1px rgba(43, 228, 255, .25); }
.sport-tab .soon { font-size: 9.5px; letter-spacing: .1em; color: var(--dim); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 4px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red-glow); animation: livepulse 1.6s infinite; flex: none; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(255, 52, 72, .7); } 70% { box-shadow: 0 0 0 8px rgba(255, 52, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 52, 72, 0); } }
.top-right { display: flex; align-items: center; gap: 10px; flex: none; }
.wallet-pill {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(31, 224, 143, .14), rgba(31, 224, 143, .05)); box-shadow: inset 0 0 0 1px rgba(31, 224, 143, .3);
  transition: transform .2s var(--ease);
}
.wallet-pill:hover { transform: translateY(-1px); }
.wp-label { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: #001a10; background: var(--green); padding: 2px 5px; border-radius: 4px; }
.wp-val { font-family: var(--display); font-variation-settings: "wdth" 85; font-weight: 700; font-size: 17px; color: #d7ffe9; }
.wallet-pill.bump .wp-val { animation: bump .6s var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.18); color: #fff; } 100% { transform: scale(1); } }
.subnav { display: flex; gap: 4px; padding: 0 24px; height: 44px; align-items: center; max-width: 1680px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  position: relative; padding: 12px 12px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .2s;
}
.subnav a:hover { color: var(--text); }
.subnav a.on { color: #fff; }
.subnav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* ---------- app shell ---------- */
.app { max-width: 1680px; margin: 0 auto; padding: 18px 24px 40px; min-height: calc(100vh - 200px); }
.page-enter { animation: pageIn .45s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.foot { border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.foot-in { max-width: 1680px; margin: 0 auto; padding: 20px 24px 30px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.foot-brand { font-family: var(--display); font-variation-settings: "wdth" 75; font-style: italic; font-weight: 700; color: var(--muted); font-size: 16px; }
.foot a { color: var(--accent); margin-left: auto; }

/* ---------- cards / panels ---------- */
.card {
  background: linear-gradient(180deg, rgba(20, 31, 56, .55), rgba(12, 19, 34, .72));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.card-h {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px 11px; border-bottom: 1px solid var(--line);
}
.card-h h2, .card-h h3 {
  margin: 0; font-family: var(--display); font-variation-settings: "wdth" 75; font-stretch: 75%; font-weight: 700; font-size: 17px; letter-spacing: .05em; text-transform: uppercase; font-style: italic;
}
.card-h .sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.card-b { padding: 14px 16px; }
.h-ico { width: 16px; height: 16px; color: var(--accent); flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255, 255, 255, .06); color: var(--text-2); white-space: nowrap;
}
.chip.live { background: var(--red); color: #fff; }
.chip.open { background: rgba(31, 224, 143, .15); color: var(--green); box-shadow: inset 0 0 0 1px rgba(31, 224, 143, .35); }
.chip.locked { background: rgba(255, 201, 64, .12); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 201, 64, .3); }
.chip.title { background: linear-gradient(90deg, #ffdf7a, #d9971b); color: #2a1800; }
.chip.won { background: var(--green); color: #00170c; }
.chip.lost { background: rgba(255, 93, 108, .14); color: var(--loss); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .35); }
.chip.refund { background: rgba(255, 255, 255, .08); color: var(--text-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 13px; letter-spacing: .02em;
  background: linear-gradient(180deg, #3ae8ff, #12b6dc); color: #00131a; box-shadow: 0 8px 24px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .15s var(--ease), filter .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-ghost { background: rgba(255, 255, 255, .05); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.grid { display: grid; gap: 16px; }
.sec-title {
  display: flex; align-items: baseline; gap: 14px; margin: 6px 0 16px;
}
.sec-title h1 {
  margin: 0; font-family: var(--display); font-variation-settings: "wdth" 75; font-stretch: 75%; font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 40px; letter-spacing: .01em; line-height: 1;
}
.sec-title h1 em { font-style: italic; color: var(--accent); }
.sec-title p { margin: 0; color: var(--muted); }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; transition: width .5s var(--ease); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.me td { background: rgba(43, 228, 255, .07); }
.tbl .r { text-align: right; }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto; min-width: 260px; max-width: 360px; padding: 12px 14px; border-radius: 12px; background: rgba(16, 26, 45, .96); border: 1px solid var(--line-2);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .7); display: flex; gap: 10px; align-items: flex-start; animation: toastIn .45s var(--ease-out) both;
}
.toast.out { animation: toastOut .35s ease both; }
.toast b { display: block; font-size: 13px; }
.toast span { color: var(--text-2); font-size: 12px; }
.toast .t-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; font-weight: 900; }
.toast.ok .t-ico { background: var(--green); color: #00170c; }
.toast.bad .t-ico { background: var(--loss); color: #fff; }
.toast.info .t-ico { background: var(--accent); color: #001018; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* belts / rank badges */
.rank-badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 5px; font-family: var(--display); font-variation-settings: "wdth" 80; font-weight: 700; font-size: 12px;
  background: rgba(255, 255, 255, .08); color: var(--text-2);
}
.rank-badge.champ { background: linear-gradient(180deg, #ffe27a, #d39516); color: #2a1800; box-shadow: 0 0 12px rgba(255, 201, 64, .45); }

@media (max-width: 860px) {
  :root { --topbar-h: 96px; }
  .topbar-in { padding: 0 14px; gap: 12px; height: 56px; }
  .brand-word { font-size: 22px; }
  .brand-badge { width: 32px; height: 32px; }
  .subnav { padding: 0 8px; height: 40px; }
  .app { padding: 12px 12px 30px; }
  .hide-sm { display: none !important; }
  .sec-title h1 { font-size: 30px; }
  .sec-title { flex-wrap: wrap; }
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* v3: season 2 pill in the top bar */
.season-pill { flex: none; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 12px; letter-spacing: .14em; padding: 4px 10px; border-radius: 999px; color: #2a1800; background: linear-gradient(90deg, #ffdf7a, #d9971b); box-shadow: 0 0 14px rgba(255, 201, 64, .28); text-decoration: none; white-space: nowrap; }
.season-pill:hover { filter: brightness(1.08); }
@media (max-width: 720px) { .season-pill { font-size: 10px; padding: 3px 7px; letter-spacing: .1em; } }
@media (max-width: 520px) { .season-pill .sp-w { display: none; } .season-pill { letter-spacing: .04em; } }
