/* Voting Frontend Styles - v8.3.6 */
/* v5.4.6 - Lehrer entfernt, Danke-Text aktualisiert */
/* v5.4.5 - Impressum: Joshua Fuss ergänzt */
/* v5.4.4 - Impressum erweitert (9 Abschnitte), Startseite-Button */
/* v5.4.3 - Footer sticky, Startseite Text, Session-Sort, Excel Kategorie-Tabs */
/* v5.4.2 - Consent-Overlay blockiert Seite bis Einwilligung */
/* v5.4.1 - Website verlassen: location.replace() */
/* v5.3.9 - Cookie-Banner: Einwilligungs-Dialog mit Zwei-Button-Layout */
/* v5.3.8 - Impressum & Datenschutzerklärung komplett neu */
/* v5.3.7 - Unicode-Fix in PHP-Fehlermeldungen */
/* v5.3.6 - DSGVO Impressum, Stats-Tab Klasse, Sort-Button, Grid-Fix, Fehler-Hinweise */
/* v5.2.6 - Ja/Nein Buttons grün, gelbe Validierung, Scroll-Fix */
/* v5.2.5 - Ja/Nein Buttons grün, Prozent schwarz, Kat16 Design */
/* v5.2.4 - Kategorie-Seite: Stärkerer margin-top mit !important */
/* v5.2.3 - Kategorie-Seite: Negativer margin-top gegen Theme-Abstand */
/* v5.1.9 - CSS-Fix: Prozent-Anzeige auf Platz 1 sichtbar */
/* v5.0.8 - Feedback-Kategorie Header-Farben */
/* v5.0.7 - Mobile-Optimierung, Prozent-Anzeige */

/* v5.0.4: scroll-behavior für Desktop smooth, für Mobile auto */
html {
    scroll-behavior: smooth;
}

@media (hover: none) and (pointer: coarse) {
    /* Touch-Geräte (Mobile) */
    html {
        scroll-behavior: auto;
    }
}

/* v5.0.3: Body-Scroll-Lock OHNE position:fixed - verhindert Zucken */
body.dropdown-open {
    overflow: hidden !important;
    /* KEIN position:fixed mehr - das verursachte das Zucken */
}

/* ========== BASIS ========== */
#voting-login-page,
#voting-erklaerung-page,
#voting-danke-page,
#voting-stats-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
}

/* v5.3.1: Theme "Extendable" setzt großes padding auf <main> via CSS-Variable.
   Wir entfernen es für ALLE Voting-Seiten damit kein Leerraum oben entsteht. */
body.page main.wp-block-group {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* v5.3.1: margin-top auf 0px - Content beginnt direkt unter dem Badge */
#voting-kategorie-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1000px;
    margin: 0 auto 0 auto !important;
    padding: 0 20px 20px 20px !important;
    min-height: 80vh;
}

