/* ══════════════════════════════════════════
   base.css — CSS variables, reset, typography
   ══════════════════════════════════════════ */

:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C96A;
  --gold-dim:    #7a6228;
  --white:       #F5F2EA;
  --bg:          #0D0D0D;
  --admin-overlay: rgba(0, 0, 0, 0.96);
  --surface:     #161616;
  --surface2:    #1E1E1E;
  --surface3:    #272727;
  --border:      rgba(201, 168, 76, 0.18);
  --text:        #E8E4D9;
  --muted:       #7a7770;
  --green:       #3EC878;
  --red:         #E05252;
  --yellow:      #E8C96A;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography utilities ── */
.section-header {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-top: 0.2rem;
  margin-bottom: 0.75rem;
}

.section-header span { color: var(--gold); }

.section-sub {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  color: var(--white);
}

.card-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ── Shared table styles ── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

tbody tr:hover { background: var(--surface2); }

tbody td {
  padding: 0.7rem 0.8rem;
  color: var(--text);
  vertical-align: middle;
}

/* Date + Opponent: left-aligned */
tbody td:first-child,
tbody td:nth-child(2) { text-align: left; }

/* Score, Result, Film: centered */
tbody td:nth-child(3),
tbody td:nth-child(4),
tbody td:nth-child(5) { text-align: center; }

/* Also align headers to match */
thead th:nth-child(3),
thead th:nth-child(4),
thead th:nth-child(5) { text-align: center; }

td.highlight { color: var(--gold); font-weight: 600; }

/* ── Shared utility ── */
.no-data {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 2rem;
}

.score-badge {
  display: inline-block;
  background: rgba(62, 200, 120, 0.15);
  border: 1px solid rgba(62, 200, 120, 0.3);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.score-badge.loss {
  background: rgba(224, 82, 82, 0.1);
  border-color: rgba(224, 82, 82, 0.3);
  color: var(--red);
}

.score-badge.draw {
  background: rgba(232, 201, 106, 0.1);
  border-color: rgba(232, 201, 106, 0.3);
  color: var(--yellow);
}

/* ── Responsive breakpoints ── */
@media (max-width: 600px) {
  .section-header { font-size: 1.4rem; }
}


/* ══════════════════════════════════════════
   Light Mode (Real Madrid: white/gold/navy)
   ══════════════════════════════════════════ */

body.light-mode {
  --gold:        #C9A84C;
  --gold-light:  #a8841f;
  --gold-dim:    #c9a84c;
  --white:       #0a1628;
  --bg:          #F4F4F2;
  --admin-overlay: rgba(235, 233, 228, 0.98);
  --surface:     #FFFFFF;
  --surface2:    #EEF0F4;
  --surface3:    #DDE0E8;
  --border:      rgba(10,22,40,0.15);
  --text:        #0a1628;
  --muted:       #5a6a82;
  --green:       #1a7a3e;
  --red:         #c0392b;
  --yellow:      #a8841f;
}

body.light-mode .topbar {
  background: rgba(244,244,242,0.96);
  border-bottom-color: rgba(10,22,40,0.1);
}

body.light-mode .nav {
  background: #F4F4F2;
}

body.light-mode tbody tr:hover { background: var(--surface2); }
body.light-mode tbody tr { border-bottom-color: rgba(10,22,40,0.06); }

body.light-mode .ticker-bar {
  background: #0a1628;
  color: #C9A84C;
}

body.light-mode .ticker-label {
  border-right-color: rgba(201,168,76,0.2);
}
body.light-mode .ticker-label svg { fill: rgba(201,168,76,0.9); }

body.light-mode .ticker-content { color: #C9A84C; }

body.light-mode .admin-trigger { background: #0a1628; color: var(--gold); }

/* ── Light mode match card — no dark gradient ── */
body.light-mode .match-card {
  background: var(--surface);
}
body.light-mode .match-card::before {
  display: none;
}

/* ── Light mode: mobile gameday roster chips ── */
body.light-mode .vbm-chip {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.15);
  color: #1a1a2e;
}
body.light-mode .vbm-chip.vbm-in  { border-color: rgba(30,140,70,0.5); }
body.light-mode .vbm-chip.vbm-sub { border-color: rgba(160,120,20,0.5); }
body.light-mode .vbm-chip.vbm-out { border-color: rgba(180,40,40,0.3); color: #888; }
body.light-mode .vbm-chip.vbm-link:hover { color: #a07820; border-color: #a07820; }
body.light-mode .vbm-icon.in  { color: #1e8c46; }
body.light-mode .vbm-icon.sub { color: #a07820; }
body.light-mode .vbm-icon.out { color: #b42828; }

/* ── Light mode: video banner roster header ── */
body.light-mode .vb-mobile-roster-header,
body.light-mode .vbm-tab { color: #1a1a2e; }
body.light-mode .vbm-tab {
  border-color: rgba(0,0,0,0.2);
  color: #444;
}
body.light-mode .vbm-tab.active {
  background: #c9a84c;
  border-color: #c9a84c;
  color: #1a1a1a;
}

/* ── Light mode: chat FAB ── */
body.light-mode .chat-fab {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1a2e;
}
body.light-mode .chat-fab:hover,
body.light-mode .chat-fab.active {
  background: #b8922e;
  border-color: #b8922e;
}

/* ── Light mode: chat FAB ── */
body.light-mode .chat-fab {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
  font-size: 1.15rem;
}
body.light-mode .chat-fab:hover,
body.light-mode .chat-fab.active {
  background: #2a2a4e;
  border-color: var(--gold);
}

/* ── Light mode: chat badge stays visible on dark button ── */
body.light-mode .chat-badge {
  border-color: #1a1a2e;
}
