/* Dark Mode Theme für Barrierefreiheit */
body {
    background-color: #1e1e1e; /* Dunkelgrauer Hintergrund */
    color: #f0f0f0; /* Leicht abgetöntes Weiß für besseren Lesekomfort */
    font-family: sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

h1, h2 {
    color: #ff8c00; /* Kontrastreiches Orange für Überschriften */
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

a {
    color: #ff8c00; /* Selbes Orange für Links */
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
}

form {
    background-color: #2a2a2a;
    border: 1px solid #444;
    padding: 20px;
    border-radius: 5px;
}

fieldset {
    border: 1px solid #555;
    padding: 15px;
    margin-bottom: 20px;
}

legend {
    color: #ff8c00;
    font-weight: bold;
    padding: 0 10px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #555;
    padding: 10px;
    width: 100%;
    box-sizing: border-box; /* Stellt sicher, dass Padding die Breite nicht beeinflusst */
    border-radius: 3px;
}

input:focus, textarea:focus {
    outline: 2px solid #ff8c00;
    border-color: #ff8c00;
}

button {
    background-color: #ff8c00;
    color: #1e1e1e;
    font-weight: bold;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 1em;
    border-radius: 3px;
}

button:hover, button:focus {
    opacity: 0.9;
}

.hinweis {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 5px;
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.message.success {
    background-color: #2a5c3d;
    color: #c8e6c9;
    border: 1px solid #388e3c;
}

.message.error {
    background-color: #7f2424;
    color: #ffcdd2;
    border: 1px solid #d32f2f;
}


/* Footer Styling */
footer {
    border-top: 1px solid #444; /* Trennlinie zum Hauptinhalt */
    margin-top: 50px; /* Abstand nach oben */
    padding-top: 20px;
    font-size: 0.8em; /* Kleinere Schrift */
    color: #aaa; /* Etwas dunklere Schriftfarbe */
    text-align: center; /* Zentrierter Text */
}

footer p {
    margin-bottom: 10px;
}

/* --- Modal-Dialog (Popup) Styling --- */

.modal-overlay {
    position: fixed; /* Bleibt beim Scrollen an Ort und Stelle */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Schwarzer, halbtransparenter Hintergrund */
    display: none; /* Standardmäßig unsichtbar */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Stellt sicher, dass es über allem anderen liegt */
}

.modal-dialog {
    background-color: #2a2a2a;
    border: 1px solid #555;
    padding: 25px;
    border-radius: 8px;
    max-width: 500px; /* Maximale Breite des Popups */
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.modal-dialog h2 {
    margin-top: 0;
    color: #ff8c00;
}

.modal-dialog button {
    margin-top: 20px;
}

/* Klasse, die per JavaScript hinzugefügt wird, um das Modal anzuzeigen */
.modal-overlay.active {
    display: flex;
}

/* --- Admin Layout --- */
/* --- Admin Layout mit Seitenleiste (Responsiv) --- */
.admin-container {
    display: flex;
    align-items: flex-start;
}

.admin-sidebar {
    width: 250px;
    flex-shrink: 0; /* Verhindert, dass die Sidebar schrumpft */
    padding-right: 20px;
    border-right: 1px solid #444;
}

.admin-sidebar h2 {
    font-size: 1.2em;
    color: #fff;
}

.admin-sidebar ul {
    list-style: none; /* Entfernt die Aufzählungszeichen */
    padding: 0;
    margin: 0;
}

.admin-sidebar li a {
    display: block;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.admin-sidebar li a:hover,
.admin-sidebar li a:focus {
    background-color: #2a2a2a;
    text-decoration: none;
}

.admin-content {
    flex-grow: 1;
    padding-left: 30px;
}

/* --- NEU: Regel für schmale Bildschirme (Tablets im Hochformat, Handys) --- */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column; /* Ordnet Sidebar und Inhalt untereinander an */
    }

    .admin-sidebar {
        width: 100%; /* Sidebar nimmt die volle Breite ein */
        border-right: none; /* Keine seitliche Trennlinie mehr */
        border-bottom: 1px solid #444; /* Trennlinie unten */
        padding-right: 0;
        margin-bottom: 20px;
    }

    .admin-content {
        padding-left: 0; /* Kein linker Abstand mehr */
        width: 100%;
    }
}

/* --- Optimierungen für die Archiv-Ansicht --- */

.archive-header-nav {
    background-color: #2a2a2a;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    border: 1px solid #444;
}

.share-links a.share-button {
    display: inline-block;
    background-color: #333;
    color: #f0f0f0;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    margin-right: 10px;
    margin-top: 5px;
    border: 1px solid #555;
}

.share-links a.share-button:hover,
.share-links a.share-button:focus {
    background-color: #444;
    color: #ff8c00;
}

/* --- Button-Styling für die Archiv-Navigation --- */

.archive-nav-button {
    display: inline-block;
    background-color: #3a3a3a;
    color: #f0f0f0;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    margin-right: 10px;
    border: 1px solid #555;
    font-size: 0.9em;
}

.archive-nav-button:hover,
.archive-nav-button:focus {
    background-color: #444;
    color: #ff8c00;
}