/* =====================================================================
   elofootball.com – Stylesheet (Design A "Clean Teal")
   Ersetzt bootstrap.min.css, animate.css, footable.core.css, font-awesome
   und die 150 KB große style.css des Admin-Themes.
   ===================================================================== */

:root {
    --teal: #004d66;
    --teal-dark: #00303f;
    --teal-soft: #cfe6ee;
    --teal-bright: #7fd3ec;
    --bg: #f3f6f7;
    --card: #ffffff;
    --ink: #1c2a30;
    --muted: #56676e;
    --line: #e6edf0;
    --chip: #eef3f5;
    --draw: #9fc6d3;
    --draw-bar: #b8cdd4;
    --loss: #b3261e;
    --loss-line: #d38a85;
    --away: #e08a1e;
    --away-ink: #a35a00;
    --away-soft: #fbeedf;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(0, 40, 55, 0.08);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; }
img { max-width: 100%; height: auto; }
.num, table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfbereich ---------- */
.site-header { background: var(--teal); color: #fff; }
.site-header .bar { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.brand { color: #fff; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.brand span { color: var(--teal-bright); }
.brand:hover { color: #fff; text-decoration: none; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; flex: 1 1 auto; font-weight: 500; }
.main-nav a { color: var(--teal-soft); padding: 6px 0; }
.main-nav a[aria-current="page"], .main-nav a:hover { color: #fff; }
.donate { display: flex; align-items: center; }
.donate button { font: inherit; font-size: 13px; font-weight: 700; padding: 5px 14px; border: 0; border-radius: 999px; background: #ffc439; color: #111; cursor: pointer; }
.donate button:hover { background: #f2b600; }
.test-banner { background: #fff3cd; color: #5c4400; text-align: center; font-size: 13px; padding: 4px; }

/* ---------- Grundgerüst ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 24px 48px; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card > h2, .section-title { margin: 0 0 12px; font-size: 20px; font-weight: 700; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.row > .main { flex: 999 1 560px; min-width: 0; }
.row > .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.row.stretch { align-items: stretch; }
.grow { flex: 1 1 400px; min-width: 0; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.page-title { margin: 0 0 6px; font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; color: var(--teal-dark); }
.lead { margin: 0; font-size: 17px; color: #4a5b62; max-width: 760px; }
.note { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.note li { margin-bottom: 2px; }

/* ---------- Kennzahlen ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fact { background: var(--card); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); }
.fact b { display: block; font-size: 24px; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; }
.fact span { font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: 1 1 420px; }
.kpi { background: var(--chip); border-radius: 12px; padding: 12px 14px; }
.kpi .k-label { font-size: 13px; color: var(--muted); }
.kpi .k-value { font-size: 30px; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .k-sub { font-size: 13px; color: var(--muted); }
.kpi.primary { background: var(--teal); color: #fff; }
.kpi.primary .k-label, .kpi.primary .k-sub { color: var(--teal-soft); }
.kpi.primary .k-value { color: #fff; }
.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.record { background: var(--card); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); font-size: 13px; }
.record .r-label { color: var(--muted); }
.record .r-value { font-size: 24px; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; }

/* ---------- Klub-/Länderkopf ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: center; }
.hero .logo { width: 88px; height: 88px; object-fit: contain; flex: 0 0 auto; }
.hero .who { flex: 1 1 260px; min-width: 0; }
.hero .who .muted { font-size: 14px; }
.hero h1 { margin: 2px 0 10px; font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; color: var(--teal-dark); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Auswahlmenüs (ohne JavaScript, <details>) ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 14px; border-radius: 10px; background: var(--chip); color: var(--teal); font-size: 14px; font-weight: 500; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 4px; }
.menu[open] > summary { background: var(--teal); color: #fff; }
.menu > ul { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 40, 55, 0.18); min-width: 220px; max-height: 60vh; overflow-y: auto; }
.menu > ul a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); white-space: nowrap; }
.menu > ul a:hover, .menu > ul a[aria-current="true"] { background: var(--chip); color: var(--teal); text-decoration: none; }
.site-header .menu > summary { background: rgba(255, 255, 255, 0.12); color: #fff; }
.site-header .menu > ul { right: 0; left: auto; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--chip); padding: 4px; border-radius: 10px; }
.tabs button { font: inherit; font-size: 14px; border: 0; border-radius: 8px; padding: 8px 14px; min-height: 36px; background: transparent; color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--teal); color: #fff; }
.tabpanel[hidden] { display: none; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -8px; padding: 0 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data thead th { text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 10px; white-space: nowrap; vertical-align: bottom; border-bottom: 1px solid var(--line); background: var(--card); }
table.data td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover td { background: #f6fafb; }
table.data .group { border-left: 1px solid var(--line); }
table.data tr.total td { background: var(--chip); font-weight: 700; }
table.data .club { white-space: nowrap; font-weight: 600; }
table.data .sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
table.sortable thead th { cursor: pointer; }
table.sortable thead th:hover { color: var(--teal); }
/* Klub-Spalte bleibt beim seitlichen Wischen stehen */
table.data .stick2 { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: 6px 0 6px -6px rgba(0, 40, 55, 0.2); }
table.data td.rank, table.data th.rank { width: 40px; min-width: 40px; color: var(--muted); }
.flag { width: 18px; height: auto; vertical-align: -2px; margin-left: 6px; border-radius: 2px; }

/* ---------- Werte-Bausteine ---------- */
.rating { display: inline-block; min-width: 54px; text-align: center; background: var(--teal); color: #fff; font-weight: 700; border-radius: 6px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.rating.light { background: var(--chip); color: var(--teal); }
.delta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.form { display: flex; gap: 3px; }
.f { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 32px; height: 22px; padding: 0; border-radius: 5px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; overflow: hidden; cursor: help; }
.f-W { background: var(--teal); color: #fff; }
.f-D { background: var(--draw); color: var(--teal-dark); }
.f-L { background: #fff; color: var(--loss); border: 1px solid var(--loss-line); }
.f small { font-weight: 500; margin-left: 2px; opacity: .85; }
.res { display: inline-block; min-width: 56px; text-align: center; padding: 4px 8px; border-radius: 6px; font-weight: 700; white-space: nowrap; background: var(--chip); color: var(--teal-dark); }
a.res:hover { text-decoration: none; filter: brightness(0.95); }
.res-W { background: var(--teal); color: #fff; }
.res-D { background: var(--draw); color: var(--teal-dark); }
.res-L { background: #fff; color: var(--loss); border: 1px solid var(--loss-line); }
.res-U { background: var(--chip); color: var(--teal); }
.probbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--chip); min-width: 110px; }
.probbar span:nth-child(1) { background: var(--teal); }
.probbar span:nth-child(2) { background: var(--draw-bar); }
.probbar span:nth-child(3) { background: var(--away); }
.probtext { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.probbar.big { height: 14px; border-radius: 7px; }

/* ---------- Übersicht der Startseite (drei Karten nebeneinander) ---------- */
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.overview .card { padding: 16px 18px; }
.overview .card > h2 { font-size: 17px; margin-bottom: 10px; }
.overview .fixture-list { gap: 10px; }
.overview .fixture .teams { font-size: 13px; }
.overview .fixture .probbar { height: 6px; margin: 4px 0 0; }
.overview .mini-rank { font-size: 13px; }
.overview .mini-rank td { padding: 5px 4px; }
.overview .mini-rank .rating { min-width: 46px; padding: 2px 6px; font-size: 12px; }
.overview .mini-rank .res { min-width: 44px; padding: 2px 6px; font-size: 12px; }
@media (max-width: 1000px) {
    /* Tablet und Handy: Karten als seitlich wischbare Leiste */
    .overview { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 2px 16px 8px; }
    .overview .card { flex: 0 0 min(340px, 86%); scroll-snap-align: start; }
}

/* ---------- Kleine Listen der Startseite ---------- */
.fixture-list { display: flex; flex-direction: column; gap: 14px; }
.fixture { display: block; color: var(--ink); }
.fixture:hover { text-decoration: none; }
.fixture .teams { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.fixture .teams .muted { font-weight: 500; }
.fixture .probbar { margin: 6px 0 4px; }
.fixture .pct { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.mini-rank { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini-rank td { padding: 7px 4px; border-top: 1px solid var(--line); }

/* ---------- Spielseite ---------- */
.matchup { text-align: center; }
.matchup .teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; margin: 16px 0 20px; }
.matchup .logo { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto 8px; }
.matchup .team-name { display: block; font-size: clamp(18px, 2.6vw, 28px); font-weight: 800; color: var(--teal-dark); }
.matchup .score { font-size: clamp(30px, 5vw, 52px); font-weight: 800; color: var(--teal-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.matchup .vs { font-size: clamp(26px, 4vw, 40px); font-weight: 800; color: var(--draw-bar); }
.matchup .derby { font-weight: 700; color: var(--away-ink); margin-top: 4px; }
.matchup .probs { max-width: 640px; margin: 0 auto; }
.matchup .probs .labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 15px; }
.matchup .probs b { font-size: 22px; }
.tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; margin-bottom: 14px; }
.tally div { border-radius: 12px; padding: 12px; background: var(--chip); color: var(--muted); }
.tally b { display: block; font-size: 28px; font-weight: 800; }
.tally .home { background: var(--teal); color: #fff; }
.tally .away { background: var(--away-soft); color: #6b3d00; }
.tally .away b { color: var(--away-ink); }
.dist { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; }
.dist .col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; font-size: 11px; color: var(--muted); }
.dist .bar { border-radius: 4px 4px 0 0; margin-top: 4px; min-height: 3px; }
.dist-labels { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; margin-top: 6px; font-size: 11px; color: var(--muted); text-align: center; }

/* ---------- Diagramme (SVG) ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { stroke: #fff; stroke-width: 1.5; }
.chart .pt:hover { r: 6; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 3px; display: inline-block; }

/* ---------- Matrix ---------- */
table.matrix td, table.matrix th { text-align: center; padding: 6px 6px; }
table.matrix td a { display: block; color: var(--ink); }
table.matrix td.pos { background: #e3f0f4; }
table.matrix td.neg { background: #fbeedf; }

/* ---------- Werbung ---------- */
.ad { min-height: 0; overflow: hidden; text-align: center; }
.ad ins { display: block; }

/* ---------- Fußbereich ---------- */
.site-footer { background: var(--teal-dark); color: var(--teal-soft); }
.site-footer .bar { max-width: 1200px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; }
.site-footer a { color: #fff; }

/* ---------- Statische Seiten ---------- */
.prose { max-width: 820px; }
.prose h2 { font-size: 20px; margin: 24px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose table { border-collapse: collapse; font-size: 14px; margin-bottom: 12px; }
.prose td { padding: 4px 16px 4px 0; border-bottom: 1px solid var(--line); }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 700px) {
    body { font-size: 14px; }
    .site-header .bar { padding: 10px 16px; gap: 8px 16px; }
    .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; gap: 18px; padding-bottom: 2px; }
    .main-nav a { white-space: nowrap; }
    .donate { display: none; }
    .container { padding: 16px 16px 32px; gap: 14px; }
    .card { padding: 14px; border-radius: 12px; }
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex-basis: 100%; }
    .kpi { padding: 10px; }
    .kpi .k-value { font-size: 22px; }
    .hero .logo { width: 56px; height: 56px; }
    table.data td, table.data th { padding: 8px 8px; }
    .matchup .teams { gap: 8px; }
    .dist { height: 150px; gap: 3px; }
    .records { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .record { padding: 12px; }
    .record .r-value { font-size: 20px; }
    .chart .axis { font-size: 30px; }
    .chart .line { stroke-width: 6; }
    .chart .pt { r: 6; }
    .dist-labels { gap: 3px; }
}
