/* TFM Season Portal — the public face. Same FPL-flavoured palette as the
   explorer (deep purple + neon green/cyan), its own single-column layout. */

:root {
  --purple-950: #1a0020;
  --purple-900: #2a0033;
  --purple-800: #37003c;
  --purple-700: #4a0a52;
  --ink: #f3e9f7;
  --ink-dim: #b79cc4;
  --ink-faint: #7d6690;
  --green: #00ff87;
  --cyan: #04f5ff;
  --amber: #ffd166;
  --line: rgba(255, 255, 255, 0.08);
  --panel: rgba(255, 255, 255, 0.035);
  --panel-hi: rgba(255, 255, 255, 0.07);
  --radius: 14px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 15% -10%, var(--purple-700), transparent 60%),
              radial-gradient(1000px 700px at 110% 10%, #003b2e, transparent 55%),
              var(--purple-950);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 40px 22px 72px; }

/* ------------------------------------------------------------------ header -- */
header.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wordmark {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 34px; line-height: 0.95; font-weight: 700; letter-spacing: -1.2px;
  white-space: nowrap;
}
.wm-the { font-style: italic; font-weight: 400; font-size: 22px; color: var(--ink-dim); margin-right: 2px; vertical-align: 3px; }
.wm-freak {
  background: linear-gradient(135deg, var(--green) 10%, var(--cyan) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.wm-model { color: var(--ink); font-weight: 800; }
.tagline { color: var(--ink-dim); font-size: 13px; margin-top: 4px; letter-spacing: 0.2px; }
.top a.explorer-link {
  color: var(--ink-dim); text-decoration: none; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  background: var(--panel); transition: all .15s;
}
.top a.explorer-link:hover { color: var(--ink); border-color: var(--green); }

/* -------------------------------------------------------------------- hero -- */
.hero {
  margin-top: 24px; display: flex; align-items: center; gap: 22px;
  background: linear-gradient(135deg, rgba(74,10,82,0.55), rgba(0,59,46,0.35));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px;
}
.gw-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 108px; height: 108px; border-radius: 16px;
  background: rgba(0,0,0,0.28); border: 1px solid var(--line);
}
.gw-badge .lab { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-faint); }
.gw-badge .num {
  font-size: 46px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-main { flex: 1; min-width: 0; }
.hero-main h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.hero-sub { color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.chips { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px;
  color: var(--ink-dim); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px;
}
.chip b { color: var(--ink); font-weight: 600; }

/* Model tags render as code — a neon monospace pill against the palette. */
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em;
  color: var(--green); background: rgba(0, 255, 135, 0.09);
  border: 1px solid rgba(0, 255, 135, 0.22); border-radius: 5px; padding: 1px 6px;
}
.chip code { padding: 0 4px; }
.section-sub code { font-size: 12px; }
.banner {
  margin-top: 18px; padding: 12px 16px; border-radius: 10px; font-size: 13.5px;
  border: 1px solid rgba(255,209,102,0.35); background: rgba(255,209,102,0.08); color: var(--amber);
}
.banner.err { border-color: rgba(255,120,120,0.4); background: rgba(255,80,80,0.09); color: #ff9c9c; }

/* ---------------------------------------------------------------- sections -- */
.section-head { margin: 30px 0 12px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.section-sub { color: var(--ink-faint); font-size: 12.5px; }

/* ------------------------------------------------------------- match cards -- */
.matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.match {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.match:hover { background: var(--panel-hi); }
.match-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.match-top .team { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-top .team.home { text-align: right; }
.match-top .team.away { text-align: left; }
.scoreline {
  font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.scoreline .dash { -webkit-text-fill-color: var(--ink-faint); color: var(--ink-faint); font-weight: 400; }

.wdl { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(0,0,0,0.25); }
.wdl .seg.home { background: var(--green); }
.wdl .seg.draw { background: var(--ink-faint); }
.wdl .seg.away { background: var(--cyan); }

.wdl-labels {
  display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-faint);
  font-family: ui-monospace, Menlo, monospace; align-items: center;
}
.wdl-labels .on { color: var(--ink); font-weight: 700; }
.wdl-labels .actual-lab { margin-left: auto; color: var(--ink-faint); }
.mv { font-weight: 700; margin-left: 4px; }
.mv.hit { color: var(--green); } .mv.miss { color: #ff9c9c; }

/* -------------------------------------------------------------------- tabs -- */
.tabs { margin: 26px 0 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  font: inherit; font-size: 13px; cursor: pointer; color: var(--ink-dim);
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 8px 15px;
  transition: all .12s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--purple-900); font-weight: 700; background: linear-gradient(135deg, var(--green), var(--cyan)); border-color: transparent; }

/* ------------------------------------------------------------------- table -- */
.board { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.row {
  display: grid; grid-template-columns: 46px 1fr 58px 92px 78px; align-items: center;
  gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line);
}
.row.head {
  border-top: none; font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-faint); padding-top: 14px; padding-bottom: 10px;
}
.row:not(.head):hover { background: var(--panel-hi); }
.rank { color: var(--ink-faint); font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.row.head .rank { color: var(--ink-faint); }
.name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos {
  justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-dim);
}
.pos.GKP { color: #ffd166; } .pos.DEF { color: #04f5ff; }
.pos.MID { color: #00ff87; } .pos.FWD { color: #ff6ba9; }
.pred { text-align: right; font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.actual { text-align: right; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.actual.hit { color: var(--green); } .actual.miss { color: #ff9c9c; }
.head .pred, .head .actual { font-weight: inherit; -webkit-text-fill-color: initial; background: none; color: var(--ink-faint); font-size: 11px; }

.empty { padding: 46px 20px; text-align: center; color: var(--ink-dim); }

/* ------------------------------------------------------------------ footer -- */
footer { margin-top: 26px; color: var(--ink-faint); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--ink-dim); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); margin-right: 6px; }

@media (max-width: 560px) {
  .row { grid-template-columns: 34px 1fr 64px 66px; }
  .row .actual { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
}
