/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f1117;
  --bg-card:   #1a1d27;
  --bg-hover:  #22263a;
  --border:    #2e3250;
  --accent:    #4f7ef8;
  --accent2:   #7c3aed;
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --pos:       #34d399;
  --neg:       #f87171;
  --font:      'Inter', system-ui, sans-serif;
  --radius:    6px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: .02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

/* ── Main & footer ────────────────────────────────────────────────────────── */
.site-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
}

/* ── Page header ──────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-header h1 { font-size: 1.75rem; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: .5rem;
}

.hero p { color: var(--text-muted); margin-bottom: 1.5rem; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: .55rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: opacity .15s;
}
.btn:hover { opacity: .85; text-decoration: none; }
.btn-primary  { background: var(--accent);  color: #fff; }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }

/* ── Season list ──────────────────────────────────────────────────────────── */
.season-list { margin-top: 2rem; }
.season-list h2 { margin-bottom: .75rem; }
.season-list ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }

/* ── Season picker ────────────────────────────────────────────────────────── */
.season-picker {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.season-picker label { color: var(--text-muted); font-size: .9rem; }

.season-picker select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .3rem .6rem;
  font-size: .9rem;
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tier-tabs, .bracket-type-tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tier-tab, .bracket-tab {
  padding: .5rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}

.tier-tab:hover, .bracket-tab:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--bg-hover);
}

.tier-tab.active, .bracket-tab.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.standings-table, .bracket-table, .history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.standings-table th, .bracket-table th, .history-table th {
  text-align: left;
  padding: .5rem .75rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}

.standings-table td, .bracket-table td, .history-table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border);
}

.standings-table tr:hover td,
.bracket-table tr:hover td,
.history-table tr:hover td {
  background: var(--bg-hover);
}

td.pos { color: var(--pos); }
td.neg { color: var(--neg); }

/* ── League / conf blocks ─────────────────────────────────────────────────── */
.league-block { margin-bottom: 2.5rem; }
.league-block h2 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--text-muted); }

.conf-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.conf-block h3 { font-size: 1rem; margin-bottom: .75rem; }

/* ── Bracket blocks ───────────────────────────────────────────────────────── */
.bracket-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.bracket-block h2 { font-size: 1rem; margin-bottom: .5rem; }

/* ── Team page ────────────────────────────────────────────────────────────── */
.team-section { margin-top: 1.5rem; }
.team-section h2 { margin-bottom: 1rem; }

.movement-promoted  { color: var(--pos); }
.movement-relegated { color: var(--neg); }
.movement-new, .movement-stayed { color: var(--text-muted); }

/* ── Tags ─────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
}

.tag-geo  { background: #1e3a5f; color: #7eb8f7; }
.tag-jv   { background: #3b2f1e; color: #f5a623; }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.muted { color: var(--text-muted); font-style: italic; }