/* ========== LOGIN SEITE ========== */
.login-container {
    max-width: 420px;
    margin: 40px auto;
    padding: 35px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.login-container h2 {
    text-align: center;
    color: #1a1a2e;
    margin-bottom: 8px;
    font-size: 26px;
}

.help-text {
    text-align: center;
    color: #5a5a7a;
    font-size: 14px;
    margin-bottom: 28px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e8f4fd, #f0f7ff);
    border-radius: 10px;
    border-left: 4px solid #2271b1;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2a2a4a;
    font-size: 14px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 4px rgba(34,113,177,0.1);
}

.error-message {
    background: linear-gradient(135deg, #fee, #fff0f0);
    color: #c00;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    text-align: center;
    border-left: 4px solid #c00;
}

/* ========== BUTTONS ========== */
.btn-primary {
    display: block;
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #2271b1, #1a5a8f);
    color: #fff !important;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 15px rgba(34,113,177,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(34,113,177,0.4);
    background: linear-gradient(135deg, #1a5a8f, #135070);
}

.btn-secondary {
    padding: 14px 28px;
    background: linear-gradient(145deg, #f8f8fa, #eeeef2);
    color: #3a3a5a !important;
    border: 2px solid #e0e0e8;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #eeeef2, #e4e4ea);
    border-color: #c8c8d8;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 4px 15px rgba(220,53,69,0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71d2a);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #218838);
    box-shadow: 0 4px 15px rgba(40,167,69,0.3);
}

/* v4.5.5: Weiter-Button ausgegraut wenn 1. Platz leer */
.btn-disabled,
.btn-primary.btn-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: auto; /* Klick bleibt erlaubt für Validierung */
}

/* NEU v3.4.0: Mini-Buttons für Passwort-Verwaltung */
.btn-mini {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin: 1px;
    transition: all 0.2s ease;
    min-width: 28px;
}

.btn-mini.btn-success {
    background: #28a745;
    color: white;
    box-shadow: none;
}

.btn-mini.btn-success:hover {
    background: #218838;
}

.btn-mini.btn-danger {
    background: #dc3545;
    color: white;
    box-shadow: none;
}

.btn-mini.btn-danger:hover {
    background: #c82333;
}

.btn-mini.btn-warning {
    background: #ffc107;
    color: #000;
    box-shadow: none;
}

.btn-mini.btn-warning:hover {
    background: #e0a800;
}

/* v5.0.2: Primary-Stil für Passwort-ändern Button */
.btn-mini.btn-primary {
    background: #2196F3;
    color: #fff;
    box-shadow: none;
}

.btn-mini.btn-primary:hover {
    background: #1976D2;
}

/* v3.7.0: Admin-Control Mini-Buttons (kleiner als normale Buttons) */
.btn-admin-mini {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-admin-mini.btn-success {
    background: #28a745;
    color: white;
}

.btn-admin-mini.btn-success:hover {
    background: #218838;
}

.btn-admin-mini.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-admin-mini.btn-danger:hover {
    background: #c82333;
}

.btn-admin-mini.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-admin-mini.btn-warning:hover {
    background: #e0a800;
}

/* v4.5.2: Einzelnen Vote löschen Button */
.btn-delete-vote {
    background: #ffebee;
    color: #c62828;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-vote:hover {
    background: #c62828;
    color: white;
    transform: scale(1.1);
}

/* v4.5.2: Session-Separator Styling */
.session-separator td {
    padding: 10px 15px !important;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #000 !important;
    box-shadow: 0 4px 15px rgba(255,193,7,0.3);
}

/* ========== ERKLÄRUNG SEITE ========== */
.erklaerung-container {
    max-width: 620px;
    margin: 30px auto;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    text-align: center;
    position: relative; /* v3.10.0: Für Test-Button Positionierung */
}

.erklaerung-container h2 {
    color: #1a1a2e;
    margin-bottom: 25px;
    font-size: 28px;
}

.erklaerung-text {
    color: #4a4a6a;
    line-height: 1.9;
    text-align: left;
}

.erklaerung-text ol {
    padding-left: 25px;
    margin: 20px 0;
}

.erklaerung-text li {
    margin-bottom: 14px;
    padding-left: 8px;
}

/* v3.10.0: Pflicht-Hinweis ROT */
.erklaerung-text li.pflicht-hinweis,
.erklaerung-text li.pflicht-hinweis strong {
    color: #e74c3c;
}

.erklaerung-container .btn-primary,
.erklaerung-container .btn-large {
    display: inline-block;
    width: auto;
    margin: 0 auto; /* v4.5.5: Zentriert */
}

/* v4.5.5: Buttons Container zentrieren - Fix für Mobile */
.erklaerung-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    text-align: center;
    width: 100%;
}

/* v4.5.5: Buttons zentrieren - auch auf Mobile */
.erklaerung-buttons-centered {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* v4.5.5: Start-Button immer zentriert */
#start-voting-btn {
    display: block;
    margin: 0 auto !important;
    text-align: center;
    max-width: 300px;
}

/* v3.9.3: Test-Button standardmäßig versteckt - nur JS kann ihn für Admins zeigen */
#test-vote-btn {
    display: none !important;
    margin-left: 15px;
}

#test-vote-btn.admin-visible {
    display: inline-block !important;
}

/* v3.10.0: Test-Button oben rechts in der Ecke */
#test-vote-btn.test-btn-corner {
    position: absolute;
    top: 15px;
    right: 15px;
    margin: 0;
    padding: 8px 15px;
    font-size: 13px;
}

#test-vote-btn.test-btn-corner.admin-visible {
    display: block !important;
}

/* ========== KATEGORIE SEITE ========== */
.kategorie-container {
    max-width: 950px;
    margin: 15px auto;
}

.kategorie-header {
    text-align: center;
    margin-bottom: 15px;
}

