@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   A Bola Maya — WC2026 Design System
   Palette: Torch Red #E61D25 · Azul Hermes #2A398D
            Average Green #3CAC3B · Cinzento Claro #D1D4D1
            Cinzento Escuro #474A4A
   ============================================================ */

:root {
  /* WC2026 Official Palette */
  --wc-red:        #E61D25;
  --wc-red-dk:     #c41720;
  --wc-blue:       #2A398D;
  --wc-blue-dk:    #1e2b6e;
  --wc-blue-lt:    rgba(42,57,141,.12);
  --wc-green:      #3CAC3B;
  --wc-green-dk:   #2d8a2c;
  --wc-green-lt:   rgba(60,172,59,.12);
  --wc-gray-light: #D1D4D1;
  --wc-gray-dark:  #474A4A;

  /* Semantic aliases */
  --primary:    var(--wc-red);
  --primary-dk: var(--wc-red-dk);
  --primary-bg: rgba(230,29,37,.12);
  --green:      var(--wc-green);
  --green-bg:   var(--wc-green-lt);
  --blue:       var(--wc-blue);
  --blue-bg:    var(--wc-blue-lt);
  --gold:       #f5a623;
  --gold-bg:    rgba(245,166,35,.12);
  --red-bg:     rgba(230,29,37,.1);

  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* ============================================================
   DARK THEME (default) — pure black, no blue tint
   ============================================================ */
:root, [data-theme="dark"] {
  --bg:       #0c0c0c;
  --bg-card:  #161616;
  --bg-hover: #1f1f1f;
  --border:   #2e2e2e;
  --text:     #f0f0f0;
  --muted:    #666666;
  --dim:      #3a3a3a;
  --shadow:   0 2px 12px rgba(0,0,0,.7);
  --shadow-lg:0 8px 40px rgba(0,0,0,.8);
  --shadow-colored: 0 8px 32px rgba(230,29,37,.3);
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
[data-theme="light"] {
  --bg:       #f2f2f2;
  --bg-card:  #ffffff;
  --bg-hover: #ebebeb;
  --border:   #d1d4d1;
  --text:     #111111;
  --muted:    #555555;
  --dim:      #999999;
  --shadow:   0 2px 12px rgba(0,0,0,.07);
  --shadow-lg:0 8px 40px rgba(0,0,0,.12);
  --shadow-colored: 0 8px 32px rgba(230,29,37,.15);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  transition: background .2s, color .2s;
}

/* Coloured atmosphere — dark mode only */
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 900px 700px at -8% 20%,  rgba(230,29,37,.11)  0%, transparent 100%),
    radial-gradient(ellipse 800px 600px at 108% 55%, rgba(42,57,141,.14)  0%, transparent 100%),
    radial-gradient(ellipse 700px 500px at 55% 105%, rgba(60,172,59,.09)  0%, transparent 100%);
}

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

/* ============================================================
   LAYOUT
   ============================================================ */
.container      { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background .2s, border-color .2s;
}

/* WC2026 gradient stripe */
.navbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--wc-red) 0%,
    var(--wc-red) 28%,
    var(--wc-blue) 28%,
    var(--wc-blue) 58%,
    var(--wc-green) 58%,
    var(--wc-green) 100%
  );
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Anton', sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
  margin-right: 16px;
  letter-spacing: .04em;
}
.navbar-brand:hover { text-decoration: none; color: var(--text); }

.brand-bee-wrap {
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--border);
}
.brand-bee { width: 26px; height: 26px; object-fit: contain; }

.brand-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--wc-red), var(--wc-blue));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -.03em;
}

/* Nav links */
.navbar-nav {
  display: flex;
  gap: 2px;
  flex: 1;
}

.navbar-nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.navbar-nav a:hover  { color: var(--text); background: var(--bg-hover); text-decoration: none; }
.navbar-nav a.active { color: var(--text); background: var(--bg-hover); font-weight: 600; }

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Theme toggle */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  color: var(--muted);
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg); color: var(--text); border-color: var(--primary); }
.theme-toggle svg { display: none; width: 15px; height: 15px; stroke: currentColor; }

