/* CSS STYLESHEET - Farben: #00CED1 Türkis | #87CEEB Himmelblau | #4682B4 Stahlblau | #48bb78 Grün | #f56565 Rot */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Arial Rounded MT Bold', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f5f5f5; color: #333; line-height: 1.6; }

/* === HEADER (KOPFBEREICH) === */
.header {
    background: linear-gradient(135deg, #87CEEB 0%, #00CED1 50%, #4682B4 100%); /* Farbverlauf von Himmelblau über Türkis zu Stahlblau */
    padding: 1rem 0;                      /* Innenabstand oben/unten: 1rem (16px) */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Leichter Schatten unter Header */
    position: sticky;                     /* Header bleibt beim Scrollen oben sichtbar */
    top: 0;                              /* Position: ganz oben */
    z-index: 1000;                       /* Liegt über allen anderen Elementen */
}

.header-container {
    max-width: 1200px;              /* Maximale Breite: 1200 Pixel */
    margin: 0 auto;                 /* Zentriert den Header horizontal */
    padding: 0 2rem;                /* Innenabstand links/rechts: 2rem (32px) */
    display: flex;                  /* Flexbox-Layout für flexible Anordnung */
    justify-content: space-between; /* Platz zwischen Logo und Navigation */
    align-items: center;            /* Vertikale Zentrierung der Elemente */
}

/* === LOGO === */
.logo-img {
    height: 60px;                   /* Höhe des Logos: 60 Pixel */
    width: auto;                    /* Breite passt sich automatisch an */
    transition: transform 0.3s ease; /* Animation: 0.3 Sekunden sanfte Vergrößerung */
}

.logo-img:hover {
    transform: scale(1.05);         /* Bei Hover: 5% größer (Vergrößerungseffekt) */
}

/* === HEADER RECHTE SEITE (Navigation + Dropdown) === */
.header-rechts {
    display: flex;                  /* Flexbox-Layout für horizontale Anordnung */
    align-items: center;            /* Vertikale Zentrierung */
    gap: 2rem;                      /* Abstand zwischen Navigation und Dropdown: 2rem */
}

/* === NAVIGATION === */
.navigation {
    display: flex;                  /* Flexbox für horizontale Anordnung der Links */
    gap: 1.5rem;                    /* Abstand zwischen den Links: 1.5rem */
}

/* Einzelner Navigations-Link */
.nav-link {
    color: white;                   /* Weiße Schriftfarbe */
    text-decoration: none;          /* Keine Unterstreichung */
    font-weight: 500;               /* Mittlere Schriftdicke */
    padding: 0.5rem 1rem;           /* Innenabstand: 0.5rem oben/unten, 1rem links/rechts */
    border-radius: 5px;             /* Abgerundete Ecken: 5px */
    transition: all 0.3s ease;      /* Sanfte Animation für alle Eigenschaften: 0.3 Sekunden */
    position: relative;             /* Relative Positionierung */
}

/* Navigations-Link beim Überfahren mit Maus */
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Halbtransparenter weißer Hintergrund */
}

/* Aktiver/ausgewählter Navigations-Link (für aktuelle Seite) */
.nav-link.aktiv {
    background-color: white;        /* Weißer Hintergrund */
    color: #00CED1;                 /* Türkise Schriftfarbe */
    font-weight: 600;               /* Dickere Schrift */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Schatten für Hervorhebung */
}

/* === BENUTZER-DROPDOWN (Menü für eingeloggten Benutzer) === */
.benutzer-dropdown {
    position: relative;             /* Relative Positionierung für absolute Dropdown-Inhalte */
    display: inline-block;          /* Inline-Block für Nebeneinanderstellung mit anderen Elementen */
}

/* Dropdown-Button (Benutzername-Button) */
.dropdown-btn {
    background-color: rgba(255, 255, 255, 0.2); /* Halbtransparenter weißer Hintergrund */
    color: white;                   /* Weiße Schriftfarbe */
    border: 2px solid white;        /* Weißer Rahmen: 2px dick */
    padding: 0.5rem 1.5rem;         /* Innenabstand: 0.5rem oben/unten, 1.5rem links/rechts */
    font-size: 16px;                /* Schriftgröße: 16 Pixel */
    cursor: pointer;                /* Zeiger-Cursor beim Überfahren (anklickbar) */
    border-radius: 5px;             /* Abgerundete Ecken: 5px */
    transition: all 0.3s ease;      /* Sanfte Animation für alle Eigenschaften: 0.3 Sekunden */
    font-family: inherit;           /* Schriftart vom Haupt-Element übernehmen */
}

