/* ============================================================
   Eyeball · World Cup 2026 Sweepstake
   Design language aligned with the eyeball.club product:
   navy #000938 · cyan #03C5FF · editorial type, eyebrows,
   two-tone display headlines, numbered steps, pill CTAs.
   ============================================================ */

:root {
  --navy: #000938;
  --navy-900: #00041f;
  --navy-800: #050f3f;
  --navy-700: #0a1751;
  --navy-600: #122064;
  --cyan: #03c5ff;
  --cyan-300: #5cdcff;
  --cyan-600: #029fd6;
  --cyan-grad: linear-gradient(180deg, #3ad4ff 0%, #03c5ff 100%);
  --white: #ffffff;
  --ink: #eaf0ff;
  --muted: #8b95c9;
  --muted-2: #5d6aa6;
  --line: rgba(120, 140, 220, 0.16);
  --line-strong: rgba(120, 150, 230, 0.34);
  --surface: rgba(13, 26, 80, 0.52);
  --surface-2: rgba(8, 18, 58, 0.72);
  --surface-3: rgba(5, 13, 44, 0.85);
  --gold: #ffd23f;
  --silver: #c7d2ff;
  --live: #ff3b5c;
  --green: #2fe6a8;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(3, 197, 255, 0.25), 0 18px 60px -16px rgba(3, 197, 255, 0.3);
  --glow-cta: 0 10px 30px -10px rgba(3, 197, 255, 0.65);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 720px at 80% -10%, rgba(3, 197, 255, 0.18), transparent 60%),
    radial-gradient(960px 640px at 4% 2%, rgba(3, 197, 255, 0.08), transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }

.accent { color: var(--cyan); }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Eyebrow (marketing-style section label) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(3, 197, 255, 0.7);
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::before { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(0, 9, 56, 0.94), rgba(0, 9, 56, 0.6));
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 26px; width: auto; display: block; }
.brand__tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  font-weight: 700;
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav a.is-active { color: var(--navy); background: var(--cyan); box-shadow: var(--glow-cta); }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.user-chip a { color: var(--cyan); font-weight: 600; }

.nav-toggle { display: none; }

/* ---------- Page scaffolding ---------- */
.page { padding: 40px 0 72px; }

.page__head { margin-bottom: 28px; max-width: 720px; }
.page__head--anchored {
  margin-top: 48px; padding-top: 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}
.page__title { font-size: 38px; line-height: 1.06; }
.page__sub { color: var(--muted); margin-top: 12px; font-size: 16px; max-width: 60ch; }