[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wc-red), var(--wc-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .78rem;
  color: #fff;
  flex-shrink: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: background .2s, border-color .2s;
}
/* In dark mode, very slight translucency lets the BG glows show */
[data-theme="dark"] .card {
  background: rgba(22,22,22,.88);
  backdrop-filter: blur(4px);
}

.card-sm { padding: 14px 16px; }
.card + .card { margin-top: 12px; }

.card-title {
  font-size: .7rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .09em;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  font-family: inherit;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: var(--wc-red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230,29,37,.3);
}
.btn-primary:hover {
  background: var(--wc-red-dk);
  box-shadow: 0 4px 16px rgba(230,29,37,.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-blue   { background: var(--wc-blue); color: #fff; }
.btn-blue:hover { background: var(--wc-blue-dk); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-gold   { background: var(--gold); color: #000; font-weight: 700; }

.btn-sm   { padding: 6px 12px; font-size: .8rem; }
.btn-lg   { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,29,37,.15);
}
.input::placeholder { color: var(--dim); }

.score-input {
  width: 52px;
  text-align: center;
  padding: 8px 4px;
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  -moz-appearance: textfield;
  transition: border-color .15s;
}
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.score-input:focus { outline: none; border-color: var(--primary); }

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 2px;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 10px 16px;
  font-size: .875rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  transition: color .15s, border-color .15s;
  font-family: inherit;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }
.tab-btn:hover  { color: var(--text); }

/* ============================================================
   MATCH ROW
   ============================================================ */
/* Wrapper so the separator line sits BELOW both the match and the meta line */
.match-block {
  border-bottom: 1px solid var(--border);
}
.match-block:last-child { border-bottom: none; }

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 0 4px;
}

.team-home { text-align: right;  display: flex; align-items: center; justify-content: flex-end;   gap: 8px; }
.team-away { text-align: left;   display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.team-name-text { font-weight: 600; font-size: .9rem; }
.team-flag      { font-size: 1.3rem; line-height: 1; }

.score-box { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.score-sep { color: var(--muted); font-weight: 800; font-size: 1rem; }

.match-meta { font-size: .73rem; color: var(--dim); text-align: center; margin-top: 2px; padding-bottom: 10px; }

.match-actual-score {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.02em;
}

.pts-badge { font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.pts-3 { background: var(--gold-bg); color: var(--gold); }
.pts-1 { background: var(--green-bg); color: var(--green); }
.pts-0 { background: var(--bg-hover); color: var(--muted); }

/* ============================================================
   STANDINGS TABLE
   ============================================================ */
.standings-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.standings-table th {
  color: var(--muted);
  font-weight: 700;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.standings-table th:nth-child(2) { text-align: left; }
.standings-table td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.standings-table td.team-name { text-align: left; font-weight: 600; }
.standings-table td.pos       { color: var(--muted); font-weight: 700; font-size: .78rem; }
.standings-table td.pts-cell  { font-weight: 800; color: var(--green); }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table tr:nth-child(-n+2) td.pos { color: var(--gold); }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.lb-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.lb-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .09em;
}
.lb-table th:not(:nth-child(2)) { text-align: center; }
.lb-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.lb-table td:not(:nth-child(2)) { text-align: center; }
.lb-table tr:last-child td      { border-bottom: none; }
.lb-table tr:hover td           { background: var(--bg-hover); transition: background .12s; }
.lb-table tr.me td              { background: var(--primary-bg); }

/* Top 3 row subtle tint */
.lb-table tr.rank-row-1 td { background: rgba(230,29,37,.06); }
.lb-table tr.rank-row-2 td { background: rgba(42,57,141,.06); }
.lb-table tr.rank-row-3 td { background: rgba(60,172,59,.06); }
.lb-table tr.rank-row-1:hover td { background: rgba(230,29,37,.1); }
.lb-table tr.rank-row-2:hover td { background: rgba(42,57,141,.1); }
.lb-table tr.rank-row-3:hover td { background: rgba(60,172,59,.1); }
.lb-table tr.me.rank-row-1 td,
.lb-table tr.me.rank-row-2 td,
.lb-table tr.me.rank-row-3 td { background: var(--primary-bg); }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 800;
  color: var(--muted);
}
.rank-badge.rank-1 { background: rgba(255,215,0,.18); color: #ffd700; border: 1px solid rgba(255,215,0,.3); }
.rank-badge.rank-2 { background: rgba(192,192,192,.18); color: #c0c0c0; border: 1px solid rgba(192,192,192,.3); }
.rank-badge.rank-3 { background: rgba(205,127,50,.18);  color: #cd7f32; border: 1px solid rgba(205,127,50,.3); }

.lb-pts { font-weight: 900; font-size: 1.05rem; color: var(--gold); }
.lb-sub { font-size: .75rem; color: var(--muted); }

/* ============================================================
   GROUP GRID (dashboard)
   ============================================================ */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  text-decoration: none;
  display: block;
  color: var(--text);
}
.group-card:hover      { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.group-card.done       { opacity: .85; }

/* Per-group colours are applied via .gc-X classes (see 12 GROUP COLOURS section) */

.group-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.group-label { font-weight: 800; font-size: 1rem; letter-spacing: -.02em; }
.group-check { color: var(--green); font-size: .85rem; font-weight: 700; }
.group-teams { display: flex; flex-direction: column; gap: 4px; }
.group-team  { font-size: .78rem; color: var(--muted); display: block; }
a.group-team:hover { color: var(--text); text-decoration: none; }

/* ============================================================
   STATS ROW
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }

/* Colored top stripe */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.stat-card:nth-child(1)::before { background: var(--wc-red); }
.stat-card:nth-child(2)::before { background: var(--wc-blue); }
.stat-card:nth-child(3)::before { background: var(--wc-green); }

/* Colored glow behind the number */
.stat-card:nth-child(1)::after { background: radial-gradient(circle at 50% 0%, rgba(230,29,37,.1) 0%, transparent 70%); }
.stat-card:nth-child(2)::after { background: radial-gradient(circle at 50% 0%, rgba(42,57,141,.12) 0%, transparent 70%); }
.stat-card:nth-child(3)::after { background: radial-gradient(circle at 50% 0%, rgba(60,172,59,.1) 0%, transparent 70%); }
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stat-value {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.04em;
  position: relative;
  z-index: 1;
}
.stat-label {
  font-size: .68rem;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

/* ============================================================
   BADGE / CHIP
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-green { background: var(--green-bg);  color: var(--green); }
.badge-blue  { background: var(--blue-bg);   color: var(--blue); }
.badge-red   { background: var(--primary-bg); color: var(--primary); }
.badge-gold  { background: var(--gold-bg);   color: var(--gold); }
.badge-muted { background: var(--bg-hover);  color: var(--muted); }

/* ============================================================
   LOBBY
   ============================================================ */
.lobby-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow .15s;
}
.lobby-card:hover { box-shadow: var(--shadow); }
.lobby-card + .lobby-card { margin-top: 10px; }

.lobby-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lobby-name   { font-weight: 700; font-size: 1rem; }
.lobby-code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: .82rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--gold);
  cursor: pointer;
  user-select: all;
  letter-spacing: .12em;
  font-weight: 600;
  transition: border-color .15s;
}
.lobby-code:hover { border-color: var(--gold); }

/* Create / Join card accents */
.card-accent-red  { border-top: 3px solid var(--wc-red) !important; }
.card-accent-blue { border-top: 3px solid var(--wc-blue) !important; }

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: .875rem;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid rgba(245,166,35,.25);
  border-radius: var(--radius);
  padding: 10px 18px;
  margin-bottom: 20px;
  font-weight: 600;
}
.countdown::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .3; transform: scale(.7); }
}

.locked-banner {
  background: var(--red-bg);
  border: 1px solid rgba(230,29,37,.25);
  color: var(--primary);
  border-radius: var(--radius);
  padding: 11px 18px;
  text-align: center;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: .9rem;
}

/* ============================================================
   PREDICT PAGE
   ============================================================ */
.predict-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}

.group-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 76px;
}

