/* ====================================================== HSL 2.0 GRUNDLAYOUT ====================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --bg: #1e1e1e;
    --card: #2b2b2b;
    --header: #111;
    --accent: #ff9800;
    --accent-dark: #e68a00;
    --text: #f5f5f5;
    --border: #444;
    --success: #3fb950;
    --danger: #d9534f;
    --radius: 10px;
}
html {
    min-height: 100%;
    background: var(--bg);
}
body {
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
}
main {
    width: 100%;
    flex: 1 0 auto;
    margin-top: 16px;
    padding: 0 16px 16px;
}
#content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    min-width: 0;
}
footer {
    width: 100%;
}
.adminLayout {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    g 1fr 260px;
    gap: 24px;
    align-items: start;
}
.adminContent {
    min-width: 0;
}
/* ====================================================== HEADER + NAVIGATION ====================================================== */
.topbar {
    width: 100%;
    min-height: 52px;
    background: #111;
    border-bottom: 2px solid var(--accent);
    /* * Die komplette Navigationsleiste bleibt * beim Scrollen dauerhaft oben sichtbar. */
    position: sticky;
    top: 0;
    /* * Muss über allen Cards, Tabellen und * anderen Inhalten liegen. */
    z-index: 1000;
}
.topbarInner {
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    cursor: default;
    user-select: none;
}
.logo {
    font-size: 36px;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    cursor: pointer;
    user-select: none;
}
.logo:hover {
    opacity: .8;
}
.brandText {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1px;
    line-height: 1.05;
}
.brandTop, .brandBottom {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    position: relative;
    top: 1px;
}
/* ====================================================== DESKTOP NAVIGATION ====================================================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-left: auto;
    /* * Sticky NICHT auf .navbar. * Der komplette .topbar ist sticky. */
    position: relative;
}
.navbar button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 11px;
    min-height: 40px;
    border-radius: 8px;
    font-size: 15px;
    transition: background .2s,
        color .2s;
    white-space: nowrap;
}
.navbar button:hover {
    background: #222;
}
.navbar button.active {
    background: var(--accent);
    color: #111;
}
.navChevron {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    transition: transform .15s;
}
.mobileMenuButton {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 9px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #1b1b1b;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.mobileMenuButton span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s,
        opacity .2s;
}
.mobileMenuButton.open span:nth-child(1) {
    transform: translateY(7px)
        rotate(45deg);
}
.mobileMenuButton.open span:nth-child(2) {
    opacity: 0;
}
.mobileMenuButton.open span:nth-child(3) {
    transform: translateY(-7px)
        rotate(-45deg);
}
/* ====================================================== ADMIN DROPDOWN ====================================================== */
.adminDropdown {
    padding: 6px;
    /* * Höher als der normale Inhalt, * aber innerhalb der Navigation. */
}
.season {
    font-size: 14px;
    font-weight: 400;
    color: #bdbdbd;
}
/* ====================================================== RESPONSIVE HEADER ====================================================== */
@media (max-width: 820px) {
    .topbar {
        /* * Auch auf Smartphone/Tablet bleibt * die komplette Leiste oben. */
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    .topbarInner {
        min-height: 56px;
        padding: 6px 14px;
        flex-wrap: wrap;
    }
    .mobileMenuButton {
        display: flex;
    }
    .navbar {
        /* * Das Menü bleibt Bestandteil der * sticky Topbar. */
        display: none;
        width: 100%;
        flex-basis: 100%;
        margin: 0;
        padding: 8px 0 10px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        border-top: 1px solid #333;
    }
    .navbar.mobileOpen {
        display: flex;
    }
    .navbar > button, .adminMenuWrapper > button {
        width: 100%;
        min-height: 44px;
        padding: 10px 12px;
        text-align: left;
        font-size: 16px;
    }
    .adminMenuWrapper {
        width: 100%;
    }
    .adminDropdown {
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: 4px;
        padding: 4px 0 4px 14px;
        background: #181818;
        border: none;
        border-left: 2px solid var(--accent);
        border-radius: 0;
        box-shadow: none;
        z-index: auto;
    }
    .adminDropdown button {
        min-height: 42px;
    }
    .navChevron {
        float: right;
        margin-top: 3px;
    }
    main {
        margin-top: 12px;
        padding: 0 12px 12px;
    }
}
/* ====================================================== RESPONSIVE ALLGEMEIN ====================================================== */
@media (max-width: 600px) {
    .topbarInner {
        padding: 6px 12px;
    }
    .logo {
        font-size: 32px;
    }
    .brandTop, .brandBottom {
        font-size: 12px;
    }
    .card {
        padding: 16px;
    }
    table {
        min-width: 650px;
    }
    .modal {
        width: calc(100vw - 24px);
        max-width: none;
    }
    #modalBody {
        padding: 18px;
    }
    .btn {
        min-height: 44px;
    }
}
/* ====================================================== CARD ====================================================== */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 20px 24px;
}
.card h1 {
    color: var(--accent);
    font-size: 38px;
    margin-bottom: 12px;
}
.card h2 {
    color: var(--accent);
    font-size: 28px;
    margin-bottom: 18px;
}
/* ====================================================== ÜBERSCHRIFTEN ====================================================== */
h1 {
    color: var(--accent);
    margin-bottom: 20px;
}
h2 {
    color: var(--accent);
    margin-bottom: 15px;
}
h3 {
    margin-bottom: 10px;
}
/* ====================================================== BUTTONS ====================================================== */
button {
    font-family: inherit;
}
.btn {
    background: var(--accent);
    color: #111;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 17px;
    cursor: pointer;
    font-weight: bold;
    transition: .2s;
}
.btn:hover {
    background: var(--accent-dark);
}
.btnEdit {
    width: 145px;
    background: #444;
    color: white;
    border: none;
    padding: 10px 0;
    border-radius: 6px;
    cursor: pointer;
}
.btnEdit:hover {
    background: #666;
}
/* ====================================================== FOOTER ====================================================== */
footer {
    background: #111;
    color: #999;
    text-align: center;
    padding: 18px;
    border-top: 1px solid var(--border);
}
/* ====================================================== TABELLEN ====================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #2f2f2f;
    border-radius: 8px;
    overflow: hidden;
}
thead {
    background: var(--accent);
    color: #111;
}
th {
    padding: 14px;
    text-align: left;
    font-size: 16px;
}
td {
    padding: 14px;
    border-bottom: 1px solid #444;
}
tbody tr {
    transition: .15s;
}
tbody tr:hover {
    background: #383838;
}
tbody tr:last-child td {
    border-bottom: none;
}
/* ====================================================== FORMULARE ====================================================== */
label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: bold;
    color: #ddd;
}
input, select, textarea {
    width: 100%;
    padding: 12px;
    background: #1f1f1f;
    color: white;
    border: 1px solid #555;
    border-radius: 8px;
    font-size: 16px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}
.checkbox input {
    width: auto;
}
/* ====================================================== STATUS BUTTON ====================================================== */
.statusButton {
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}
.statusButton:hover {
    color: var(--accent);
}
.statusActive {
    color: var(--success);
    font-weight: bold;
}
.statusInactive {
    color: var(--danger);
    font-weight: bold;
}
/* ====================================================== MELDUNGEN ====================================================== */
.success {
    background: #23462a;
    border-left: 5px solid var(--success);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.error {
    background: #522424;
    border-left: 5px solid var(--danger);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
/* ====================================================== MODAL ====================================================== */
.modalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.modal {
    width: 650px;
    max-width: 95vw;
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modalHeader {
    background: #111;
    color: var(--accent);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 3px solid var(--accent);
}
.modalHeader button {
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    font-size: 22px;
}
#modalBody {
    padding: 25px;
}
/* ====================================================== KLEINE BUTTONS ====================================================== */
.btnSmall {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
}
/* ====================================================== BADGES ====================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 110px;
    height: 36px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: bold;
    color: white;
}
.badge.active {
    background: #1d6f42;
}
.badge.inactive {
    background: #555;
}
/* ====================================================== ANIMATIONEN ====================================================== */
.card, .modal {
    animation: fadeIn .2s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.matchHeader {
    text-align: center;
}
.matchRound {
    font-size: 16px;
    color: #888;
    margin-bottom: 8px;
}
.vs {
    color: #999;
    font-size: 22px;
    margin: 0 20px;
}
.playerSelection {
    display: grid;
    g 1fr 1fr;
    gap: 25px;
}
.playerSelection label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
.matchScore {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: center;
    gap: 4px;
}
.bigScore {
    font-size: 64px;
    font-weight: bold;
    color: #1f6feb;
    gap: 4px;
}
.scoreTitle {
    margin-bottom: 10px;
    color: #777;
    gap: 4px;
}
.adminSidebar {
    position: sticky;
    top: 76px;
}
/* ===================================================== ADMIN LAYOUT ===================================================== */
.leagueAdmin {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
/* ===================================================== SPIELERVERWALTUNG ===================================================== */
.playerAdmin {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.playerNew {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.playerNew h1 {
    margin: 0;
}
.playerNewGrid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 120px 120px auto;
    gap: 16px;
    align-items: end;
}
.playerNewGrid label {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
}
.playerNewGrid input, .playerNewGrid select {
    height: 42px;
}
.playerActiveBox {
    display: flex;
    align-items: end;
    height: 42px;
}
.playerActiveBox label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}
.playerActiveBox input {
    width: auto;
    margin: 0;
}
.playerList {
    overflow-x: auto;
}
.playerList table {
    margin-top: 0;
}
.playerList th:last-child, .playerList td:last-child {
    width: 170px;
    text-align: center;
}
/* Tablet */
@media (max-width:1200px) {
    .playerNewGrid {
        grid-template-columns: 1fr 1fr;
    }
    .playerNewGrid > div:last-child {
        grid-column: 1 / -1;
    }
}
/* ===================================================== SECTION ===================================================== */
.leaguePanel, .seasonPanel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.leaguePanelHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #444;
}
.leaguePanelHeader h1 {
    margin: 0;
}
/* ===================================================== SAISON ===================================================== */
.seasonRow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.seasonBox {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.seasonBox label {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #ddd;
}
.seasonControls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}
/* ===================================================== NEUE LIGA ===================================================== */
.leagueNew {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
}
.leagueNew label {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
}
.leagueNew input {
    height: 42px;
}
/* ===================================================== LIGAKARTEN ===================================================== */
#leagueCards {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(390px,1fr));
    gap: 22px;
}
.leagueCard {
    background: #2f2f2f;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.leagueCardHeader {
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}
.leagueCardHeader h3 {
    margin: 0;
    color: white;
    font-size: 26px;
}
.leagueHeader {
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 14px;
    align-items: end;
}
.leagueHeader label {
    margin: 0 0 6px 0;
    font-size: 14px;
}
.leagueHeader input {
    height: 40px;
}
.leagueSort input {
    text-align: center;
}
/* ===================================================== FIRST TO ===================================================== */
.firstToTitle {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}
.firstToGrid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.leagueMode {
    display: grid;
    grid-template-columns: 1fr 60px;
    gap: 12px;
    align-items: center;
}
.leagueMode span {
    font-size: 15px;
    color: #ddd;
}
.leagueMode input {
    width: 60px;
    height: 36px;
    margin: 0;
    text-align: center;
    font-weight: bold;
}
/* ===================================================== BUTTONS ===================================================== */
.leagueCardButtons {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 4px;
    margin-top: 10px;
}
.leagueCardButtons .btn {
    padding: 10px;
    font-size: 14px;
}
.btnSecondary {
    background: #4b5d77;
    color: white;
}
.btnSecondary:hover {
    background: #607391;
}
.btnDanger {
    background: #b13030;
    color: white;
}
.btnDanger:hover {
    background: #cf3e3e;
}
/* ===================================================== RESPONSIVE ===================================================== */
@media (max-width:1100px) {
    .seasonRow {
        grid-template-columns: 1fr;
    }
    #leagueCards {
        grid-template-columns: 1fr;
    }
}
/* ===================================================== SPIELPLAN ===================================================== */
.matchdayHeader td {
    background: #353535;
    font-size: 18px;
    font-weight: 400;
    text-align: left !important;
    color: #bdbdbd;
    padding: 14px 18px;
    border: none;
}
.finaldayHeader td {
    background: #ff9800;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: #000000;
    padding: 14px 18px;
    border: none;
}
.playoffMatchHeader td {
    background: #444;
    color: #fff;
    font-size: 17px;
    font-weight: 400;
    text-align: left !important;
    padding: 14px 18px;
    border: none;
}
/* ===================================================== SPIELPLAN – SEITENBREITE ===================================================== */
.fixturePage {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
/* ===================================================== SPIELPLAN – FILTER / TOOLBAR ===================================================== */
.fixtureToolbar {
    display: grid;
    grid-template-columns: 1fr
        1fr;
    gap: 24px;
    margin-bottom: 28px;
    align-items: end;
}
/* ===================================================== SAISON / LIGA ===================================================== */
.fixtureToolbar .toolbarGroup {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fixtureToolbar .toolbarGroup label {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.fixtureToolbar .toolbarGroup select {
    width: 100%;
}
/* ===================================================== BUTTON-BEREICH ===================================================== */
.fixtureToolbar .toolbarSpacer {
    display: none;
}
#fixtureButtons {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* ===================================================== SPIELPLAN – TABELLENLAYOUT ===================================================== */
#fixtureTable {
    width: 100%;
    table-layout: fixed;
}
/* ----------------------------------------------------- ALLE SPALTEN ZENTRIEREN ----------------------------------------------------- */
#fixtureTable th, #fixtureTable td {
    text-align: center;
    vertical-align: middle;
}
/* ----------------------------------------------------- Datum ----------------------------------------------------- */
#fixtureTable th:nth-child(1), #fixtureTable td:nth-child(1) {
    width: 17%;
}
/* ----------------------------------------------------- Uhrzeit ----------------------------------------------------- */
#fixtureTable th:nth-child(2), #fixtureTable td:nth-child(2) {
    width: 16%;
}
/* ----------------------------------------------------- Heim ----------------------------------------------------- */
#fixtureTable th:nth-child(3), #fixtureTable td:nth-child(3) {
    width: 21%;
}
/* ----------------------------------------------------- VS ----------------------------------------------------- */
#fixtureTable th:nth-child(4), #fixtureTable td:nth-child(4) {
    width: 35px;
}
/* ----------------------------------------------------- Gast ----------------------------------------------------- */
#fixtureTable th:nth-child(5), #fixtureTable td:nth-child(5) {
    width: 21%;
}
/* ----------------------------------------------------- Ergebnis ----------------------------------------------------- */
#fixtureTable th:nth-child(6), #fixtureTable td:nth-child(6) {
    width: 15%;
}
/* ----------------------------------------------------- VS-Spalte ----------------------------------------------------- */
#fixtureTable .vsColumn {
    width: 50px;
    min-width: 50px;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}
