/* World Cup 2026 — matchday skin. Dark-default (the hero look), with a full light
   theme. Built on AICOFI-family tokens; energy palette layered for matchday vibrance.
   All motion uses transform/opacity and is disabled under prefers-reduced-motion. */

:root {
  --coral: #ff6b68;
  --violet: #9a5cff;
  --cyan: #18d6d8;
  --lime: #a7ef22;
  --pitch: #19c37d;
  --gold: #ffce4d;
  --accent: var(--coral);
  --accent-2: var(--violet);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --dur: 320ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- dark (default) ---- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1024;
  --ink: #f3f6ff;
  --muted: #9aa6c8;
  --muted-2: #6f7da6;
  --line: rgba(150, 170, 230, 0.16);
  --line-strong: rgba(150, 170, 230, 0.3);
  --surface: rgba(22, 31, 60, 0.72);
  --surface-2: rgba(30, 41, 74, 0.66);
  --surface-solid: #141d3a;
  --chip: rgba(255, 255, 255, 0.07);
  --shadow: 0 24px 70px rgba(4, 8, 24, 0.5);
  --page-bg: radial-gradient(circle at 82% -8%, rgba(255, 107, 104, 0.16), transparent 40%),
    radial-gradient(circle at 4% 4%, rgba(154, 92, 255, 0.16), transparent 36%),
    linear-gradient(180deg, #0a1024 0%, #0b1330 50%, #0a1024 100%);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8ff;
  --ink: #0a1230;
  --muted: #58618a;
  --muted-2: #8a93b8;
  --line: rgba(20, 30, 70, 0.12);
  --line-strong: rgba(20, 30, 70, 0.22);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-2: rgba(255, 255, 255, 0.96);
  --surface-solid: #ffffff;
  --chip: rgba(12, 20, 60, 0.05);
  --shadow: 0 22px 60px rgba(30, 45, 92, 0.14);
  --page-bg: radial-gradient(circle at 84% -6%, rgba(255, 107, 104, 0.16), transparent 38%),
    radial-gradient(circle at 2% 2%, rgba(154, 92, 255, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f3f6ff 48%, #ffffff 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page-bg);
  background-attachment: scroll;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
button { font-family: inherit; cursor: pointer; }

/* language toggle */
.lang-zh,
:root[data-lang="zh"] .lang-en { display: none; }
:root[data-lang="zh"] .lang-zh { display: inline; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; }
.brand-ball { font-size: 23px; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); animation: spin-in 600ms var(--ease) both; }
.brand-name { letter-spacing: 0.01em; }
.brand-name b { font-weight: 800; background: linear-gradient(96deg, var(--coral), var(--gold) 55%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes spin-in { from { transform: rotate(-180deg) scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.footer-logo-img { height: 26px; width: auto; }
.footer-logo-dark { display: none; }
:root[data-theme="dark"] .footer-logo-light { display: none; }
:root[data-theme="dark"] .footer-logo-dark { display: block; }
.top-nav { display: flex; gap: 6px; margin-left: 8px; }
.top-nav a { padding: 8px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color 160ms, background 160ms; }
.top-nav a:hover { color: var(--ink); background: var(--chip); }
.top-nav a.is-current { color: var(--ink); background: var(--chip); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; transition: color 160ms, background 160ms; }
.lang-switch button.is-active { color: #fff; background: linear-gradient(135deg, var(--coral), var(--violet)); }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--chip); display: grid; place-items: center; }
.theme-toggle-icon { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); box-shadow: inset -5px -3px 0 0 var(--bg); transition: transform var(--dur) var(--ease); }
:root[data-theme="light"] .theme-toggle-icon { box-shadow: none; background: linear-gradient(135deg, var(--coral), var(--violet)); }

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 22px clamp(16px, 4vw, 40px) 60px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #0b1330 0%, #14224d 55%, #2a1a52 100%);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
:root[data-theme="light"] .hero { background: linear-gradient(135deg, #0d1538 0%, #1b2a5c 55%, #311f5e 100%); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .pitch { position: absolute; inset: auto 0 0 0; height: 46%; background: radial-gradient(120% 100% at 50% 130%, rgba(25, 195, 125, 0.4), transparent 60%); }
.hero-bg .floodlights { position: absolute; inset: 0; background: radial-gradient(40% 60% at 18% -10%, rgba(255, 255, 255, 0.14), transparent 70%), radial-gradient(40% 60% at 82% -10%, rgba(154, 92, 255, 0.22), transparent 70%); }
.hero-bg .bokeh { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255, 206, 77, 0.5) 0 2px, transparent 3px), radial-gradient(circle, rgba(24, 214, 216, 0.4) 0 2px, transparent 3px), radial-gradient(circle, rgba(255, 107, 104, 0.4) 0 2px, transparent 3px); background-size: 220px 220px, 300px 300px, 260px 260px; background-position: 12% 30%, 70% 60%, 40% 80%; opacity: 0.5; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 96px); mask: linear-gradient(180deg, transparent, #000 26%, #000 72%, transparent); }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.45fr 1fr; gap: 26px; padding: clamp(24px, 3.5vw, 44px); }
.hero-copy { color: #fff; animation: rise var(--dur) var(--ease) both; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); color: #d9e2ff; }
.ping { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: ping 1.6s ease-out infinite; }
.hero-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 18px; line-height: 0.92; margin: 16px 0 6px; font-weight: 900; }
.hero-title .t1 { font-size: clamp(38px, 6.4vw, 78px); color: #fff; }
.hero-title .t2 { font-size: clamp(44px, 7.4vw, 92px); background: linear-gradient(96deg, var(--coral), var(--gold) 45%, var(--lime) 70%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-kicker { font-size: clamp(15px, 1.6vw, 20px); font-weight: 800; letter-spacing: 0.02em; margin: 0 0 12px; background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: rgba(255, 255, 255, 0.74); font-size: 15px; max-width: 42ch; margin: 0 0 22px; line-height: 1.55; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hosts { display: flex; gap: 8px; flex-wrap: wrap; }
.host-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #fff; padding: 8px 13px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; padding: 12px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.08); color: #fff; transition: transform 160ms var(--ease), background 160ms, border-color 160ms; }
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.16); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--pitch), var(--lime)); border-color: transparent; color: #06231a; box-shadow: 0 12px 30px rgba(25, 195, 125, 0.34); }
.btn-primary:hover { background: linear-gradient(135deg, var(--pitch), var(--lime)); }
.panel .btn, .predictor-view .btn { border-color: var(--line-strong); background: var(--chip); color: var(--ink); }
.predictor-view .btn-primary { background: linear-gradient(135deg, var(--coral), var(--violet)); color: #fff; border-color: transparent; box-shadow: 0 12px 30px rgba(154, 92, 255, 0.32); }

/* hero panel */
.hero-panel { position: relative; border-radius: var(--radius); background: rgba(8, 13, 33, 0.55); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(10px); padding: 18px; color: #fff; animation: rise var(--dur) var(--ease) 60ms both; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; background: rgba(255, 107, 104, 0.16); border: 1px solid rgba(255, 107, 104, 0.42); color: #ffd9d6; }
.live-badge .ping { background: var(--coral); }
.live-badge:not(.is-live) { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #cdd6f5; }
.live-badge:not(.is-live) .ping { animation: none; background: var(--cyan); }
.countdown { margin: 14px 0 6px; text-align: center; }
.cd-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 8px; }
.cd { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 14px; padding: 12px 6px; }
.cd b { display: block; font-size: clamp(22px, 3vw, 30px); font-weight: 900; font-variant-numeric: tabular-nums; }
.cd span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.5); }
.cd-foot { font-size: 11px; color: rgba(255, 255, 255, 0.5); }
.hp-section { margin-top: 16px; }
.hp-title { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); margin-bottom: 10px; }
.contenders { display: grid; gap: 8px; }
.contender { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 10px; font-size: 13px; font-weight: 600; }
.contender .flag { font-size: 18px; }
.contender-pct { font-weight: 800; color: var(--lime); font-variant-numeric: tabular-nums; }
.contender-bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.contender-bar i { display: block; height: 100%; border-radius: 999px; transform-origin: left; animation: grow var(--dur) var(--ease) both; }
.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-stat { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 10px 6px; text-align: center; }
.quick-stat b { display: block; font-size: 22px; font-weight: 900; background: linear-gradient(135deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quick-stat span { font-size: 10px; color: rgba(255, 255, 255, 0.6); }

/* ---------- tabs ---------- */
.tab-nav { position: sticky; top: 66px; z-index: 30; display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 0; margin-bottom: 6px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); }
.tab { font-size: 14px; font-weight: 700; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: transform 160ms var(--ease), color 160ms, background 160ms; }
.tab:hover { color: var(--ink); transform: translateY(-1px); }
.tab.is-active { color: #fff; background: linear-gradient(135deg, var(--coral), var(--violet)); border-color: transparent; box-shadow: 0 10px 26px rgba(255, 107, 104, 0.3); }

/* ---------- panel + shared cards ---------- */
.panel { animation: fade var(--dur) var(--ease) both; }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel-title { font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; }
.empty { color: var(--muted); font-size: 14px; padding: 20px 0; text-align: center; }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar-search { position: relative; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.toolbar-search .i { display: inline-flex; }
.search { flex: 1; border: 0; background: transparent; color: var(--ink); font-size: 14px; padding: 11px 0; outline: none; }
.search::placeholder { color: var(--muted-2); }
.toolbar-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.field { display: inline-flex; flex-direction: column; gap: 3px; }
.field-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); padding-left: 4px; }
.select { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; padding: 9px 30px 9px 12px; border-radius: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 8l3-3.5' stroke='%238a93b8' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; outline: none; }
.select:focus { border-color: var(--accent); }

/* ---------- team grid ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.team-card { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 16px; box-shadow: var(--shadow); transition: transform 200ms var(--ease), border-color 200ms; cursor: pointer; }
.team-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--team-color, var(--accent)); }
.team-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.team-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.team-rank { position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 800; color: var(--ink); background: color-mix(in srgb, var(--team-color, var(--accent)) 22%, transparent); padding: 4px 9px; border-radius: 9px; }
.team-card-top { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.flag { line-height: 1; }
.team-card-top .flag { font-size: 32px; }
.team-id h3 { font-size: 17px; font-weight: 800; }
.team-sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.ovr-row { display: flex; align-items: baseline; gap: 7px; margin: 12px 0 6px; }
.ovr-label { font-size: 11px; font-weight: 700; color: var(--muted-2); letter-spacing: 0.08em; }
.ovr { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar-fill { height: 100%; width: var(--v, 0%); border-radius: 999px; background: linear-gradient(90deg, var(--bar-color, var(--accent)), var(--accent-2)); transform-origin: left; animation: grow var(--dur) var(--ease) both; }
.team-style { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 12px 0; min-height: 38px; }
.traits { display: flex; gap: 6px; flex-wrap: wrap; }
.trait { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); border: 1px solid var(--line); }

/* ---------- team detail ---------- */
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; margin-bottom: 16px; }
.back-btn:hover { color: var(--ink); }
.detail-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.detail-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--team-color); }
.flag-lg { font-size: 56px; }
.detail-id h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 900; }
.detail-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.detail-meta b { color: var(--ink); }
.detail-style { font-size: 14px; color: var(--muted); max-width: 60ch; margin: 0 0 10px; line-height: 1.5; }
.detail-ovr { text-align: center; }
.detail-ovr span { display: block; font-size: 11px; font-weight: 700; color: var(--muted-2); letter-spacing: 0.08em; }
.detail-ovr b { font-size: 46px; font-weight: 900; letter-spacing: -0.03em; background: linear-gradient(135deg, var(--team-color), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.detail-grid { display: grid; grid-template-columns: 1.1fr 1fr 0.9fr; gap: 14px; margin-top: 14px; }
.panel-wide { grid-column: 1 / -1; }

.kp-list { display: grid; gap: 8px; }
.kp-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; text-align: left; color: var(--ink); transition: transform 160ms var(--ease), border-color 160ms; }
.kp-row:hover { transform: translateX(2px); border-color: var(--line-strong); }
.kp-avatar, .pr-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--team-color, var(--accent)), var(--accent-2)); }
.kp-info b { font-size: 14px; font-weight: 700; }
.kp-info small { display: block; font-size: 11px; color: var(--muted); }
.kp-ovr { font-size: 18px; font-weight: 900; color: var(--team-color, var(--ink)); }
.link-btn { margin-top: 12px; background: none; border: 0; color: var(--accent); font-size: 13px; font-weight: 700; padding: 0; }
.info-dl { display: grid; gap: 10px; margin: 0; }
.info-dl > div { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.info-dl dt { color: var(--muted); }
.info-dl dd { margin: 0; font-weight: 700; }

/* fixtures rows (shared by detail + fixtures tab) */
.fx-list { display: grid; gap: 7px; }
.md-divider { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); padding: 8px 2px 2px; }
.fx-row { display: grid; grid-template-columns: 74px 1fr auto 1fr auto; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 13px; }
.fx-date { color: var(--muted); font-weight: 600; font-size: 12px; }
.fx-date small { display: block; color: var(--muted-2); font-size: 11px; }
.fx-team { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.fx-team .flag { font-size: 18px; }
.fx-team.away { justify-content: flex-end; text-align: right; }
.fx-vs, .fx-score { font-weight: 800; color: var(--muted-2); text-align: center; }
.fx-score { color: var(--ink); }
.fx-status { font-size: 11px; font-weight: 700; color: var(--muted-2); text-align: right; }
.status-final { color: var(--pitch); }

/* ---------- players ---------- */
.players-layout { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.player-list { display: grid; gap: 7px; max-height: 640px; overflow: auto; padding-right: 4px; }
.player-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; text-align: left; color: var(--ink); transition: border-color 160ms, transform 160ms var(--ease); }
.player-row:hover { transform: translateX(2px); }
.player-row.is-active { border-color: var(--team-color, var(--accent)); background: color-mix(in srgb, var(--team-color, var(--accent)) 12%, var(--surface)); }
.pr-info b { font-size: 14px; }
.pr-info small { display: block; font-size: 11px; color: var(--muted); }
.pr-ovr { font-size: 17px; font-weight: 900; }
.profile-card { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.profile-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 20px; position: relative; background: linear-gradient(135deg, color-mix(in srgb, var(--team-color, var(--accent)) 22%, transparent), transparent 70%); }
.profile-avatar { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; font-size: 26px; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--team-color, var(--accent)), var(--accent-2)); }
.profile-number { position: absolute; bottom: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.profile-id h2 { font-size: 26px; font-weight: 900; }
.profile-team { margin-top: 6px; background: var(--chip); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.profile-team:hover { color: var(--ink); }
.profile-ovr { text-align: center; }
.profile-ovr span { display: block; font-size: 11px; color: var(--muted-2); font-weight: 700; }
.profile-ovr b { font-size: 40px; font-weight: 900; background: linear-gradient(135deg, var(--team-color, var(--accent)), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.profile-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
.bio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bio-grid > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.bio-grid dt { font-size: 11px; color: var(--muted-2); margin-bottom: 3px; }
.bio-grid dd { margin: 0; font-size: 15px; font-weight: 800; }
.profile-radar { display: grid; place-items: center; }
.scout-note { padding: 0 20px 20px; }
.scout-tag, .intel-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--violet), var(--cyan)); padding: 5px 11px; border-radius: 999px; margin-bottom: 8px; }
.scout-note p, .match-intel p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0; }

/* radar svg */
.radar { width: 100%; max-width: 320px; height: auto; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-spoke { stroke: var(--line); stroke-width: 1; }
.radar-area { fill: color-mix(in srgb, var(--radar-color, var(--accent)) 28%, transparent); stroke: var(--radar-color, var(--accent)); stroke-width: 2; animation: fade var(--dur) var(--ease) both; }
.radar-label { fill: var(--muted); font-size: 11px; font-weight: 700; }
.radar-val { fill: var(--ink); font-size: 12px; font-weight: 800; }

/* ---------- fixtures & groups ---------- */
.provisional-banner { display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--gold) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; }
.pb-icon { font-size: 18px; }
.provisional-banner p { margin: 0; font-size: 13px; color: var(--ink); }
.group-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.group-tab { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 800; font-size: 14px; }
.group-tab.is-active { color: #fff; background: linear-gradient(135deg, var(--coral), var(--violet)); border-color: transparent; }
.fixtures-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; align-items: start; }
.standings { width: 100%; border-collapse: collapse; font-size: 13px; }
.standings th { font-size: 11px; color: var(--muted-2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 4px; text-align: center; }
.standings td { padding: 9px 4px; text-align: center; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.standings .ta-left { text-align: left; }
.standings tbody tr { cursor: pointer; }
.standings tbody tr:hover { background: var(--chip); }
.standings tr.qualifies td.pos { color: var(--pitch); font-weight: 900; }
.standings tr.qualifies td.pos::before { content: "▌"; color: var(--pitch); margin-right: 2px; }
.team-cell { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.team-cell .flag { font-size: 18px; }
.standings .pts { font-weight: 900; }
.form-cell { display: flex; gap: 4px; }
.form-dot { width: 18px; height: 18px; border-radius: 6px; font-size: 10px; font-weight: 800; color: #fff; display: grid; place-items: center; }
.form-W { background: var(--pitch); }
.form-D { background: var(--muted-2); }
.form-L { background: var(--coral); }
.qualify-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.played-pill { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--chip); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }

/* ---------- bracket ---------- */
.champion-banner { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; border-radius: var(--radius); border: 1px solid var(--line); padding: 18px 22px; margin-bottom: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--team-color, var(--gold)) 28%, var(--surface)), var(--surface) 70%); box-shadow: var(--shadow); transition: transform 160ms var(--ease); }
.champion-banner:hover { transform: translateY(-2px); }
.champ-trophy { font-size: 40px; }
.champ-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.champ-name { font-size: 26px; font-weight: 900; display: inline-flex; align-items: center; gap: 10px; }
.champ-name .flag { font-size: 30px; }
.champ-ovr { margin-left: auto; font-size: 15px; font-weight: 900; color: var(--team-color, var(--ink)); }
.bracket-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.bracket-col { flex: 0 0 200px; display: flex; flex-direction: column; gap: 12px; }
.bracket-round { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); padding: 4px 2px; position: sticky; top: 0; }
.bracket-match { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
.bracket-team { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); text-align: left; font-size: 13px; }
.bracket-team .flag { font-size: 17px; }
.bracket-team.is-winner { background: color-mix(in srgb, var(--team-color, var(--accent)) 16%, transparent); color: var(--ink); font-weight: 800; }
.bracket-team:not(.is-winner) { opacity: 0.6; }
.bt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-ovr { font-weight: 800; font-size: 12px; }
.golden-boot { margin-top: 16px; }
.gb-list { display: grid; gap: 7px; }
.gb-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--team-color, var(--accent)); border-radius: 10px; padding: 9px 12px; }
.gb-rank { font-weight: 900; color: var(--muted-2); text-align: center; }
.gb-name b { font-weight: 700; }
.gb-name small { color: var(--muted); font-size: 12px; }
.gb-goals { font-weight: 900; font-size: 18px; }
.gb-goals small { font-size: 10px; color: var(--muted-2); font-weight: 600; }