.group-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background .12s, border-color .12s;
  font-size: .875rem;
  font-weight: 500;
}
.group-list-item:last-child { border-bottom: none; }
.group-list-item:hover      { background: var(--bg-hover); }
.group-list-item.active     {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 700;
  border-left-color: var(--primary);
}
.group-list-item .check     { font-size: .78rem; color: var(--green); font-weight: 700; }

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  background: var(--bg);
  /* no overflow:hidden — lets the trophy breathe */
}
/* WC2026-style colour atmosphere */
.auth-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 0% 50%,   rgba(230,29,37,.28)  0%, transparent 100%),
    radial-gradient(ellipse 60% 70% at 100% 50%,  rgba(42,57,141,.28)  0%, transparent 100%),
    radial-gradient(ellipse 50% 50% at 50% -5%,   rgba(60,172,59,.22)  0%, transparent 100%),
    radial-gradient(ellipse 40% 40% at 50% 105%,  rgba(230,29,37,.15)  0%, transparent 100%);
  pointer-events: none;
}

/* Tricolour stripe top */
.auth-wrap::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg,
    var(--wc-red)   0%,   var(--wc-red)   33.3%,
    var(--wc-blue)  33.3%, var(--wc-blue)  66.6%,
    var(--wc-green) 66.6%, var(--wc-green) 100%
  );
}