.fixtureVs {
    display: inline-block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}
/* ----------------------------------------------------- Ergebnis ----------------------------------------------------- */
.fixtureResultCell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
/* ===================================================== SPIELPLAN – SPIEL ANNULLIEREN ===================================================== */
.fixtureVoidButton {
    height: 30px;
    padding: 0 10px;
    border: 1px solid #555;
    border-radius: 999px;
    background: #3a3a3a;
    color: #bbb;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s,
        color .2s;
}
.fixtureVoidButton:hover {
    background: #5a3030;
    color: #fff;
}
/* ===================================================== Admin Dropdown ===================================================== */
.adminMenuWrapper {
    position: relative;
    display: inline-block;
}
.adminDropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 220px;
    background: #2f2f2f;
    border: 1px solid #454545;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
    z-index: 1000;
}
.adminDropdown.hidden {
    display: none;
}
.adminDropdown button {
    width: 100%;
    border: none;
    background: none;
    color: white;
    text-align: left;
    padding: 14px 18px;
    font-size: 16px;
    cursor: pointer;
    transition: .2s;
}
.adminDropdown button:hover {
    background: var(--accent);
    color: black;
}
.adminMenuWrapper #navAdmin {
    display: flex;
    align-items: center;
    gap: 6px;
}
/* ===================================================== Admin Login ===================================================== */
.adminLoginDialog {
    width: 420px;
    background: #2f2f2f;
    border: 1px solid #4b4b4b;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,.45);
}
.adminLoginDialog h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 30px;
}
.adminLoginDialog p {
    margin: 0 0 22px;
    color: #bdbdbd;
}
.adminLoginDialog input {
    width: 100%;
    height: 46px;
    margin-bottom: 24px;
}
.adminLoginButtons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.adminLoginButtons .btn {
    min-width: 150px;
}
/* ===================================================== MATCH CONSOLE ===================================================== */
/* ----------------------------------------------------- HEADER ----------------------------------------------------- */
.matchHeader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 42px;
}
/* ----------------------------------------------------- HAUPTBEREICH ----------------------------------------------------- */
/* ----------------------------------------------------- SPIELER ----------------------------------------------------- */
/* ----------------------------------------------------- MITTELBEREICH ----------------------------------------------------- */
/* ---------- FIRST TO ---------- */
/* ---------- EINGABEFELD ---------- */
.remainingAfter {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 600;
    color: #8dd35f;
}
/* ---------- NUMMERNBLOCK ---------- */
/* ---------- AKTIONSBUTTONS ---------- */
/* ----------------------------------------------------- HISTORIE ----------------------------------------------------- */
/* ----------------------------------------------------- TABLET ----------------------------------------------------- */
/* ----------------------------------------------------- ANIMATIONEN ----------------------------------------------------- */
/* ===================================================== Match Login ===================================================== */
.matchLoginPage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
}
.matchLoginCard {
    width: 100%;
    max-width: 1000px;
    background: #2b2b2b;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 auto;
    box-shadow: none;
}
.matchLoginCard h1 {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 44px;
    font-weight: 700;
}
.matchSelectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}
.selector {
    display: flex;
    flex-direction: column;
}
.selector label {
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 700;
}
.selector select {
    height: 48px;
    font-size: 20px;
    border-radius: 10px;
}
.matchInfo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.matchBadge {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 48px;
    border-radius: 10px;
    background: #202020;
    border: 1px solid #404040;
    font-size: 19px;
    font-weight: 600;
}
.loginGrid {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 18px;
    align-items: stretch;
}
.loginPlayerCard {
    background: #242424;
    border: 1px solid #404040;
    border-radius: 14px;
    padding: 20px;
    transition: .2s;
}
.loginPlayerCard:hover {
    border-color: var(--accent);
}
.loginPlayerName {
    text-align: center;
    color: var(--accent);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: .5px;
}
.loginPlayerCard input {
    width: 100%;
    height: 50px;
    background: #181818;
    border: 1px solid #4d4d4d;
    border-radius: 10px;
    text-align: center;
    font-size: 24px;
    letter-spacing: 6px;
    transition: .2s;
}
.loginPlayerCard input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255,152,0,.25);
}
.loginVS {
    display: flex;
    justify-content: center;
    align-items: center;
}
.loginVS::before {
    content: "VS";
    width: 62px;
    height: 62px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 0 14px rgba(255,152,0,.35);
}
.btnStartMatch {
    width: 100%;
    height: 56px;
    margin-top: 18px;
    font-size: 22px;
    border-radius: 10px;
}
/* ----------------------------------------------------- LETZTE AUFNAHME ----------------------------------------------------- */
.undoButton {
    margin-top: 14px;
    width: 100%;
    height: 56px;
    border-radius: 12px;
    background: #2b2b2b;
    border: 1px solid #3a3a3a;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: .15s;
}
.undoButton:hover {
    background: #3a3a3a;
    border-color: var(--accent);
}
.navLeaveMatch {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 26px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: #111;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: .15s;
}
.navLeaveMatch:hover {
    filter: brightness(1.08);
}
.hidden {
    display: none !important;
}
.checkoutButtons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 20px;
}
.checkoutBtn {
    flex: 1;
    height: 52px;
    border: none;
    border-radius: 10px;
    background: #2f2f2f;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}
.checkoutBtn.active {
    background: var(--accent);
    color: #111;
}
.doubleButtons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 20px;
}
.doubleBtn {
    flex: 1;
    height: 52px;
    border: none;
    border-radius: 10px;
    background: #2f2f2f;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}
.doubleBtn.active {
    background: var(--accent);
    color: #111;
}
/* ===================================================== MATCH SUMMARY EINHEITLICH RESPONSIV ===================================================== */
/* ===================================================== MATCH SUMMARY ===================================================== */
.matchSummary {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}
/* ===================================================== SPIELER + ENDSTAND ===================================================== */
.summaryHeader {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 20px;
    display: grid;
    grid-template-columns: auto
        auto
        auto;
    align-items: end;
    justify-content: center;
    column-gap: 18px;
}
.summaryPlayer {
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}
.summaryScoreBlock {
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: -8px;
}
.summaryLabel {
    font-size: 13px;
    color: #8f8f8f;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
    white-space: nowrap;
}
.summaryScore {
    font-size: 46px;
    font-weight: 800;
    line-height: .95;
    letter-spacing: 1px;
    white-space: nowrap;
}
/* ===================================================== INHALT – DESKTOP ===================================================== */
.summaryContent {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr)
        minmax(0,1fr)
        minmax(0,1fr);
    grid-template-areas: "home legs guest";
    gap: 14px;
    align-items: stretch;
}
/* ===================================================== HEIM ===================================================== */
.summaryContent > .summarySide:nth-child(1) {
    grid-area: home;
}
/* ===================================================== LEGTABELLE ===================================================== */
.summaryContent > .summaryLegs {
    grid-area: legs;
}
/* ===================================================== GAST ===================================================== */
.summaryContent > .summarySide:nth-child(3) {
    grid-area: guest;
}
/* ===================================================== STATISTIKEN ===================================================== */
.summarySide {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: #2c2c2c;
    box-sizing: border-box;
}
.summaryStat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    min-height: 46px;
    padding: 0;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.summaryStat span {
    min-width: 0;
    color: #bbb;
}
.summaryStat strong {
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}
/* ===================================================== SPIELERNAME ÜBER STATISTIK ===================================================== */
.summaryMobilePlayer {
    display: none;
}
/* ===================================================== LEGTABELLE ===================================================== */
.summaryLegs {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #4a4a4a;
    border-radius: 14px;
    padding: 8px 12px;
    background: #2c2c2c;
}
/* ===================================================== LEGTABELLE – HEADER ===================================================== */
.summaryLegHeader {
    display: grid;
    grid-template-columns: minmax(0,1fr)
        42px
        minmax(0,1fr);
    align-items: center;
    min-height: 30px;
    padding: 0 4px 5px;
    border-bottom: 2px solid #555;
    color: #999;
    font-size: 13px;
    font-weight: 700;
}
.summaryHeadPlayer {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.summaryHeadLeg {
    text-align: center;
}
/* ===================================================== LEG-ZEILEN ===================================================== */
.summaryLegRow {
    display: grid;
    grid-template-columns: minmax(0,1fr)
        42px
        minmax(0,1fr);
    align-items: center;
    min-height: 32px;
    padding: 3px 0;
    border-bottom: 1px solid #444;
    box-sizing: border-box;
}
.summaryLegRow:last-child {
    border-bottom: none;
}
.summaryLegCell {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}
.summaryLegCell:first-child {
    justify-content: flex-start;
}
.summaryLegCell:last-child {
    justify-content: flex-end;
}
.summaryLegNo {
    width: 42px;
    min-width: 42px;
    text-align: center;
    color: #999;
    font-size: 12px;
    font-weight: 500;
}
.summaryWinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 22px;
    border-radius: 6px;
    background: #37963f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.summaryRemaining {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 22px;
    color: #999;
    font-size: 13px;
    font-weight: 500;
}
/* ===================================================== TABLET / KLEINER LAPTOP ===================================================== */
@media (max-width:900px) {
    .matchSummary {
        max-width: 680px;
    }
    .summaryHeader {
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        column-gap: 18px;
    }
    .summaryPlayer {
        font-size: 24px;
    }
    .summaryScoreBlock {
        order: 0;
        min-width: 100px;
        margin-top: 0;
    }
    .summaryScore {
        font-size: 38px;
    }
    .summaryContent {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .summaryContent > .summaryLegs {
        order: 1;
    }
    .summaryContent > .summarySide:nth-child(1) {
        order: 2;
    }
    .summaryContent > .summarySide:nth-child(3) {
        order: 3;
    }
    .summaryMobilePlayer {
        display: block;
        width: 100%;
        margin: 0 0 7px;
        padding: 5px 4px 7px;
        color: var(--accent);
        font-size: 17px;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,.12);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        box-sizing: border-box;
    }
}
/* ===================================================== SMARTPHONE ===================================================== */
@media (max-width:600px) {
    .summaryHeader {
        column-gap: 10px;
        margin-bottom: 12px;
    }
    .summaryPlayer {
        font-size: 16px;
    }
    .summaryScoreBlock {
        min-width: 80px;
    }
    .summaryScore {
        font-size: 30px;
    }
    .summaryLabel {
        font-size: 9px;
        letter-spacing: 1px;
    }
    .summarySide {
        padding: 7px 9px;
        border-radius: 10px;
    }
    .summaryStat {
        min-height: 38px;
    }
    .summaryStat span {
        font-size: 11px;
    }
    .summaryStat strong {
        font-size: 15px;
    }
    .summaryLegs {
        padding: 6px 8px;
        border-radius: 10px;
    }
    .summaryLegHeader {
        grid-template-columns: minmax(0,1fr)
            36px
            minmax(0,1fr);
        min-height: 24px;
        font-size: 10px;
    }
    .summaryLegRow {
        grid-template-columns: minmax(0,1fr)
            36px
            minmax(0,1fr);
        min-height: 27px;
    }
    .summaryLegNo {
        width: 36px;
        min-width: 36px;
        font-size: 10px;
    }
    .summaryWinner {
        width: 36px;
        min-width: 36px;
        height: 20px;
        font-size: 11px;
    }
    .summaryRemaining {
        min-width: 36px;
        height: 20px;
        font-size: 11px;
    }
}
/* ===================================================== SEHR KLEINES SMARTPHONE ===================================================== */
@media (max-width:400px) {
    .summaryHeader {
        column-gap: 7px;
    }
    .summaryPlayer {
        font-size: 14px;
    }
    .summaryScoreBlock {
        min-width: 70px;
    }
    .summaryScore {
        font-size: 26px;
    }
    .summarySide {
        padding: 6px 7px;
    }
    .summaryMobilePlayer {
        font-size: 15px;
    }
    .summaryStat {
        min-height: 36px;
    }
    .summaryStat span {
        font-size: 10px;
    }
    .summaryStat strong {
        font-size: 14px;
    }
    .summaryLegHeader {
        grid-template-columns: minmax(0,1fr)
            32px
            minmax(0,1fr);
        font-size: 9px;
    }
    .summaryLegRow {
        grid-template-columns: minmax(0,1fr)
            32px
            minmax(0,1fr);
    }
    .summaryLegNo {
        width: 32px;
        min-width: 32px;
    }
    .summaryWinner {
        width: 32px;
        min-width: 32px;
        font-size: 10px;
    }
    .summaryRemaining {
        min-width: 32px;
        font-size: 10px;
    }
}
/* ====================================================== SPIELPLAN – ERGEBNIS-PILL ====================================================== */
.resultPill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 64px;
    height: 30px;
    padding: 0 12px;
    box-sizing: border-box;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s,
        transform .2s,
        box-shadow .2s;
}
/* ------------------------------------------------------ Offenes Spiel ------------------------------------------------------ */
.resultPill.open {
    background: #3b3b3b;
    color: #777;
}
/* ------------------------------------------------------ Gespieltes Spiel ------------------------------------------------------ */
.resultPill.played {
    background: #4a4a4a;
    color: #e0e0e0;
    cursor: pointer;
}
/* ------------------------------------------------------ Hover – Ergebnis anklickbar ------------------------------------------------------ */
.resultPill.played:hover {
    background: #5a5a5a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
/* ====================================================== SPIELPLAN – ADMIN SPIELER-PILLS ====================================================== */
.playerPill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #4a4a4a;
    color: #e0e0e0;
    cursor: pointer;
    transition: background .2s,
        transform .2s,
        box-shadow .2s;
}
.playerPill:hover {
    background: #5a5a5a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
//PIN-EINGABE

#homePin, #awayPin {
    text-align: center;
    letter-spacing: 8px;
    padding-left: 8px;
    padding-right: 0;
}
/* ===================================================== TABELLE ===================================================== */
.tablePage {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
/* ===================================================== TABELLEN-FILTER ===================================================== */
.tableFilters {
    display: grid;
    grid-template-columns: 1fr
        1fr;
    gap: 24px;
    margin-bottom: 28px;
}
.tableFilter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tableFilter label {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.tableFilter select {
    width: 100%;
}
/* ===================================================== TABELLEN-CONTAINER ===================================================== */
.rankingTableWrapper {
    width: 100%;
    overflow-x: auto;
}
/* ===================================================== TABELLE ===================================================== */
#rankingTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
/* ===================================================== SPALTENBREITEN ===================================================== */
#rankingTable th:nth-child(1), #rankingTable td:nth-child(1) {
    width: 8%;
}
#rankingTable th:nth-child(2), #rankingTable td:nth-child(2) {
    width: 26%;
}
#rankingTable th:nth-child(3), #rankingTable td:nth-child(3) {
    width: 8%;
}
#rankingTable th:nth-child(4), #rankingTable td:nth-child(4) {
    width: 8%;
}
#rankingTable th:nth-child(5), #rankingTable td:nth-child(5) {
    width: 8%;
}
#rankingTable th:nth-child(6), #rankingTable td:nth-child(6) {
    width: 12%;
}
#rankingTable th:nth-child(7), #rankingTable td:nth-child(7) {
    width: 10%;
}
#rankingTable th:nth-child(8), #rankingTable td:nth-child(8) {
    width: 10%;
}
#rankingTable th:nth-child(9), #rankingTable td:nth-child(9) {
    width: 10%;
}
/* ===================================================== ÜBERSCHRIFTEN ===================================================== */
#rankingTable thead th {
    background: #ff9800;
    color: #111;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 16px 8px;
}
#rankingTable thead th:first-child {
    border-top-left-radius: 12px;
}
#rankingTable thead th:last-child {
    border-top-right-radius: 12px;
}
/* ===================================================== TABELLENZEILEN ===================================================== */
#rankingTable tbody tr {
    background: #2d2d2d;
    border-bottom: 1px solid #444;
}
#rankingTable tbody tr:nth-child(even) {
    background: #303030;
}
#rankingTable tbody td {
    padding: 9px 6px;
    color: #fff;
    font-size: 15px;
    text-align: center;
    vertical-align: middle;
}
/* ===================================================== SPIELERNAME ===================================================== */
#rankingTable td.rankingPlayer {
    text-align: left;
    font-weight: 600;
    padding-left: 18px;
}
/* ===================================================== PLATZIERUNG ===================================================== */
.rankingPosition {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    border-radius: 7px;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
}
/* ===================================================== 1. PLATZ ===================================================== */
.rankingPosition.rank1 {
    background: #188c3a;
}
/* ===================================================== 2. PLATZ ===================================================== */
.rankingPosition.rank2 {
    background: #1EBC6D;
}
/* ===================================================== 3. PLATZ ===================================================== */
.rankingPosition.rank3 {
    background: #19C19D;
}
/* ===================================================== 4. PLATZ ===================================================== */
.rankingPosition.rank4 {
    background: #12C8B7;
}
/* ===================================================== MITTLERE PLÄTZE ===================================================== */
.rankingPosition:not(
    .rank1,
    .rank2,
    .rank3,
    .rank4,
    .rankSecondLast,
    .rankLast
) {
    background: #555;
    color: #fff;
}
/* ===================================================== VORLETZTER PLATZ ===================================================== */
.rankingPosition.rankSecondLast {
    background: #ff9800;
    color: #fff;
}
/* ===================================================== LETZTER PLATZ ===================================================== */
.rankingPosition.rankLast {
    background: #d93636;
}
/* ===================================================== NACHRICHTEN ===================================================== */
.tableMessage {
    text-align: center !important;
    color: #aaa !important;
    padding: 30px !important;
}
.tableError {
    color: #ff6b6b !important;
}
/* ===================================================== MOBILE / TABLET ===================================================== */
@media (
    max-width:700px
) {
    .tableFilters {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    #rankingTable {
        min-width: 760px;
    }
    #rankingTable thead th {
        background: #ff9800;
        color: #111;
        font-size: 14px;
        font-weight: 700;
        text-align: center;
        padding: 10px 6px;
    }
    #rankingTable tbody td {
        font-size: 15px;
        padding: 13px 6px;
    }
    #rankingTable td.rankingPlayer {
        padding-left: 12px;
    }
}
/* ===================================================== STATISTIK – NEUES DESIGN ===================================================== */
/* ===================================================== HAUPTSEITE ===================================================== */
.statisticsPage {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
/* ===================================================== STATISTIK FILTER ===================================================== */
.statisticsFilterPanel {
    width: 100%;
    background: #2b2b2b;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.statisticsFilter {
    min-width: 0;
}
.statisticsFilter label {
    display: block;
    margin-bottom: 5px;
    color: #999;
    font-size: 12px;
    font-weight: 600;
}
.statisticsFilter select {
    width: 100%;
    height: 40px;
    padding: 0 10px;
}
/* ===================================================== RESPONSIVE ===================================================== */
@media (max-width: 700px) {
    .statisticsFilterPanel {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
    }
}
/* ===================================================== TOP-20-BEREICH ===================================================== */
.statisticsRecordsPanel {
    width: 100%;
    background: #2b2b2b;
    border-radius: 12px;
    padding: 20px 24px;
}
/* ===================================================== HEADER ===================================================== */
.statisticsRecordsHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.statisticsRecordsHeader h2 {
    margin: 0;
    color: #fff;
    font-size: 26px;
    line-height: 1.1;
}
.statisticsRecordsHint {
    margin-top: 5px;
    color: #999;
    font-size: 13px;
}
/* ===================================================== AUSWAHL-BUTTONS ===================================================== */
.statisticsRecordButtons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}
.statisticsRecordButton {
    border: 1px solid #555;
    background: #3a3a3a;
    color: #ddd;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .1s ease;
}
.statisticsRecordButton:hover {
    background: #464646;
}
.statisticsRecordButton:active {
    transform: scale(.97);
}
.statisticsRecordButton.active {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}
/* ===================================================== CARDS ===================================================== */
.statisticsCards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
/* ===================================================== EINZELNE CARD ===================================================== */
.statisticsCard {
    min-width: 0;
    background: #303030;
    border: 1px solid #444;
    border-radius: 10px;
    overflow: hidden;
}
/* ===================================================== CARD HEADER ===================================================== */
.statisticsCardHeader {
    min-height: 52px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border-bottom: 1px solid #444;
}
.statisticsCardHeader h3 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}
/* ===================================================== CARD-TABELLE ===================================================== */
.statisticsCardTableWrapper {
    width: 100%;
    overflow-x: auto;
}
.statisticsCardTable {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}
/* ===================================================== TABELLEN-KOPF ===================================================== */
.statisticsCardTable th {
    padding: 9px 8px;
    background: var(--accent);
    color: #111;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.statisticsCardTable th:nth-child(1) {
    width: 48px;
}
.statisticsCardTable th:nth-child(2) {
    width: auto;
}
.statisticsCardTable th:nth-child(3) {
    width: 72px;
}
/* ===================================================== TABELLEN-ZEILEN ===================================================== */
.statisticsCardTable td {
    padding: 7px 8px;
    color: #eee;
    font-size: 13px;
    text-align: center;
    border-bottom: 1px solid #414141;
}
.statisticsCardTable tbody tr:last-child td {
    border-bottom: none;
}
.statisticsCardTable tbody tr:hover {
    background: #363636;
}
/* ===================================================== RANG ===================================================== */
.statisticsRank {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #444;
    color: #ddd;
    font-size: 12px;
    font-weight: 600;
}
/* ===================================================== SPIELERNAME ===================================================== */
.statisticsPlayerName {
    text-align: left !important;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ===================================================== WERT ===================================================== */
.statisticsValue {
    font-weight: 700;
    color: #fff !important;
    white-space: nowrap;
}
/* ===================================================== CARD FOOTER ===================================================== */
.statisticsCardFooter {
    padding: 8px 12px;
    color: #888;
    font-size: 11px;
    text-align: right;
    border-top: 1px solid #414141;
}
/* ===================================================== LEERE CARD ===================================================== */
.statisticsCardEmpty {
    padding: 25px 10px !important;
    color: #888 !important;
    text-align: center !important;
}
/* ===================================================== LADEN ===================================================== */
.statisticsLoading {
    grid-column: 1 / -1;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    background: #303030;
    border: 1px solid #444;
    border-radius: 10px;
}
/* ===================================================== FEHLER ===================================================== */
.statisticsError {
    grid-column: 1 / -1;
    padding: 20px;
    color: #ddd;
    background: #3a2929;
    border: 1px solid #704040;
    border-radius: 10px;
}
/* ===================================================== TABLET ===================================================== */
@media (max-width: 1000px) {
    .statisticsRecordsHeader {
        align-items: flex-start;
        flex-direction: column;
    }
    .statisticsRecordButtons {
        width: 100%;
        justify-content: flex-start;
    }
    .statisticsCards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* ===================================================== KLEINERE TABLETS / HANDY ===================================================== */
@media (max-width: 700px) {
    .statisticsFilterPanel {
        padding: 16px;
    }
    .statisticsRecordsPanel {
        padding: 16px;
    }
    .statisticsFilterFields {
        grid-template-columns: 1fr;
    }
    .statisticsCards {
        grid-template-columns: 1fr;
    }
    .statisticsRecordButtons {
        gap: 6px;
    }
    .statisticsRecordButton {
        padding: 7px 11px;
        font-size: 12px;
    }
    .statisticsRecordsHeader h2 {
        font-size: 23px;
    }
}
/* ===================================================== SEHR KLEINE DISPLAYS ===================================================== */
@media (max-width: 450px) {
    .statisticsFilterPanel {
        padding: 14px;
    }
    .statisticsRecordsPanel {
        padding: 14px;
    }
    .statisticsCardTable th {
        padding: 8px 5px;
    }
    .statisticsCardTable td {
        padding: 6px 5px;
        font-size: 12px;
    }
}
/* ====================================================== HSL – ZENTRALE SEITENBREITE ====================================================== */
.fixturePage, .tablePage, .statisticsPage, .playerAdmin, .leagueAdmin, .page {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.playerList, .rankingTableWrapper, .fixtureTableWrapper, .statisticsRecordTableWrapper {
    max-width: 100%;
}
/* ====================================================== TOUCH / MOBILE ====================================================== */
button, select, input, textarea {
    max-width: 100%;
}
@media (max-width: 820px) {
    .adminLayout {
        grid-template-columns: 1fr;
    }
    .adminSidebar {
        position: static;
    }
    .seasonRow {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .leagueNew {
        grid-template-columns: 1fr;
    }
    .leagueCardButtons {
        grid-template-columns: 1fr;
    }
    .playerNewGrid {
        grid-template-columns: 1fr;
    }
    .playerNewGrid > div:last-child {
        grid-column: auto;
    }
    .statisticsFilters {
        grid-template-columns: 1fr !important;
    }
    .statisticsCards {
        grid-template-columns: 1fr !important;
    }
    .fixtureToolbar {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .playerSelection, .matchScore {
        grid-template-columns: 1fr;
    }
    .bigScore {
        font-size: 48px;
    }
}
@media (max-width: 520px) {
    th, td {
        padding: 10px 8px;
        font-size: 14px;
    }
    .card h1 {
        font-size: 30px;
    }
    .card h2 {
        font-size: 23px;
    }
    .leagueHeader {
        grid-template-columns: 1fr;
    }
    .leagueSort input {
        width: 100%;
    }
    .seasonControls {
        grid-template-columns: 1fr;
    }
    .leagueMode {
        grid-template-columns: 1fr 56px;
    }
    .statisticsRecordButtons {
        justify-content: flex-start;
    }
}
/* ====================================================== STARTSEITE ====================================================== */
.homeGrid {
    display: grid;
    grid-template-columns: minmax(0, 2fr)
        minmax(320px, 1fr);
    gap: 25px;
    align-items: start;
}
.homeContentCard, .nextMatchdayCard {
    min-width: 0;
}
.homeContentDisplay {
    min-height: 180px;
}
.homeEmpty h1 {
    color: var(--accent);
    font-size: 38px;
    margin-bottom: 12px;
}
.homeEmpty p {
    font-size: 17px;
    line-height: 1.5;
}
.homeContentRow {
    display: flex;
    align-items: baseline;
    gap: 10px;
    line-height: 1.35;
    margin-bottom: 8px;
}
.homeContentRow:last-child {
    margin-bottom: 0;
}
.homeEmoji {
    flex: 0 0 auto;
}
.homeBullet {
    flex: 0 0 auto;
    font-weight: bold;
}
.homeText {
    min-width: 0;
}
/* ====================================================== STARTSEITEN-FARBEN ====================================================== */
.homeColor-orange {
    color: #ff9800;
}
.homeColor-white {
    color: #f5f5f5;
}
.homeColor-red {
    color: #ff5b5b;
}
.homeColor-green {
    color: #55c95a;
}
.homeColor-yellow {
    color: #ffd43b;
}
.homeColor-blue {
    color: #5b91e8;
}
/* ====================================================== STARTSEITEN-SCHRIFTGRÖSSEN ====================================================== */
.homeFontH1 {
    font-size: 32px;
    font-weight: 700;
}
.homeFontH2 {
    font-size: 24px;
    font-weight: 700;
}
.homeFontText {
    font-size: 17px;
    font-weight: 400;
}
/* ====================================================== NÄCHSTER SPIELTAG ====================================================== */
.nextMatchdayCard h2 {
    margin-bottom: 12px;
}
.nextMatchdayNumber {
    color: #aaa;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 15px;
}
.nextLeagueGroup {
    margin-bottom: 16px;
}
.nextLeagueGroup:last-child {
    margin-bottom: 0;
}
.nextLeagueTitle {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 5px;
}
.nextMatch {
    padding: 8px 0;
    border-bottom: 1px solid #3b3b3b;
}
.nextMatch:last-child {
    border-bottom: none;
}
.nextMatchPlayers {
    display: grid;
    grid-template-columns: minmax(0,1fr)
        20px
        minmax(0,1fr);
    align-items: center;
    gap: 4px;
    font-size: 15px;
}
.nextMatchPlayers span:first-child {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nextMatchPlayers span:last-child {
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nextMatchDash {
    text-align: center;
    color: #888;
}
.nextMatchDetails {
    margin-top: 3px;
    color: #999;
    font-size: 12px;
}
.nextMatchdayEmpty {
    color: #999;
    padding: 10px 0;
}
.homeError {
    color: #ff5b5b;
}
/* ====================================================== STARTSEITE – ADMIN EDITOR ====================================================== */
.homeAdminEditor {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #444;
}
.homeEditorHeader h2 {
    font-size: 21px;
}
.homeEditorOrder {
    padding-top: 10px;
    color: #888;
    font-weight: 700;
}
.homeEditorText {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 7px;
    border: 1px solid #555;
    background: #1b1b1b;
    color: #fff;
    font-size: 16px;
}
/* ====================================================== SCHRIFTGRÖSSE ====================================================== */
.homeOptionButton {
    display: flex;
    align-items: center;
    justify-content: center;
}
.homeSizeButton {
    font-size: 22px;
}
.homeSizeMedium {
    font-size: 18px;
}
.homeSizeSmall {
    font-size: 14px;
}
.homeOptionButton.selected {
    color: #fff;
}
/* ====================================================== FARBEN ====================================================== */
/* ====================================================== EMOJI ====================================================== */
.homeEditorEmoji {
    min-width: 145px;
    height: 34px;
}
/* ====================================================== AUFZÄHLUNG ====================================================== */
.homeBulletSwitch {
    display: flex;
    margin: 0;
}
.homeBulletSwitch input {
    width: 18px;
    margin: 0;
}
/* ====================================================== LÖSCHEN ====================================================== */
.homeDeleteButton {
    font-size: 13px;
}
/* ====================================================== EMPTY ====================================================== */
.homeEditorEmpty {
    color: #999;
    padding: 15px 0;
}
/* ====================================================== TABLET ====================================================== */
@media (max-width:700px) {
    .homeEditorToolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* ====================================================== MOBILE / TABLET ====================================================== */
@media (max-width:900px) {
    .homeGrid {
        grid-template-columns: 1fr;
    }
}
@media (max-width:600px) {
    .homeEditorOptions {
        flex-direction: column;
        align-items: stretch;
    }
    .homeEditorOptions label {
        justify-content: space-between;
    }
    .homeEditorOptions select {
        flex: 1;
    }
}
/* ====================================================== FIXTURE / SPIELER INAKTIV ====================================================== */
.inactiveFixture td, .inactiveFixture td * {
    color: #6B6B6B !important;
}
/* ===================================================== STARTSEITE – LAYOUT-ELEMENTE ===================================================== */
/* ===================================================== STARTSEITE – EDITOR REIHENFOLGE ===================================================== */
.homeEditorOrder {
    justify-content: flex-start;
    min-width: 58px;
}
.homeEditorTypeRow {
    margin-bottom: 8px;
}
.homeEditorType {
    width: auto;
}
/* ===================================================== STARTSEITE – ADMIN EDITOR ===================================================== */
.homeEditorRows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
/* ----------------------------------------------------- EINZELNE EDITOR-ZEILE ----------------------------------------------------- */
.homeEditorRow {
    width: 100%;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 16px;
    background: #242424;
    border: 1px solid #444;
    border-radius: 10px;
}
/* ----------------------------------------------------- REIHENFOLGE ----------------------------------------------------- */
.homeEditorOrder {
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.homeEditorOrderInput {
    width: 52px !important;
    height: 38px !important;
    padding: 6px !important;
    margin: 0 !important;
    text-align: center;
    font-size: 16px !important;
    font-weight: 700;
}
.homeEditorMoveButtons {
    display: flex;
    justify-content: center;
    gap: 4px;
}
.homeMoveButton {
    width: 25px;
    height: 25px;
    padding: 0;
    margin: 0;
    border: 1px solid #555;
    border-radius: 5px;
    background: #333;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}
.homeMoveButton:hover {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}
/* ----------------------------------------------------- HAUPTBEREICH ----------------------------------------------------- */
.homeEditorMain {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* ----------------------------------------------------- ELEMENT-TYP ----------------------------------------------------- */
.homeEditorTypeRow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.homeEditorTypeRow label {
    display: block;
    width: auto;
    margin: 0 !important;
    padding: 0;
    color: #aaa;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.homeEditorType {
    width: auto !important;
    min-width: 150px;
    height: 40px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
}
/* ----------------------------------------------------- TEXT ----------------------------------------------------- */
.homeEditorText {
    width: 100% !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
}
.homeEditorText:disabled {
    opacity: .45;
    cursor: not-allowed;
}
/* ----------------------------------------------------- TOOLBAR ----------------------------------------------------- */
.homeEditorToolbar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px;
}
.homeEditorTool {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}
.homeEditorToolLabel {
    color: #aaa;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
/* ----------------------------------------------------- SCHRIFTGRÖSSE ----------------------------------------------------- */
.homeSizeButtons {
    display: flex;
    gap: 5px;
}
.homeOptionButton {
    width: 38px;
    height: 34px;
    padding: 0;
    margin: 0;
    border: 1px solid #555;
    border-radius: 6px;
    background: #333;
    color: #fff;
    cursor: pointer;
}
.homeOptionButton:hover {
    border-color: var(--accent);
}
.homeOptionButton.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.homeSizeButton {
    font-weight: 700;
}
.homeSizeButton:nth-child(1) {
    font-size: 22px;
}
.homeSizeButton:nth-child(2) {
    font-size: 18px;
}
.homeSizeButton:nth-child(3) {
    font-size: 15px;
}
/* ----------------------------------------------------- FARBEN ----------------------------------------------------- */
.homeColorButtons {
    display: flex;
    align-items: center;
    gap: 7px;
}
.homeColorButton {
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    border: 2px solid #555;
    border-radius: 50%;
    cursor: pointer;
}
.homeColorButton:hover {
    transform: scale(1.08);
}
.homeColorButton.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--accent);
}
.homeColorButton-orange {
    background: #ff9800;
}
.homeColorButton-white {
    background: #fff;
}
.homeColorButton-red {
    background: #ff4d4d;
}
.homeColorButton-green {
    background: #4caf50;
}
.homeColorButton-yellow {
    background: #ffd43b;
}
.homeColorButton-blue {
    background: #5b9bea;
}
/* ----------------------------------------------------- EMOJI ----------------------------------------------------- */
.homeEditorEmoji {
    width: 180px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 6px 10px !important;
}
/* ----------------------------------------------------- AUFZÄHLUNG ----------------------------------------------------- */
.homeBulletSwitch {
    display: flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 !important;
    padding: 0;
    height: 36px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.homeBulletSwitch input {
    width: 18px !important;
    height: 18px;
    margin: 0 !important;
}
/* ----------------------------------------------------- LÖSCHEN ----------------------------------------------------- */
.homeDeleteButton {
    height: 36px;
    padding: 0 14px;
    margin: 0;
}
/* ----------------------------------------------------- DEAKTIVIERTE ELEMENTE ----------------------------------------------------- */
.homeEditorDisabled {
    opacity: .35;
}
.homeEditorDisabled button {
    cursor: not-allowed;
}
/* ----------------------------------------------------- EDITOR HEADER ----------------------------------------------------- */
.homeEditorHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.homeEditorHeader h2 {
    margin: 0;
}
/* ----------------------------------------------------- SPEICHERN ----------------------------------------------------- */
.homeEditorActions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}
/* ----------------------------------------------------- TRENNSTRICH / ABSATZ ----------------------------------------------------- */
.homeContentSeparator {
    width: 100%;
    height: 2px;
    margin: 18px 0;
    background: #555;
}
.homeContentParagraph {
    width: 100%;
    height: 18px;
}
/* ===================================================== KLEINERE DISPLAYS ===================================================== */
@media (max-width:700px) {
    .homeEditorRow {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }
    .homeEditorOrder {
        width: 60px;
    }
    .homeEditorToolbar {
        gap: 12px;
    }
    .homeEditorEmoji {
        width: 160px !important;
    }
}
@media (max-width:520px) {
    .homeEditorRow {
        grid-template-columns: 1fr;
    }
    .homeEditorOrder {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }
    .homeEditorMoveButtons {
        margin-left: 4px;
    }
    .homeEditorTypeRow {
        flex-wrap: wrap;
    }
    .homeEditorType {
        flex: 1;
        min-width: 140px;
    }
    .homeEditorToolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ===================================================== HSL – RESPONSIVE GESAMTLAYOUT Nur Darstellung – keine Funktionslogik ===================================================== */
/* ---------- Grundsätzlich ---------- */
html, body {
    width: 100%;
    max-width: 100%;
}
main {
    padding-left: clamp(10px, 2vw, 16px);
    padding-right: clamp(10px, 2vw, 16px);
}
.card, .fixturePage, .tablePage, .statisticsPage, .playerAdmin, .leagueAdmin, .page, .adminLayout {
    min-width: 0;
}
img, video, canvas {
    max-width: 100%;
}
input, select, textarea, button {
    font-family: inherit;
}
/* ===================================================== TABLET HOCHFORMAT / KLEINERE NOTEBOOKS ===================================================== */
@media (max-width: 900px) {
    main {
        margin-top: 12px;
        padding-bottom: 12px;
    }
    #content {
        max-width: 100%;
    }
    /* ---------- Verwaltung ---------- */
    .adminLayout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .adminSidebar {
        position: static;
        width: 100%;
    }
    /* ---------- Ligaspiel Login ---------- */
    .matchLoginCard {
        padding: 16px;
    }
    .matchLoginCard h1 {
        font-size: clamp(30px, 5vw, 40px);
    }
    .matchSelectors {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .loginGrid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .loginVS {
        min-height: 54px;
    }
    .loginVS::before {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    /* ---------- AKTIVES LIGASPIEL ---------- */
    /* ---------- Match-Zusammenfassung ---------- */
    .summaryHeader {
        display: grid;
        grid-template-columns: auto
        auto
        auto;
        justify-content: center;
        align-items: center;
        gap: 24px;
        margin-bottom: 14px;
    }
    .summaryPlayer {
        font-size: 24px;
        white-space: nowrap;
    }
    .summaryScoreBlock {
        order: 0;
        margin-top: 0;
        min-width: 110px;
        text-align: center;
    }
    .summaryContent {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
    }
    .summarySide {
        height: auto;
    }
    .summaryLegs {
        order: 2;
    }
    /* ---------- Startseite ---------- */
    .homeGrid {
        grid-template-columns: 1fr;
    }
    /* ---------- Spielplan ---------- */
    .fixtureToolbar {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    #fixtureButtons {
        grid-column: auto;
        flex-wrap: wrap;
    }
    /* ---------- Tabelle ---------- */
    .tableFilters {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}
/* ===================================================== SMARTPHONE ===================================================== */
@media (max-width: 600px) {
    body {
        font-size: 14px;
    }
    main {
        margin-top: 8px;
        padding: 0 8px 10px;
    }
    footer {
        padding: 14px 10px;
        font-size: 12px;
    }
    /* ---------- Cards ---------- */
    .card {
        border-radius: 10px;
        padding: 14px;
    }
    .card h1 {
        font-size: 27px;
        line-height: 1.15;
    }
    .card h2 {
        font-size: 21px;
        line-height: 1.2;
    }
    /* ---------- Match Login ---------- */
    .matchLoginCard {
        padding: 12px;
        border-radius: 10px;
    }
    .matchLoginCard h1 {
        font-size: 28px;
        margin-bottom: 14px;
    }
    .selector label {
        font-size: 14px;
    }
    .selector select, .loginPlayerCard input {
        height: 46px;
        font-size: 17px;
    }
    .loginPlayerCard {
        padding: 14px;
        border-radius: 10px;
    }
    .loginPlayerName {
        font-size: 21px;
    }
    .btnStartMatch {
        height: 50px;
        font-size: 18px;
    }
    /* ---------- Aktives Ligaspiel ---------- */
    .matchHeader {
        height: 42px;
    }
    /* ---------- Match Summary ---------- */
    .summaryPlayer {
        font-size: 21px;
    }
    .summaryScore {
        font-size: 40px;
    }
    .summaryStat {
        min-height: 40px;
    }
    .summaryStat strong {
        font-size: 15px;
    }
    .summaryLegs {
        padding: 6px 8px;
    }
    /* ---------- Formulare allgemein ---------- */
    .btn, button {
        min-height: 42px;
    }
    select, input, textarea {
        min-height: 42px;
    }
}
/* ===================================================== SPIELPLAN – MOBILE KARTENANSICHT Die Daten bleiben vollständig erhalten. ===================================================== */
@media (max-width: 600px) {
    .fixtureTableWrapper {
        overflow: visible;
    }
    #fixtureTable {
        width: 100%;
        min-width: 0;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0 8px;
    }
    #fixtureTable thead {
        display: none;
    }
    #fixtureTable tbody, #fixtureTable tr {
        display: block;
        width: 100%;
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) {
        padding: 8px 10px;
        background: #2d2d2d;
        border: 1px solid var(--accent);
        border-radius: 10px;
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td {
        width: 100% !important;
        min-width: 0 !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 2px;
        border-bottom: 1px solid #414141;
        text-align: right;
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td:last-child {
        border-bottom: none;
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td::before {
        flex: 0 0 auto;
        color: #999;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .5px;
        text-align: left;
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td:nth-child(1)::before {
        content: "Datum";
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td:nth-child(2)::before {
        content: "Uhrzeit";
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td:nth-child(3)::before {
        content: "Heim";
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td:nth-child(4)::before {
        content: "";
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td:nth-child(5)::before {
        content: "Gast";
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) td:nth-child(6)::before {
        content: "Ergebnis";
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) .vsColumn {
        justify-content: center;
        padding: 3px 0;
        border-bottom: none;
    }
    #fixtureTable tbody tr:not(.matchdayHeader):not(.finaldayHeader):not(.playoffMatchHeader) .vsColumn::before {
        display: none;
    }
    #fixtureTable .playerCell {
        white-space: normal;
    }
    #fixtureTable .playerPill, #fixtureTable .fixtureResultCell {
        max-width: 70%;
    }
    #fixtureTable .fixtureResultCell {
        justify-content: flex-end;
    }
    #fixtureTable .matchdayHeader, #fixtureTable .finaldayHeader, #fixtureTable .playoffMatchHeader {
        margin-top: 8px;
        margin-bottom: 0;
        border-radius: 8px;
        overflow: hidden;
    }
    #fixtureTable .matchdayHeader td, #fixtureTable .finaldayHeader td, #fixtureTable .playoffMatchHeader td {
        display: block;
        width: 100% !important;
        padding: 11px 12px;
        border: none;
        border-radius: 8px;
    }
    .fixtureToolbar .toolbarGroup select {
        width: 100%;
    }
}
/* ===================================================== TABELLE – MOBILE KARTENANSICHT Alle Werte bleiben sichtbar. ===================================================== */
@media (max-width: 600px) {
    .rankingTableWrapper {
        overflow: visible;
    }
    #rankingTable {
        width: 100%;
        min-width: 0;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0 8px;
    }
    #rankingTable thead {
        display: none;
    }
    #rankingTable tbody, #rankingTable tbody tr {
        display: block;
        width: 100%;
    }
    #rankingTable tbody tr {
        padding: 8px 10px;
        background: #2d2d2d;
        border: 1px solid #444;
        border-radius: 10px;
    }
    #rankingTable tbody td {
        width: 100% !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 2px;
        border-bottom: 1px solid #414141;
        text-align: right;
        font-size: 14px;
    }
    #rankingTable tbody td:last-child {
        border-bottom: none;
    }
    #rankingTable tbody td::before {
        flex: 0 0 auto;
        color: #999;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .5px;
        text-align: left;
    }
    #rankingTable tbody td:nth-child(1)::before {
        content: "Platz";
    }
    #rankingTable tbody td:nth-child(2)::before {
        content: "Spieler";
    }
    #rankingTable tbody td:nth-child(3)::before {
        content: "Sp.";
    }
    #rankingTable tbody td:nth-child(4)::before {
        content: "S.";
    }
    #rankingTable tbody td:nth-child(5)::before {
        content: "N.";
    }
    #rankingTable tbody td:nth-child(6)::before {
        content: "Set-Diff.";
    }
    #rankingTable tbody td:nth-child(7)::before {
        content: "Legs +";
    }
    #rankingTable tbody td:nth-child(8)::before {
        content: "Legs −";
    }
    #rankingTable tbody td:nth-child(9)::before {
        content: "Leg-Diff.";
    }
    #rankingTable td.rankingPlayer {
        padding-left: 2px;
        text-align: right;
        white-space: normal;
    }
}
/* Tabellen-Meldungen bleiben auf Mobilgeräten normale Textzeilen */
@media (max-width: 600px) {
    #rankingTable tbody td.tableMessage {
        display: block;
        width: 100% !important;
        padding: 24px 10px !important;
        border-bottom: none;
        text-align: center !important;
    }
    #rankingTable tbody td.tableMessage::before {
        display: none;
    }
}
/* ===================================================== STATISTIK – MOBILE ===================================================== */
@media (max-width: 600px) {
    .statisticsPage {
        width: 100%;
    }
    .statisticsFilterPanel, .statisticsRecordsPanel {
        border-radius: 10px;
    }
    .statisticsRecordsHeader {
        gap: 10px;
    }
    .statisticsRecordButtons {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .statisticsRecordButton {
        width: 100%;
        min-width: 0;
        text-align: center;
    }
    .statisticsCards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .statisticsCardTableWrapper {
        overflow: visible;
    }
    .statisticsCardTable {
        table-layout: auto;
    }
    .statisticsCardTable th, .statisticsCardTable td {
        padding: 7px 6px;
        font-size: 12px;
    }
}
/* ===================================================== STARTSEITEN-EDITOR – MOBILE ===================================================== */
@media (max-width: 600px) {
    .homeEditorRow {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }
    .homeEditorOrder {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }
    .homeEditorMain {
        width: 100%;
    }
    .homeEditorTypeRow {
        flex-wrap: wrap;
    }
    .homeEditorType {
        flex: 1;
        min-width: 140px;
    }
    .homeEditorToolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
/* ===================================================== SEHR SCHMALE SMARTPHONES ===================================================== */
@media (max-width: 380px) {
    .topbarInner {
        padding-left: 8px;
        padding-right: 8px;
    }
    main {
        padding-left: 6px;
        padding-right: 6px;
    }
    .card {
        padding: 11px;
    }
    .rankingPosition {
        min-width: 28px;
        height: 26px;
    }
}
/* ===================================================== LIGA + SAISON GESAMTSTATISTIK ===================================================== */
.statisticsSummaryPanel {
    width: 100%;
    margin-bottom: 24px;
    background: #2b2b2b;
    border: 1px solid #444;
    border-radius: 14px;
    padding: 20px;
}
.statisticsSummaryHeader {
    margin-bottom: 16px;
}
.statisticsSummaryHeader h2 {
    margin: 0;
    color: var(--accent);
    font-size: 30px;
}
.statisticsSummaryHint {
    margin-top: 6px;
    color: #aaa;
    font-size: 15px;
}
/* ===================================================== TABELLE ===================================================== */
.statisticsSummaryTableWrapper {
    width: 100%;
    overflow-x: hidden;
    border: 1px solid #444;
    border-radius: 10px;
}
.statisticsSummaryTable {
    width: 100%;
    min-width: 0;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}
/* ===================================================== KOPF ===================================================== */
.statisticsSummaryTable th {
    background: var(--accent);
    color: #111;
    padding: 10px 5px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
    white-space: normal;
}
/* ===================================================== ZELLEN ===================================================== */
.statisticsSummaryTable td {
    padding: 9px 5px;
    color: #eee;
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #444;
    line-height: 1.15;
}
.statisticsSummaryTable tbody tr {
    background: #2d2d2d;
}
.statisticsSummaryTable tbody tr:nth-child(even) {
    background: #303030;
}
.statisticsSummaryTable tbody tr:last-child td {
    border-bottom: none;
}
/* Liga + Saison links */
.statisticsSummaryTable td:nth-child(1), .statisticsSummaryTable td:nth-child(2) {
    text-align: left;
    white-space: nowrap;
}
/* Zahlen nicht umbrechen */
.statisticsSummaryTable td:nth-child(n/**/+3) {
    white-space: nowrap;
}
/* ===================================================== SPALTENBREITEN ===================================================== */
.statisticsSummaryTable th:nth-child(1), .statisticsSummaryTable td:nth-child(1) {
    width: 9%;
}
.statisticsSummaryTable th:nth-child(2), .statisticsSummaryTable td:nth-child(2) {
    width: 9%;
}
.statisticsSummaryTable th:nth-child(3), .statisticsSummaryTable td:nth-child(3) {
    width: 7%;
}
.statisticsSummaryTable th:nth-child(4), .statisticsSummaryTable td:nth-child(4) {
    width: 7%;
}
.statisticsSummaryTable th:nth-child(5), .statisticsSummaryTable td:nth-child(5) {
    width: 6%;
}
.statisticsSummaryTable th:nth-child(6), .statisticsSummaryTable td:nth-child(6) {
    width: 8%;
}
.statisticsSummaryTable th:nth-child(7), .statisticsSummaryTable td:nth-child(7) {
    width: 10%;
}
.statisticsSummaryTable th:nth-child(8), .statisticsSummaryTable td:nth-child(8) {
    width: 11%;
}
.statisticsSummaryTable th:nth-child(9), .statisticsSummaryTable td:nth-child(9) {
    width: 9%;
}
.statisticsSummaryTable th:nth-child(10), .statisticsSummaryTable td:nth-child(10) {
    width: 7%;
}
.statisticsSummaryTable th:nth-child(11), .statisticsSummaryTable td:nth-child(11) {
    width: 7%;
}
.statisticsSummaryTable th:nth-child(12), .statisticsSummaryTable td:nth-child(12) {
    width: 7%;
}
/* ===================================================== SPIELER GESAMTSTATISTIK ===================================================== */
.statisticsPlayerPanel {
    width: 100%;
    margin-bottom: 24px;
    background: #2b2b2b;
    border: 1px solid #444;
    border-radius: 14px;
    padding: 20px;
    box-sizing: border-box;
}
/* ===================================================== SPIELER HEADER ===================================================== */
.statisticsPlayerHeader {
    margin-bottom: 20px;
}
.statisticsPlayerHeader h2 {
    margin: 0;
    color: var(--accent);
    font-size: 30px;
}
.statisticsPlayerHint {
    margin-top: 6px;
    color: #aaa;
    font-size: 15px;
}
/* ===================================================== STATISTIK-KENNZAHLEN ===================================================== */
.statisticsPlayerStats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.statisticsPlayerStat {
    min-width: 0;
    padding: 14px 10px;
    background: #303030;
    border: 1px solid #444;
    border-radius: 10px;
    text-align: center;
}
.statisticsPlayerStat span {
    display: block;
    margin-bottom: 7px;
    color: #aaa;
    font-size: 13px;
    line-height: 1.15;
}
.statisticsPlayerStat strong {
    display: block;
    color: #fff;
    font-size: 21px;
    line-height: 1.1;
}
/* ===================================================== AUFSCHLÜSSELUNG ===================================================== */
.statisticsPlayerBreakdown {
    margin-top: 10px;
}
.statisticsPlayerBreakdown h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 20px;
}
.statisticsPlayerTableWrapper {
    width: 100%;
    overflow-x: hidden;
    border: 1px solid #444;
    border-radius: 10px;
}
.statisticsPlayerTable {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
}
/* Kopf */
.statisticsPlayerTable th {
    padding: 10px 6px;
    background: var(--accent);
    color: #111;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
}
/* Zellen */
.statisticsPlayerTable td {
    padding: 9px 6px;
    background: #2d2d2d;
    color: #eee;
    font-size: 13px;
    text-align: center;
    border-bottom: 1px solid #444;
    line-height: 1.15;
}
.statisticsPlayerTable tbody tr:nth-child(even) td {
    background: #303030;
}
.statisticsPlayerTable tbody tr:last-child td {
    border-bottom: none;
}
/* Saison + Liga */
.statisticsPlayerTable td:nth-child(1), .statisticsPlayerTable td:nth-child(2) {
    text-align: left;
    white-space: nowrap;
}
/* Zahlen */
.statisticsPlayerTable td:nth-child(n/**/+3) {
    white-space: nowrap;
}
/* ===================================================== LEERE / FEHLERZUSTÄNDE ===================================================== */
.statisticsPlayerEmpty {
    padding: 20px;
    background: #303030;
    border: 1px solid #444;
    border-radius: 10px;
    color: #aaa;
    text-align: center;
}
.statisticsPlayerHidden {
    display: none !important;
}
/* ===================================================== TABLET ===================================================== */
@media (max-width: 900px) {
    .statisticsPlayerStats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .statisticsPlayerTableWrapper {
        overflow-x: auto;
    }
    .statisticsPlayerTable {
        min-width: 900px;
    }
}
/* ===================================================== SMARTPHONE ===================================================== */
@media (max-width: 600px) {
    .statisticsPlayerPanel {
        padding: 14px;
        border-radius: 12px;
    }
    .statisticsPlayerHeader {
        margin-bottom: 14px;
    }
    .statisticsPlayerHeader h2 {
        font-size: 24px;
    }
    .statisticsPlayerHint {
        font-size: 14px;
    }
    .statisticsPlayerStats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 18px;
    }
    .statisticsPlayerStat {
        padding: 12px 8px;
    }
    .statisticsPlayerStat span {
        font-size: 12px;
    }
    .statisticsPlayerStat strong {
        font-size: 19px;
    }
    .statisticsPlayerBreakdown h3 {
        font-size: 18px;
    }
    .statisticsPlayerTableWrapper {
        overflow-x: auto;
    }
    .statisticsPlayerTable {
        min-width: 900px;
    }
}
/* ===================================================== STATISTIK – RESPONSIVE OPTIMIERUNG ===================================================== */
/* ===================================================== TABLET ===================================================== */
@media (max-width: 900px) {
    .statisticsPage {
        width: 100%;
    }
    /* --------------------------------------------- FILTER --------------------------------------------- */
    .statisticsFilterPanel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 14px;
    }
    .statisticsFilter:last-child {
        grid-column: 1 / -1;
    }
    /* --------------------------------------------- GESAMTSTATISTIK --------------------------------------------- */
    .statisticsSummaryPanel {
        padding: 16px;
        margin-bottom: 18px;
    }
    .statisticsSummaryHeader {
        margin-bottom: 12px;
    }
    .statisticsSummaryHeader h2 {
        font-size: 25px;
    }
    .statisticsSummaryHint {
        font-size: 14px;
    }
    /* --------------------------------------------- TOP 20 --------------------------------------------- */
    .statisticsRecordsPanel {
        padding: 16px;
    }
    .statisticsRecordsHeader {
        gap: 12px;
    }
    .statisticsRecordsHeader h2 {
        font-size: 25px;
    }
    .statisticsRecordButtons {
        gap: 6px;
    }
    .statisticsRecordButtons button {
        font-size: 13px;
        padding: 8px 10px;
    }
    /* --------------------------------------------- TOP 20 CARDS --------------------------------------------- */
    .statisticsCards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    /* --------------------------------------------- SPIELERSTATISTIK --------------------------------------------- */
    .statisticsPlayerPanel {
        padding: 16px;
        margin-bottom: 18px;
    }
    .statisticsPlayerHeader h2 {
        font-size: 25px;
    }
    .statisticsPlayerStats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
}
/* ===================================================== SMARTPHONE ===================================================== */
@media (max-width: 600px) {
    /* ================================================= GESAMTSEITE ================================================= */
    .statisticsPage {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    /* ================================================= FILTER ================================================= */
    .statisticsFilterPanel {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        margin-bottom: 12px;
    }
    .statisticsFilter {
        width: 100%;
    }
    .statisticsFilter label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .statisticsFilter select {
        width: 100%;
        min-height: 42px;
        font-size: 15px;
    }
    /* ================================================= GESAMTSTATISTIK ================================================= */
    .statisticsSummaryPanel {
        width: 100%;
        padding: 12px;
        margin-bottom: 14px;
        border-radius: 11px;
    }
    .statisticsSummaryHeader {
        margin-bottom: 10px;
    }
    .statisticsSummaryHeader h2 {
        font-size: 21px;
        line-height: 1.15;
    }
    .statisticsSummaryHint {
        font-size: 13px;
        line-height: 1.3;
    }
    /* --------------------------------------------- Gesamtstatistik Tabelle --------------------------------------------- */
    .statisticsSummaryTableWrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    .statisticsSummaryTable {
        min-width: 850px;
    }
    .statisticsSummaryTable th {
        padding: 8px 5px;
        font-size: 11px;
    }
    .statisticsSummaryTable td {
        padding: 8px 5px;
        font-size: 12px;
    }
    /* ================================================= TOP 20 BEREICH ================================================= */
    .statisticsRecordsPanel {
        width: 100%;
        padding: 12px;
        margin: 0;
        border-radius: 11px;
    }
    .statisticsRecordsHeader {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 12px;
    }
    .statisticsRecordsHeader h2 {
        font-size: 21px;
        line-height: 1.15;
    }
    .statisticsRecordsHint {
        font-size: 13px;
    }
    /* ================================================= STATISTIK-AUSWAHL ================================================= */
    .statisticsRecordButtons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }
    .statisticsRecordButtons button {
        width: 100%;
        min-height: 40px;
        padding: 8px 6px;
        font-size: 12px;
        line-height: 1.15;
        white-space: normal;
    }
    /* ================================================= TOP 20 CARDS ================================================= */
    .statisticsCards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
    }
    .statisticsCard {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding: 12px;
        border-radius: 10px;
        overflow: hidden;
    }
    .statisticsCardHeader {
        gap: 8px;
        margin-bottom: 8px;
    }
    .statisticsCardHeader h3 {
        min-width: 0;
        font-size: 17px;
        line-height: 1.2;
    }
    .statisticsCard table {
        width: 100%;
        table-layout: fixed;
    }
    .statisticsCard th, .statisticsCard td {
        padding: 7px 5px;
        font-size: 12px;
    }
    /* * Spielername bekommt mehr Platz, * Platzierung und Wert bleiben kompakt. */
    .statisticsCard th:first-child, .statisticsCard td:first-child {
        width: 36px;
        text-align: center;
    }
    .statisticsCard th:nth-child(2), .statisticsCard td:nth-child(2) {
        width: auto;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .statisticsCard th:last-child, .statisticsCard td:last-child {
        width: 82px;
        text-align: right;
        white-space: nowrap;
    }
    /* ================================================= SPIELERSTATISTIK ================================================= */
    .statisticsPlayerPanel {
        width: 100%;
        padding: 12px;
        margin-bottom: 14px;
        border-radius: 11px;
    }
    .statisticsPlayerHeader {
        margin-bottom: 12px;
    }
    .statisticsPlayerHeader h2 {
        font-size: 22px;
        line-height: 1.15;
    }
    .statisticsPlayerHint {
        font-size: 13px;
    }
    /* --------------------------------------------- Spieler-Kennzahlen --------------------------------------------- */
    .statisticsPlayerStats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-bottom: 16px;
    }
    .statisticsPlayerStat {
        min-width: 0;
        padding: 10px 7px;
        border-radius: 8px;
    }
    .statisticsPlayerStat span {
        margin-bottom: 5px;
        font-size: 11px;
        line-height: 1.15;
    }
    .statisticsPlayerStat strong {
        font-size: 18px;
        line-height: 1.1;
    }
    /* --------------------------------------------- Spieler-Aufschlüsselung --------------------------------------------- */
    .statisticsPlayerBreakdown h3 {
        margin-bottom: 10px;
        font-size: 17px;
    }
    .statisticsPlayerTableWrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .statisticsPlayerTable {
        min-width: 850px;
    }
    .statisticsPlayerTable th {
        padding: 8px 5px;
        font-size: 11px;
    }
    .statisticsPlayerTable td {
        padding: 8px 5px;
        font-size: 12px;
    }
    /* ================================================= ALLGEMEINE STATISTIK-LADE-/FEHLERBOXEN ================================================= */
    .statisticsLoading, .statisticsError, .statisticsSummaryEmpty, .statisticsPlayerEmpty {
        font-size: 13px;
        padding: 14px;
    }
}
/* ===================================================== TOP 20 – MOBILE TABELLEN OPTIMIERUNG ===================================================== */
@media (max-width: 600px) {
    /* --------------------------------------------- Card --------------------------------------------- */
    .statisticsCard {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
    /* --------------------------------------------- Tabelle innerhalb der Card --------------------------------------------- */
    .statisticsCard table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed;
        border-collapse: collapse;
    }
    /* --------------------------------------------- Alle Zellen --------------------------------------------- */
    .statisticsCard table th, .statisticsCard table td {
        box-sizing: border-box;
        padding: 7px 4px;
        font-size: 12px;
        overflow: hidden;
    }
    /* --------------------------------------------- Spalte 1 – Platzierung --------------------------------------------- */
    .statisticsCard table th:first-child, .statisticsCard table td:first-child {
        width: 32px !important;
        min-width: 32px;
        max-width: 32px;
        text-align: center;
    }
    /* --------------------------------------------- Spalte 2 – Spieler --------------------------------------------- */
    .statisticsCard table th:nth-child(2), .statisticsCard table td:nth-child(2) {
        width: auto !important;
        min-width: 0;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* --------------------------------------------- Spalte 3 – Wert --------------------------------------------- */
    .statisticsCard table th:nth-child(3), .statisticsCard table td:nth-child(3) {
        width: 78px !important;
        min-width: 78px;
        max-width: 78px;
        text-align: right;
        white-space: nowrap;
    }
    /* --------------------------------------------- Keine horizontale Scrollbox --------------------------------------------- */
    .statisticsCard {
        overflow-x: hidden;
    }
}
/* ===================================================== MATCHZUSAMMENFASSUNG – SMARTPHONE ===================================================== */
@media (max-width: 600px) {
    /* ================================================= MODAL OVERLAY ================================================= */
    #modalOverlay {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        max-width: 100vw;
        max-height: 100dvh;
        padding: 8px;
        box-sizing: border-box;
        overflow: hidden;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        /* * Wichtig: * Die Navigation liegt bei z-index 1000. * Das Modal muss darüber liegen. */
        z-index: 2000;
    }
    /* ================================================= MODAL ================================================= */
    #modalOverlay .modal {
        position: relative;
        width: 100%;
        max-width: 650px;
        max-height: calc(100dvh - 16px);
        margin: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    /* ================================================= MODAL HEADER ================================================= */
    #modalOverlay .modalHeader {
        position: relative;
        z-index: 10;
        flex: 0 0 auto;
        min-height: 56px;
        padding: 10px 12px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    /* ================================================= X BUTTON ================================================= */
    #modalOverlay .modalHeader button {
        position: relative;
        z-index: 20;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: #fff;
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
    }
    #modalOverlay .modalHeader button:hover {
        background: #2a2a2a;
    }
    /* ================================================= MODAL BODY ================================================= */
    #modalOverlay #modalBody {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 12px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    /* ================================================= MATCH SUMMARY ================================================= */
    #modalOverlay .matchSummary {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0 auto;
        box-sizing: border-box;
        overflow: visible;
    }
    /* ================================================= KOPF Spieler links – Endstand Mitte – Spieler rechts ================================================= */
    #modalOverlay .summaryHeader {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
        align-items: center;
        margin-bottom: 14px;
    }
    /* ================================================= SPIELERNAME LINKS ================================================= */
    #modalOverlay .summaryPlayer:first-child {
        min-width: 0;
        max-width: 100%;
        justify-content: flex-start;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 15px;
    }
    /* ================================================= SPIELERNAME RECHTS ================================================= */
    #modalOverlay .summaryPlayer:last-child {
        min-width: 0;
        max-width: 100%;
        justify-content: flex-end;
        text-align: right;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 15px;
    }
    /* ================================================= ENDSTAND ================================================= */
    #modalOverlay .summaryScoreBlock {
        order: 0;
        flex: 0 0 auto;
        margin: 0;
        text-align: center;
    }
    #modalOverlay .summaryLabel {
        font-size: 9px;
        margin-bottom: 3px;
    }
    #modalOverlay .summaryScore {
        font-size: 28px;
        line-height: 1;
        white-space: nowrap;
    }
    /* ================================================= SUMMARY CONTENT ================================================= */
    #modalOverlay .summaryContent {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        gap: 10px;
        padding: 0;
    }
    /* ================================================= MOBILE REIHENFOLGE 1. Legtabelle 2. Heimspieler Statistik 3. Gastspieler Statistik ================================================= */
    #modalOverlay .summaryContent {
        display: flex;
        flex-direction: column;
    }
    /* ================================================= 1. LEGTABELLE ================================================= */
    #modalOverlay .summaryContent .summaryLegs {
        order: 1;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        padding: 6px 8px;
        overflow-x: hidden;
    }
    /* ================================================= 2. HEIMSPIELER ================================================= */
    #modalOverlay .summaryContent .summarySide {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    /* * Der erste Statistikblock wird * immer vor dem zweiten angezeigt. */
    #modalOverlay .summaryContent .summarySide:nth-of-type(1) {
        order: 2;
    }
    /* ================================================= 3. GASTSPIELER ================================================= */
    /* * Der zweite Statistikblock kommt danach. */
    #modalOverlay .summaryContent .summarySide:nth-of-type(2) {
        order: 3;
    }
    /* ================================================= STATISTIK-BOX ================================================= */
    #modalOverlay .summarySide {
        width: 100%;
        min-width: 0;
        height: auto;
        box-sizing: border-box;
        padding: 8px 10px;
    }
    /* ================================================= SPIELERNAME ÜBER STATISTIK ================================================= */
    #modalOverlay .summaryMobilePlayer {
        display: block;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        margin: 0 0 7px 0;
        padding: 5px 4px 7px;
        color: var(--accent);
        font-size: 17px;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,.12);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* ================================================= STATISTIK-ZEILEN ================================================= */
    #modalOverlay .summaryStat {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        box-sizing: border-box;
    }
    #modalOverlay .summaryStat span {
        min-width: 0;
        font-size: 11px;
    }
    #modalOverlay .summaryStat strong {
        flex: 0 0 auto;
        font-size: 16px;
    }
    /* ================================================= LEG-TABELLE HEADER ================================================= */
    #modalOverlay .summaryLegHeader {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        grid-template-columns: minmax(0, 1fr)
            38px
            minmax(0, 1fr);
        height: 24px;
        min-height: 24px;
        font-size: 11px;
    }
    /* ================================================= LEG-ZEILEN ================================================= */
    #modalOverlay .summaryLegRow {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        grid-template-columns: minmax(0, 1fr)
            38px
            minmax(0, 1fr);
        min-height: 25px;
        height: 25px;
    }
    #modalOverlay .summaryLegCell {
        min-width: 0;
        overflow: hidden;
    }
    /* ================================================= LEG-NUMMER ================================================= */
    #modalOverlay .summaryLegNo {
        width: 38px;
        flex: 0 0 38px;
        font-size: 11px;
    }
    /* ================================================= GEWINNER ================================================= */
    #modalOverlay .summaryWinner {
        width: 38px;
        min-width: 38px;
        height: 20px;
        font-size: 12px;
    }
    /* ================================================= RESTPUNKTE ================================================= */
    #modalOverlay .summaryRemaining {
        min-width: 38px;
        height: 20px;
        font-size: 12px;
    }
}
/* ===================================================== SEHR SCHMALE SMARTPHONES ===================================================== */
@media (max-width: 400px) {
    #modalOverlay {
        padding: 5px;
    }
    #modalOverlay .modal {
        max-height: calc(100dvh - 10px);
        border-radius: 10px;
    }
    #modalOverlay .modalHeader {
        min-height: 52px;
        padding: 8px 10px;
    }
    #modalOverlay .modalHeader button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 23px;
    }
    #modalOverlay #modalBody {
        padding: 10px;
    }
    #modalOverlay .summaryHeader {
        grid-template-columns: minmax(0, 1fr)
            auto
            minmax(0, 1fr);
        gap: 5px;
        margin-bottom: 12px;
    }
    #modalOverlay .summaryPlayer:first-child, #modalOverlay .summaryPlayer:last-child {
        font-size: 13px;
    }
    #modalOverlay .summaryScore {
        font-size: 24px;
    }
    #modalOverlay .summaryLabel {
        font-size: 8px;
    }
    #modalOverlay .summaryMobilePlayer {
        font-size: 16px;
        margin-bottom: 5px;
        padding-bottom: 6px;
    }
    #modalOverlay .summarySide {
        padding: 7px 8px;
    }
    #modalOverlay .summaryStat {
        min-height: 38px;
    }
    #modalOverlay .summaryStat span {
        font-size: 10px;
    }
    #modalOverlay .summaryStat strong {
        font-size: 15px;
    }
    #modalOverlay .summaryLegHeader, #modalOverlay .summaryLegRow {
        grid-template-columns: minmax(0, 1fr)
            34px
            minmax(0, 1fr);
    }
    #modalOverlay .summaryLegNo {
        width: 34px;
        flex-basis: 34px;
    }
    #modalOverlay .summaryWinner {
        width: 34px;
        min-width: 34px;
    }
    #modalOverlay .summaryRemaining {
        min-width: 34px;
    }
}
/* ===================================================== HSL – MATCH-MODAL KOMPLETT RESPONSIV ===================================================== */
/* ===================================================== MODAL – GRUNDLAGE ===================================================== */
#modalOverlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    box-sizing: border-box;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .72);
    z-index: 2000;
    overflow: hidden;
}
/* ===================================================== MODAL-CONTAINER ===================================================== */
#modalOverlay .modal {
    position: relative;
    width: min(900px, 100%);
    max-width: 900px;
    max-height: calc(100dvh - 32px);
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
/* ===================================================== MODAL HEADER ===================================================== */
#modalOverlay .modalHeader {
    position: relative;
    z-index: 10;
    flex: 0 0 auto;
    min-height: 58px;
    padding: 10px 16px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #111;
    color: var(--accent);
    border-bottom: 3px solid var(--accent);
    font-size: 20px;
    font-weight: bold;
}
/* ===================================================== SCHLIESSEN-BUTTON ===================================================== */
#modalOverlay #modalClose {
    position: relative;
    z-index: 20;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
