@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@500;600;700;800&family=Noto+Sans+Hebrew:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-2: #0d1b2e;
  --panel: #101d2e;
  --panel-2: #17263a;
  --panel-3: #20334c;
  --ink: #f8fbff;
  --muted: #a7b6c7;
  --line: rgba(193, 219, 245, .18);
  --navy: #06101d;
  --blue: #005eb8;
  --blue-2: #00a6d6;
  --cyan: #24d2ff;
  --green: #22c55e;
  --pitch: #0f9f6e;
  --gold: #f6b52e;
  --red: #ff625c;
  --amber: #ffb84d;
  --shadow: 0 18px 42px rgba(2, 8, 18, .32);
  --shadow-tight: 0 8px 20px rgba(2, 8, 18, .24);
  --heading-font: "Barlow Condensed", "Noto Sans Hebrew", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --body-font: "Noto Sans Hebrew", "Barlow", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --number-font: "Barlow Condensed", "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif;
  font-family: var(--body-font);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 42%, #050a12);
  color: var(--ink);
  position: relative;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(36, 210, 255, .12) 0 12%, transparent 12% 100%),
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 260px);
  z-index: -1;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07111f;
  --bg-2: #0d1b2e;
  --panel: #101d2e;
  --panel-2: #17263a;
  --panel-3: #20334c;
  --ink: #f5f7fb;
  --muted: #a6b4c6;
  --line: rgba(193, 219, 245, .18);
  --navy: #06101d;
  --shadow: 0 18px 42px rgba(2, 8, 18, .32);
  --shadow-tight: 0 8px 20px rgba(2, 8, 18, .24);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #edf6fb;
  --bg-2: #f8fcff;
  --panel: #ffffff;
  --panel-2: #eef6fb;
  --panel-3: #dcecf6;
  --ink: #111827;
  --muted: #667589;
  --line: #cbdbe8;
  --navy: #06172c;
  --shadow: 0 16px 36px rgba(10, 31, 58, .1);
  --shadow-tight: 0 7px 18px rgba(10, 31, 58, .08);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 276px 1fr; }
.side {
  min-width: 0;
  background: linear-gradient(180deg, #08233b, var(--navy) 42%, #020711);
  color: white;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-inline-end: 1px solid rgba(255,255,255,.1);
  box-shadow: inset -1px 0 0 rgba(36, 210, 255, .12);
}
.brand { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.13); }
.brand strong { font-family: var(--heading-font); font-size: 1.55rem; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.brand span { color: rgba(255,255,255,.72); font-size: .9rem; }
.mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan) 70%, var(--green));
  border-radius: 6px;
  font-weight: 900;
  letter-spacing: .01em;
  margin-bottom: 8px;
  box-shadow: 0 14px 30px rgba(0, 166, 214, .28), inset 0 0 0 1px rgba(255,255,255,.26);
}
.logo-img {
  object-fit: contain;
  padding: 4px;
  background: var(--panel);
}
.preview-mark { margin: 0; }
.avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue), var(--cyan) 72%, var(--green));
  color: white;
  font-weight: 900;
  flex: 0 0 auto;
}
.avatar.big { width: 86px; height: 86px; font-size: 1.65rem; }
.avatar.mini { width: 28px; height: 28px; font-size: .78rem; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; }
.profile-panel { display: grid; gap: 18px; }
.profile-hero { display: flex; align-items: center; gap: 16px; }
.profile-hero h2, .profile-hero p { margin: 0; }
.avatar-builder {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  display: grid;
  gap: 12px;
  background: var(--panel-2);
}
.avatar-builder h3 { margin: 0; }
.avatar-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 2px solid var(--line);
  background: var(--swatch);
  padding: 0;
}
.swatch.active { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(19,32,51,.1); }
.nav { display: grid; gap: 8px; }
.nav button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: white;
  text-align: start;
  padding: 11px 12px;
  font-weight: 900;
  letter-spacing: .01em;
  border-inline-start: 4px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.nav button span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  color: var(--cyan);
  font-size: .72rem;
  flex: 0 0 auto;
}
.nav button.active, .nav button:hover {
  background: linear-gradient(90deg, rgba(36, 210, 255, .18), rgba(34, 197, 94, .08));
  border-inline-start-color: var(--cyan);
}
.nav button:hover { transform: translateX(-2px); }
.side-foot {
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: rgba(255,255,255,.065);
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 24px;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg) 86%, black);
  border-top: 1px solid var(--line);
  font-size: .86rem;
}
.legal-footer nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.legal-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.legal-footer a:hover { color: var(--cyan); }
.cookie-banner {
  position: fixed;
  inset-inline: 18px;
  inset-block-end: 18px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 980px;
  margin-inline: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, var(--blue));
  box-shadow: var(--shadow);
}
.cookie-banner p {
  margin: 4px 0 10px;
  color: var(--muted);
}
.cookie-banner a {
  color: var(--cyan);
  font-weight: 900;
}
.cookie-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cookie-categories span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .78rem;
  font-weight: 850;
  background: rgba(255,255,255,.05);
}
.legal-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-2);
}
.legal-editor h3 { margin: 0; }

