/* ============================================================
   LIGA · ROT-GLANZ  (Tabelle, Ergebnisse/Spielplan, Subtabs, Liga-Chips)
   Nur Optik, scoped auf .fb-* / .subtab-nav / .liga-wechsler-*. Wird nach den Seiten-Styles geladen.
   Hell + dunkel (data-theme="dark") + Desktop + Handy.
   ============================================================ */

/* ---------- Karten-Kopf (wie Kopfleiste) ---------- */
html body .fb-block { border-radius: 16px; box-shadow: 0 0 0 1px rgba(167,9,9,.22), 0 8px 28px rgba(167,9,9,.14); }
html body .fb-block-header {
    position: relative; padding: 12px 16px; font-weight: 800; letter-spacing: .01em;
    background-color: #a70909;
    background-image:
        linear-gradient(180deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.05) 48%, rgba(0,0,0,.08) 50%, rgba(0,0,0,0) 100%),
        linear-gradient(180deg, #b50c0c 0%, #a70909 50%, #930808 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(0,0,0,.25);
}
html body .fb-block-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
    background: linear-gradient(90deg, rgba(255,60,50,.3), #ff5a4a 50%, rgba(255,60,50,.3));
    filter: drop-shadow(0 0 4px rgba(255,70,60,.9));
}
html body .fb-saison-auswahl {
    background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
    padding: 5px 12px; color: #fff; font-weight: 700; cursor: pointer;
}
html body .fb-saison-auswahl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Tabelle ---------- */
html body table.fb-tabelle { font-size: .88rem; }
html body table.fb-tabelle th { padding: 10px 8px; font-weight: 800; letter-spacing: .04em; }
html body table.fb-tabelle td { padding: 10px 8px; transition: background .15s; }
html body table.fb-tabelle td:first-child, html body table.fb-tabelle th:first-child { text-align: center; width: 38px; font-weight: 800; }
html body table.fb-tabelle tbody tr:hover td { background: rgba(167,9,9,.07); }
html body .fb-team { gap: 10px; font-weight: 600; }
html body .fb-team img { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
/* Punkte als Pille */
html body table.fb-tabelle td.fb-num:last-child strong {
    display: inline-block; min-width: 34px; padding: 3px 9px; border-radius: 999px; text-align: center;
    background: rgba(167,9,9,.10); color: #a70909; font-weight: 800;
}
/* RWE-Zeile: Balken links, Verlauf, leuchtende Punkte */
html body table.fb-tabelle tr.fb-rwe { background: linear-gradient(90deg, rgba(167,9,9,.16), rgba(167,9,9,.04) 70%, transparent); }
html body table.fb-tabelle tr.fb-rwe td:first-child { box-shadow: inset 4px 0 0 #a70909; color: #a70909; }
html body table.fb-tabelle tr.fb-rwe td.fb-num:last-child strong {
    background: linear-gradient(180deg, #c91010, #930808); color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 14px rgba(255,40,30,.55);
}
html body .fb-live-badge { box-shadow: 0 0 10px rgba(40,167,69,.7); }

/* ---------- Spielplan / Ergebnisse ---------- */
html body .fb-spieltag-nav { gap: 10px; }
html body .fb-spieltag-nav a { padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.28); font-weight: 700; font-size: .82rem; }
html body .fb-spieltag-nav a:hover { background: rgba(255,255,255,.22); }
html body .fb-match { padding: 14px 16px; transition: background .15s; }
html body a.fb-match-klickbar:hover, html body .fb-match:hover { background: rgba(167,9,9,.07); }
html body .fb-match-team { font-weight: 600; gap: 10px; min-width: 0; }
html body .fb-match-team img { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
html body .fb-match.fb-rwe { background: linear-gradient(90deg, rgba(167,9,9,.16), rgba(167,9,9,.04) 70%, transparent); box-shadow: inset 4px 0 0 #a70909; }
html body .fb-match-score {
    min-width: 70px; padding: 5px 12px; border-radius: 10px; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .03em;
    background-image: linear-gradient(180deg, #c91010, #930808);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 12px rgba(255,40,30,.4);
}
html body .fb-match-time { min-width: 72px; padding: 5px 10px; border-radius: 10px; background: rgba(128,128,128,.14); color: inherit; opacity: .85; font-weight: 700; font-variant-numeric: tabular-nums; }
html body .fb-match-wettbewerb { padding-top: 10px; letter-spacing: .06em; }
html body .fb-datum-trenner { padding: 8px 16px; letter-spacing: .08em; box-shadow: inset 4px 0 0 rgba(167,9,9,.55); }

/* Blaettern */
html body .fb-blaettern { border-radius: 14px; }
html body .fb-blaettern-zahlen a, html body .fb-blaettern-zahlen .aktiv { border-radius: 999px; }
html body .fb-blaettern-zahlen .aktiv { background-image: linear-gradient(180deg, #c91010, #930808); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 12px rgba(255,40,30,.5); }

/* ---------- Subtabs (Vereine / Tabelle / Ergebnisse / News) + Liga-Chips ---------- */
html body .subtab-nav a { border-radius: 999px; transition: background .15s, box-shadow .15s; }
html body .subtab-nav a.aktiv {
    background-color: #a70909; color: #fff;
    background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.04) 50%, rgba(0,0,0,.08) 51%), linear-gradient(180deg, #b50c0c, #930808);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 14px rgba(255,40,30,.45);
}
html body .liga-wechsler-chip.aktiv { border-color: #ff5a4a; box-shadow: 0 0 0 2px rgba(255,60,50,.25), 0 0 16px rgba(255,40,30,.6); }

/* ---------- Dunkelmodus ---------- */
:root[data-theme="dark"] html body table.fb-tabelle td.fb-num:last-child strong,
:root[data-theme="dark"] table.fb-tabelle td.fb-num:last-child strong { background: rgba(255,90,70,.16); color: #ff8a7a; }
:root[data-theme="dark"] table.fb-tabelle tr.fb-rwe td:first-child { color: #ff8a7a; }
:root[data-theme="dark"] table.fb-tabelle tbody tr:hover td, :root[data-theme="dark"] .fb-match:hover { background: rgba(255,90,70,.10); }

/* ---------- Handy ---------- */
@media (max-width: 640px) {
    html body table.fb-tabelle { font-size: .82rem; }
    html body table.fb-tabelle th, html body table.fb-tabelle td { padding: 9px 4px; }
    /* Siege/Unentschieden/Niederlagen ausblenden: mehr Platz fuer Vereinsnamen (Sp, Tore, Diff, Pkt bleiben) */
    html body table.fb-tabelle th:nth-child(4), html body table.fb-tabelle td:nth-child(4),
    html body table.fb-tabelle th:nth-child(5), html body table.fb-tabelle td:nth-child(5),
    html body table.fb-tabelle th:nth-child(6), html body table.fb-tabelle td:nth-child(6) { display: none; }
    html body .fb-team { gap: 8px; }
    html body .fb-team img { width: 22px; height: 22px; }
    html body table.fb-tabelle td.fb-num:last-child strong { min-width: 30px; padding: 2px 7px; }
    html body .fb-block-header { padding: 11px 12px; }
    html body .fb-match { padding: 12px 10px; gap: 6px; }
    html body .fb-match-team { font-size: .8rem; gap: 6px; }
    html body .fb-match-team img { width: 22px; height: 22px; }
    html body .fb-match-score { min-width: 54px; padding: 4px 8px; font-size: .88rem; }
    html body .fb-match-time { min-width: 58px; padding: 4px 6px; font-size: .74rem; }
    html body .fb-spieltag-nav a { padding: 4px 8px; font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) { html body table.fb-tabelle td, html body .fb-match { transition: none; } }
