/* ============================================================
   WORLD CUP 2026 — Editorial / Matchday Programme Theme
   Bebas Neue (display) + IBM Plex Sans (body)
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black:      #0f0f0f;
  --black-alt:  #161616;
  --border:     #2a2a2a;
  --red:        #e8192c;
  --red-dark:   #7a0010;
  --red-tint:   #1a0a0a;
  --red-fill:   #2a0a0a;
  --cream:      #f0ebe0;
  --muted:      #555;
  --font-display: 'Bebas Neue', 'Arial Narrow', Arial, sans-serif;
  --font-body:    'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 16px;
}

body {
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- Header ---- */

header {
  background: #000;
  border-bottom: 2px solid var(--red);
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.site-title a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  color: var(--cream);
  text-decoration: none;
  line-height: 1;
}

.site-title a:hover {
  color: #fff;
}

nav {
  display: flex;
  gap: 1.75rem;
}

nav a {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #aaa;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav a:hover {
  color: var(--cream);
}

nav a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ---- Main / Page wrap ---- */

main {
  min-height: calc(100vh - 54px - 48px);
}

.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ---- Typography ---- */

h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  letter-spacing: 0.05em;
  color: #fff;
  line-height: 1;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--cream);
  text-transform: uppercase;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--cream);
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 0.75rem;
  color: var(--cream);
}

p.hint {
  font-size: 0.8125rem;
  color: #888;
  margin-bottom: 0.75rem;
}

small {
  font-size: 0.8rem;
  color: #888;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

li {
  margin-bottom: 0.35rem;
}

strong {
  font-weight: 600;
}

/* ---- Banner ---- */

.banner {
  border-left: 3px solid var(--red);
  background: var(--red-tint);
  padding: 0.75rem 1rem;
  margin-bottom: 1.75rem;
  font-size: 0.875rem;
}

.banner a {
  margin-left: 0.5rem;
}

/* ---- Badges ---- */

.level-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--red-fill);
  color: var(--red);
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  vertical-align: middle;
}

.group-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: #1e1e1e;
  color: #aaa;
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  vertical-align: middle;
  border: 1px solid var(--border);
}

/* ---- Tables — shared base ---- */

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

thead th {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  background: #000;
  border-bottom: 1px solid var(--red);
  padding: 0.55rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: var(--black-alt);
}

tbody tr:nth-child(odd) {
  background: var(--black);
}

tbody tr:hover {
  background: #1c1c1c;
}

tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--cream);
  vertical-align: middle;
}

/* ---- Leaderboard ---- */

table.leaderboard {
  max-width: 480px;
  margin-bottom: 2rem;
}

table.leaderboard td.rank {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--red);
  width: 2.5rem;
  letter-spacing: 0.04em;
}

table.leaderboard td.points {
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: right;
}

table.leaderboard tr.leader td {
  font-weight: 600;
  color: #fff;
  border-left: 3px solid var(--red);
}

table.leaderboard tr.leader td.rank {
  padding-left: calc(0.75rem - 3px);
}

/* ---- Selections grid ---- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.selections {
  min-width: 700px;
}

table.selections td {
  font-size: 0.8125rem;
  line-height: 1.3;
  min-width: 110px;
}

table.selections td.player-name {
  font-weight: 600;
  white-space: nowrap;
  min-width: 90px;
}

table.selections td.points {
  font-weight: 600;
  text-align: right;
  min-width: 60px;
}

table.selections td.joker {
  background: var(--red-dark);
  color: var(--cream);
}

table.selections td.joker .level-badge {
  background: rgba(0,0,0,0.3);
  color: #ffb3b3;
}

.joker-star {
  color: #ffb3b3;
  font-size: 0.75rem;
  margin-left: 2px;
}

table.selections td.knocked {
  color: var(--muted);
}

table.selections td.knocked s {
  text-decoration: line-through;
  color: var(--muted);
}

.tbd {
  color: #666;
  font-style: italic;
}

/* ---- Teams table ---- */

table.teams-table {
  margin-bottom: 2rem;
}

table.teams-table td:first-child {
  font-weight: 500;
  min-width: 180px;
}

table.teams-table .knocked td {
  color: var(--muted);
}

table.teams-table .knocked td s {
  text-decoration: line-through;
  color: var(--muted);
}

.mult-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: #888;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 0.5rem;
}

/* ---- Rules page ---- */

table.rules-table {
  max-width: 400px;
  margin-bottom: 1.25rem;
}

.team-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.3rem 1.5rem;
  margin-bottom: 1rem;
}

.team-list li {
  font-size: 0.875rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0;
}

/* ---- Footer ---- */

footer {
  background: #000;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  font-size: 0.7rem;
  color: rgba(240,235,224,0.45);
  letter-spacing: 0.04em;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  .header-inner { padding: 0 1rem; }
  .page-wrap { padding: 1.5rem 1rem; }
  nav { gap: 1rem; }
}