/* Trophy decorative — dark: img/trophy.png · light: img/trophyblack.png */
.auth-trophy {
  position: fixed;
  right: 3%;
  bottom: 0;
  height: 80vh;
  max-height: 680px;
  min-height: 360px;
  opacity: .28;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  object-fit: contain;
  object-position: bottom;
}
[data-theme="light"] .auth-trophy { opacity: .18; }
.auth-wrap .auth-card { position: relative; z-index: 1; }

/* Trophy in page headers — contained inside the header box */
.header-trophy {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  height: 65%;
  width: auto;
  opacity: .35;
  pointer-events: none;
  z-index: 0;
  object-fit: contain;
  object-position: right center;
}
[data-theme="light"] .header-trophy { opacity: .22; }

/* Theme-aware visibility helpers */
[data-theme="dark"]  .trophy-light { display: none; }
[data-theme="light"] .trophy-dark  { display: none; }

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-bee-wrap {
  background: #ffffff;
  border-radius: 22px;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15), 0 0 0 4px var(--border);
  overflow: hidden;
}
.auth-bee { width: 72px; height: 72px; object-fit: contain; }

/* Fallback if no image */
.brand-logo {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, var(--wc-red) 0%, var(--wc-blue) 100%);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  margin: 0 auto 14px;
  box-shadow: var(--shadow-colored);
  letter-spacing: -.05em;
}

.auth-brand h1 { font-family: 'Anton', sans-serif; font-size: 2.6rem; font-weight: 400; letter-spacing: .03em; }
.auth-brand p  { color: var(--muted); font-size: .875rem; margin-top: 6px; }

.error-msg {
  background: var(--red-bg);
  border: 1px solid rgba(230,29,37,.3);
  color: var(--primary);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .85rem;
  margin-bottom: 16px;
  font-weight: 500;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  position: relative;
}
/* Tricolour accent bar under the page header */
.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--wc-red), var(--wc-blue), var(--wc-green));
  border-radius: 2px;
}
.page-header h2 {
  font-family: 'Anton', sans-serif;
  font-size: 3.6rem;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.page-header p  { color: var(--muted); font-size: .875rem; margin-top: 10px; position: relative; z-index: 1; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: .875rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  box-shadow: var(--shadow-lg);
  max-width: 300px;
}
.toast.show   { opacity: 1; transform: translateY(0); }
.toast-success { border-left-color: var(--green); }
.toast-error   { border-left-color: var(--primary); }
.toast-info    { border-left-color: var(--blue); }

/* ============================================================
   UTILITIES
   ============================================================ */
.muted        { color: var(--muted); }
.text-green   { color: var(--green); }
.text-gold    { color: var(--gold); }
.text-red     { color: var(--primary); }
.text-blue    { color: var(--blue); }
.text-center  { text-align: center; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.fw-bold  { font-weight: 700; }
.fw-black { font-weight: 900; }
.small    { font-size: .82rem; }
.divider  { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.loading  { color: var(--muted); text-align: center; padding: 40px; font-size: .9rem; }

/* ============================================================
   DASHBOARD SIDEBAR LAYOUT
   ============================================================ */
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  padding-bottom: 48px;
}

.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 76px;
}

/* User card */
.user-card {
  text-align: center;
  padding: 28px 20px 20px;
}
.avatar-xl {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wc-red), var(--wc-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: #fff;
  margin: 0 auto 12px;
  letter-spacing: .02em;
}
.user-display-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}
.user-username { font-size: .78rem; color: var(--muted); }