.main { min-width: 0; padding: 24px; display: grid; align-content: start; gap: 18px; }
.arena-header {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0,94,184,.2), transparent 42%),
    linear-gradient(90deg, var(--panel), color-mix(in srgb, var(--panel) 88%, var(--cyan)));
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  overflow: hidden;
  position: relative;
}
.arena-copy {
  display: grid;
  align-content: center;
  gap: 3px;
  position: relative;
  z-index: 1;
}
.kicker {
  color: var(--cyan);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.arena-copy strong {
  font-family: var(--heading-font);
  font-size: 2.15rem;
  line-height: .95;
  text-transform: uppercase;
}
.arena-stats {
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.arena-stats span {
  min-width: 92px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.045);
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  position: relative;
  overflow: hidden;
}
.arena-stats span::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}
.arena-stats b {
  display: block;
  color: var(--ink);
  font-family: var(--number-font);
  font-size: 1.7rem;
  line-height: .9;
}
.arena-stats .live b { color: var(--green); }
.arena-stats .closed b { color: var(--amber); }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.title h1, .title p { margin: 0; }
.title p { color: var(--cyan); font-weight: 950; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.title h1 { font-family: var(--heading-font); font-size: 2.85rem; letter-spacing: 0; line-height: .95; text-transform: uppercase; }
.actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.btn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--panel) 88%, white);
  color: var(--ink);
  font-weight: 950;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.btn.primary { background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: white; box-shadow: 0 12px 28px rgba(0, 166, 214, .24); }
.btn.good { background: var(--green); color: white; }
.btn.danger { background: #fff0ef; color: #9d2c29; border-color: #f2c3c0; }
.btn.ghost { border-color: var(--line); background: rgba(255,255,255,.04); }
.btn.small { min-height: 32px; font-size: .86rem; padding-inline: 10px; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15, 23, 42, .12); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #0075d8, var(--cyan)); transform: translateY(-1px); }
.btn.ghost:hover:not(:disabled) { border-color: color-mix(in srgb, var(--cyan) 45%, var(--line)); background: rgba(54, 212, 255, .08); }
.lang button[aria-pressed="true"] { background: var(--navy); color: white; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(1060px, 100%);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
}
.login-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green), var(--gold));
  z-index: 2;
}
.login-hero {
  background: linear-gradient(135deg, #08233b, #07101d 62%, #031224);
  color: white;
  padding: clamp(26px, 5vw, 48px);
  display: grid;
  align-content: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 96px;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(36,210,255,.14) 42% 52%, transparent 52%),
    linear-gradient(90deg, rgba(34,197,94,.18), transparent 58%);
}
.login-hero h1 { margin: 0; font-family: var(--heading-font); font-size: 4rem; line-height: .9; letter-spacing: 0; text-transform: uppercase; position: relative; z-index: 1; }
.login-hero p { color: rgba(255,255,255,.74); line-height: 1.6; margin: 0; }
.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.feature-strip span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  padding: 5px 10px;
  color: rgba(255,255,255,.88);
  background: rgba(54,212,255,.1);
  font-size: .82rem;
  font-weight: 900;
}
.login-form { padding: clamp(24px, 4vw, 42px); display: grid; gap: 15px; align-content: center; }
.site-preview {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}
.mini-preview {
  width: min(720px, 100%);
  box-shadow: none;
}
.mini-preview .mark,
.mini-preview .btn.primary {
  background: var(--preview-blue, var(--blue));
}
.nav-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}
.mini-preview .login-hero h1 {
  font-size: 2rem;
}

