/* 38–0 Premier League — flat dark PL brand: near-black purple, neon green, pink */
:root {
  --bg: #0e0718;
  --bg-2: #130b22;
  --surface: #1c1230;
  --surface-2: #231741;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --green: #00ff87;
  --green-dim: rgba(0, 255, 135, 0.1);
  --pink: #e90052;
  --cyan: #04f5ec;
  --gold: #e8b64c;
  --text: #f4f1fa;
  --muted: #a79ec4;
  --ink: #0a0512;
  --radius: 10px;
  --font-display: 'Archivo', 'Inter', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  min-height: 100vh;
}

#app {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

h1, h2, h3, .logo-mark, .btn, .slot-strip, .diff-name, .season-round, .result-banner, .ovr-badge, .season-pos, .tab-btn, .coach-name, .coach-bonus, .formation-name, .modal-head, .feed-min, .sb-team-name, .sb-score-pill, .sb-clock, .stat-label, .poss-num, .stat-num, .os-score {
  font-family: var(--font-display);
}

.tnum, .league-table, .sb-score-pill, .sb-clock, .season-record, .slot-strip, .ovr-badge, .scorer-row, .fixture-row, .live-feed, .result-stats, .match-stats, .other-scores {
  font-variant-numeric: tabular-nums;
}

/* ---------- screens / routing ---------- */
.screen { display: none; animation: fadeIn 0.22s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 4px 0 18px;
  color: var(--text);
  border-left: 3px solid var(--green);
  padding-left: 12px;
  line-height: 1.1;
}

.muted { color: var(--muted); font-size: 0.85rem; }
.center { text-align: center; margin-bottom: 12px; }
.hidden { display: none !important; }

.micro-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  text-decoration: none;
  text-align: center;
  touch-action: manipulation;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.3); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}
.btn-primary:hover:not(:disabled) { background: #4dffab; border-color: #4dffab; }

.btn-big { display: block; width: 100%; padding: 14px; font-size: 0.95rem; margin-top: 16px; }
.btn-sm { padding: 7px 12px; font-size: 0.72rem; border-radius: 7px; }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); }

/* ---------- home ---------- */
#screen-home { max-width: 760px; margin: 0 auto; }
.home-hero { text-align: center; padding-top: 9vh; }

/* SEO content block (visible, crawlable) */
.seo-content {
  max-width: 960px;
  margin: 8vh auto 0;
  padding: 0 4px 48px;
}
.seo-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 14px;
}
.seo-block h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--green, #00ff87);
  margin: 0 0 10px;
}
.seo-block p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}
.seo-block p strong { color: var(--text); font-weight: 600; }
.seo-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.seo-cols .seo-block { margin-bottom: 0; }
@media (max-width: 900px) {
  .seo-cols { grid-template-columns: 1fr; }
  .seo-content { margin-top: 6vh; }
}
.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 22px;
}
.hero-title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}
.hero-title .logo-mark,
.hero-title .logo-sub {
  display: block;
}

.logo-mark {
  font-size: clamp(5rem, 17vw, 10.5rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--text);
}
.logo-dash { color: var(--green); }
.logo-sub {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  margin: 14px 0 24px;
  color: var(--muted);
  font-size: 0.85rem;
  text-indent: 0.5em;
}
.tagline { color: var(--muted); line-height: 1.65; margin-bottom: 30px; font-size: 0.95rem; }
.tagline strong { color: var(--green); font-weight: 600; }
.home-links { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

/* ---------- forms ---------- */
.field-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 20px 0 8px;
}
.text-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.12s ease;
}
.text-input:focus { border-color: var(--green); }

/* ---------- narrow screens ---------- */
#screen-setup, #screen-coach, #screen-result { max-width: 760px; margin: 0 auto; }

/* ---------- setup: formations ---------- */
.formation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.formation-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.formation-card:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.formation-card.selected { border-color: var(--green); background: var(--surface-2); }
.mini-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.mini-pitch::before {
  content: "";
  position: absolute;
  left: 20%; right: 20%; top: -1px; height: 14%;
  border: 1px solid var(--border-strong); border-top: none;
}
.mini-pitch::after {
  content: "";
  position: absolute;
  left: 20%; right: 20%; bottom: -1px; height: 14%;
  border: 1px solid var(--border-strong); border-bottom: none;
}
.mini-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  transform: translate(-50%, -50%);
}
.formation-name {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 0 3px;
  color: var(--text);
}