/* Sidebar stats */
.stats-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-sidebar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 20px;
}
.stat-sidebar-row:last-child { border-bottom: none; }
.stat-sidebar-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.stat-sidebar-row:nth-child(1)::before { background: var(--wc-red); }
.stat-sidebar-row:nth-child(2)::before { background: var(--wc-blue); }
.stat-sidebar-row:nth-child(3)::before { background: var(--wc-green); }
.stat-sidebar-label {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
}
.stat-sidebar-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: .03em;
  line-height: 1;
}

/* Dash main area */
.dash-main { min-width: 0; }

/* ============================================================
   3 WC2026 COLOURS — cycling R / B / G for the 12 groups
   ============================================================ */
.gc-A, .gc-D, .gc-G, .gc-J { --gc: var(--wc-red); }
.gc-B, .gc-E, .gc-H, .gc-K { --gc: var(--wc-blue); }
.gc-C, .gc-F, .gc-I, .gc-L { --gc: var(--wc-green); }

/* Group card uses --gc */
.group-card { border-left-color: var(--gc, var(--border)); }
.group-card:hover { border-left-color: var(--gc, var(--primary)); box-shadow: 0 4px 16px rgba(0,0,0,.4); }

/* Filter button group colours */
.filter-btn-group { --gc: var(--border); border-color: var(--gc); }
.filter-btn-group:hover { background: var(--gc); border-color: var(--gc); color: #fff; }
.filter-btn-group.active { background: var(--gc); border-color: var(--gc); color: #fff; }

/* ============================================================
   GROUP FILTER BAR (predict page)
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  align-items: center;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  font-family: inherit;
  white-space: nowrap;
}
.filter-btn:hover   { border-color: var(--primary); color: var(--text); }
.filter-btn.active  { background: var(--primary); border-color: var(--primary); color: #fff; }

.filter-btn-group {
  width: 36px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
}

/* ============================================================
   PREDICT — DAY-BY-DAY LAYOUT
   ============================================================ */
.match-day { margin-bottom: 28px; }

.match-day-header {
  font-family: 'Anton', sans-serif;
  font-size: 1.35rem;
  letter-spacing: .04em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.match-day-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.match-group-chip {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--dim);
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* When a group is active, the day card gets a coloured left border */
#matchSchedule .card {
  border-left: 3px solid var(--active-gc, var(--border));
  transition: border-color .2s;
}

/* Sticky save bar */
.save-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--primary);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 80;
  box-shadow: 0 -8px 32px rgba(0,0,0,.5);
  transition: background .2s;
}
.save-bar-info { font-size: .88rem; color: var(--muted); }
.save-bar-info strong { color: var(--text); font-variant-numeric: tabular-nums; }
.has-save-bar { padding-bottom: 76px; }

/* Group standings grid (predict bottom) */
.groups-standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

/* ============================================================
   LOBBY MEMBER LIST
   ============================================================ */
.member-list { display: flex; flex-direction: column; }
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.member-row:last-child { border-bottom: none; }
.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wc-blue), var(--wc-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .82rem;
  color: #fff;
  flex-shrink: 0;
}
.member-name { flex: 1; font-weight: 500; font-size: .9rem; }
.member-me   { color: var(--primary); font-weight: 700; }

/* ============================================================
   TEAM / SQUAD PAGE
   ============================================================ */