#modalOverlay #modalClose:hover {
    background: #2a2a2a;
    color: var(--accent);
}
/* ===================================================== MODAL BODY ===================================================== */
#modalOverlay #modalBody {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
/* ===================================================== MATCH SUMMARY ===================================================== */
#modalOverlay .matchSummary {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    box-sizing: border-box;
}
/* ===================================================== SPIELER + ENDSTAND ===================================================== */
#modalOverlay .summaryHeader {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr)
        auto
        minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin: 0 0 18px;
}
#modalOverlay .summaryPlayer {
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#modalOverlay .summaryPlayer:first-child {
    justify-content: flex-start;
    text-align: left;
}
#modalOverlay .summaryPlayer:last-child {
    justify-content: flex-end;
    text-align: right;
}
/* ===================================================== ENDSTAND ===================================================== */
#modalOverlay .summaryScoreBlock {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    text-align: center;
}
#modalOverlay .summaryLabel {
    margin-bottom: 4px;
    color: #8f8f8f;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
#modalOverlay .summaryScore {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
/* ===================================================== INHALT GROSSER BILDSCHIRM: Heim | Legtabelle | Gast ===================================================== */
#modalOverlay .summaryContent {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0;
}
/* Heim-Statistik */
/* Legtabelle */
/* Gast-Statistik */
/* ===================================================== DESKTOP – HEIM | LEGS | GAST ===================================================== */
#modalOverlay .summaryContent {
    display: grid;
    grid-template-columns: minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(0, 1fr);
    grid-template-areas: "home legs guest";
    gap: 12px;
}
/* Heim-Statistik */
#modalOverlay .summaryContent > .summarySide:nth-child(1) {
    grid-area: home;
}
/* Legtabelle */
#modalOverlay .summaryContent > .summaryLegs {
    grid-area: legs;
}
/* Gast-Statistik */
#modalOverlay .summaryContent > .summarySide:nth-child(3) {
    grid-area: guest;
}
/* Alle drei Spalten gleich breit */
#modalOverlay .summaryContent > * {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
/* ===================================================== STATISTIK-BOXEN ===================================================== */
#modalOverlay .summarySide {
    width: 100%;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: #2c2c2c;
}
/* ===================================================== SPIELERNAME ===================================================== */
#modalOverlay .summaryMobilePlayer {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 0 6px;
    padding: 5px 4px 7px;
    color: var(--accent);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.12);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* ===================================================== STATISTIK-ZEILEN ===================================================== */
