/* ==========================================================================
   0. DESIGN-SYSTEM & VARIABLEN (:root)
   Gefüttert aus den 3 getesteten Beispieldateien
   ========================================================================== */
:root {
    --bg-main: #121412;
    --bg-card: #1c2018;
    --bg-card-subtle: #222620;
    --bg-card-header: #282c24;
    --border-color: #3a4034;
    --border-input: #454d3e;
    
    --color-text: #e8ebe4;
    --color-text-muted: #a8b09a;
    --color-text-dim: #7a8270;
    
    --color-primary: #7d9159;
    --color-secondary: #a8b89a;
    
    /* Status-Badges & Formkurve */
    --bg-success-badge: #1a2a1a;
    --color-success-text: #81c784;
    --border-success: #2e7d32;
    
    --bg-danger-badge: #2a1a1a;
    --color-danger-text: #e57373;
    --border-danger: #c62828;
}

/* ==========================================================================
   1. BASIS-EINSTELLUNGEN & RESET
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-gutter: stable;
}

body {
    background-color: var(--bg-main);
    color: var(--color-text);
    font-family: Arial, sans-serif;
    line-height: 1.5;
    padding: 20px;
}

/* ==========================================================================
   2. REUSE-ELEMENTE & TEXTE (Überschriften, Links, Fehler)
   ========================================================================== */
h1, h2 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 { font-size: 1.25rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1.0rem; }

a {
    color: var(--color-secondary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary);
}

.fehlermeldung {
    background-color: #2a0a0a;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.flash-msg,
.flash-message {
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 0.95rem;
    margin: 0 0 20px;
    font-weight: bold;
}

.flash-msg.success,
.flash-message.success {
    background-color: var(--bg-success-badge);
    color: var(--color-success-text);
    border: 1px solid var(--border-success);
}

.flash-msg.error,
.flash-message.error {
    background-color: var(--bg-danger-badge);
    color: var(--color-danger-text);
    border: 1px solid var(--border-danger);
}

/* ==========================================================================
   3. LOGO-BEREICH
   ========================================================================== */
.logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.logo-link {
    display: inline-block;
    line-height: 0;
}

.logo-link:hover .logo {
    opacity: 0.85;
}

.logo {
    max-width: 100%;
    height: auto;
    max-height: 100px;
}

/* ==========================================================================
   4. FORMULARE & BUTTONS (Login & Admin)
   ========================================================================== */
.login-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--color-primary);
    border-radius: 6px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 40px auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.form-gruppe {
    margin-bottom: 15px;
}

.form-gruppe label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text);
    font-size: 0.9rem;
}

.form-hinweis {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

input[type="text"],
input[type="email"], 
input[type="password"], 
select,
textarea {
    width: 100%;
    padding: 10px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-input);
    color: #FFFFFF;
    font-size: 1rem;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    min-height: 220px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.recht-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.recht-editor-toolbar .admin-btn {
    width: auto;
    min-height: 34px;
    height: auto;
    padding: 8px 12px;
}

.recht-editor {
    min-height: 260px;
    padding: 12px;
    overflow-y: auto;
    background-color: var(--bg-main);
    border: 1px solid var(--border-input);
    color: #FFFFFF;
    line-height: 1.5;
    border-radius: 4px;
}

.recht-editor:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 1px;
}

.farb-einstellungen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.farb-einstellungen legend {
    padding: 0 6px;
    color: var(--color-secondary);
    font-weight: bold;
}

.farb-feld {
    margin-bottom: 0;
}

.logo-einstellungen {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.logo-einstellungen legend {
    padding: 0 6px;
    color: var(--color-secondary);
    font-weight: bold;
}

.logo-vorschau {
    text-align: center;
    margin-bottom: 15px;
}

.logo-vorschau-bild {
    max-width: 100%;
    height: auto;
    max-height: 100px;
}

.logo-upload-formular,
.logo-reset-formular {
    margin-top: 12px;
}

.logo-upload-formular .admin-btn,
.logo-reset-formular .admin-btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: block;
}