.squad-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.squad-flag { font-size: 3.5rem; line-height: 1; flex-shrink: 0; }
.squad-info { flex: 1; min-width: 0; }
.squad-info h1 {
  font-family: 'Anton', sans-serif;
  font-size: 3rem;
  letter-spacing: .02em;
  line-height: 1;
}
.squad-info .squad-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.squad-manager { font-size: .88rem; color: var(--muted); }

.squad-trophy {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  height: 65%;
  opacity: .28;
  pointer-events: none;
  object-fit: contain;
}
[data-theme="light"] .squad-trophy { opacity: .14; }

/* Position section */
.position-section { margin-bottom: 32px; }
.position-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: .12em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.position-label::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--gc, var(--primary));
  border-radius: 2px;
  flex-shrink: 0;
}

/* Player grid */
.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.player-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  border-color: var(--gc, var(--primary));
  text-decoration: none;
}
[data-theme="dark"] .player-card { background: rgba(22,22,22,.9); }

/* Photo area */
.player-photo-wrap {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg-hover);
  overflow: hidden;
}
.player-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .2s;
}
.player-card:hover .player-photo { transform: scale(1.04); }

/* Placeholder when no photo */
.player-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bg-hover) 0%, var(--bg-card) 100%);
  font-family: 'Anton', sans-serif;
  font-size: 2.8rem;
  color: var(--dim);
  letter-spacing: .02em;
}

/* Number badge */
.player-number-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--gc, var(--primary));
  color: #fff;
  font-weight: 800;
  font-size: .72rem;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

/* Player info below photo */
.player-info { padding: 10px 10px 12px; }
.player-name {
  font-weight: 700;
  font-size: .82rem;
  line-height: 1.25;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-club {
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Clickable team name in match rows */
a.team-link { color: inherit; text-decoration: none; }
a.team-link:hover { color: var(--primary); text-decoration: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    position: static;
    order: 2;
  }
  .dash-main { order: 1; }
}

/* ============================================================
   TEAM FORM (Recent Results)
   ============================================================ */
.team-form-section {
  margin: 0 0 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.team-form-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 12px;
}
.form-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.form-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}
.form-badge-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.form-badge-dot.fw { background: var(--green-bg);  color: var(--green);   border: 1.5px solid var(--green); }
.form-badge-dot.fd { background: var(--gold-bg);   color: var(--gold);    border: 1.5px solid var(--gold); }
.form-badge-dot.fl { background: var(--red-bg);    color: var(--primary); border: 1.5px solid var(--primary); }
.form-badge-meta {
  font-size: .6rem;
  color: var(--muted);
  text-align: center;
  max-width: 54px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.form-badge-score {
  font-size: .65rem;
  font-weight: 700;
  color: var(--text);
}
.form-loading { color: var(--muted); font-size: .85rem; }
.form-error   { color: var(--muted); font-size: .8rem; font-style: italic; }

/* Equal-height lobby cards */
.cj-grid { align-items: stretch; }
.cj-grid .card { display: flex; flex-direction: column; }
.cj-grid .card .btn-full { margin-top: auto; }

@media (max-width: 640px) {
  .predict-layout { grid-template-columns: 1fr; }
  .group-list     { position: static; }
  .navbar-nav a:not(.always) { display: none; }
  .team-name-text { font-size: .76rem; }
  .score-input    { width: 46px; }
  .auth-card      { padding: 24px; }
  .page-header h2 { font-size: 2rem; }
  .save-bar       { padding: 10px 16px; }
  .groups-standings-grid { grid-template-columns: 1fr; }
  .cj-grid        { grid-template-columns: 1fr !important; }
  .profile-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .profile-stats  { grid-template-columns: repeat(3, 1fr); }
  .lb-table .lb-accuracy { display: none; }
}

/* ── Avatar generated ────────────────────────────────────────────────────────*/
.avatar-gen { transition: opacity .15s; }
.avatar-gen:hover { opacity: .85; }
#navAvatar { transition: background .3s; }

/* ── Profile page ────────────────────────────────────────────────────────────*/
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; color: #fff;
  flex-shrink: 0;
}
.profile-info h1 { font-size: 1.6rem; font-weight: 900; margin: 0 0 4px; }
.profile-meta    { color: var(--muted); font-size: .85rem; display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.profile-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
}
.profile-stat-value { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.profile-stat-label { font-size: .72rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* ── Prediction history table ────────────────────────────────────────────────*/
.history-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.history-table th { text-align: left; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.history-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: rgba(255,255,255,.03); }
.pred-correct  { color: var(--green); font-weight: 700; }
.pred-exact    { color: var(--gold);  font-weight: 700; }
.pred-wrong    { color: var(--muted); }
.pred-pending  { color: var(--muted); font-style: italic; }

/* ── User badges ─────────────────────────────────────────────────────────────*/
.user-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  vertical-align: middle;
}
.badge-admin    { background: rgba(245,166,35,.15); color: var(--gold); }
.badge-top      { background: rgba(60,172,59,.15);  color: var(--green); }

/* ── Friends ─────────────────────────────────────────────────────────────────*/
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 10px; }
.friend-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  text-decoration: none; color: var(--text);
  transition: border-color .2s;
}
.friend-card:hover { border-color: var(--primary); }
.friend-name  { font-weight: 700; font-size: .9rem; }
.friend-sub   { font-size: .75rem; color: var(--muted); margin-top: 2px; }