.grid { display: grid; gap: 14px; }
.grid.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel, .metric, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.panel { padding: 18px; backdrop-filter: saturate(125%); }
.metric {
  min-height: 118px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  border-block-start: 4px solid color-mix(in srgb, var(--cyan) 62%, var(--blue));
  background: linear-gradient(145deg, rgba(54,212,255,.09), transparent 48%), var(--panel);
  position: relative;
  overflow: hidden;
}
.metric::after {
  content: "";
  position: absolute;
  inset-inline-end: 12px;
  inset-block-end: 12px;
  width: 34px;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  border-radius: 999px;
  opacity: .75;
}
.metric span { color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; }
.metric strong { font-family: var(--heading-font); font-size: 2.35rem; letter-spacing: 0; line-height: .92; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel h2, .panel h3 { margin: 0; font-family: var(--heading-font); letter-spacing: 0; text-transform: uppercase; }
.muted { color: var(--muted); font-size: .92rem; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--cyan);
  font-weight: 850;
  font-size: .78rem;
  width: max-content;
}
.badge.good { background: rgba(32,199,131,.14); color: var(--green); }
.badge.warn { background: rgba(255,184,77,.15); color: var(--amber); }
.badge.danger { background: rgba(255,98,92,.13); color: var(--red); }

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(320px, 1.4fr) minmax(220px, .8fr);
  gap: 14px;
}
.hero-score,
.next-match,
.hero-actions,
.podium-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.hero-score {
  min-height: 240px;
  padding: 20px;
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(135deg, rgba(36,210,255,.15), transparent 48%),
    var(--panel);
}
.hero-score h2 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: 2.6rem;
  line-height: .92;
  text-transform: uppercase;
}
.hero-scoreline {
  display: flex;
  align-items: end;
  gap: 10px;
}
.hero-scoreline strong {
  font-family: var(--heading-font);
  font-size: 5rem;
  line-height: .8;
}
.hero-scoreline span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}
.progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}
.next-match {
  min-height: 240px;
  padding: 20px;
  display: grid;
  align-content: space-between;
}
.next-match .teams {
  width: 100%;
  font-size: 1rem;
}
.hero-actions {
  min-height: 240px;
  padding: 20px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.hero-actions .btn {
  justify-content: space-between;
  text-align: start;
}

label { display: grid; gap: 7px; color: var(--muted); font-size: .88rem; font-weight: 750; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 86%, black);
  color: var(--ink);
  padding: 10px 12px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 3px solid rgba(36, 210, 255, .3);
  outline-offset: 2px;
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; color: var(--ink); background: var(--panel); }
.switch input { width: 22px; min-height: 22px; accent-color: var(--blue); }

.matchday-board {
  display: grid;
  gap: 16px;
}
.stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stage h2 {
  grid-column: 1 / -1;
  margin: 16px 0 0;
  font-family: var(--heading-font);
  font-size: 1.35rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.match-card {
  padding: 18px;
  display: grid;
  gap: 14px;
  border-color: color-mix(in srgb, var(--line) 70%, var(--cyan));
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.match-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--green));
}
.match-card:hover {
  border-color: rgba(54,212,255,.34);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(0, 166, 214, .13);
}
.match-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: min(520px, 100%);
  font-weight: 900;
  font-size: 1.08rem;
}
.teams::after {
  content: "VS";
  grid-column: 2;
  grid-row: 1;
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 26px;
  border-radius: 999px;
  background: rgba(54,212,255,.11);
  color: var(--cyan);
  font-size: .72rem;
  letter-spacing: .04em;
  border: 1px solid rgba(54,212,255,.22);
}
.teams > span:first-child { grid-column: 1; }
.teams > span:last-child { grid-column: 3; }
.team-badge {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, white), var(--panel));
  box-shadow: var(--shadow-tight);
}
.team-flag {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  font-size: 1.22rem;
  flex: 0 0 auto;
}
.empty-flag { background: rgba(255,255,255,.08); }
.prediction-grid { display: grid; grid-template-columns: 100px 100px minmax(160px, 1fr) auto; gap: 9px; align-items: end; }
.prediction-grid.no-winner { grid-template-columns: 104px 104px minmax(150px, 1fr) auto; }
.score-input { text-align: center; font-size: 1.1rem; font-weight: 900; }
.outcome-preview {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  display: grid;
  align-content: center;
  background: rgba(255,255,255,.035);
}
.outcome-preview strong { color: var(--gold); }
.status-msg { min-height: 22px; font-weight: 800; color: var(--green); }
.status-msg.err { color: var(--red); }