/* Dropdown-Button beim Überfahren mit Maus */
.dropdown-btn:hover {
    background-color: white;        /* Vollständig weißer Hintergrund */
    color: #667eea;                 /* Lila Schriftfarbe */
}

/* Dropdown-Button beim Fokussieren (z.B. durch Tab-Taste) */
.dropdown-btn:focus {
    outline: 2px solid white;       /* Weißer Fokus-Rahmen: 2px dick */
    outline-offset: 2px;            /* Abstand des Rahmens zum Button: 2px */
}

/* Dropdown-Inhalt (Menü-Einträge) */
.dropdown-inhalt {
    display: none;                  /* Standardmäßig versteckt */
    position: absolute;             /* Absolute Positionierung (überlappt andere Inhalte) */
    right: 0;                       /* Rechts ausgerichtet am Dropdown-Button */
    top: 100%;                      /* Direkt unter dem Button (100% = Button-Höhe) */
    background-color: white;        /* Weißer Hintergrund */
    min-width: 200px;               /* Mindestbreite: 200 Pixel */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* Schatten für 3D-Effekt */
    border-radius: 5px;             /* Abgerundete Ecken: 5px */
    margin-top: 0;                  /* Kein Abstand nach oben */
    overflow: hidden;               /* Versteckt überstehende Inhalte */
    z-index: 1000;                  /* Liegt über allen anderen Elementen */
    opacity: 0;                     /* Unsichtbar (für Animation) */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Animation für Einblenden: 0.3 Sekunden */
    transform: translateY(-10px);   /* Start-Position: 10px nach oben verschoben */
    pointer-events: none;           /* Keine Mausinteraktionen wenn versteckt */
}