#modalOverlay .summaryStat {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
#modalOverlay .summaryStat:last-child {
    border-bottom: none;
}
#modalOverlay .summaryStat span {
    min-width: 0;
    color: #bbb;
    font-size: 13px;
}
#modalOverlay .summaryStat strong {
    flex: 0 0 auto;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}
/* ===================================================== LEGTABELLE ===================================================== */
#modalOverlay .summaryLegs {
    flex: none;
    min-width: 0;
    border: 1px solid #4a4a4a;
    border-radius: 14px;
    padding: 8px 12px;
    box-sizing: border-box;
    background: #2c2c2c;
}
/* ===================================================== LEGTABELLE HEADER ===================================================== */
#modalOverlay .summaryLegHeader {
    width: 100%;
    min-width: 0;
    height: 30px;
    min-height: 30px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr)
        42px
        minmax(0, 1fr);
    align-items: center;
    padding: 0 2px 5px;
    border-bottom: 2px solid #555;
    color: #999;
    font-size: 13px;
    font-weight: 600;
}
#modalOverlay .summaryHeadPlayer {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#modalOverlay .summaryHeadPlayer:first-child {
    text-align: left;
}
#modalOverlay .summaryHeadPlayer:last-child {
    text-align: right;
}
#modalOverlay .summaryHeadLeg {
    text-align: center;
}
/* ===================================================== LEGTABELLE ZEILEN ===================================================== */
#modalOverlay .summaryLegRow {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    height: 32px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr)
        42px
        minmax(0, 1fr);
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid #444;
}
#modalOverlay .summaryLegRow:last-child {
    border-bottom: none;
}
#modalOverlay .summaryLegCell {
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}
#modalOverlay .summaryLegCell:first-child {
    justify-content: flex-start;
}
#modalOverlay .summaryLegCell:last-child {
    justify-content: flex-end;
}
#modalOverlay .summaryLegNo {
    width: 42px;
    min-width: 42px;
    text-align: center;
    color: #999;
    font-size: 12px;
}
#modalOverlay .summaryWinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 22px;
    border-radius: 6px;
    background: #37963f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