.request-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin-bottom: 8px;
}
.request-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

/* ── Leaderboard improvements ────────────────────────────────────────────────*/
.lb-table .lb-rank    { width: 40px; font-weight: 700; color: var(--muted); text-align: center; }
.lb-table .lb-avatar  { width: 40px; }
.lb-table .lb-accuracy{ color: var(--muted); font-size: .82rem; }
.lb-table .lb-admin   { color: var(--gold); font-size: .9rem; }

/* ── Admin stats dashboard ───────────────────────────────────────────────────*/
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 10px; margin-bottom: 16px; }
.admin-stat  { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 12px; text-align: center; }
.admin-stat-value { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.admin-stat-label { font-size: .7rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* ── OAuth buttons ───────────────────────────────────────────────────────────*/
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--muted); font-size: .8rem; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.oauth-btns    { display: flex; gap: 8px; }
.btn-oauth     {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 6px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); text-decoration: none;
  font-size: .82rem; font-weight: 600; transition: border-color .2s, background .2s;
  cursor: pointer;
}
.btn-oauth:hover { border-color: var(--primary); background: rgba(230,29,37,.06); }

/* ── Notification bell ───────────────────────────────────────────────────────*/
.nav-bell     { position: relative; }
.nav-bell-btn {
  background: none; border: none; cursor: pointer; color: var(--text);
  padding: 4px 6px; border-radius: var(--radius); display: flex; align-items: center;
  position: relative; transition: background .15s;
}
.nav-bell-btn:hover { background: var(--border); }
.nav-bell-badge {
  position: absolute; top: -2px; right: -4px;
  background: var(--primary); color: #fff;
  font-size: .6rem; font-weight: 700; border-radius: 10px;
  padding: 1px 5px; min-width: 16px; text-align: center; line-height: 1.4;
}
.nav-bell-panel {
  position: absolute; right: -8px; top: calc(100% + 8px);
  width: 300px; max-height: 400px; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 200;
}
.notif-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border); transition: background .1s;
}
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: rgba(255,255,255,.04); }
.notif-unread { background: rgba(230,29,37,.06); }
.notif-icon   { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.notif-title  { font-size: .83rem; font-weight: 600; line-height: 1.3; }
.notif-time   { font-size: .73rem; margin-top: 2px; }

/* ── Achievements ────────────────────────────────────────────────────────────*/
.achievements-grid  { display: flex; flex-wrap: wrap; gap: 8px; }
.achievement-card   {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px; font-size: .82rem; font-weight: 600;
  cursor: default; transition: border-color .2s;
}
.achievement-card:hover { border-color: var(--gold); }
.achievement-icon  { font-size: 1rem; }
.achievement-name  { color: var(--text); }

/* ── Privacy toggle rows ─────────────────────────────────────────────────────*/
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  cursor: pointer; padding: 10px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row input[type=checkbox] { width: 36px; height: 20px; cursor: pointer; accent-color: var(--green); }

/* ── Avatar hover overlay ────────────────────────────────────────────────────*/
#settingsAvatar:hover .avatar-overlay { opacity: 1 !important; }


/* ── Player national team stats mini display ─────────────────────────────────*/
.player-nat-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.pns-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.06);
  border-radius: 5px;
  padding: 2px 6px;
  min-width: 30px;
}
[data-theme="light"] .pns-item { background: rgba(0,0,0,.06); }
.pns-val  { font-size: .72rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.pns-lbl  { font-size: .58rem; color: var(--muted); line-height: 1.2; white-space: nowrap; }

/* ── Player modal ─────────────────────────────────────────────────────────────*/
.player-card { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.player-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.22); }