/* ---------- predictor ---------- */
.predictor-view { max-width: 860px; margin: 0 auto; }
.pred-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-bottom: 16px; }
.team-select-wrap { display: flex; }
.side-away { justify-content: flex-end; }
.team-select { width: 100%; max-width: 320px; appearance: none; font-size: 15px; font-weight: 700; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.pred-vs { font-size: 13px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.1em; }
.pred-card { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 22px; }
.pred-matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 20px; }
.pred-side { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.pred-side b { font-size: 18px; font-weight: 800; }
.pred-side small { font-size: 12px; color: var(--muted); }
.pred-side .flag-lg { font-size: 50px; }
.pred-score { text-align: center; }
.pred-score-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.pred-score b { font-size: clamp(40px, 7vw, 60px); font-weight: 900; letter-spacing: -0.03em; background: linear-gradient(135deg, var(--coral), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pred-score b span { -webkit-text-fill-color: var(--muted-2); }
.pred-ft { display: block; font-size: 11px; color: var(--muted-2); }
.prob-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); text-align: center; margin-bottom: 8px; }
.prob-bar { display: flex; height: 30px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.prob-bar .seg { display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; transition: width var(--dur) var(--ease); min-width: 0; overflow: hidden; }
.seg-home { background: linear-gradient(90deg, var(--pitch), #14a86a); }
.seg-draw { background: var(--muted-2); }
.seg-away { background: linear-gradient(90deg, var(--violet), var(--coral)); }
.prob-keys { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.prob-keys span { display: inline-flex; align-items: center; gap: 6px; }
.prob-keys i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.k-draw { background: var(--muted-2); }
.pred-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.stat-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.stat-label { display: block; font-size: 11px; color: var(--muted-2); font-weight: 700; margin-bottom: 6px; }
.stat-value { font-size: 18px; font-weight: 900; }
.stat-value small { font-size: 11px; color: var(--muted-2); font-weight: 700; }
.match-intel { background: color-mix(in srgb, var(--violet) 8%, var(--surface-2)); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.pred-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); opacity: 0; transition: opacity 240ms, transform 240ms var(--ease); z-index: 80; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.site-footer { max-width: var(--maxw); margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 48px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-brand p { margin: 0; font-size: 13px; color: var(--muted); }
.footer-note { font-size: 12px; color: var(--muted-2); margin: 0; }
.footer-link { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ---------- animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 104, 0.6); } 100% { box-shadow: 0 0 0 8px rgba(255, 107, 104, 0); } }

/* ---------- stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.stat-board .panel-title { display: flex; align-items: center; gap: 8px; }
.board-icon { font-size: 18px; }
.board-list { display: grid; gap: 7px; }
.board-row { display: grid; grid-template-columns: 24px 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; text-align: left; color: var(--ink); transition: transform 140ms var(--ease), border-color 140ms; }
.board-row:hover { transform: translateX(2px); border-color: var(--line-strong); }
.board-rank { grid-row: 1 / 3; font-weight: 900; color: var(--muted-2); text-align: center; }
.board-name { font-size: 13px; }
.board-name b { font-weight: 700; }
.board-name small { color: var(--muted); }
.board-val { font-weight: 900; font-size: 16px; }
.board-val small { font-size: 10px; color: var(--muted-2); font-weight: 600; margin-left: 3px; }
.board-bar { grid-column: 2 / 4; height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.board-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--team-color, var(--accent)), var(--accent-2)); transform-origin: left; animation: grow var(--dur) var(--ease) both; }

/* ---------- modal + match center ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 8, 24, 0.8); backdrop-filter: blur(8px); opacity: 0; transition: opacity 200ms var(--ease); }
.modal-overlay.show { opacity: 1; }
.modal-dialog { position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); transform: translateY(12px) scale(0.98); transition: transform 220ms var(--ease); }
.modal-overlay.show .modal-dialog { transform: none; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--chip); color: var(--ink); font-size: 14px; }
.mc-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 14px; padding-right: 32px; }
.mc-stage { font-weight: 800; color: var(--ink); }
.mc-matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 16px; }
.mc-side { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; color: var(--ink); }
.mc-side .flag-lg { font-size: 44px; }
.mc-side b { font-size: 15px; }
.mc-side small { color: var(--muted); font-size: 12px; }
.mc-score { text-align: center; }
.mc-score b { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; }
.mc-score b span { color: var(--muted-2); }
.mc-score-tag { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.mc-probs { margin-bottom: 14px; }
.mc-prob-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); text-align: center; margin-bottom: 6px; }
.mc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.mc-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.mc-stat span { display: block; font-size: 11px; color: var(--muted-2); }
.mc-stat b { font-size: 16px; font-weight: 800; }
.mc-keyplayers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mc-kp-team { display: block; font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.mc-kp { display: flex; flex-direction: column; width: 100%; align-items: flex-start; gap: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; color: var(--ink); text-align: left; }
.mc-kp b { font-size: 13px; }
.mc-kp small { font-size: 11px; color: var(--muted); }

/* ---------- projected path ---------- */
.path-outcome { font-size: 15px; font-weight: 800; padding: 10px 14px; border-radius: 12px; background: var(--chip); border: 1px solid var(--line); margin-bottom: 12px; }
.path-outcome.is-champ { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 30%, var(--surface)), var(--surface)); }
.path-list { display: grid; gap: 7px; }
.path-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--team-color, var(--accent)); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.path-round { font-weight: 700; color: var(--muted); }
.path-opp small { color: var(--muted-2); }
.path-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.path-badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.path-row.won .path-badge { background: color-mix(in srgb, var(--pitch) 22%, transparent); color: var(--pitch); }
.path-row.lost .path-badge { background: color-mix(in srgb, var(--coral) 22%, transparent); color: var(--coral); }
.fx-row.is-clickable { cursor: pointer; transition: transform 140ms var(--ease), border-color 140ms; }
.fx-row.is-clickable:hover { transform: translateX(2px); border-color: var(--line-strong); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .players-layout { grid-template-columns: 1fr; }
  .player-list { max-height: 360px; }
  .fixtures-cols { grid-template-columns: 1fr; }
  .profile-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top-nav { display: none; }
  .detail-head { grid-template-columns: auto 1fr; }
  .detail-ovr { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .pred-controls { grid-template-columns: 1fr; }
  .side-away { justify-content: flex-start; }
  .pred-stats { grid-template-columns: 1fr; }
  .quick-stats, .cd-grid { gap: 6px; }
  .fx-row { grid-template-columns: 60px 1fr auto; }
  .fx-team.away { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