#modalOverlay .summaryRemaining {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 22px;
    color: #999;
    font-size: 13px;
}
/* ===================================================== KLEINER LAPTOP / TABLET Ab 900px abwärts: untereinander ===================================================== */
@media (max-width: 900px) {
    #modalOverlay {
        align-items: flex-start;
        padding: 10px;
    }
    #modalOverlay .modal {
        width: 100%;
        max-width: 680px;
        max-height: calc(100dvh - 20px);
    }
    #modalOverlay .modalHeader {
        min-height: 54px;
        padding: 8px 12px;
        font-size: 18px;
    }
    #modalOverlay #modalBody {
        padding: 12px;
    }
    #modalOverlay .summaryPlayer {
        font-size: 18px;
    }
    #modalOverlay .summaryScore {
        font-size: 34px;
    }
    #modalOverlay .summaryContent {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    #modalOverlay .summaryContent > .summaryLegs {
        order: 1;
    }
    #modalOverlay .summaryContent > .summarySide:nth-child(1) {
        order: 2;
    }
    #modalOverlay .summaryContent > .summarySide:nth-child(3) {
        order: 3;
    }
}
/* ===================================================== SMARTPHONE ===================================================== */
@media (max-width: 600px) {
    #modalOverlay {
        padding: 6px;
    }
    #modalOverlay .modal {
        max-width: 100%;
        max-height: calc(100dvh - 12px);
    }
    #modalOverlay .modalHeader {
        min-height: 52px;
        padding: 7px 10px;
        font-size: 17px;
    }
    #modalOverlay #modalClose {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 23px;
    }
    #modalOverlay #modalBody {
        padding: 10px;
    }
    #modalOverlay .summaryHeader {
        grid-template-columns: minmax(0, 1fr)
            auto
            minmax(0, 1fr);
        gap: 6px;
        margin-bottom: 12px;
    }
    #modalOverlay .summaryPlayer {
        font-size: 14px;
    }
    #modalOverlay .summaryScore {
        font-size: 28px;
    }
    #modalOverlay .summaryLabel {
        font-size: 8px;
        letter-spacing: 1px;
    }
    #modalOverlay .summaryContent {
        gap: 8px;
    }
    #modalOverlay .summarySide {
        padding: 7px 9px;
        border-radius: 10px;
    }
    #modalOverlay .summaryMobilePlayer {
        font-size: 16px;
        margin-bottom: 5px;
        padding: 4px 3px 6px;
    }
    #modalOverlay .summaryStat {
        min-height: 38px;
        gap: 8px;
    }
    #modalOverlay .summaryStat span {
        font-size: 11px;
    }
    #modalOverlay .summaryStat strong {
        font-size: 15px;
    }
    #modalOverlay .summaryLegs {
        padding: 6px 8px;
        border-radius: 10px;
    }
    #modalOverlay .summaryLegHeader {
        grid-template-columns: minmax(0, 1fr)
            36px
            minmax(0, 1fr);
        height: 24px;
        min-height: 24px;
        font-size: 10px;
    }
    #modalOverlay .summaryLegRow {
        grid-template-columns: minmax(0, 1fr)
            36px
            minmax(0, 1fr);
        min-height: 27px;
        height: 27px;
    }
    #modalOverlay .summaryLegNo {
        width: 36px;
        min-width: 36px;
        font-size: 10px;
    }
    #modalOverlay .summaryWinner {
        width: 36px;
        min-width: 36px;
        height: 20px;
        font-size: 11px;
    }
    #modalOverlay .summaryRemaining {
        min-width: 36px;
        height: 20px;
        font-size: 11px;
    }
}
/* ===================================================== SEHR KLEINES SMARTPHONE ===================================================== */
@media (max-width: 400px) {
    #modalOverlay {
        padding: 4px;
    }
    #modalOverlay .modal {
        max-height: calc(100dvh - 8px);
    }
    #modalOverlay .modalHeader {
        min-height: 50px;
        padding: 6px 8px;
    }
    #modalOverlay #modalClose {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        font-size: 22px;
    }
    #modalOverlay #modalBody {
        padding: 8px;
    }
    #modalOverlay .summaryPlayer {
        font-size: 12px;
    }
    #modalOverlay .summaryScore {
        font-size: 24px;
    }
    #modalOverlay .summaryLabel {
        font-size: 7px;
    }
    #modalOverlay .summarySide {
        padding: 6px 7px;
    }
    #modalOverlay .summaryMobilePlayer {
        font-size: 15px;
    }
    #modalOverlay .summaryStat {
        min-height: 36px;
    }
    #modalOverlay .summaryStat span {
        font-size: 10px;
    }
    #modalOverlay .summaryStat strong {
        font-size: 14px;
    }
    #modalOverlay .summaryLegHeader {
        grid-template-columns: minmax(0, 1fr)
            32px
            minmax(0, 1fr);
        font-size: 9px;
    }
    #modalOverlay .summaryLegRow {
        grid-template-columns: minmax(0, 1fr)
            32px
            minmax(0, 1fr);
    }
    #modalOverlay .summaryLegNo {
        width: 32px;
        min-width: 32px;
    }
    #modalOverlay .summaryWinner {
        width: 32px;
        min-width: 32px;
        font-size: 10px;
    }
    #modalOverlay .summaryRemaining {
        min-width: 32px;
        font-size: 10px;
    }
}
/* ===================================================== HSL MATCH – FINALES SCOREBOARD RESPONSIVE OVERRIDE Version 2026-08 ===================================================== */
/* ===================================================== SPIELERKARTEN – INHALT IMMER INNERHALB ===================================================== */
/* ===================================================== SPIELERNAME ===================================================== */
/* ===================================================== SPIELERSTATISTIK ===================================================== */
/* ===================================================== LETZTE AUFNAHME / RÜCKNAHME ===================================================== */
/* ===================================================== AKTIVER SPIELER – DEUTLICHER HERVORHEBEN ===================================================== */
/* Aktiver Spielername */
/* Gegner etwas zurücknehmen */
/* ===================================================== MITTELBEREICH ===================================================== */
/* FIRST TO – etwas kompakter */
/* ===================================================== EINGABE Die Überschrift "EINGABE" wird entfernt. ===================================================== */
/* ===================================================== NUMMERNBLOCK ===================================================== */
/* ===================================================== AKTIONSBUTTONS ===================================================== */
/* Ausgegraute Aktionsbuttons */
/* ===================================================== TABLET 901px – 1180px ===================================================== */
@media (min-width:901px) and (max-width:1180px) {
    /* ------------------------------------------------- Spielerkarte ------------------------------------------------- */
    /* ------------------------------------------------- Nummernblock ------------------------------------------------- */
    /* ------------------------------------------------- Center-Abstände ------------------------------------------------- */
}
/* ===================================================== SMARTPHONE max-width:900px ===================================================== */
@media (max-width:900px) {
    /* ----------------------------------------------- CENTER ----------------------------------------------- */
    /* ----------------------------------------------- NUMMERN ----------------------------------------------- */
}
/* ===================================================== SEHR SCHMALES SMARTPHONE ===================================================== */