.player-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.65); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.player-modal-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  width: 100%; max-width: 400px; max-height: 90vh; overflow-y: auto;
  padding: 20px 24px 24px; position: relative;
  animation: pmodal-in .18s cubic-bezier(.2,.8,.4,1);
}
@keyframes pmodal-in {
  from { opacity: 0; transform: scale(.93) translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.player-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--muted);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  padding: 2px 8px; border-radius: 6px; transition: color .15s, background .15s;
}
.player-modal-close:hover { color: var(--text); background: rgba(255,255,255,.1); }
[data-theme="light"] .player-modal-close:hover { background: rgba(0,0,0,.08); }

.pmodal-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding-top: 2px; }
.pmodal-photo-wrap {
  width: 76px; height: 76px; flex-shrink: 0;
  border-radius: 50%; overflow: hidden;
  border: 2px solid var(--border);
}
.pmodal-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.pmodal-photo-placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.5rem; color: #fff;
}
.pmodal-player-info { flex: 1; min-width: 0; }
.pmodal-name { font-size: 1.05rem; font-weight: 800; line-height: 1.25; margin-bottom: 3px; }
.pmodal-meta { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.pmodal-pos  { display: flex; gap: 6px; flex-wrap: wrap; }

.pmodal-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0 12px; }

.pmodal-stats-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.pmodal-stats-grid {
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 8px;
  background: rgba(255,255,255,.04); border-radius: 12px;
  padding: 16px 8px; margin-bottom: 8px;
}
[data-theme="light"] .pmodal-stats-grid { background: rgba(0,0,0,.04); }
.pmodal-stat-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 44px; }
.pmodal-stat-val  { font-size: 1.5rem; font-weight: 900; line-height: 1; color: var(--text); }
.pmodal-stat-lbl  { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pmodal-updated   { text-align: right; font-size: .72rem; }

/* ── Player modal — override: solid, readable card ──────────────────────────*/
.player-modal-box {
  background: #0d0d10;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 60px rgba(0,0,0,.7);
}
[data-theme="light"] .player-modal-box {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.14);
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
.pmodal-stats-grid {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
}
[data-theme="light"] .pmodal-stats-grid {
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.1);
}
.pmodal-stat-val  { font-size: 1.55rem; }
.pmodal-stat-lbl  { font-size: .63rem; }
.pmodal-name      { font-size: 1.1rem; color: #fff; }
[data-theme="light"] .pmodal-name { color: #111; }
.pmodal-meta      { color: #aaa; }
[data-theme="light"] .pmodal-meta { color: #666; }

/* ── Player modal — senior/total labels ──────────────────────────────────────*/
.pmodal-secondary-label { margin-bottom: 8px; display: block; }

/* ── Site footer ─────────────────────────────────────────────────────────────*/
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 28px;
  margin-top: 48px;
  color: var(--muted);
  font-size: .78rem;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--text); }

/* ── Ticket status badges ────────────────────────────────────────────────────*/
.badge-orange { background: rgba(251,146,60,.15); color: #fb923c; }
[data-theme="light"] .badge-orange { background: rgba(234,88,12,.12); color: #c2410c; }

/* ── Ticket list (admin) ─────────────────────────────────────────────────────*/
.ticket-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.ticket-row:last-child { border-bottom: none; }
.ticket-meta { font-size: .75rem; color: var(--muted); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.pmodal-note            { margin-top: 8px; font-size: .65rem; }
