/* WC2026 — Dark theme */
[data-theme="dark"] {
  color-scheme: dark;

  --green-light: #052e16;
  --red-light: #450a0a;
  --amber-light: #451a03;
  --blue-light: #1e3a5f;
  --gray: #9ca3af;
  --gray-light: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --shadow: 0 2px 8px rgba(0, 0, 0, .35);
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --footer-bg: #0f172a;
  --input-bg: #0f172a;
  --overlay: rgba(0, 0, 0, .65);
  --bd-head-t-bg: #172554;
  --bd-head-p-bg: #450a0a;
  --bd-me-bg: #1e3a5f;
}

/* Navbar & links */
[data-theme="dark"] .nav-links a:hover { background: var(--surface-2); }

/* Match cards */
[data-theme="dark"] .handicap-team .team-side { background: #78350f; color: #fde68a; }
[data-theme="dark"] .handicap-inline { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .handicap-badge { background: #451a03; color: #fde68a; }
[data-theme="dark"] .handicap-badge.hdp-left { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .handicap-badge.hdp-right { background: #3b0764; color: #c4b5fd; }

/* Bet buttons */
[data-theme="dark"] .btn-bet {
  background: #1e3a5f; color: #93c5fd; border-color: #334155;
}
[data-theme="dark"] .btn-bet.btn-left {
  background: #052e16; color: #86efac; border-color: #166534;
}
[data-theme="dark"] .btn-bet.btn-right {
  background: #172554; color: #93c5fd; border-color: #1e40af;
}
[data-theme="dark"] .btn-bet.btn-left:hover,
[data-theme="dark"] .btn-bet.btn-left:focus { background: #14532d; border-color: #22c55e; }
[data-theme="dark"] .btn-bet.btn-right:hover,
[data-theme="dark"] .btn-bet.btn-right:focus { background: #1e3a5f; border-color: #3b82f6; }
[data-theme="dark"] .bet-change .btn-bet.not-selected.btn-left {
  background: #052e16 !important; color: #86efac !important;
  border: 2px solid #166534 !important;
}
[data-theme="dark"] .bet-change .btn-bet.not-selected.btn-right {
  background: #172554 !important; color: #93c5fd !important;
  border: 2px solid #1e40af !important;
}
[data-theme="dark"] .bet-change .btn-bet.active.selected-t {
  background: #14532d !important; color: #bbf7d0 !important;
  border-color: #22c55e !important;
}
[data-theme="dark"] .bet-change .btn-bet.active.selected-p {
  background: #1e3a5f !important; color: #bfdbfe !important;
  border-color: #3b82f6 !important;
}
[data-theme="dark"] .bet-change .btn-bet.active.selected-t .pick-check {
  background: rgba(187,247,208,.2); color: #86efac;
}
[data-theme="dark"] .bet-change .btn-bet.active.selected-p .pick-check {
  background: rgba(191,219,254,.2); color: #93c5fd;
}

/* My bet banner */
[data-theme="dark"] .my-bet-placed.bet-pending {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

/* Leaderboard */
[data-theme="dark"] .lb-me { background: #172554; }
[data-theme="dark"] .lb-me:hover { background: #1e3a5f !important; }
[data-theme="dark"] .wdl-w { background: #052e16; color: #86efac; }
[data-theme="dark"] .wdl-d { background: #451a03; color: #fde68a; }
[data-theme="dark"] .wdl-l { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .wdl-auto { background: #3b0764; color: #d8b4fe; }
[data-theme="dark"] .prize-banner {
  background: #1c1917; border-color: #92400e;
}
[data-theme="dark"] .prize-banner__label { color: #fde68a; }
[data-theme="dark"] .prize-banner__value { color: #fbbf24; }

[data-theme="dark"] .bulletin-card {
  background: var(--surface); border-color: var(--border);
}
[data-theme="dark"] .bulletin-card__toggle { background: var(--surface-2); }
[data-theme="dark"] .bulletin-card__toggle:hover { background: #1e293b; }
[data-theme="dark"] .bulletin-badge--auto { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .bulletin-badge--manual { background: #451a03; color: #fde68a; }

/* Tables */
[data-theme="dark"] .data-table th { background: var(--surface-2); }
[data-theme="dark"] .row-win { background: #052e16; }
[data-theme="dark"] .row-lose { background: #450a0a; }
[data-theme="dark"] .row-draw { background: #451a03; }
[data-theme="dark"] .score-input {
  background: var(--input-bg); color: var(--text); border-color: var(--border);
}

/* Buttons & misc */
[data-theme="dark"] .btn-see-bets {
  background: var(--surface-2); border-color: var(--border); color: var(--text-muted);
}
[data-theme="dark"] .btn-see-bets:hover {
  background: #1e3a5f; color: #93c5fd; border-color: #3b82f6;
}
[data-theme="dark"] .btn-google {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
[data-theme="dark"] .btn-google:hover { background: var(--surface-2); }
[data-theme="dark"] .login-card { box-shadow: 0 4px 24px rgba(0, 0, 0, .4); }
[data-theme="dark"] .login-disclaimer {
  background: #451a03; border-color: #92400e; color: #fde68a;
}
[data-theme="dark"] .login-disclaimer strong { color: #fef3c7; }
[data-theme="dark"] .tip-box--legal {
  background: #052e16; border-color: #166534; color: #86efac;
}
[data-theme="dark"] .tip-box--legal strong { color: #bbf7d0; }
[data-theme="dark"] .status-upcoming { background: var(--surface-2); color: var(--text-muted); }

/* Activity log */
[data-theme="dark"] .log-table thead th {
  background: var(--surface-2); color: var(--text); border-bottom-color: var(--border);
}
[data-theme="dark"] .log-row { border-bottom-color: var(--border); }
[data-theme="dark"] .log-row:hover { background: var(--surface-2); }
[data-theme="dark"] .log-date { color: var(--text); }
[data-theme="dark"] .log-desc { color: var(--text); }
[data-theme="dark"] .badge-auth     { background: #3b0764; color: #c4b5fd; }
[data-theme="dark"] .badge-bet      { background: #052e16; color: #86efac; }
[data-theme="dark"] .badge-follow   { background: #3b0764; color: #d8b4fe; }
[data-theme="dark"] .badge-match    { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .badge-result   { background: #451a03; color: #fde68a; }
[data-theme="dark"] .badge-score    { background: #500724; color: #f9a8d4; }
[data-theme="dark"] .badge-user     { background: #0c4a6e; color: #7dd3fc; }
[data-theme="dark"] .badge-whitelist{ background: #052e16; color: #86efac; border-color: #166534; }
[data-theme="dark"] .badge-betvalue { background: #431407; color: #fdba74; }
[data-theme="dark"] .badge-bulletin { background: #164e63; color: #67e8f9; }
[data-theme="dark"] .badge-default  { background: var(--surface-2); color: var(--text-muted); }
[data-theme="dark"] .page-btn {
  background: var(--surface); border-color: var(--border); color: var(--text);
}
[data-theme="dark"] .page-btn:hover { background: #1e3a5f; border-color: #3b82f6; color: #93c5fd; }

/* Profile */
[data-theme="dark"] .profile-log-desc { color: var(--text); }
[data-theme="dark"] .profile-info-row { border-bottom-color: var(--border); }
[data-theme="dark"] .follow-help-box {
  background: #172554; border-color: #1e40af;
}
[data-theme="dark"] .fhelp-title { color: #93c5fd; }
[data-theme="dark"] .fhelp-note {
  background: #451a03; border-color: #92400e; color: #fde68a;
}
[data-theme="dark"] .follow-status {
  background: #172554; border-color: #1e40af;
}
[data-theme="dark"] .follow-label { color: #60a5fa; }
[data-theme="dark"] .follow-select {
  background: var(--input-bg); color: var(--text); border-color: var(--border);
}
[data-theme="dark"] .follow-mode-opt { background: var(--surface); }
[data-theme="dark"] .follow-mode-opt.active,
[data-theme="dark"] .follow-mode-opt:has(input:checked) {
  background: #172554; border-color: var(--blue);
}
[data-theme="dark"] .follow-mode-same { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .follow-mode-inverse { background: #500724; color: #f9a8d4; }
[data-theme="dark"] .follow-cancel-btn:hover { background: #450a0a; }

/* Nav followers */
[data-theme="dark"] .nav-followers-btn[aria-expanded="true"],
[data-theme="dark"] .nav-followers-btn:hover { background: var(--surface-2); }
[data-theme="dark"] .nav-followers-panel { background: var(--surface-2); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
[data-theme="dark"] .nav-followers-panel__count { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .nav-followers-mode--same { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .nav-followers-mode--inverse { background: #500724; color: #f9a8d4; }

[data-theme="dark"] #chibi-picker { background: var(--surface); }
[data-theme="dark"] .chibi-active .chibi-btn { background: #172554; }
[data-theme="dark"] .avatar-upload-label:hover { background: #1e3a5f; }

/* Chat */
[data-theme="dark"] #chat-input-area { border-top-color: var(--border); }
[data-theme="dark"] .chat-msg.bot .chat-bubble {
  background: var(--surface-2); color: var(--text);
}
[data-theme="dark"] #chat-messages::-webkit-scrollbar-thumb { background: var(--border); }

/* Poll labels — giữ màu sáng để dễ đọc */
[data-theme="dark"] .poll-label-t { color: #60a5fa; }
[data-theme="dark"] .poll-label-p { color: #f87171; }

/* Match card closed */
[data-theme="dark"] .match-card.closed { opacity: .65; }

/* Form controls chung (admin, filter, ...) */
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] code { background: var(--surface-2); color: var(--text); }