.einstellungen-theme-aktionen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 24px 0 40px;
}

.einstellungen-speichern-unten {
    margin-top: 30px;
}

input[type="color"] {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 3px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-input);
    border-radius: 4px;
    cursor: pointer;
}

input[type="submit"] {
    width: 100%;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
}

input[type="submit"]:hover {
    background-color: var(--color-secondary);
    color: var(--bg-main);
}

/* ==========================================================================
   5. NAVIGATION & MENÜ-STRUKTUR (Mobile-First / Card-Look)
   ========================================================================== */
.haupt-header {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--color-primary);
    border-radius: 6px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.benutzer-info {
    color: var(--color-secondary);
    font-size: 0.95rem;
    font-weight: bold;
}

.benutzer-info .admin-rolle-hinweis {
    margin-left: 6px;
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--color-secondary);
    text-decoration: none;
}

.benutzer-info a.admin-rolle-hinweis:hover {
    color: var(--color-primary);
}

.nav-toggle { display: none; }

.nav-toggle-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.nav-toggle-label span, 
.nav-toggle-label span::before, 
.nav-toggle-label span::after {
    display: block;
    background: var(--color-primary);
    height: 3px;
    width: 25px;
    position: relative;
    transition: all 0.2s ease-in-out;
    border-radius: 2px;
}

.nav-toggle-label span::before, 
.nav-toggle-label span::after { 
    content: ''; 
    position: absolute; 
}

.nav-toggle-label span::before { top: -8px; }
.nav-toggle-label span::after { bottom: -8px; }

.haupt-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    z-index: 100;
    box-shadow: 0 6px 15px rgba(0,0,0,0.7);
    overflow: hidden;
}

.haupt-nav ul { list-style: none; }

