/* == MODO OSCURO == */
body.dark-mode {
  --c-bg:       #0f1117;
  --c-surface:  #1a1d27;
  --c-text:     #e8eaf0;
  --c-text-2:   #9ca3af;
  --c-border:   #2d3148;
  --c-header:   #0a0d14;
}

body.dark-mode .app-header { background: var(--c-header) !important; }
body.dark-mode .bottom-nav { background: #0f1117 !important; border-top: .5px solid #2d3148 !important; }
body.dark-mode .bottom-nav a.active { color: #4db2ec !important; }
body.dark-mode .hamburger-drawer { background: #0f1117 !important; }
body.dark-mode .drawer-nav a { color: #e8eaf0 !important; }
body.dark-mode .drawer-nav a:hover,
body.dark-mode .drawer-nav a.active { background: #1a1d27 !important; }
body.dark-mode #app-wrap { background: #0f1117 !important; }

/* ── Cards y contenedores ── */
body.dark-mode div[style*="background:#fff"],
body.dark-mode div[style*="background: #fff"],
body.dark-mode div[style*="background:#f5f7fa"],
body.dark-mode div[style*="background: #f5f7fa"] { background: #1a1d27 !important; }

body.dark-mode a[style*="background:#fff"] { background: #1a1d27 !important; }

/* ── Textos inline (inline styles) ── */
body.dark-mode [style*="color:#111"]     { color: #e8eaf0 !important; }
body.dark-mode [style*="color: #111"]    { color: #e8eaf0 !important; }
body.dark-mode [style*="color:#1a1a1a"]  { color: #e8eaf0 !important; }
body.dark-mode [style*="color:#222"]     { color: #e8eaf0 !important; }
body.dark-mode [style*="color:#333"]     { color: #e8eaf0 !important; }
body.dark-mode [style*="color:#374151"]  { color: #d1d5db !important; }
body.dark-mode [style*="color:#4b5563"]  { color: #9ca3af !important; }
body.dark-mode [style*="color:#6b7280"]  { color: #9ca3af !important; }
body.dark-mode [style*="color:#9ca3af"]  { color: #6b7280 !important; }

/* ── Fondos inline ── */
body.dark-mode [style*="background:#f3f4f6"]  { background: #252839 !important; }
body.dark-mode [style*="background: #f3f4f6"] { background: #252839 !important; }
body.dark-mode [style*="background:#f5f7fa"]  { background: #0f1117 !important; }
body.dark-mode [style*="background: #f5f7fa"] { background: #0f1117 !important; }
body.dark-mode [style*="background:#f9fafb"]  { background: #1a1d27 !important; }
body.dark-mode [style*="background: #f9fafb"] { background: #1a1d27 !important; }
body.dark-mode [style*="background:#f8fafc"]  { background: #1a1d27 !important; }
body.dark-mode [style*="background: #f8fafc"] { background: #1a1d27 !important; }
body.dark-mode [style*="background:#ffffff"]  { background: #1a1d27 !important; }
body.dark-mode [style*="background: #ffffff"] { background: #1a1d27 !important; }

/* ── Bordes inline ── */
body.dark-mode [style*="border-bottom:.5px solid #f3f4f6"]  { border-bottom: .5px solid #2d3148 !important; }
body.dark-mode [style*="border-bottom: .5px solid #f3f4f6"] { border-bottom: .5px solid #2d3148 !important; }
body.dark-mode [style*="border:.5px solid #f3f4f6"]         { border: .5px solid #2d3148 !important; }
body.dark-mode [style*="border: .5px solid #f3f4f6"]        { border: .5px solid #2d3148 !important; }
body.dark-mode [style*="border:1px solid #eee"]             { border: 1px solid #2d3148 !important; }
body.dark-mode [style*="border: 1px solid #eee"]            { border: 1px solid #2d3148 !important; }
body.dark-mode [style*="border-bottom:1px solid #f0f2f5"]   { border-bottom: 1px solid #2d3148 !important; }
body.dark-mode [style*="border-bottom: 1px solid #f0f2f5"]  { border-bottom: 1px solid #2d3148 !important; }

/* ── Sección partidos / fixture ── */
body.dark-mode .match-row-v2 {
  background: #1a1d27 !important;
  border-bottom: .5px solid #2d3148 !important;
}
body.dark-mode .match-row-v2:hover { background: #252839 !important; }

/* Texto DENTRO de filas de partido */
body.dark-mode .match-row-v2 *,
body.dark-mode .fixture-row *,
body.dark-mode .fixture-card * {
  color: inherit;
}
body.dark-mode .match-row-v2 .team-name,
body.dark-mode .match-row-v2 [class*="team"],
body.dark-mode .match-row-v2 [class*="name"],
body.dark-mode .fixture-row  [class*="team"],
body.dark-mode .fixture-row  [class*="name"] { color: #e8eaf0 !important; }

body.dark-mode .match-row-v2 .score,
body.dark-mode .match-row-v2 [class*="score"] { color: #ffffff !important; }

body.dark-mode .match-row-v2 .time-badge,
body.dark-mode .match-row-v2 .minute,
body.dark-mode .match-row-v2 [class*="time"],
body.dark-mode .match-row-v2 [class*="min"]  { color: #9ca3af !important; }

/* Nombre de la competición / liga */
body.dark-mode .league-name,
body.dark-mode .competition-name,
body.dark-mode [class*="league-label"],
body.dark-mode [class*="comp-name"]    { color: #d1d5db !important; }

/* ── Sección "En Vivo" y pestañas ── */
body.dark-mode .tabs-bar,
body.dark-mode .tab-pills,
body.dark-mode [class*="tab-container"] { background: #1a1d27 !important; }

body.dark-mode .tab-btn:not(.active),
body.dark-mode .tab-pill:not(.active)  { color: #9ca3af !important; background: transparent !important; }

/* ── Noticias ── */
body.dark-mode .news-card-grid > a {
  background: #1a1d27 !important;
  border-bottom: .5px solid #2d3148 !important;
}
body.dark-mode .news-card-grid > a h3,
body.dark-mode .news-card-grid > a p  { color: #e8eaf0 !important; }

/* ── Tabla de posiciones ── */
body.dark-mode .standings-table tr:nth-child(even) { background: #1a1d27 !important; }
body.dark-mode .standings-table th { color: #9ca3af !important; background: #0f1117 !important; }
body.dark-mode .standings-table td { color: #e8eaf0 !important; }
body.dark-mode .standings-table    { background: #0f1117 !important; }

/* ── Accesos rápidos ── */
body.dark-mode .qa-card,
body.dark-mode [class*="quick-access"] { background: #1a1d27 !important; border-color: #2d3148 !important; }
body.dark-mode .qa-card .qa-name       { color: #e8eaf0 !important; }
body.dark-mode .qa-card .qa-sub        { color: #9ca3af !important; }

/* ── Countdown ── */
body.dark-mode .countdown-box,
body.dark-mode [class*="cd-b"],
body.dark-mode [class*="count-box"]    { background: #1a1d27 !important; color: #e8eaf0 !important; }

/* ── Quiniela CTA ── */
body.dark-mode [class*="quiniela-cta"],
body.dark-mode [class*="join-card"]    { background: #1a1d27 !important; }

/* ── Textos sueltos con color fijo ── */
body.dark-mode p, body.dark-mode span, body.dark-mode li,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode label, body.dark-mode td, body.dark-mode th {
  color: inherit;
}
body.dark-mode .page-content { color: #e8eaf0; }

/* ── Dark mode toggle button ── */
.dark-toggle {
  width: 38px; height: 22px; border-radius: 11px;
  background: #374151; border: none; cursor: pointer;
  position: relative; transition: background .3s; flex-shrink: 0;
}
.dark-toggle::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform .3s;
}
body.dark-mode .dark-toggle { background: #4db2ec; }
body.dark-mode .dark-toggle::after { transform: translateX(16px); }