.benutzer-dropdown:hover .dropdown-inhalt, .benutzer-dropdown.open .dropdown-inhalt, .dropdown-inhalt:hover { display: block; opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Links und Rolle im Dropdown */
.dropdown-inhalt a { color: #333; padding: 12px 16px; text-decoration: none; display: block; transition: background-color 0.3s ease; }
.dropdown-inhalt a:hover { background-color: rgba(0, 206, 209, 0.1); }
.benutzer-rolle { display: block; padding: 12px 16px; background: linear-gradient(135deg, #87CEEB 0%, #00CED1 50%, #4682B4 100%); color: white; font-weight: bold; text-align: center; }

/* Seitenanzeige und Überschriften */
.seiten-anzeige { max-width: 95%; margin: 1rem auto 0; padding: 0 1.5rem; }
.seiten-anzeige .container { background: linear-gradient(135deg, rgba(135, 206, 235, 0.1) 0%, rgba(0, 206, 209, 0.1) 50%, rgba(70, 130, 180, 0.1) 100%); border-left: 4px solid #00CED1; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.main-content { max-width: 95%; margin: 2rem auto; padding: 0 1.5rem; }
.container { background-color: white; padding: 2rem; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin: 0 auto 2rem; max-width: 100%; }
h1, h2, h3 { color: #000; margin-bottom: 1rem; }
h1 { font-size: 2.5rem; text-align: center; }
h2 { font-size: 2rem; }

/* Diashow Container und Folien */
.diashow-container { position: relative; max-width: 100%; height: 600px; overflow: hidden; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); background-color: #000; margin-bottom: 2rem; }
.diashow-folie { position: absolute; width: 100%; height: 100%; display: none; animation: fade 0.8s; align-items: center; justify-content: center; }
.diashow-folie.aktiv { display: flex; align-items: center; justify-content: center; }
.diashow-bild { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; object-position: center; display: block; }
.diashow-bild-gross { max-width: 120%; max-height: 120%; transform: scale(1.2); }
.diashow-bild-schule { min-width: 70%; min-height: 70%; width: 70%; height: 70%; object-fit: cover; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.diashow-text { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.4)); color: white; padding: 2rem; text-align: center; }
.diashow-text h2 { color: white; font-size: 1.8rem; margin: 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }

/* Diashow Navigation */
.diashow-pfeil { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0,0,0,0.6); color: white; border: 2px solid white; font-size: 2.5rem; padding: 1rem 1.5rem; cursor: pointer; border-radius: 8px; transition: all 0.3s ease; z-index: 10; box-shadow: 0 4px 8px rgba(0,0,0,0.3); font-weight: bold; }
.diashow-pfeil:hover { background-color: rgba(0,0,0,0.9); transform: translateY(-50%) scale(1.1); box-shadow: 0 6px 12px rgba(0,0,0,0.4); }
.diashow-pfeil-links { left: 20px; }
.diashow-pfeil-rechts { right: 20px; }
.diashow-steuerung { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.diashow-punkt { width: 15px; height: 15px; border-radius: 50%; background-color: rgba(255,255,255,0.5); border: 2px solid rgba(255,255,255,0.8); cursor: pointer; transition: all 0.3s ease; }
.diashow-punkt:hover { background-color: rgba(255,255,255,0.8); transform: scale(1.2); }
.diashow-punkt.aktiv { background-color: white; border-color: white; }

/* Formulare */
.formular { max-width: 500px; margin: 0 auto; }
.formular-gruppe { margin-bottom: 1.5rem; }
.formular-gruppe label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: #555; }
.formular-gruppe input, .formular-gruppe select { width: 100%; padding: 0.75rem; border: 2px solid #ddd; border-radius: 5px; font-size: 16px; transition: border-color 0.3s ease; }
.formular-gruppe input:focus, .formular-gruppe select:focus { outline: none; border-color: #00CED1; }

/* Buttons */
.btn { padding: 0.75rem 2rem; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; text-align: center; }
.btn-primaer { background: linear-gradient(135deg, #87CEEB 0%, #00CED1 50%, #4682B4 100%); color: white; }
.btn-primaer:hover { background: linear-gradient(135deg, #76BDDA 0%, #00BCC0 50%, #3771A3 100%); transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.btn-erfolg { background-color: #48bb78; color: white; }
.btn-erfolg:hover { background-color: #38a169; }
.btn-warnung { background: linear-gradient(135deg, #87CEEB 0%, #00CED1 50%, #4682B4 100%); color: white; }
.btn-warnung:hover { background: linear-gradient(135deg, #76BDDA 0%, #00BCC0 50%, #3771A3 100%); transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.btn-gefahr { background-color: #f56565; color: white; }
.btn-gefahr:hover { background-color: #e53e3e; }
.btn-sekundaer { background-color: #718096; color: white; }
.btn-sekundaer:hover { background-color: #4a5568; }
.btn-klein { padding: 0.5rem 1rem; font-size: 14px; }

/* Nachrichten */
.nachricht { padding: 1.2rem 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 1rem; display: flex; align-items: center; gap: 1rem; animation: slideIn 0.3s ease; }
.nachricht::before { font-size: 1.5rem; }
.nachricht-erfolg { background-color: #c6f6d5; color: #22543d; border-left: 5px solid #48bb78; }
.nachricht-erfolg::before { content: "✓"; color: #48bb78; font-weight: bold; }
.nachricht-fehler { background-color: #fed7d7; color: #742a2a; border-left: 5px solid #f56565; box-shadow: 0 2px 8px rgba(245,101,101,0.2); }
.nachricht-fehler::before { content: "✖"; color: #f56565; font-weight: bold; }
.nachricht-info { background-color: #bee3f8; color: #2c5282; border-left: 5px solid #4299e1; }
.nachricht-info::before { content: "ℹ"; color: #4299e1; font-weight: bold; }
.nachricht-warnung { background-color: #fef5e7; color: #7d6608; border-left: 5px solid #ecc94b; }
.nachricht-warnung::before { content: "⚠"; color: #ecc94b; font-weight: bold; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; margin: 1rem auto; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; }
.tabelle thead { background: linear-gradient(135deg, #87CEEB 0%, #00CED1 50%, #4682B4 100%); color: white; }
.tabelle th, .tabelle td { padding: 0.75rem 0.5rem; text-align: left; border-bottom: 1px solid #e2e8f0; word-wrap: break-word; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabelle td { max-width: 180px; }
.tabelle td:hover { overflow: visible; white-space: normal; }
.tabelle th { font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; }
.tabelle tbody tr { transition: all 0.2s ease; }
.tabelle tbody tr:hover { background-color: #f7fafc; transform: scale(1.01); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.tabelle tbody tr:nth-child(even) { background-color: #f8f9fa; }
.tabelle tbody tr:nth-child(even):hover { background-color: #f1f3f5; }

/* Such- und Filter-Felder */
#mitarbeiter-container, #mitarbeiter-container-verwaltung { overflow-x: auto; margin-top: 1rem; }
.suchfeld { max-width: 800px; margin-bottom: 1.5rem; }
.suchfeld input { width: 100%; padding: 0.75rem 1rem; border: 2px solid #ddd; border-radius: 25px; font-size: 16px; }
.suchfeld input:focus { outline: none; border-color: #00CED1; }
.filter-container { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; align-items: center; }
.filter-select { padding: 0.75rem 1rem; font-size: 16px; border: 2px solid #ddd; border-radius: 25px; background-color: white; cursor: pointer; transition: border-color 0.3s ease; min-width: 200px; }
.filter-select:focus { outline: none; border-color: #00CED1; }
.filter-select:hover { border-color: #999; }
.aktionen { display: flex; gap: 0.5rem; }

/* Footer */
.footer { background-color: #333; color: white; text-align: center; padding: 2rem 0; margin-top: 4rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 1rem; }
    .header-rechts { flex-direction: column; width: 100%; }
    .navigation { flex-wrap: wrap; justify-content: center; }
    .diashow-container { height: 300px; }
    .tabelle { font-size: 14px; }
    .tabelle th, .tabelle td { padding: 0.5rem; }
    .profil-grid { grid-template-columns: 1fr; }
    .passwort-grid { grid-template-columns: 1fr; }
}

/* Utilities */
.text-zentriert { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.versteckt { display: none; }

/* Profil-Seite */
.profil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; margin-top: 2rem; }
.profil-karte { background: #f8f9fa; padding: 2rem; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border-left: 4px solid #00CED1; }
.profil-karte.volle-breite { grid-column: 1 / -1; }
.profil-karte h2 { color: #00CED1; font-size: 1.5rem; margin-bottom: 1rem; border-bottom: 2px solid #00CED1; padding-bottom: 0.5rem; }
.profil-karte .aktuell { background: white; padding: 1rem; border-radius: 5px; margin-bottom: 1.5rem; border-left: 3px solid #48bb78; }
.profil-karte .aktuell strong { color: #00CED1; }
.passwort-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.profil-karte small { color: #666; font-size: 0.85rem; display: block; margin-top: 0.25rem; }

/* Modal-Fenster */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); animation: fadeIn 0.3s; }
@keyframes slideInModal { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-inhalt { position: relative; background: white; border-radius: 15px; max-width: 500px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: slideInModal 0.3s; z-index: 1; }
.modal-header { padding: 2rem 2rem 1rem 2rem; border-bottom: 2px solid #f1f1f1; }
.modal-header h2 { margin: 0; color: #e53e3e; }
.warning-text { color: #e53e3e; margin-top: 1rem; }
.modal-body { padding: 2rem; }
.mitarbeiter-info { background: #f7fafc; padding: 1rem; border-radius: 8px; margin-top: 1rem; border-left: 4px solid #00CED1; }
.modal-footer { padding: 1rem 2rem 2rem 2rem; display: flex; gap: 1rem; justify-content: flex-end; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Setup-Seite */
body.setup-body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.setup-container { background: white; padding: 3rem; border-radius: 15px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-width: 600px; width: 100%; }
.setup-container h1 { color: #667eea; text-align: center; margin-bottom: 1rem; font-size: 2.5rem; }
.subtitle { text-align: center; color: #666; margin-bottom: 2rem; }
.status-box { background: #f7fafc; padding: 1.5rem; border-radius: 8px; margin-bottom: 2rem; }
.status-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid #e2e8f0; }
.status-item:last-child { border-bottom: none; }
.status-icon { font-size: 1.5rem; }
.status-ok { color: #48bb78; }
.status-fehler { color: #f56565; }
.btn-erfolg { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); }
.info-box { background: #edf2f7; padding: 1.5rem; border-radius: 8px; margin-top: 2rem; }
.info-box h3 { color: #667eea; margin-bottom: 1rem; }
.info-box ul { margin-left: 1.5rem; }
.info-box li { margin-bottom: 0.5rem; color: #4a5568; }
.link-box { text-align: center; margin-top: 2rem; }
.link-box a { color: #667eea; text-decoration: none; font-weight: bold; font-size: 1.1rem; }
.link-box a:hover { text-decoration: underline; }
.info-box-erfolg { background: #c6f6d5; }
.info-box-erfolg h3, .info-box-erfolg p { color: #22543d; }
.setup-body .btn { width: 100%; padding: 1rem 2rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: all 0.3s ease; margin-top: 1rem; display: inline-block; text-align: center; }
.setup-body .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(102,126,234,0.4); }