.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan); font-weight: 700; margin: 30px 0 14px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Stat band (prize pool / entry) ---------- */
.pool {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.pool__card {
  padding: 22px 24px;
  position: relative;
}
.pool__card + .pool__card { border-left: 1px solid var(--line); }
.pool__card--hero {
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(3, 197, 255, 0.2), transparent 70%);
}
.pool__label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pool__value { font-size: 34px; font-weight: 800; margin-top: 8px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pool__value .unit { font-size: 16px; color: var(--cyan); font-weight: 700; margin-left: 5px; letter-spacing: 0; }
.pool__meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.pool__prize { display: flex; align-items: baseline; gap: 8px; }
.pool__prize .pct { color: var(--gold); font-weight: 800; }
.pool--first .pool__value { color: var(--gold); }
.pool--second .pool__value { color: var(--silver); }

/* ---------- Live strip ---------- */
.livestrip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 18px;
  margin: 18px 0;
  font-size: 14px;
}
.livestrip a { color: var(--cyan); font-weight: 600; }
.livestrip__none { color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Numbered steps (how it works) ---------- */
.steps { display: grid; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: border-color 0.15s, transform 0.15s;
}
.step:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.step__num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  min-width: 58px;
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(3, 197, 255, 0.22) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.step__title { font-size: 18px; font-weight: 800; margin-bottom: 7px; }
.step__body { color: var(--ink); font-size: 15px; }
.step__body p { margin: 0 0 8px; }
.step__body p:last-child { margin-bottom: 0; }
.step__body .muted { color: var(--muted); font-size: 14px; }
.step__body a { color: var(--cyan); font-weight: 600; }
.step__body strong { color: var(--white); }

/* ---------- Leaderboard ---------- */
.board { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 20px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.row--first {
  border-color: rgba(255, 210, 63, 0.5);
  background:
    radial-gradient(420px 160px at 0% 0%, rgba(255, 210, 63, 0.1), transparent 70%),
    var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 210, 63, 0.22), var(--shadow);
}
.row--second { border-color: rgba(199, 210, 255, 0.42); }
.row--live { border-color: rgba(3, 197, 255, 0.5); }

.rank { display: flex; align-items: center; justify-content: center; }
.rank__num {
  font-size: 20px; font-weight: 800; color: var(--muted);
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.row--first .rank__num { color: var(--navy); background: var(--gold); border-color: transparent; box-shadow: 0 8px 20px -8px rgba(255, 210, 63, 0.7); }
.row--second .rank__num { color: var(--navy); background: var(--silver); border-color: transparent; }

.who { min-width: 0; }
.who__name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who__teams { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }

.standing { text-align: right; }
.standing__stage { font-size: 14px; font-weight: 700; color: var(--cyan); white-space: nowrap; }
.standing__prize { font-size: 15px; font-weight: 800; margin-top: 4px; color: var(--gold); white-space: nowrap; }
.standing__prize--second { color: var(--silver); }
.standing__note { font-size: 12px; color: var(--muted-2); margin-top: 2px; }

/* team chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600;
  max-width: 100%;
}
.chip__flag { font-size: 15px; line-height: 1; }
.chip__crest { width: 16px; height: 16px; border-radius: 3px; object-fit: cover; }
.chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip--out { opacity: 0.45; text-decoration: line-through; text-decoration-color: var(--muted-2); }
.chip--best { border-color: rgba(3, 197, 255, 0.5); background: rgba(3, 197, 255, 0.1); color: var(--cyan-300); }

/* ---------- Match cards (today) ---------- */
.matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.match {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.15s, transform 0.15s;
}
.match:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.match--live { border-color: rgba(255, 59, 92, 0.5); box-shadow: 0 0 0 1px rgba(255, 59, 92, 0.16); }
.match__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.match__stage { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match__side {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  padding: 8px 0;
}
.match__side + .match__side { border-top: 1px solid var(--line); }
.match__team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.match__team .flag { font-size: 22px; line-height: 1; }
.match__team .crest { width: 22px; height: 22px; border-radius: 4px; }
.match__name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match__owner { display: block; font-size: 11.5px; color: var(--cyan); font-weight: 600; margin-top: 1px; }
a.match__owner:hover { text-decoration: underline; }
.match__owner--none { color: var(--muted-2); }
.match__score { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 24px; text-align: center; }
.match__side--win .match__name { color: var(--white); }
.match__side--lose { opacity: 0.6; }
.match__time { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; flex-shrink: 0; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge--live { color: #fff; background: var(--live); border-color: transparent; }
.badge--ft { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.badge--ko { color: var(--cyan); border-color: rgba(3, 197, 255, 0.4); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot--pulse { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(3, 197, 255, 0.1); color: var(--cyan-300); border: 1px solid rgba(3, 197, 255, 0.25);
}

/* ---------- Groups ---------- */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.group { padding: 4px 0 8px; }
.group__head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; font-weight: 800; font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.group__letter {
  width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px;
  background: var(--cyan-grad); color: var(--navy); font-weight: 800; font-size: 14px;
  box-shadow: var(--glow-cta);
}
.gtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.gtable th { text-align: right; color: var(--muted); font-weight: 600; font-size: 11px; padding: 9px 6px; }
.gtable th:first-child { text-align: left; }
.gtable td { padding: 10px 6px; text-align: right; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.gtable td:first-child { text-align: left; }
.gteam { display: flex; align-items: center; gap: 8px; }
.gteam .flag { font-size: 17px; }
.gteam .crest { width: 18px; height: 18px; border-radius: 3px; }
.gteam__owner { font-size: 11px; color: var(--cyan); margin-left: 4px; }
a.gteam__owner:hover { text-decoration: underline; }
.gtable tr.is-through td { background: rgba(3, 197, 255, 0.05); }
.gtable td.pts { color: var(--white); font-weight: 800; }
.gtable tr.is-out .gteam { opacity: 0.5; }

/* ---------- Auth ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 380px at 50% -8%, rgba(3, 197, 255, 0.22), transparent 60%);
  pointer-events: none;
}
.auth__card {
  position: relative;
  width: 100%; max-width: 440px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 38px 34px;
  box-shadow: var(--glow), var(--shadow);
  text-align: center;
}
.auth__logo { height: 30px; margin-bottom: 22px; }
.auth__title { font-size: 26px; }
.auth__sub { color: var(--muted); font-size: 14.5px; margin: 10px 0 26px; }
.auth__perks {
  list-style: none; margin: 24px 0 0; padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid; gap: 10px; text-align: left;
}
.auth__perks li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--muted); }
.auth__perks li::before {
  content: "✓"; color: var(--cyan); font-weight: 800;
  width: 20px; height: 20px; flex: none; display: grid; place-items: center;
  background: rgba(3, 197, 255, 0.12); border-radius: 50%; font-size: 11px;
}
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.04em; }
.input {
  width: 100%; padding: 14px 15px; font-size: 15px;
  background: rgba(0, 0, 0, 0.25); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 12px; outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(3, 197, 255, 0.18); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 20px; font-size: 15px; font-weight: 700;
  background: var(--cyan-grad); color: var(--navy); border: none; border-radius: 999px;
  cursor: pointer; font-family: inherit;
  box-shadow: var(--glow-cta);
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 14px 36px -10px rgba(3, 197, 255, 0.7); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--cyan); border: 1px solid var(--line-strong); box-shadow: none; }
.btn--ghost:hover { background: rgba(3, 197, 255, 0.07); box-shadow: none; }

.alert { padding: 12px 15px; border-radius: 12px; font-size: 13.5px; margin-bottom: 16px; text-align: left; }
.alert--error { background: rgba(255, 59, 92, 0.12); border: 1px solid rgba(255, 59, 92, 0.4); color: #ffc2cc; }
.alert--info { background: rgba(3, 197, 255, 0.1); border: 1px solid rgba(3, 197, 255, 0.3); color: var(--cyan-300); }
.devlink { word-break: break-all; font-size: 12px; }

/* ---------- Empty / notices ---------- */
.empty { text-align: center; color: var(--muted); padding: 48px 24px; }
.empty__big { font-size: 42px; margin-bottom: 10px; }
.empty strong { color: var(--ink); font-size: 17px; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(255, 210, 63, 0.08); border: 1px solid rgba(255, 210, 63, 0.28);
  color: #ffe9a8; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted-2); font-size: 13px; }
.site-footer a { color: var(--muted); }
.site-footer__admin { font-weight: 600; }
.site-footer__admin:hover { color: var(--cyan); }
.updated { font-size: 12px; color: var(--muted-2); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .page { padding: 28px 0 56px; }
  .page__title { font-size: 30px; }
  .pool { grid-template-columns: 1fr; }
  .pool__card + .pool__card { border-left: none; border-top: 1px solid var(--line); }
  .nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--navy-900); border-bottom: 1px solid var(--line);
    padding: 8px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { border-radius: 10px; }
  .nav-toggle {
    display: inline-grid; place-items: center; margin-left: auto;
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink);
    cursor: pointer;
  }
  .row { grid-template-columns: 44px 1fr; }
  .standing { grid-column: 2; text-align: left; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; }
  .standing__prize { margin-top: 0; }
  .user-chip span { display: none; }
  .step { grid-template-columns: auto 1fr; gap: 16px; padding: 20px; }
  .step__num { font-size: 34px; min-width: 44px; }
}

/* ---------- Profile ---------- */
.user-chip a.user-chip__id {
  color: var(--muted); font-weight: 600;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-chip a.user-chip__id:hover { color: var(--ink); }

.backlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 18px;
}
.backlink:hover { color: var(--cyan); }

.phero {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); margin-bottom: 8px;
}
.phero--first {
  border-color: rgba(255, 210, 63, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 210, 63, 0.22), var(--shadow);
  background: radial-gradient(520px 220px at 0% 0%, rgba(255, 210, 63, 0.1), transparent 70%), var(--surface-2);
}
.phero--second { border-color: rgba(199, 210, 255, 0.42); }
.phero__rank { text-align: center; }
.phero__ranknum {
  font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  width: 76px; height: 76px; display: grid; place-items: center; border-radius: 18px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); color: var(--ink);
}
.phero--first .phero__ranknum { background: var(--gold); color: var(--navy); border-color: transparent; box-shadow: 0 8px 20px -8px rgba(255, 210, 63, 0.7); }
.phero--second .phero__ranknum { background: var(--silver); color: var(--navy); border-color: transparent; }
.phero__ranklbl { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 7px; font-weight: 700; }
.phero__main { min-width: 0; }
.phero__name { font-size: 28px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phero__meta { color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.phero__stage { color: var(--cyan); font-weight: 700; }
.phero__dot { margin: 0 4px; }
.phero__prize { text-align: right; white-space: nowrap; }
.phero__prizeval { font-size: 22px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.phero__prizeval--second { color: var(--silver); }
.phero__prizeval--none { font-size: 15px; color: var(--muted); font-weight: 700; }
.phero__prizenote { font-size: 12px; color: var(--muted-2); margin-top: 3px; }

.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; transition: border-color 0.15s, transform 0.15s;
}
.tcard:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.tcard--best { border-color: rgba(3, 197, 255, 0.5); box-shadow: 0 0 0 1px rgba(3, 197, 255, 0.16); }
.tcard--out { opacity: 0.62; }
.tcard__head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.tcard__head .crest { width: 30px; height: 30px; border-radius: 5px; }
.tcard__head .flag { font-size: 28px; line-height: 1; }
.tcard__id { min-width: 0; }
.tcard__name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.tcard__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tcard__stage { font-size: 12.5px; font-weight: 700; color: var(--cyan); text-align: right; white-space: nowrap; }
.tcard__stage.is-out { color: var(--live); }
.tcard--out .tcard__name { text-decoration: line-through; text-decoration-color: var(--muted-2); }

.ladder {
  height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.06);
  overflow: hidden; margin: 14px 0; border: 1px solid var(--line);
}
.ladder__fill { height: 100%; border-radius: 999px; background: var(--cyan-grad); box-shadow: 0 0 12px rgba(3, 197, 255, 0.5); transition: width 0.4s ease; }
.ladder__fill--out { background: linear-gradient(90deg, var(--muted-2), var(--muted)); box-shadow: none; }

.statgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.stat { text-align: center; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 9px; padding: 7px 4px; }
.stat__v { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat__k { display: block; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.stat--pts .stat__v { color: var(--cyan); }

.row--you { border-color: rgba(3, 197, 255, 0.55); box-shadow: 0 0 0 1px rgba(3, 197, 255, 0.22), var(--shadow); }

.spectator .spectator__hint { color: var(--ink); margin-top: 6px; }
.spectator__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.spectator__actions .btn { width: auto; }

@media (max-width: 760px) {
  .user-chip a.user-chip__id { display: none; }
  .phero { grid-template-columns: auto 1fr; gap: 16px; padding: 20px; }
  .phero__name { font-size: 23px; }
  .phero__ranknum { width: 60px; height: 60px; font-size: 32px; }
  .phero__prize { grid-column: 1 / -1; text-align: left; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
  .statgrid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Admin dashboard ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
.tile { padding: 18px 20px; }
.tile__value { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.tile__label { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.atable-wrap { overflow-x: auto; padding: 4px; }
.atable { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.atable th {
  text-align: left; padding: 9px 14px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-2); border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.atable td { padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.atable tbody tr:last-child td { border-bottom: none; }
.atable tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.atable__num { text-align: right; font-variant-numeric: tabular-nums; }
.atable__nowrap { white-space: nowrap; }
.atable__name { display: block; font-weight: 600; color: var(--ink); }
.atable__sub { display: block; font-size: 12px; color: var(--muted); word-break: break-all; }
.atable__row--muted td { color: var(--muted); }
.atable__row--muted .atable__name { color: var(--muted); font-weight: 500; }

.badge--ok { color: var(--navy-900); background: var(--green); border-color: transparent; }

@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile__value { font-size: 26px; }
}

/* ---------- Clickable match cards (stretched link) ---------- */
.match { position: relative; }
.match__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.match__owner { position: relative; z-index: 2; }

/* ---------- Match detail: scoreboard ---------- */
.scoreboard {
  position: relative;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px 20px; box-shadow: var(--shadow);
}
.scoreboard--live { border-color: rgba(255, 59, 92, 0.5); box-shadow: 0 0 0 1px rgba(255, 59, 92, 0.16); }
.scoreboard__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.scoreboard__grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 14px; }
.scoreboard__team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.scoreboard__teamlink { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink); }
a.scoreboard__teamlink:hover .scoreboard__name { color: var(--cyan); }
.scoreboard__team .crest { width: 64px; height: 64px; border-radius: 10px; }
.scoreboard__team .flag { font-size: 56px; line-height: 1; }
.scoreboard__name { font-weight: 800; font-size: 17px; }
.scoreboard__owner { font-size: 12px; color: var(--cyan); font-weight: 600; }
.scoreboard__owner--none { color: var(--muted-2); }
.scoreboard__team.is-lose { opacity: 0.55; }
.scoreboard__team.is-win .scoreboard__name { color: #fff; }
.scoreboard__score { text-align: center; min-width: 100px; padding-top: 8px; }
.scoreboard__nums { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; gap: 10px; }
.scoreboard__dash { color: var(--muted-2); }
.scoreboard__vs { font-size: 20px; font-weight: 800; color: var(--muted); }
.scoreboard__ht { margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }

/* ---------- Match detail: facts, officials, head-to-head ---------- */
.mfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 16px; }
.mfact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; }
.mfact__k { display: block; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.mfact__v { display: block; font-weight: 700; font-size: 14px; margin-top: 3px; }
.reflist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ref { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; }
.ref__name { display: block; font-weight: 700; font-size: 14px; }
.ref__meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.h2h { padding: 16px 18px; }
.h2h__summary { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.h2h__wins { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.h2h__draws { font-size: 20px; font-weight: 800; color: var(--muted); }
.h2h__lbl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.h2h__mid { padding: 0 6px; }
.h2h__list { display: flex; flex-direction: column; margin-top: 4px; }
.h2h__row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.h2h__row:first-child { border-top: none; }
.h2h__date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.h2h__teams { font-variant-numeric: tabular-nums; }
.h2h__comp { color: var(--muted-2); font-size: 11.5px; text-align: right; white-space: nowrap; }

/* ---------- Team detail ---------- */
.thero {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 8px;
}
.thero--out { opacity: 0.85; }
.thero__crest { display: grid; place-items: center; width: 72px; height: 72px; }
.thero__crest .crest { width: 64px; height: 64px; border-radius: 10px; }
.thero__crest .flag { font-size: 58px; line-height: 1; }
.thero__name { font-size: 26px; margin: 2px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.thero__meta { margin-top: 8px; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thero__stage { color: var(--cyan); font-weight: 700; }
.thero__stage.is-out { color: var(--muted); }
a.thero__owner { color: var(--cyan); font-weight: 600; }
a.thero__owner:hover { text-decoration: underline; }
.thero .ladder { margin-top: 14px; }
.tinfo { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tinfo__item { display: flex; flex-direction: column; gap: 2px; }
.tinfo__k { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tinfo__v { font-weight: 700; font-size: 14px; }
.squad { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.squad__group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.squad__pos { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); font-weight: 800; margin-bottom: 10px; }
.squad__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.squad__list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.squad__num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.squad__pname { font-weight: 600; }

/* ---------- Team links inside tables / cards ---------- */
a.gteam__link { color: var(--ink); font-weight: 600; }
a.gteam__link:hover { color: var(--cyan); text-decoration: underline; }
.gteam__owner--none { color: var(--muted-2); font-size: 11px; margin-left: 4px; }
a.tcard__link { color: inherit; }
a.tcard__link:hover { color: var(--cyan); }
.gtable tr.is-self td { background: rgba(3, 197, 255, 0.12); }
.gtable tr.is-self td.pts { color: #fff; }

@media (max-width: 480px) {
  .scoreboard__team .crest { width: 48px; height: 48px; }
  .scoreboard__team .flag { font-size: 42px; }
  .scoreboard__nums { font-size: 32px; }
  .scoreboard__name { font-size: 15px; }
  .thero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