.haupt-nav .nav-link {
    display: block;
    padding: 14px 18px;
    color: var(--color-text);
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.haupt-nav li:last-child .nav-link {
    border-bottom: none;
}

.haupt-nav .nav-link:hover, 
.haupt-nav .nav-link.aktiv {
    color: var(--color-secondary);
    background-color: var(--bg-card-subtle);
}

.haupt-nav .logout-link { color: var(--color-primary); }

.nav-toggle:checked ~ .haupt-nav { display: block; }
.nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
.nav-toggle:checked ~ .nav-toggle-label span::before { transform: rotate(45deg); top: 0; }
.nav-toggle:checked ~ .nav-toggle-label span::after { transform: rotate(-45deg); bottom: 0; }

/* ==========================================================================
   6. TABELLEN-DESIGN (Dunkles Theme aus Prototype 1)
   ========================================================================== */
.tabelle-responsive {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card);
    color: var(--color-text);
    text-align: left;
    font-size: 0.95rem;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

tr {
    background-color: var(--bg-card);
}

tr:nth-child(even) {
    background-color: var(--bg-card-subtle);
}

th {
    background-color: var(--bg-card-header);
    color: var(--color-text);
    font-weight: bold;
    border-bottom: 2px solid var(--color-primary);
}

table th:nth-child(2), table td:nth-child(2) {
    width: 65px;
    text-align: center;
    font-size: 0.85rem;
}

/* Status Badges in Tabellen */
.badge-status {
    background-color: var(--bg-success-badge);
    color: var(--color-success-text);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* ==========================================================================
   7. MEDIA QUERIES (Optimierung für PC / größere Bildschirme)
   ========================================================================== */
@media (min-width: 768px) {
    body {
        padding: 30px;
        max-width: 900px;
        margin: 0 auto;
    }
/* Im bestehenden @media (min-width: 768px) Block einfügen: */
    .filter-zentrale {
        width: 100%;
        max-width: 100%;
    }
  h1 { font-size: 1.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

    .logo {
        width: 320px;
        height: auto;
        max-height: none;
    }

    .nav-toggle-label {
        display: none;
    }

    .haupt-nav {
        display: block !important;
        position: static;
        width: auto;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .haupt-nav ul {
        display: flex;
        gap: 10px;
    }

    .haupt-nav .nav-link {
        padding: 8px 14px;
        border: 1px solid var(--border-input);
        border-radius: 4px;
        background-color: var(--bg-main);
        font-size: 0.88rem;
    }

    .haupt-nav .nav-link:hover,
    .haupt-nav .nav-link.aktiv {
        background-color: var(--color-secondary);
        color: var(--bg-main);
        border-color: var(--color-secondary);
    }
}

/* ==========================================================================
   8. FOOTER-DESIGN
   ========================================================================== */
.haupt-footer {
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-text {
    margin-bottom: 8px;
}

.footer-admin-link {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: bold;
}

.footer-admin-link:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   9. ADMIN & STATISTIK KACHELSYSTEM (Aus Prototype 2)
   ========================================================================== */
.kachel-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.kachel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--color-primary);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.kachel h3 {
    color: #FFFFFF;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.kachel p {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    line-height: 1.4;
    margin-bottom: 20px;
    flex-grow: 1;
}

.kachel-btn {
    display: block;
    text-align: center;
    background-color: #1A1A1A;
    color: var(--color-secondary);
    border: 1px solid var(--border-input);
    padding: 10px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.kachel-btn:hover {
    background-color: var(--color-primary);
    color: #FFFFFF;
}

@media (min-width: 768px) {
    .kachel-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .kachel-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   10. HIGHLIGHTS & AKZENTE IN TABELLEN
   ========================================================================== */
.tc-highlight {
    color: var(--color-primary);
    font-weight: bold;
}

/* ==========================================================================
   11. DESIGN FÜR AKTIONS-LINKS IN TABELLEN
   ========================================================================== */
.action-link {
    color: var(--color-secondary) !important;
    font-weight: bold;
    text-decoration: none;
}

.action-link:hover {
    color: var(--color-primary) !important;
    text-decoration: underline;
}

/* ==========================================================================
   12. DESIGN FÜR PASSIVE MITGLIEDER (Aus Prototype 1)
   ========================================================================== */
.zeile-passiv {
    background-color: var(--bg-card-subtle) !important;
    border-bottom: 1px solid var(--border-color);
    opacity: 0.5;
    color: var(--color-text-dim) !important;
}

.zeile-passiv td {
    color: var(--color-text-dim) !important;
}

/* ==========================================================================
   13. RECHTSTEXTE-DESIGN (Impressum & Datenschutz)
   ========================================================================== */
.recht-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
}

.nav-link-zurueck {
    color: var(--color-secondary);
    font-weight: bold;
    text-decoration: none;
}

.nav-link-zurueck:hover {
    color: var(--color-primary);
}

.recht-einleitung {
    margin-bottom: 20px;
    color: var(--color-text);
}

.recht-sektion {
    margin-bottom: 20px;
}

.recht-titel {
    color: var(--color-primary);
    display: block;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.recht-text {
    color: var(--color-text);
    line-height: 1.5;
}

.recht-link {
    color: var(--color-secondary);
    text-decoration: underline;
}

.recht-link:hover {
    color: var(--color-primary);
}

.recht-fussnote {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 25px;
    line-height: 1.4;
}

/* ==========================================================================
   14. LOGIN RECHTS-LINKS
   ========================================================================== */
.login-recht-links {
    margin-top: 25px;
    text-align: center;
    font-size: 0.8rem;
}

.login-recht-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 5px 10px;
}

.login-recht-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.login-recht-links .trennstrich {
    color: var(--border-color);
}

/* ==========================================================================
   15. MOBILE-FIRST SPIELPLAN & KARTEN
   ========================================================================== */
.spielplan-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.spiel-karte {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.spiel-kommend {
    border-left: 5px solid var(--color-secondary);
}
.karte-neutral {
    border-left: 5px solid var(--border-color);
}

.spiel-erledigt {
    border-left: 5px solid var(--border-color);
    background-color: var(--bg-card-subtle);
}

.spiel-kopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.label {
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--bg-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kat-liga { background-color: var(--color-secondary); }
.kat-pokal { background-color: #FFD700; }
.kat-freundschaft { background-color: var(--color-success-text); }

/* Status-Labels für Mitgliederverwaltung */
.status-aktiv {
    background-color: var(--color-success-text);
    color: #ffffff;
}

.status-passiv {
    background-color: #FFD700;
    color: #111111;
}

.spiel-ort {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    font-weight: bold;
}

.spiel-inhalt {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spiel-datum {
    font-size: 0.85rem;
    color: var(--color-text-dim);
}

.spiel-gegner {
    font-size: 1.1rem;
    color: #FFFFFF;
}

.spiel-ergebnis {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 1.3rem;
    font-weight: bold;
    color: #00FF00;
    text-align: right;
}

.keine-eintraege {
    color: var(--color-text-dim);
    font-style: italic;
    text-align: center;
    padding: 10px;
}

@media (min-width: 768px) {
    .spielplan-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

.spiel-kneipe {
    font-size: 0.85rem;
    color: var(--color-secondary);
    margin-top: 5px;
    font-style: italic;
}

/* ==========================================================================
   16. ADMIN SPIELPLAN-VERWALTUNG
   ========================================================================== */
.admin-spiel-status {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #FFFFFF;
}

.ergebnis-eingetragen {
    color: #00FF00;
}

.ergebnis-offen {
    color: var(--color-text-dim);
    font-style: italic;
}

.admin-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.admin-action-buttons a {
    flex: 1;
    text-align: center;
    border: 1px solid var(--border-color);
    padding: 12px 0;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
}

.btn-ergebnis {
    background-color: var(--color-secondary);
    color: var(--bg-main) !important;
}

.btn-loeschen {
    background-color: var(--color-primary);
    color: #FFFFFF !important;
}

.admin-add-container {
    margin-top: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.admin-add-btn {
    border: 1px solid var(--color-primary);
    width: 100%;
    max-width: 400px;
    display: inline-block;
}

.ergebnis-datum-info {
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 25px;
    text-align: center;
    font-style: italic;
}

/* ==========================================================================
   17. SPIELBERICHT & STATISTIK-EINGABE
   ========================================================================== */
.admin-stat-block {
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
}

.admin-stat-block legend {
    color: var(--color-secondary);
    font-weight: bold;
    padding: 0 5px;
}

.form-gruppe-inline {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 15px;
}

.form-gruppe-mini {
    flex: 1;
    max-width: 110px;
}

.form-gruppe-mini label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-bottom: 5px;
    text-align: center;
}

.form-gruppe-mini input {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    width: 100%;
}

.form-trennzeichen, .partie-vs {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    padding-bottom: 5px;
}

.admin-ausfuell-hinweis {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    font-style: italic;
    margin-bottom: 20px;
    text-align: center;
}

.aufstellung-block {
    margin-bottom: 25px;
}

.aufstellung-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 15px;
}

.aufstellung-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.admin-details {
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-card-subtle);
    padding: 0 15px 15px;
}

.admin-details-summary {
    cursor: pointer;
    font-weight: bold;
    padding: 15px 0;
    color: var(--color-primary);
    list-style: none;
}

.admin-details-summary::before {
    content: '▸ ';
}

.admin-details[open] .admin-details-summary::before {
    content: '▾ ';
}

.admin-details-summary::-webkit-details-marker {
    display: none;
}

.admin-details-kurz {
    font-weight: normal;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.gesamtergebnis-anzeige {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    margin-top: 8px;
}

.gesamtergebnis-trenner {
    font-weight: bold;
    font-size: 1.4rem;
}

.wechsel-block .form-gruppe-inline {
    align-items: flex-end;
    gap: 20px;
}

.kader-status-hinweis {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.spieler-stat-box {
    border: 1px solid var(--border-color);
    background-color: var(--bg-card-subtle);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
}

.spieler-name-legend {
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.1rem;
    background-color: var(--color-primary);
    padding: 3px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.stat-reihen-titel {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--color-secondary);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3px;
}

.partie-eingabe-zeile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.partie-nummer {
    font-size: 0.85rem;
    color: var(--color-text);
    width: 75px;
}

.partie-eingabe-zeile input {
    width: 60px;
    text-align: center;
    padding: 6px;
    font-weight: bold;
}

/* ==========================================================================
   18. WETTBEWERBS-FILTER
   ========================================================================== */
.filter-form-zentriert {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.filter-form-zentriert .form-gruppe {
    width: 100%;
    max-width: 250px;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .filter-form-zentriert {
        flex-direction: row;
        justify-content: center;
    }
}

/* ==========================================================================
   19. ADMIN-HEADER & FILTER-ETAGE
   ========================================================================== */
.admin-filter-etage {
    margin-top: 15px;
    margin-bottom: 30px;
    width: 100%;
}

.admin-nav-links {
    display: flex;
    align-items: center;
}

/* ==========================================================================
   20. OPTIMIERUNG FÜR VEREINS-RANGLISTE (Isoliert für rangliste.php)
   ========================================================================== */
.rangliste-tabelle table th:nth-child(1),
.rangliste-tabelle table td:nth-child(1) {
    width: 35px;
    text-align: center;
}

.rangliste-tabelle table th:nth-child(2),
.rangliste-tabelle table td:nth-child(2) {
    text-align: left;
    width: auto;
}

.rangliste-tabelle table th:nth-child(3),
.rangliste-tabelle table td:nth-child(3),
.rangliste-tabelle table th:nth-child(4),
.rangliste-tabelle table td:nth-child(4) {
    width: 30px;
    text-align: center;
    padding: 8px 2px;
}

.rangliste-tabelle table th:nth-child(5),
.rangliste-tabelle table td:nth-child(5) {
    width: 85px;
    text-align: center;
    padding: 8px 4px;
}

.rangliste-tabelle table td:nth-child(5) span.leg-diff {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

/* ==========================================================================
   21. FORMKURVE (Aus Prototype 3)
   ========================================================================== */
.formkurve-container {
    display: flex;
    gap: 8px;
    margin-top: 5px;
    align-items: center;
}

.form-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: help;
}

.form-sieg {
    background-color: var(--bg-success-badge);
    color: var(--color-success-text);
    border: 1px solid var(--border-success);
}

.form-niederlage {
    background-color: var(--bg-danger-badge);
    color: var(--color-danger-text);
    border: 1px solid var(--border-danger);
}

/* Spezifische Spaltenbreiten für die Saisonverwaltung */
.tabelle-saison .col-name {
    width: 50%;
    min-width: 200px;
}

.tabelle-saison .col-spiele {
    width: 15%;
    text-align: center;
}

.tabelle-saison .col-status {
    width: 15%;
}

.tabelle-saison .col-aktionen {
    width: 20%;
}

.tabelle-responsive table input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.highlight-bereich {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    margin-top: 15px;
}

.highlight-bereich .stat-reihen-titel {
    color: var(--color-secondary);
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ergebnis-link.ergebnis-rueckstand,
.ergebnis-rueckstand {
    color: var(--color-primary) !important;
}

.admin-add-container.sticky-save {
    position: sticky;
    bottom: 15px;
    z-index: 1000;
    margin-top: 20px;
    padding: 0 10px;
}

.admin-add-container.sticky-save .admin-add-btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
    border: 2px solid var(--color-secondary);
}

/* ==========================================================================
   ADMIN AKTIONSLEISTE & BUTTONS (.admin-btn)
   ========================================================================== */
.admin-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px;
}

.admin-action-buttons form {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    background-color: var(--color-secondary);
    color: var(--bg-main);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    box-sizing: border-box;
    cursor: pointer;
    line-height: 1;
    margin: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-btn:hover {
    background-color: var(--color-primary);
    color: #FFFFFF;
}

.admin-btn-danger {
    background-color: var(--color-primary);
    color: #FFFFFF;
}

.admin-btn-danger:hover {
    background-color: var(--color-secondary);
    color: var(--bg-main);
}
.highlight-erfolg {
    font-size: 1.25rem;
    color: #00FF00;
    font-weight: bold;
}

.highlight-info {
    font-size: 1.25rem;
    color: var(--color-secondary);
    font-weight: bold;
}

.highlight-gefahr {
    color: var(--color-primary);
    margin-top: 5px;
    display: block;
}

/* ==========================================================================
   SPIELERSTATISTIK / 100+-VERTEILUNG
   ========================================================================== */
.score-tabelle-100 {
    table-layout: fixed;
    font-size: 0.9rem;
}

.score-tabelle-100 > thead > tr > th,
.score-tabelle-100 > tbody > tr > td {
    width: 25%;
    padding: 7px 6px;
    text-align: center;
    font-size: 0.9rem;
}

.score-tabelle-100 .score-punkte-100 {
    color: var(--color-secondary);
    font-weight: bold;
}

/* ==========================================================================
   SPIELBERICHT / ERGEBNIS-SCOREBOARD
   ========================================================================== */
.spiel-ergebnis {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    padding: 20px 0;
    text-align: center;
    width: 100%;
}

.ergebnis-sieg {
    color: #2e7d32;
}

.ergebnis-niederlage {
    color: #ff0000;
}

.ergebnis-unentschieden {
    color: #f57c00;
}

/* ==========================================================================
   SPIELER-AUFSTELLUNG / LEG-BILANZEN
   ========================================================================== */
.leg-positiv {
    color: #2e7d32;
    font-weight: bold;
}

.leg-negativ {
    color: #ff0000;
    font-weight: bold;
}
.leg-unentschieden {
    color: #f57c00;
    font-weight: bold;
}
/* Gefahrenzone (Trennungsabstand & Warn-Optik) */
.danger-zone {
    margin-top: 40px;
    padding: 20px;
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 8px;
    background-color: rgba(220, 53, 69, 0.05);
}

.danger-zone h2 {
    color: #dc3545;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.danger-zone p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.85;
}

.btn-danger {
    background-color: #dc3545;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.btn-danger:hover {
    background-color: #bd2130;
}

.install-box {
    max-width: 720px;
    margin: 0 auto;
}

.install-fieldset {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 0 0 20px;
    padding: 15px;
}

.install-fieldset legend {
    padding: 0 8px;
    color: var(--color-secondary);
}

/* Container im Footer */
.footer-checkout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--color-primary);
    padding: 4px 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Das ChecKout Grafik-Logo */
.footer-checkout .checkout-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.footer-checkout .checkout-logo-link:hover .checkout-logo {
    opacity: 0.85;
}

.footer-checkout .checkout-logo {
    height: 20px; /* Höhe je nach SVG/Grafik anpassbar */
    width: auto;
    display: block;
}

.footer-version {
    font-size: 0.65rem;
    color: var(--color-text-dim);
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ==========================================================================
   16. ÖFFENTLICHE STARTSEITE (index.php)
   ========================================================================== */
.startseite-main {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 15px 40px;
}

.startseite-ueberschrift {
    font-size: 1.25rem;
    margin: 0 0 16px;
    text-align: center;
}

.startseite-hinweis {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.live-ticker {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--color-primary);
    border-radius: 6px;
    margin-bottom: 28px;
    overflow: hidden;
}

.live-ticker-kopf {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background-color: var(--bg-card-header);
    border-bottom: 1px solid var(--border-color);
}

.live-ticker-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 2px;
    color: var(--color-text-muted);
    line-height: 0;
}

.live-ticker-refresh:hover {
    color: var(--color-primary);
}

.live-ticker-refresh svg {
    display: block;
}

.live-ticker-punkt {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-primary);
    flex-shrink: 0;
    animation: live-dot-blink 2s ease-in-out infinite;
}

@keyframes live-dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.live-ticker-label {
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.live-ticker-board {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 18px 14px;
}

.live-ticker-seite {
    min-width: 0;
}

.live-ticker-seite-rechts {
    text-align: right;
}

.live-ticker-kuerzel {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-ticker-stand {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
}

.live-ticker-zahl {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.live-ticker-trenner {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-text-dim);
    line-height: 1;
}