.leader-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.leader-table th, .leader-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: start; }
.leader-table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.leader-table tbody tr:nth-child(1) { background: linear-gradient(90deg, rgba(246, 181, 46, .22), transparent); }
.leader-table tbody tr:nth-child(2) { background: linear-gradient(90deg, rgba(54, 212, 255, .13), transparent); }
.leader-table tbody tr:nth-child(3) { background: linear-gradient(90deg, rgba(32, 199, 131, .11), transparent); }
.leader-table tbody td:first-child {
  font-weight: 950;
  color: var(--gold);
}
.leader-cards { display: none; gap: 10px; }
.rank-card {
  padding: 13px;
  display: grid;
  gap: 6px;
  border-block-start: 3px solid var(--cyan);
}
.leaderboard-shell {
  display: grid;
  gap: 16px;
}
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.podium-card {
  min-height: 150px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  position: relative;
  overflow: hidden;
}
.podium-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -20px;
  inset-block-end: -34px;
  width: 112px;
  height: 112px;
  border: 18px solid rgba(255,255,255,.045);
  border-radius: 50%;
}
.podium-card.rank-1 {
  min-height: 190px;
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
}
.podium-card.rank-2 { min-height: 170px; }
.podium-card strong {
  font-family: var(--heading-font);
  font-size: 1.65rem;
  line-height: .95;
  text-transform: uppercase;
}
.podium-card b {
  font-family: var(--heading-font);
  font-size: 3.2rem;
  line-height: .85;
}
.rank-number {
  color: var(--cyan);
  font-weight: 950;
}

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button.active { background: linear-gradient(135deg, var(--blue), var(--cyan)); color: white; }
.admin-layout { display: grid; grid-template-columns: 236px 1fr; gap: 14px; align-items: start; }
.admin-menu { display: grid; gap: 8px; }
.admin-menu button { text-align: start; }
.table-wrap { overflow-x: auto; }
table.admin-table { width: 100%; min-width: 820px; border-collapse: collapse; }
table.admin-table th, table.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
table.admin-table th {
  background: var(--panel-2);
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.admin-table tbody tr:hover { background: var(--panel-2); }
table.admin-table input,
table.admin-table select {
  min-height: 34px;
  padding: 6px 8px;
}
.flag-input {
  max-width: 76px;
  text-align: center;
  font-size: 1.25rem;
}
table.admin-table td:last-child .btn { margin: 0 0 6px 6px; }
.empty { border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); padding: 18px; text-align: center; background: var(--panel); }
.toast { position: fixed; inset-inline: 20px; bottom: 20px; z-index: 20; display: grid; justify-items: center; pointer-events: none; }
.toast span { background: linear-gradient(135deg, var(--navy), var(--panel-3)); color: white; border: 1px solid rgba(54,212,255,.2); border-radius: 6px; padding: 10px 14px; box-shadow: var(--shadow); }

[data-theme="light"] body { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #fff;
}
[data-theme="light"] .btn.ghost {
  background: var(--panel);
}
[data-theme="light"] .team-flag {
  background: #eef4fb;
}
[data-theme="light"] .outcome-preview {
  background: #fff;
}

[dir="rtl"] .nav button, [dir="rtl"] .admin-menu button { text-align: right; }
[dir="rtl"] .nav button:hover { transform: translateX(2px); }
[dir="ltr"] .nav button:hover { transform: translateX(-2px); }

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

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { padding: 16px; }
  .nav { display: flex; flex-wrap: wrap; padding-bottom: 3px; }
  .nav button { flex: 1 1 140px; white-space: normal; text-align: center; min-height: 46px; justify-content: center; }
  .side-foot { display: none; }
  .arena-header { flex-direction: column; }
  .arena-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-hero { grid-template-columns: 1fr; }
  .stage { grid-template-columns: 1fr; }
  .podium { grid-template-columns: 1fr; align-items: stretch; }
  .podium-card, .podium-card.rank-1, .podium-card.rank-2 { min-height: 142px; }
  .grid.metrics, .grid.four, .grid.three, .grid.two, .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .main { padding: 16px; }
  .arena-header { min-height: 0; padding: 14px; }
  .arena-copy strong { font-size: 1.7rem; }
  .arena-stats { grid-template-columns: 1fr; }
  .arena-stats span { min-width: 0; min-height: 54px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .title h1 { font-size: 2.35rem; }
  .login-card { grid-template-columns: 1fr; }
  .login-hero { padding: 26px; }
  .form-row, .prediction-grid, .prediction-grid.no-winner { grid-template-columns: 1fr; }
  .score-input { min-height: 48px; font-size: 1.25rem; }
  .match-card { padding: 14px; }
  .login { padding: 14px; }
  .login-form { padding: 20px; }
  .login-hero h1 { font-size: 2.45rem; }
  .teams { grid-template-columns: 1fr; }
  .teams::after { grid-column: 1; grid-row: 2; justify-self: center; }
  .teams > span:first-child { grid-column: 1; grid-row: 1; }
  .teams > span:last-child { grid-column: 1; grid-row: 3; }
  .hero-score, .next-match, .hero-actions { min-height: 0; }
  .hero-score h2 { font-size: 2.05rem; }
  .hero-scoreline strong { font-size: 3.7rem; }
  .leader-table { display: none; }
  .leader-cards { display: grid; }
  .panel-head, .match-top { flex-direction: column; align-items: stretch; }
  .actions .btn, .btn.primary, .btn.good { flex: 1; }
  .legal-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }
  .legal-footer nav {
    justify-content: flex-start;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    inset-inline: 10px;
    inset-block-end: 10px;
  }
  .cookie-banner .actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