.kategorie-number {
    display: inline-block;
    background: linear-gradient(135deg, #e8f4fd, #d4e9f7);
    color: #1a5a8f;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kategorie-title {
    font-size: 26px;
    color: #1a1a2e;
    margin: 12px 0 5px;
    font-weight: 700;
}

/* v4.5.6: Pflicht-Hinweis unter Kategorie-Titel */
.kategorie-pflicht-hinweis {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 0 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fff5f5, #ffecec);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    display: inline-block;
}

/* v5.0.8: Feedback-Kategorie - Getauschte Header-Farben */
.kategorie-subtitle-green {
    color: #2e7d32;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 0 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    display: inline-block;
}

.kategorie-title-red {
    font-size: 22px;
    color: #c62828;
    margin: 15px 0 5px;
    font-weight: 700;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

/* ========== PLÄTZE CONTAINER ========== */
.plaetze-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.platz-box {
    background: linear-gradient(145deg, #ffffff, #fafbfc);
    border: 2px solid #e8e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.platz-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ddd, #eee);
    transition: all 0.3s ease;
}

.platz-box:nth-child(1)::before { background: linear-gradient(90deg, #ffd700, #ffec80); }
.platz-box:nth-child(2)::before { background: linear-gradient(90deg, #c0c0c0, #e8e8e8); }
.platz-box:nth-child(3)::before { background: linear-gradient(90deg, #cd7f32, #daa06d); }

.platz-box.selected {
    border-color: #4caf50;
    box-shadow: 0 8px 25px rgba(76,175,80,0.15);
}

.platz-box.selected::before {
    background: linear-gradient(90deg, #4caf50, #66bb6a) !important;
}

.platz-box h3 {
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #3a3a5a;
    font-weight: 600;
}

/* ========== SELECTED TEACHER ========== */
.selected-teacher {
    background: linear-gradient(145deg, #f8f9fa, #f0f2f5);
    border: 2px dashed #d0d0e0;
    border-radius: 12px;
    padding: 18px 15px;
    text-align: center;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.selected-teacher:hover {
    border-color: #2271b1;
    background: linear-gradient(145deg, #f0f7ff, #e8f4fd);
    border-style: solid;
}

.selected-teacher.has-selection {
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
    border: 2px solid #4caf50;
    border-style: solid;
}

.selected-teacher .placeholder {
    color: #8a8aa0;
    font-style: italic;
    font-size: 14px;
}

.selected-teacher .teacher-name {
    font-weight: 600;
    color: #2e7d32;
    font-size: 15px;
    flex: 1;
}

/* v4.2.0: Deselect X perfekt rund */
.selected-teacher .deselect-hint {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    margin-left: 12px;
    opacity: 0.6;
    transition: all 0.2s;
    padding: 0;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.15);
    line-height: 1;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.selected-teacher:hover .deselect-hint {
    opacity: 1;
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.1);
}

/* ========== DROPDOWN ========== */
.teacher-dropdown {
    display: none;
    position: fixed;
    z-index: 1000;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    width: 380px;
    max-height: 420px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
}

.teacher-dropdown.show {
    display: flex;
    flex-direction: column;
}

.dropdown-search {
    padding: 16px 16px 12px 16px;
    background: linear-gradient(145deg, #f8f9fa, #fff);
    border-bottom: 1px solid #eee;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

/* v5.6.5: Suchleiste-Container (direktes Kind von .teacher-dropdown) */
.teacher-dropdown > .search-input {
    width: calc(100% - 32px); /* v5.6.5: Passend zum Padding */
    margin: 16px 16px 12px 16px;
    display: block;
    padding: 10px 14px;
    border: 2px solid #333; /* v4.5.4: Schwarzer Rand */
    outline: 3px solid #fff; /* v4.5.4: Weißer Rahmen außen */
    box-shadow: 0 0 0 1px #ddd; /* v4.5.4: Subtiler äußerer Schatten */
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
    background: #fff;
}

.teacher-dropdown > .search-input:focus {
    outline: none;
    border-color: #2271b1;
    outline: 3px solid rgba(34,113,177,0.2);
    box-shadow: 0 0 0 1px #2271b1;
}

/* ========== TEACHER LIST MIT SCROLL CONTAINMENT ========== */
.teacher-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 280px;
    overscroll-behavior: contain; /* WICHTIG: Verhindert Weiterscrollen der Seite */
    /* v5.0.3: auto statt smooth - smooth verursacht Verzögerung bei schnellem Alphabet-Scroll */
    scroll-behavior: auto;
}

.teacher-list::-webkit-scrollbar {
    width: 8px;
}

.teacher-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.teacher-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.teacher-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* v4.5.4: Alphabet-Überschriften in der Lehrerliste - DEZENTER */
.letter-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #eef1f5 100%);
    color: #666;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 16px;
    border-bottom: 1px solid #ddd;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.teacher-item {
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #3a3a5a;
}

.teacher-item:hover {
    background: linear-gradient(90deg, #f8f9fa, #fff);
    padding-left: 22px;
}

.teacher-item.currently-selected {
    background: linear-gradient(90deg, #e8f5e9, #fff);
    color: #2e7d32;
    font-weight: 600;
    border-left: 4px solid #4caf50;
}

.teacher-item.currently-selected::after {
    content: " ✓";
    color: #4caf50;
}

.teacher-item.disabled {
    background: #fafafa;
    color: #bbb;
    cursor: not-allowed;
}

.teacher-item.disabled::after {
    content: " (vergeben)";
    font-size: 12px;
    font-style: italic;
}

.no-results {
    padding: 30px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* ========== NAVIGATION ========== */
.navigation-buttons,
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 25px;
}

.navigation-buttons .btn-primary,
.navigation-buttons .btn-secondary,
.nav-buttons .btn-primary,
.nav-buttons .btn-secondary {
    flex: 0;  /* Nicht gestreckt */
    width: auto;  /* Natürliche Breite */
}

/* Weiter-Button rechts und klein */
.nav-buttons .btn-primary {
    margin-left: auto;  /* Nach rechts schieben */
}

.validation-message {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #8d6e00;
    padding: 14px 24px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
    font-weight: 500;
}

/* ========== DANKE SEITE ========== */
.danke-container {
    max-width: 500px;
    margin: 50px auto;
    text-align: center;
    padding: 45px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(76,175,80,0.3);
}

.checkmark {
    color: #fff;
    font-size: 50px;
}

.danke-container h2 {
    color: #1a1a2e;
    margin-bottom: 15px;
    font-size: 28px;
}

.close-hint {
    color: #7a7a9a;
    font-style: italic;
    margin: 20px 0;
}

.vote-counter {
    background: linear-gradient(145deg, #e8f4fd, #d4e9f7);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
}

.counter-number {
    font-size: 72px;
    font-weight: 800;
    color: #1a5a8f;
    line-height: 1;
    margin: 10px 0;
}

/* ========== STATS SEITE (NEU) ========== */
#voting-stats-page {
    max-width: 1400px;
}

/* Stats Login (v5.5.0: umbenannt von stats-login-overlay für Adblocker-Kompatibilität) */
.tv-auth-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.stats-login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}

/* v3.10.0: Close-Button für Stats-Login */
.stats-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.stats-close-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.stats-login-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1a1a2e;
}

.stats-login-box input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8f0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.stats-login-box .error {
    color: #c00;
    text-align: center;
    margin-bottom: 10px;
}

/* Stats Header */
.stats-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f5;
}

.stats-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.stats-header p {
    color: #666;
}

/* Stats Navigation Buttons */
.stats-nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stats-nav-buttons .btn-primary,
.stats-nav-buttons .btn-secondary {
    display: inline-block;
    width: auto;
    padding: 12px 24px;
}

/* Stats Tabs */
.stats-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    background: #f5f6f8;
    padding: 8px;
    border-radius: 12px;
}

.stats-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #5a5a7a;
    transition: all 0.2s;
}

.stats-tab:hover {
    background: #e8e8f0;
}

.stats-tab.active {
    background: #2271b1;
    color: #fff;
}

.stats-tab-content {
    display: none;
}

.stats-tab-content.active {
    display: block;
}

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: linear-gradient(145deg, #fff, #f8f9fa);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.stat-number {
    display: block;
    font-size: 42px;
    font-weight: 800;
    color: #2271b1;
    margin-bottom: 8px;
}

.stat-label {
    color: #7a7a9a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Admin Controls */
.admin-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.admin-controls button {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

/* Category Results */
.category-results {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.category-results h3 {
    margin: 0 0 20px 0;
    color: #1a1a2e;
    font-size: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f5;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #5a5a7a;
    font-size: 13px;
    border-bottom: 2px solid #eee;
}

.results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    color: #3a3a5a;
}

.results-table tr:hover {
    background: #fafbfc;
}

/* v3.9.5: Neues Results Tab Design mit Untertabs für 1./2./3. Platz */
.results-subtabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #f0f2f5;
    padding: 6px;
    border-radius: 12px;
}

.results-subtab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.results-subtab:hover {
    background: rgba(255,255,255,0.5);
    color: #333;
}

.results-subtab.active {
    background: white;
    color: #1a1a2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.results-subtab-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Kategorie-Karten für Platzierungen */
.place-category-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f5;
}

.place-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f8;
}

.place-category-header h4 {
    margin: 0;
    color: #1a1a2e;
    font-size: 18px;
    font-weight: 700;
}

.place-votes-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.place-no-results {
    text-align: center;
    padding: 25px 15px;
    color: #999;
    font-style: italic;
    font-size: 14px;
}

/* Ranking Liste */
.place-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.place-ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.2s;
}

.place-ranking-item:hover {
    background: #f0f4ff;
    transform: translateX(3px);
}

.place-ranking-top {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%);
    border: 2px solid #ffd54f;
}

.place-ranking-top:hover {
    background: linear-gradient(135deg, #fff3c4 0%, #fff8e1 100%);
}

.place-rank {
    font-weight: 700;
    color: #888;
    min-width: 28px;
    font-size: 15px;
}

.place-ranking-top .place-rank {
    color: #f9a825;
}

.place-teacher-name {
    flex: 1;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.place-vote-count {
    font-weight: 700;
    color: #667eea;
    font-size: 15px;
    white-space: nowrap;
}

/* Admin Data Tables (v5.5.0: umbenannt von tracking-table für Adblocker-Kompatibilität) */
.tv-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 13px;
}

.tv-data-table th {
    background: #2271b1;
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.tv-data-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-family: 'Consolas', monospace;
}

.tv-data-table tr:nth-child(even) {
    background: #f9f9f9;
}

.tv-data-table tr:hover {
    background: #f0f7ff;
}

/* v6.3.0: content-visibility für massive Tabellen (Alle Votes, Sessions)
   Browser rendert nur sichtbare Zeilen → drastisch weniger Paint/Layout-Arbeit */
#all-votes-table tbody tr,
#sessions-table tbody tr {
    content-visibility: auto;
    contain-intrinsic-size: auto 35px;
}

/* v3.9.5: Session Day Headers */
.session-day-header td {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    padding: 12px 15px !important;
    font-family: inherit !important;
    text-align: left !important;
}

.session-day-header:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* v8.3.5: Tracking Day Headers (dezent grau) */
.tracking-day-header td {
    background: #e8e8e8 !important;
    color: #555 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 8px 15px !important;
    font-family: inherit !important;
    text-align: left !important;
    border-top: 2px solid #bdbdbd !important;
    border-bottom: 1px solid #ccc !important;
}

.tracking-day-header:hover {
    background: #e0e0e0 !important;
}

/* Live Indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8f5e9;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #2e7d32;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ========== RESPONSIVE ========== */
/*
 * #25 Dokumentation der Media Queries:
 * 
 * BREAKPOINTS (Überlappend - kleinere Regeln überschreiben größere):
 * - 1100px: Tablet Landscape → Stats-Summary 2 Spalten
 * - 900px:  Tablet Portrait  → Plätze-Container 1 Spalte, Tabellen scrollbar
 * - 768px:  Mobile Standard  → Reduzierte Padding, kleinere Schrift, Alphabet-Bar
 * - 480px:  Kleine Mobile    → Minimale Padding, Mobile-optimierte Buttons
 * 
 * HINWEIS: Bei 850px Breite greifen BEIDE Regeln (1100px UND 900px).
 * Das ist gewollt - die spezifischere 900px-Regel überschreibt die 1100px-Regel.
 */

/* Viewport Meta - wird im HTML gesetzt, aber hier zur Dokumentation */
/* <meta name="viewport" content="width=device-width, initial-scale=1.0"> */

/* ===== TABLET (bis 1100px) ===== */
/* Greift bei: 768px-1100px (wird von kleineren Queries überschrieben) */
@media (max-width: 1100px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #voting-stats-page {
        padding: 15px;
    }
}

/* ===== KLEINE TABLETS (bis 900px) ===== */
@media (max-width: 900px) {
    .plaetze-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .kategorie-container {
        padding: 0 10px;
    }
    
    .kategorie-title {
        font-size: 22px;
    }
    
    /* Tabellen horizontal scrollbar */
    .results-table,
    .tv-data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== MOBILE (bis 768px) ===== */
@media (max-width: 768px) {
    /* Basis-Container */
    #voting-login-page,
    #voting-erklaerung-page,
    #voting-kategorie-page,
    #voting-danke-page,
    #voting-stats-page {
        padding: 12px;
        min-height: auto;
    }
    
    /* Login */
    .login-container {
        margin: 15px 10px;
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .login-container h2 {
        font-size: 22px;
    }
    
    .help-text {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .form-group select,
    .form-group input {
        padding: 12px 14px;
        font-size: 16px; /* Verhindert iOS Zoom */
    }
    
    /* Erklärung */
    .erklaerung-container {
        margin: 15px 10px;
        padding: 25px 20px;
        padding-top: 55px; /* v3.10.0: Platz für Test-Button */
    }
    
    .erklaerung-container h2 {
        font-size: 22px;
    }
    
    .erklaerung-text {
        font-size: 15px;
        line-height: 1.7;
    }
    
    /* v3.10.0: Pflicht-Hinweis auf Mobile */
    .erklaerung-text li.pflicht-hinweis {
        font-size: 14px;
    }
    
    /* v4.5.0: Mobile-optimierte Cards auf /erklaerung */
    .erklaerung-text > div {
        padding: 12px 14px !important;
        margin-bottom: 10px !important;
        font-size: 14px !important;
    }
    
    .erklaerung-text > div strong {
        font-size: 14px !important;
    }
    
    .erklaerung-text > div span {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    .erklaerung-container h1 {
        font-size: 1.5em !important;
        margin-bottom: 5px !important;
    }
    
    .erklaerung-container > p {
        font-size: 1em !important;
        margin-bottom: 20px !important;
    }
    
    /* v4.5.5: Buttons auf Mobile ZENTRIERT - Fix */
    .erklaerung-buttons {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 12px;
        width: 100% !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* v4.5.5: Button Container zentriert auf Mobile */
    .erklaerung-buttons-centered {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }
    
    /* v4.5.5: Alle Buttons in Erklärungs-Container zentriert */
    .erklaerung-container .btn-primary,
    .erklaerung-container .btn-large,
    #start-voting-btn {
        display: block !important;
        width: auto !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        text-align: center !important;
        padding: 16px 40px !important;
    }
    
    /* v3.10.0: Test-Button oben rechts bleibt auf Mobile */
    #test-vote-btn.test-btn-corner.admin-visible {
        position: absolute;
        top: 12px;
        right: 12px;
        width: auto;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Legacy: Test-Button unten (falls nicht .test-btn-corner) */
    #test-vote-btn.admin-visible:not(.test-btn-corner) {
        display: block !important;
        width: 100%;
        margin: 12px 0 0;
    }
    
    /* Kategorie */
    .kategorie-header {
        margin-bottom: 15px;
    }
    
    .kategorie-number {
        font-size: 11px;
        padding: 6px 14px;
    }
    
    .kategorie-title {
        font-size: 20px;
        margin: 10px 0 5px;
    }
    
    /* Plätze */
    .plaetze-container {
        gap: 12px;
    }
    
    .platz-box {
        padding: 15px;
        border-radius: 12px;
    }
    
    .platz-box h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .selected-teacher {
        padding: 14px 12px;
        min-height: 48px;
    }
    
    .selected-teacher .teacher-name {
        font-size: 14px;
    }
    
    /* Navigation Buttons */
    .navigation-buttons,
    .nav-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .navigation-buttons .btn-primary,
    .navigation-buttons .btn-secondary,
    .nav-buttons .btn-primary,
    .nav-buttons .btn-secondary {
        width: 100%;
        max-width: 100%;
    }
    
    .nav-buttons .btn-primary {
        margin-left: 0;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Dropdown */
    .teacher-dropdown {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 88vw !important;
        max-width: 380px;
        max-height: 70vh;
        border-radius: 16px;
    }
    
    .dropdown-search {
        padding: 16px 16px 12px 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .teacher-dropdown > .search-input {
        padding: 12px 14px;
        font-size: 16px; /* Verhindert iOS Zoom */
    }
    
    .teacher-list {
        max-height: 40vh;
    }
    
    .teacher-item {
        padding: 14px 15px;
        font-size: 15px;
    }
    
    /* Danke */
    .danke-container {
        margin: 20px 10px;
        padding: 30px 20px;
    }
    
    .checkmark-circle {
        width: 80px;
        height: 80px;
    }
    
    .checkmark {
        font-size: 40px;
    }
    
    .danke-container h2 {
        font-size: 22px;
    }
    
    .counter-number {
        font-size: 52px;
    }
    
    .vote-counter {
        padding: 20px;
    }
    
    /* Stats */
    .stats-header h1 {
        font-size: 1.8rem;
    }
    
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-box {
        padding: 18px 12px;
        border-radius: 12px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* v4.9.9: Mobile-optimierte Admin-Buttons */
    .admin-controls-container {
        padding: 12px 10px !important;
        margin: 10px 0 !important;
    }
    
    .admin-control-group {
        margin-bottom: 10px !important;
    }
    
    .admin-control-group > div:first-child {
        font-size: 11px !important;
        margin-bottom: 5px !important;
    }
    
    .btn-admin-mini {
        padding: 8px 10px !important;
        font-size: 11px !important;
        min-height: 38px; /* Touch-freundlich */
        line-height: 1.2;
    }
    
    /* Stats Tabs für Mobile */
    .stats-tabs {
        gap: 4px !important;
        padding: 8px !important;
    }
    
    .stats-tab {
        padding: 8px 10px !important;
        font-size: 11px !important;
        min-height: 36px;
    }
    
    /* Stats Navigation Buttons */
    .stats-nav-buttons {
        gap: 6px !important;
    }
    
    .stats-nav-buttons .btn-secondary {
        padding: 10px 14px !important;
        font-size: 12px !important;
    }
    
    .stats-tabs {
        padding: 6px;
        gap: 4px;
    }
    
    .stats-tab {
        padding: 10px 12px;
        font-size: 12px;
        flex: 1;
        text-align: center;
    }
    
    .stats-nav-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-nav-buttons .btn-secondary {
        width: 100%;
    }
    
    .admin-controls {
        gap: 6px;
    }
    
    .btn-admin-mini {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .category-results {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .category-results h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    /* v3.9.5: Mobile Results Subtabs */
    .results-subtabs {
        gap: 4px;
        padding: 4px;
    }
    
    .results-subtab {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .place-category-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .place-category-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .place-category-header h4 {
        font-size: 16px;
    }
    
    .place-ranking-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .place-rank,
    .place-teacher-name,
    .place-vote-count {
        font-size: 14px;
    }
    
    /* Stats Login */
    .stats-login-box {
        padding: 30px 20px;
        width: 90%;
        max-width: 350px;
    }
    
    /* v3.10.0: Stats Mobile Optimierungen */
    .stats-login-box h2 {
        font-size: 20px;
        margin-top: 10px;
    }
    
    .stats-close-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 12px;
        right: 12px;
    }
    
    /* Stats Tabellen auf Mobile horizontall scrollbar */
    .tv-data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Stats-Content Padding */
    .category-results {
        overflow-x: auto;
    }
    
    /* Pageviews-Info Boxes */
    .category-results > div[style*="grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===== KLEINE MOBILE (bis 480px) ===== */
@media (max-width: 480px) {
    #voting-login-page,
    #voting-erklaerung-page,
    #voting-kategorie-page,
    #voting-danke-page,
    #voting-stats-page {
        padding: 8px;
    }
    
    .login-container,
    .erklaerung-container,
    .danke-container {
        margin: 10px 5px;
        padding: 20px 15px;
    }
    
    .login-container h2,
    .erklaerung-container h2,
    .danke-container h2 {
        font-size: 20px;
    }
    
    .kategorie-title {
        font-size: 18px;
    }
    
    .platz-box {
        padding: 12px;
    }
    
    .platz-box h3 {
        font-size: 14px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .stats-summary {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-box {
        padding: 14px 10px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stats-tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .stats-tab {
        flex: 1 1 45%;
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .counter-number {
        font-size: 42px;
    }
    
    /* Tabellen kleiner */
    .results-table th,
    .results-table td,
    .tv-data-table th,
    .tv-data-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    /* v3.9.5: Extra kleine Bildschirme - Subtabs kompakter */
    .results-subtabs {
        flex-wrap: wrap;
    }
    
    .results-subtab {
        flex: 1 1 100%;
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .place-category-card {
        padding: 12px;
    }
    
    .place-category-header h4 {
        font-size: 14px;
    }
    
    .place-ranking-item {
        padding: 8px 10px;
    }
    
    .place-rank,
    .place-teacher-name,
    .place-vote-count {
        font-size: 13px;
    }
}

/* ===== TOUCH-OPTIMIERUNGEN ===== */
@media (hover: none) and (pointer: coarse) {
    /* Größere Touch-Targets */
    .btn-primary,
    .btn-secondary {
        min-height: 48px;
    }
    
    .teacher-item {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .stats-tab {
        min-height: 44px;
    }
    
    /* Deselect-Hint immer sichtbar auf Touch */
    .selected-teacher.has-selection .deselect-hint {
        opacity: 1;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .teacher-dropdown {
        max-height: 85vh;
    }
    
    .teacher-list {
        max-height: 40vh;
    }
    
    .tv-auth-panel {
        padding: 10px;
    }
    
    .stats-login-box {
        padding: 20px;
    }
}

/* ===== DARK MODE SUPPORT (optional) ===== */
@media (prefers-color-scheme: dark) {
    /* Kann später aktiviert werden */
}

/* ========== ALPHABET QUICK-SELECT - v4.9.4 ========== */

/* Dropdown Content Wrapper - für Sidebar Layout */
.dropdown-content-wrapper {
    display: flex;
    flex-direction: row;
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.dropdown-content-wrapper .teacher-list {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== DESKTOP: Horizontale Alphabet-Bar ===== */
.alphabet-bar {
    display: none; /* Standard: versteckt, wird per JS aktiviert */
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.alphabet-bar.active {
    display: flex;
}

.alphabet-letter {
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.alphabet-letter:hover:not(.disabled) {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.alphabet-letter.disabled {
    color: #bbb;
    background: #f0f0f0;
    cursor: default;
    border-color: #e5e5e5;
}

.alphabet-letter.highlighted {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* ===== MOBILE: Vertikale Alphabet-Sidebar ===== */
/* v4.9.9: Kleinere Buchstaben damit Sidebar auf alle Bildschirme passt */
.alphabet-sidebar {
    display: none; /* Standard: versteckt, wird per JS aktiviert */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    background: rgba(248, 248, 248, 0.95);
    border-left: 1px solid #e0e0e0;
    border-radius: 8px 0 0 8px;
    padding: 3px 1px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 10001;
    max-height: 85vh; /* Reduziert von 90vh für mehr Abstand */
    overflow: visible; /* Kein Overflow - Sidebar passt immer */
    /* v5.0.3: Verhindert Browser-Scroll (URL-Leiste) beim Touch */
    touch-action: none;
    -webkit-touch-callout: none;
}

.alphabet-sidebar.active {
    display: flex;
}

.sidebar-letter {
    width: 18px;
    height: 12px; /* Reduziert von 16px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px; /* Reduziert von 9px */
    font-weight: 600;
    color: #333;
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
    user-select: none;
    flex-shrink: 0;
    /* v5.0.3: Verhindert Browser-Scroll beim Touch-Drag */
    touch-action: none;
    -webkit-user-select: none;
}

.sidebar-letter:hover:not(.disabled) {
    background: #2271b1;
    color: #fff;
}

.sidebar-letter.disabled {
    color: #bbb;
    cursor: default;
}

.sidebar-letter.highlighted {
    background: #2271b1;
    color: #fff;
}

/* ===== Letter Preview Bubble (Mobile Touch) ===== */
.letter-bubble {
    position: fixed;
    width: 50px;
    height: 50px;
    background: #2271b1;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.1s ease;
}

.letter-bubble.visible {
    opacity: 1;
}

/* ===== Responsive Anpassungen ===== */

/* Desktop: Nur Layout-Anpassungen, Sichtbarkeit wird per JS gesteuert */
@media (min-width: 769px) {
    .dropdown-content-wrapper {
        flex-direction: column;
    }
    
    .dropdown-content-wrapper .teacher-list {
        flex: 1;
    }
}

/* Mobile: Nur Layout-Anpassungen, Sichtbarkeit wird per JS gesteuert */
@media (max-width: 768px) {
    .dropdown-content-wrapper {
        flex-direction: column;
    }
    
    .dropdown-content-wrapper .teacher-list {
        flex: 1;
        padding-right: 35px; /* Platz für die fixed Sidebar */
    }
}

/* Touch Device - größere Touch-Targets mit Kreis-Highlight */
@media (hover: none) and (pointer: coarse) {
    .sidebar-letter {
        height: 11px; /* Kompakt damit alles passt */
        font-size: 7px;
    }
}

/* Landscape Mobile - kompaktere Sidebar */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar-letter {
        height: 10px;
        font-size: 7px;
    }
    
    .alphabet-sidebar {
        width: 18px;
        min-width: 18px;
        max-height: 80vh;
    }
}

/* Sehr kleine Bildschirme (unter 600px Höhe) */
@media (max-height: 600px) {
    .sidebar-letter {
        height: 10px;
        font-size: 7px;
    }
    
    .alphabet-sidebar {
        max-height: 80vh;
        padding: 2px 1px;
    }
}

/* ========== v5.0.4: JA/NEIN KATEGORIE ========== */
/* v5.2.6: Inline styles entfernt, alles über CSS */
/* v5.2.8: Mehr margin-top um Position wie Kat 1-14 zu erreichen */
.yes-no-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    padding: 30px 20px;
    margin: 80px 0 40px 0;
}

/* v5.3.4: Ja/Nein Kategorien - mehr Abstand oben für gleiche Position wie normale Kategorien */
#yes-no-ui {
    margin-top: 60px;
}

.yes-no-btn {
    width: 150px;
    height: 120px;
    font-size: 28px;
    font-weight: bold;
    border: 3px solid #bbb;
    border-radius: 16px;
    background: #e0e0e0;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.yes-no-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: #d5d5d5;
}

.yes-no-btn.selected {
    border-width: 4px;
    transform: scale(1.05);
}

/* v5.2.6: Beide Buttons grün wenn selected */
.yes-no-btn.selected {
    background: linear-gradient(145deg, #4caf50, #43a047) !important;
    border-color: #2e7d32 !important;
    color: #fff !important;
}

/* v5.2.6: Gelbe Validierungsmeldung für Ja/Nein */
.yes-no-validation-msg {
    text-align: center;
    color: #856404;
    font-size: 14px;
    font-weight: 600;
    margin: 10px auto;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fff3cd, #ffecb5);
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    max-width: 350px;
}

.yes-no-btn .emoji {
    font-size: 40px;
}

.yes-no-btn .text {
    font-size: 24px;
}

/* Mobile Anpassungen für Ja/Nein Buttons */
@media (max-width: 480px) {
    .yes-no-container {
        gap: 15px;
        padding: 20px 10px;
    }
    
    .yes-no-btn {
        width: 130px;
        height: 100px;
    }
    
    .yes-no-btn .emoji {
        font-size: 32px;
    }
    
    .yes-no-btn .text {
        font-size: 20px;
    }
}

/* v5.0.7: Verbesserte Touch-Unterstützung für Ja/Nein Buttons */
@media (hover: none) and (pointer: coarse) {
    .yes-no-btn {
        /* Größere Touch-Targets */
        min-width: 140px;
        min-height: 110px;
        /* Kein Hover-Effekt auf Touch */
        transform: none !important;
    }
    
    .yes-no-btn:active {
        transform: scale(0.98) !important;
        opacity: 0.9;
    }
    
    .yes-no-btn.selected {
        transform: scale(1.02) !important;
    }
}

/* Stats: Ja/Nein Ergebnis-Card */
.yes-no-card {
    background: linear-gradient(145deg, #f8f9ff, #fff);
    border: 2px solid #e3e8f0;
}

.yes-no-results {
    display: flex;
    gap: 20px;
    padding: 15px;
}

@media (max-width: 480px) {
    .yes-no-results {
        flex-direction: column;
        gap: 10px;
    }
}

/* v5.0.7: Verbesserte Mobile Stats-Anzeige */
@media (max-width: 600px) {
    .yes-no-results > div {
        padding: 10px !important;
    }
    
    .yes-no-results div[style*="font-size:18px"] {
        font-size: 16px !important;
        padding: 12px !important;
    }
    
    /* Place-Kategorie-Cards auf Mobile */
    .place-category-card {
        margin: 10px 0;
        padding: 12px;
    }
    
    .place-ranking-item {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .place-vote-count {
        font-size: 13px;
    }
}

/* v5.0.7: Prozent-Anzeige im Ergebnis-Tab */
/* v5.2.5: Alle Prozente schwarz */
.place-percent {
    color: #000;
    font-weight: normal;
    font-size: 0.85em;
    margin-left: 2px;
}

.place-ranking-top .place-percent {
    color: #000;
    opacity: 1;
}