/* ---------- setup: difficulty ---------- */
.difficulty-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diff-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 14px 12px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.diff-card:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.diff-card.selected { border-color: var(--green); background: var(--surface-2); }
.diff-name { font-size: 0.95rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.diff-card:not(.selected) .diff-name { color: var(--text); }
.diff-desc { font-size: 0.75rem; color: var(--muted); }

/* ---------- draft ---------- */
.draft-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.draft-left { position: sticky; top: 16px; }
.draft-xi { padding-bottom: 10px; }
.draft-xi .pitch { margin: 10px 10px 0; width: calc(100% - 20px); }

.slot-machine { padding: 14px; text-align: center; }
.slot-strip {
  font-size: 1.05rem;
  font-weight: 700;
  min-height: 2.2em;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.04em;
  color: var(--green);
  overflow: hidden;
  padding: 0 6px;
}
.slot-strip.spinning { animation: slotBlur 0.12s linear infinite; }
@keyframes slotBlur { 0% { filter: blur(1.5px); } 50% { filter: blur(3px); } 100% { filter: blur(1.5px); } }
.draft-controls { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

.draft-squad-label {
  margin: 14px 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
  min-height: 1.4em;
}

.draft-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.player-card {
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 9px 8px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  min-height: 72px;
}
.player-card:hover { transform: translateY(-1px); border-color: var(--green); background: var(--surface-2); }
.player-card:active { transform: translateY(0); }
.player-card.picked { opacity: 0.3; pointer-events: none; }
.player-card.taken { opacity: 0.3; pointer-events: none; filter: grayscale(1); }
.player-card.ineligible { opacity: 0.35; filter: grayscale(0.7); cursor: not-allowed; }
.player-card.ineligible:hover { transform: none; border-color: var(--border); background: var(--surface); }
.player-card.card-selected { border-color: var(--green); background: var(--surface-2); }
.pc-name { font-size: 0.78rem; font-weight: 600; line-height: 1.25; padding-right: 34px; }
.pc-pos { font-size: 0.66rem; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
.pc-oop { font-size: 0.62rem; color: var(--pink); margin-top: 2px; }

.shake { animation: shake 0.38s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.ovr-badge {
  position: absolute; top: 7px; right: 7px;
  font-size: 0.78rem; font-weight: 800;
  padding: 1px 6px; border-radius: 5px;
  background: #5b4632; color: #d9b28c; /* flat dark copper */
}
.ovr-badge.tier-80 { background: #b8c0cc; color: var(--ink); }        /* flat silver */
.ovr-badge.tier-85 { background: var(--gold); color: var(--ink); }     /* flat gold */
.ovr-badge.tier-90 { background: var(--green); color: var(--ink); }    /* brand green */

/* draft pitch (slots) */
.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.pitch::before {
  content: "";
  position: absolute;
  left: 18%; right: 18%; top: -1px; height: 15%;
  border: 1px solid var(--border-strong); border-top: none;
}
.pitch::after {
  content: "";
  position: absolute;
  left: 18%; right: 18%; bottom: -1px; height: 15%;
  border: 1px solid var(--border-strong); border-bottom: none;
}
.pitch-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 52px; min-height: 52px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: rgba(14, 7, 24, 0.5);
  color: var(--text);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 0.55rem;
  cursor: pointer;
  padding: 2px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pitch-slot .slot-role { font-weight: 700; font-size: 0.62rem; color: var(--muted); letter-spacing: 0.06em; }
.pitch-slot.filled { border-style: solid; border-color: var(--green); background: var(--surface); }
.pitch-slot.filled .slot-name { font-weight: 600; font-size: 0.6rem; line-height: 1.05; }
.pitch-slot.filled .slot-ovr { font-size: 0.6rem; color: var(--green); font-variant-numeric: tabular-nums; }
.pitch-slot.slot-target { border-color: var(--pink); }
.pitch-slot.oop { border-color: var(--pink); }

/* ---------- coach ---------- */
.coach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.coach-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px 12px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.coach-card:hover { transform: translateY(-1px); border-color: var(--green); background: var(--surface-2); }
.coach-card:active { transform: translateY(0); }
.coach-name { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em; }
.coach-bonus {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--green);
  border-radius: 5px;
  padding: 2px 8px;
}
.coach-quote { font-size: 0.72rem; color: var(--muted); font-style: italic; margin-top: 8px; line-height: 1.4; }

/* ---------- season ---------- */
.season-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; margin-bottom: 10px;
}
.season-round { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.season-pos { font-size: 1.9rem; font-weight: 900; color: var(--text); }

.live-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.season-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.season-left, .season-right, .draft-left, .draft-right { min-width: 0; }

/* ---------- scoreboard ---------- */
.scoreboard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px 16px 14px;
  margin-bottom: 12px;
  transition: border-color 0.3s ease;
}
.sb-side { min-width: 0; }
.sb-away { text-align: right; }
.sb-team-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sb-team-rating {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 3px;
}
.sb-scorers { margin-top: 8px; font-size: 0.72rem; color: var(--muted); line-height: 1.55; }
.sb-scorers .sc { display: block; }
.sb-center { display: flex; flex-direction: column; align-items: center; gap: 7px; padding-top: 2px; }
.sb-score-pill {
  background: var(--text);
  color: var(--ink);
  font-weight: 900;
  font-size: 1.55rem;
  line-height: 1;
  border-radius: 12px;
  padding: 9px 18px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.sb-score-pill.idle {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.sb-score-pill.bounce { animation: sbBounce 0.45s ease; }
@keyframes sbBounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.sb-clock {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--green);
  border-radius: 5px;
  padding: 2px 9px;
}
.sb-clock.ht { background: var(--gold); }
.sb-clock.ft { background: var(--muted); }
.sb-clock.idle { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.scoreboard.flash-me { animation: edgeMe 1s ease; }
.scoreboard.flash-opp { animation: edgeOpp 1s ease; }
@keyframes edgeMe { 0%, 55% { border-color: var(--green); } 100% { border-color: var(--border); } }
@keyframes edgeOpp { 0%, 55% { border-color: var(--pink); } 100% { border-color: var(--border); } }

/* ---------- match stats ---------- */
.match-stats { margin-bottom: 12px; }
.stats-body { padding: 10px 14px 14px; }
.stat-poss { display: flex; align-items: center; gap: 10px; }
.poss-num { font-weight: 800; font-size: 0.9rem; width: 26px; text-align: center; }
.poss-bar {
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: var(--pink);
  overflow: hidden;
}
#stat-poss-fill { height: 100%; background: var(--green); width: 50%; transition: width 0.4s ease; }
.stat-caption {
  text-align: center;
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 5px;
}
.stat-row {
  display: grid;
  grid-template-columns: 26px 1fr auto 1fr 26px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.stat-num { font-weight: 800; font-size: 0.85rem; text-align: center; }
.stat-label {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  min-width: 64px;
  text-align: center;
}
.stat-bar { display: flex; height: 6px; }
.stat-bar-l { justify-content: flex-end; }
.stat-bar > div { height: 6px; border-radius: 4px; width: 0; transition: width 0.3s ease; }
.stat-bar-l > div { background: var(--green); }
.stat-bar-r > div { background: var(--pink); }
.stat-cards {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 0 4px;
}
.cards-group { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; }
.cards-group b { font-weight: 800; }
.cards-sep { color: var(--muted); }
.card-ic { display: inline-block; width: 9px; height: 12px; border-radius: 2px; }
.card-ic.yc { background: #ffd166; }
.card-ic.rc { background: var(--pink); }
.momentum { margin-top: 12px; }
.momentum-track {
  position: relative;
  height: 8px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.momentum-axis {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: var(--border-strong);
}
#momentum-fill {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 0;
  background: var(--green);
  transition: left 0.35s ease, width 0.35s ease;
}

/* ---------- other scores wall ---------- */
.around-league { margin-bottom: 0; }
.other-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
  padding: 8px 12px 10px;
}
.os-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 7px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
}
.os-row:nth-last-child(-n+2) { border-bottom: none; }
.os-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.os-away { text-align: right; }
.os-score { font-weight: 800; font-size: 0.75rem; color: var(--text); white-space: nowrap; }

.live-feed {
  height: 190px;
  overflow-y: auto;
  padding: 10px 14px;
  font-size: 0.8rem;
  line-height: 1.55;
  margin-bottom: 12px;
}
.feed-line {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 4px 6px;
  margin: 0 -6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}
.feed-line:last-child { border-bottom: none; }
.feed-min {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.feed-text { padding-top: 4px; }
.feed-goal-me { background: rgba(0, 255, 135, 0.12); color: var(--green); font-weight: 600; }
.feed-goal-me .feed-min { background: var(--green); border-color: var(--green); color: var(--ink); }
.feed-goal-opp { background: rgba(233, 0, 82, 0.12); color: var(--pink); font-weight: 600; }
.feed-goal-opp .feed-min { background: var(--pink); border-color: var(--pink); color: var(--text); }
.feed-card { color: #ffd166; }
.feed-card .feed-min { border-color: #ffd166; color: #ffd166; }
.feed-red { color: var(--pink); }
.feed-red .feed-min { border-color: var(--pink); color: var(--pink); }
.feed-save { color: #8ab4ff; }
.feed-pen { color: var(--gold); }
.feed-pen .feed-min { border-color: var(--gold); color: var(--gold); }
.feed-ht, .feed-ft { color: var(--text); font-weight: 600; }
.feed-ht .feed-min, .feed-ft .feed-min { background: var(--muted); border-color: var(--muted); color: var(--ink); }

/* tabs */
.tab-row {
  display: flex;
  gap: 0;
  margin: 0 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.tab-btn:last-child { border-right: none; }
.tab-btn:hover { color: var(--text); }
.tab-btn.selected { background: var(--green); color: var(--ink); }

.season-panel { padding: 10px 12px; overflow-x: auto; }
.league-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.league-table th, .league-table td { padding: 6px 5px; white-space: nowrap; }
.league-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: right;
  border-bottom: 1px solid var(--border-strong);
}
.league-table td { text-align: right; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.league-table th:first-child, .league-table td:first-child { text-align: center; width: 22px; }
.league-table th:nth-child(2), .league-table td:nth-child(2) {
  text-align: left; max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}
.league-table td:last-child, .league-table th:last-child { padding-right: 2px; }
.league-table tr:last-child td { border-bottom: none; }
.league-table tr.me td { background: var(--green-dim); font-weight: 600; }
.league-table tr.me td b { color: var(--green); }
.league-table tr.zone-title td:first-child { border-left: 3px solid var(--green); }
.league-table tr.zone-euro td:first-child { border-left: 3px solid var(--cyan); }
.league-table tr.zone-drop td:first-child { border-left: 3px solid var(--pink); }

.fixture-list, .scorer-list { font-size: 0.78rem; line-height: 1.7; }
.fixture-row { display: flex; justify-content: space-between; gap: 6px; padding: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.fixture-row:last-child { border-bottom: none; }
.fixture-row.me { color: var(--green); font-weight: 600; }
.scorer-row { display: flex; justify-content: space-between; padding: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.scorer-row:last-child { border-bottom: none; }
.scorer-row .stat-num { color: var(--muted); }
.scorer-row .stat-num b { color: var(--green); font-weight: 700; }

/* ---------- result ---------- */
.result-banner {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 26px 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.result-banner.perfect {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}
.result-banner small {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 8px;
}
.result-banner.perfect small { color: rgba(10, 5, 18, 0.7); }

.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }

.result-stats { padding: 14px 16px; margin-bottom: 12px; font-size: 0.9rem; line-height: 1.9; }
.result-stats b { color: var(--green); }
.result-leaders { padding: 12px 16px; margin-bottom: 14px; font-size: 0.85rem; line-height: 1.8; }
.result-leaders b { color: var(--text); }

.share-canvas { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.share-row { display: flex; gap: 10px; margin-top: 10px; }
.share-row .btn { flex: 1; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(8, 4, 15, 0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 18px;
}
.modal-box { width: 100%; max-width: 560px; max-height: 78vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: 4px 8px; }
.modal-close:hover { color: var(--text); }
.records-list { overflow-y: auto; padding: 10px 16px; font-size: 0.78rem; }
.record-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.record-row:last-child { border-bottom: none; }
.record-row .r-team { font-weight: 600; }
.record-row .r-meta { color: var(--muted); text-align: right; }
.record-row .r-perfect { color: var(--green); font-weight: 700; }
.records-empty { color: var(--muted); text-align: center; padding: 24px 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .draft-layout { grid-template-columns: 1fr; }
  .draft-left { position: static; order: 2; }
  .season-layout { grid-template-columns: 1fr; }
  .season-right { order: 2; }
  .coach-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  #app { padding: 16px 12px 48px; }
  .formation-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .coach-grid { grid-template-columns: 1fr; }
  .live-feed { height: 150px; }
  .season-pos { font-size: 1.5rem; }
  .scoreboard { padding: 12px 10px 10px; gap: 8px; }
  .sb-team-name { font-size: 0.78rem; }
  .sb-score-pill { font-size: 1.15rem; padding: 7px 12px; border-radius: 9px; }
  .stat-label { min-width: 52px; }
  .other-scores { grid-template-columns: 1fr; }
  .os-row:nth-last-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .os-row:last-child { border-bottom: none; }
}
