/* Header Styling (gilt für alle Seiten) */
.header {
    background-color: #34495e;
    color: white;
    padding: 10px 20px; /* Standard-Padding für grössere Bildschirme */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* Header fixiert am oberen Rand */
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box; /* Stellt sicher, dass Padding nicht die Breite erhöht */
    z-index: 1000; /* Stellt sicher, dass der Header über anderen Inhalten liegt */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header h1 {
    margin: 0;
    font-size: 24px;
    flex-shrink: 1; /* Ermöglicht das Schrumpfen des Titels */
    min-width: 0; /* Wichtig, damit der Titel richtig schrumpft */
    overflow: hidden; /* Text abschneiden, wenn zu lang */
    text-overflow: ellipsis; /* ... hinzufügen, wenn Text abgeschnitten wird */
    white-space: nowrap; /* Verhindert Zeilenumbruch im Titel */
    color: white;
}

.header > div {
    display: flex;
    gap: 10px; /* Fügt 10px Abstand ZWISCHEN den Elementen hinzu */
    flex-shrink: 0; /* Verhindert das Schrumpfen des Link-Containers */
}

.header .admin-link, .header .logout-link { /* Beide Link-Typen stylen */
    font-size: 14px;
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid white;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Verhindert Zeilenumbruch bei den Links */
    /* margin-left: 10px; <--- DIESE ZEILE ENTFERNEN ODER AUSKOMMENTIEREN */
}

.header .admin-link:hover, .header .logout-link:hover {
    background-color: #2980b9;
}

/* --- Media Query für kleinere Bildschirme (max-width: 600px) --- */
@media (max-width: 600px) {
    .header {
        flex-direction: column; /* Elemente untereinander anordnen */
        align-items: flex-start; /* Elemente links ausrichten */
        padding: 10px 15px; /* Angepasstes Padding für kleine Bildschirme */
    }

    .header h1 {
        width: 100%; /* Titel volle Breite */
        text-align: center; /* Titel zentrieren */
        margin-bottom: 10px; /* Abstand unter dem Titel */
    }

    .header > div {
        width: 100%; /* Link-Container volle Breite */
        justify-content: center; /* Links zentrieren */
        margin-top: 5px; /* Abstand über den Links */
    }

    body {
        padding-top: 100px; /* Erhöht den padding-top, da der Header jetzt höher ist */
    }
}

/* Der Rest Ihres CSS bleibt gleich */
/* Grundlegendes Styling für den Body (gilt für alle Seiten) */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
    padding-top: 60px; /* Platz für den fixierten Header auf Desktop */
}

/* Container für den Hauptinhalt */
.container {
    max-width: 800px;
    margin: 20px auto; 
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Styling für <details> und <summary> */
details {
    background-color: #f9f9f9; 
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

details:nth-of-type(odd) {
    background-color: #e8f0f8; 
}

details:nth-of-type(even) {
    background-color: #f0f8e8; 
}

summary {
    font-weight: bold;
    cursor: pointer; 
    list-style: none; 
    position: relative; 
    padding-left: 25px; 
    outline: none; 
    color: #34495e; 
}

summary::before {
    content: '+';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    color: #28a745; 
    transition: transform 0.2s ease-in-out;
}

details[open] summary::before {
    content: '-';
    color: #dc3545; 
}

details div {
    padding-top: 10px;
    border-top: 1px solid #eee;
    margin-top: 10px;
    font-size: 0.95em;
    color: #555;
}

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

/* Spezifisches Styling für admin_edit.php */
.container h1 { 
    color: #34495e; 
    text-align: center; 
} 

.login-form, .edit-form { 
    margin-top: 20px; 
    text-align: center; 
}

input[type="password"], textarea { 
    width: calc(100% - 20px); 
    padding: 10px; 
    margin-bottom: 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-size: 16px; 
    box-sizing: border-box;
}

textarea { 
    min-height: 400px; 
    resize: vertical; 
    text-align: left; 
}

button { 
    background-color: #2980b9; 
    color: white; 
    padding: 10px 20px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 16px; 
    transition: background-color 0.3s ease; 
}

button:hover { 
    background-color: #2471a3; 
}

/* Nachrichten-Boxen */
.message { 
    text-align: center; 
    margin-top: 15px; 
    padding: 10px; 
    border-radius: 5px; 
}
.message p { 
    margin: 0; 
}
.message.success { 
    background-color: #d4edda; 
    color: #155724; 
    border: 1px solid #c3e6cb; 
}
.message.error { 
    background-color: #f8d7da; 
    color: #721c24; 
    border: 1px solid #f5c6cb; 
}