/* =====================================================
   HSL MATCH-SCOREBOARD
   Finales, viewport-füllendes Layout für Desktop und Tablet.
   Das Scoreboard selbst scrollt nicht und darf nichts abschneiden.
===================================================== */

/* Nur während eines laufenden Matches nutzt das Scoreboard den kompletten Viewport. */
main:has(.matchScreen) {
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0;
    padding: 0;
}

body:has(.matchScreen) footer {
    display: none;
}

.matchScreen {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    padding: 0;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.matchHeader {
    display: none;
}

.matchMain {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    align-items: stretch;
}

.playerPanel,
.centerPanel {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

.playerPanel {
    position: relative;
    padding: clamp(10px, 1vw, 16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #2b2b2b;
    border: 2px solid #3b3b3b;
    border-radius: 14px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.playerPanel.active {
    background: #42515C;
    border-color: var(--accent);
    box-shadow: 0 0 24px rgba(255, 152, 0, .22);
    transform: translateY(-2px);
}

.playerPanel:not(.active) .playerName,
.playerPanel:not(.active) .playerScore {
    color: #999;
}

.playerPanel.active .playerName {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(255, 152, 0, .3);
}

.playerName {
    flex: 0 0 auto;
    min-width: 0;
    margin: 0 0 clamp(4px, .5vw, 8px);
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent);
    font-size: clamp(28px, 2.8vw, 50px);
    font-weight: 700;
    line-height: 1.05;
}

.playerScore {
    flex: 0 0 auto;
    margin: 0;
    text-align: center;
    color: #fff;
    font-size: clamp(72px, 6vw, 120px);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -2px;
}

.playerPanel:not(.active) .playerScore {
    color: #999;
}

.playerLabel {
    flex: 0 0 auto;
    margin: 5px 0 6px;
    text-align: center;
    color: #9b9b9b;
    font-size: clamp(11px, 1vw, 13px);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.playerStats {
    width: 100%;
    min-width: 0;
    margin-top: 2px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #252525;
    border-radius: 10px;
    overflow: hidden;
}

.playerStats td {
    padding: clamp(4px, .45vw, 7px) clamp(6px, .6vw, 9px);
    border-bottom: 1px solid #3a3a3a;
    color: #bbb;
    font-size: clamp(12px, 1.15vw, 15px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playerStats td:last-child {
    text-align: right;
    color: #fff;
    font-weight: 700;
}

.playerStats tr:last-child td {
    border-bottom: 0;
}

.lastVisit {
    width: 100%;
    margin-top: auto;
    padding: clamp(6px, .6vw, 8px) clamp(8px, .7vw, 10px);
    box-sizing: border-box;
    flex: 0 0 auto;
    background: #242424;
    border: 1px solid #3a3a3a;
    border-radius: 9px;
}

.lastVisitRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: clamp(20px, 1.7vw, 24px);
}

.lastVisitRow + .lastVisitRow {
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid #3a3a3a;
}

.lastVisitLabel {
    color: #a8a8a8;
    font-size: clamp(9px, .85vw, 11px);
    letter-spacing: .5px;
    text-transform: uppercase;
}

.lastVisitNumber {
    color: #fff;
    font-size: clamp(14px, 1.15vw, 16px);
    font-weight: 700;
}

.centerPanel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.matchModeCard,
.scoreInputCard {
    flex: 0 0 auto;
    background: #242424;
    border: 2px solid #3b3b3b;
}

.matchModeCard {
    padding: clamp(6px, .6vw, 8px) clamp(10px, .8vw, 12px);
    border-radius: 12px;
    text-align: center;
}

.matchModeTitle {
    margin: 0;
    color: #9d9d9d;
    font-size: clamp(9px, .7vw, 11px);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.matchLegScore {
    margin-top: 2px;
    color: #fff;
    font-size: clamp(44px, 3.2vw, 56px);
    font-weight: 800;
    line-height: 1;
}

.scoreInputCard {
    min-height: clamp(66px, 7vh, 82px);
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    text-align: center;
}

.scoreInputLabel {
    display: none;
}

.scoreInputValue {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 2.2vw, 36px);
    font-weight: 800;
    line-height: 1;
}

.remainingAfter {
    margin-top: 4px;
    color: #8dd35f;
    font-size: clamp(11px, .85vw, 13px);
    font-weight: 600;
}

#keypadPanel {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.numberPad {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr)) minmax(0, .62fr);
    gap: 6px;
}

.numberPad button {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #323232;
    color: #fff;
    font-family: inherit;
    font-size: clamp(26px, 2.4vw, 42px);
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .15s, box-shadow .15s;
}

.numberPad button:hover {
    background: #454545;
    transform: translateY(-1px);
}

.numberPad button:active {
    transform: scale(.97);
}

.numberPad button.actionButton {
    font-size: clamp(15px, 1.3vw, 22px);
}

.numberPad button.actionButton.check,
.numberPad .ok.ready {
    background: #4f8f58;
    color: #fff;
}

.numberPad button.actionButton.check:hover,
.numberPad .ok.ready:hover {
    background: #5da468;
}

.numberPad button.actionButton.bust {
    background: #a95353;
}

.numberPad button.actionButton.bust:hover {
    background: #bd6262;
}

.numberPad button.actionButton.undo {
    background: #4e78b8;
}

.numberPad button.actionButton.undo:hover {
    background: #5d89ca;
}

.numberPad button.actionButton:disabled {
    background: #555 !important;
    color: #999 !important;
    border-color: #555 !important;
    opacity: .65;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* ---------- REST ---------- */

.numberPad button.actionButton.rest {
    background: #4f8f58;
    color: #fff;
}

.numberPad button.actionButton.rest:hover {
    background: #5da468;
}

/* =====================================================
   TABLET / KLEINER DESKTOP
   Gleiche 3-Spalten-Struktur, aber kompaktere Spielerinhalte.
===================================================== */
@media (min-width: 901px) and (max-width: 1180px) {
    .matchScreen {
        height: calc(100dvh - 54px);
    }

    .matchMain {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    }

    .playerPanel {
        padding: 8px;
    }

    .playerName {
        font-size: clamp(26px, 3.4vw, 38px);
    }

    .playerScore {
        font-size: clamp(68px, 7vw, 100px);
    }

    .playerLabel {
        margin: 3px 0 4px;
    }

    .playerStats td {
        padding: clamp(3px, .5vw, 6px) clamp(5px, .7vw, 8px);
        font-size: clamp(11px, 1.3vw, 14px);
    }

    .lastVisit {
        padding: 5px 7px;
    }

    .lastVisitRow {
        min-height: 19px;
    }

    .lastVisitLabel {
        font-size: clamp(8px, .85vw, 10px);
    }

    .lastVisitNumber {
        font-size: clamp(13px, 1.1vw, 15px);
    }

    .numberPad button {
        font-size: clamp(24px, 2.7vw, 34px);
    }

    .numberPad button.actionButton {
        font-size: clamp(14px, 1.5vw, 19px);
    }
}

/* =====================================================
   SMARTPHONE
   Hier bleibt das bisherige untereinander angeordnete Layout.
===================================================== */
@media (max-width: 900px) {
    .matchScreen {
        width: 100%;
        max-width: 760px;
        height: auto;
        min-height: 0;
        margin: 4px auto 0;
        padding: 0;
        overflow: visible;
    }

    .matchMain {
        height: auto;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .playerPanel {
        height: auto;
        min-height: 0;
        padding: 14px;
        overflow: visible;
    }

    .centerPanel {
        height: auto;
        min-height: 0;
        order: 2;
        overflow: visible;
    }

    .matchMain .playerPanel:first-child { order: 1; }
    .matchMain .playerPanel:last-child { order: 3; }

    #keypadPanel {
        flex: 0 0 auto;
        overflow: visible;
    }

    .numberPad {
        height: auto;
        grid-template-rows: none;
    }

    .numberPad button {
        height: 54px;
        font-size: 26px;
    }

    .numberPad button.actionButton {
        height: 54px;
        font-size: 19px;
    }
}

@media (max-width: 600px) {
    .matchScreen {
        width: 100%;
        max-width: 100%;
    }

    .playerPanel {
        padding: 10px;
        border-radius: 12px;
    }

    .playerName {
        font-size: 21px;
    }

    .playerScore {
        font-size: clamp(58px, 20vw, 78px);
    }

    .playerLabel {
        margin-bottom: 8px;
        font-size: 12px;
    }

    .playerStats td {
        padding: 6px 7px;
        font-size: 13px;
    }

    .lastVisit {
        padding: 7px 8px;
    }

    .lastVisitLabel {
        font-size: 10px;
    }

    .lastVisitNumber {
        font-size: 14px;
    }

    .matchLegScore {
        font-size: 44px;
    }

    .scoreInputCard {
        min-height: 58px;
        padding: 6px 10px;
    }

    .scoreInputValue {
        font-size: 30px;
    }

    .numberPad {
        gap: 6px;
    }

    .numberPad button {
        height: 52px;
        border-radius: 9px;
        font-size: 23px;
    }

    .numberPad button.actionButton {
        font-size: 18px;
    }
}

@media (max-width: 400px) {
    .playerPanel {
        padding: 9px;
        border-radius: 10px;
    }

    .playerName {
        font-size: 19px;
    }

    .playerScore {
        font-size: clamp(54px, 19vw, 72px);
    }

    .playerStats td {
        padding: 5px 6px;
        font-size: 12px;
    }

    .numberPad {
        gap: 5px;
    }

    .numberPad button {
        height: 48px;
        font-size: 21px;
    }

    .numberPad button.actionButton {
        height: 48px;
        font-size: 17px;
    }
}

/* =====================================================
   TOP 20 – STATISTIK-DROPDOWNS
===================================================== */

.statisticsCards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );
    gap: 14px;
}


.statisticsCardHeader {
    min-height: 64px;
    padding: 10px 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #333;
    border-bottom: 1px solid #444;
}


.statisticsRecordSelect {
    width: 100%;
    height: 42px;

    margin: 0;

    padding: 0 12px;

    background: #3a3a3a;
    color: #fff;

    border: 1px solid #555;
    border-radius: 8px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}


.statisticsRecordSelect:focus {
    outline: none;
    border-color: var(--accent);
}


.statisticsRecordSelect option {
    background: #2f2f2f;
    color: #fff;
}


.statisticsRecordSelect option:disabled {
    color: #777;
}


/* =====================================================
   TOP 20 – TABLET
===================================================== */

@media (max-width: 900px) {

    .statisticsCards {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/* =====================================================
   TOP 20 – SMARTPHONE
===================================================== */

@media (max-width: 600px) {

    .statisticsCards {
        grid-template-columns: 1fr;
        gap: 10px;
    }


    .statisticsRecordSelect {
        height: 42px;
        font-size: 14px;
    }

}
