/* Allgemeine Stile */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #f4f7f6;
color: #333;
line-height: 1.6;
margin: 0;
}
.container {
max-width: 800px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Header */
header {
background-color: #ffffff;
padding: 10px 0;
border-bottom: 1px solid #e0e0e0;
}
header .container {
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: none;
padding: 0 20px;
margin-top: 0;
}
header h1 {
font-size: 1.5em;
color: #4A4A4A;
margin: 0;
letter-spacing: 2px;
}
.admin-login-link {
text-decoration: none;
color: #007bff;
}

/* Formulare */
form textarea, form input[type="text"], form input[type="password"], form input[type="email"], form input[type="number"] {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 10px;
box-sizing: border-box;
}
form button {
background-color: #007bff;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 1em;
}
form button:hover {
background-color: #0056b3;
}

/* Kommentarbereich */
.comment-form {
margin-bottom: 40px;
}
.comments-section {
margin-top: 20px;
}
.comment {
background-color: #f9f9f9;
border-left: 4px solid #007bff;
padding: 15px;
margin-bottom: 15px;
border-radius: 0 4px 4px 0;
}
.comment p {
margin: 0 0 10px 0;
}
.comment .timestamp {
font-size: 0.85em;
color: #777;
}

/* Admin-Bereich */
.login-container {
max-width: 400px;
margin-top: 100px;
text-align: center;
}
.back-link {
display: block;
margin-top: 20px;
}
.admin-section {
margin-bottom: 40px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}
.comments-table {
width: 100%;
border-collapse: collapse;
}
.comments-table th, .comments-table td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
.comments-table th {
background-color: #f2f2f2;
}
.comments-table .actions a {
margin-right: 10px;
text-decoration: none;
}
.actions .delete { color: #dc3545; }
.actions .edit { color: #28a745; }

/* Nachrichten */
.error-message { color: #dc3545; background-color: #f8d7da; padding: 10px; border-radius: 4px; }
.success-message { color: #155724; background-color: #d4edda; padding: 10px; border-radius: 4px; }

/* --- STILE FÜR DAS SMTP MODAL (POP-UP) --- */

/* Das Modal-Fenster (standardmäßig versteckt) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Dunkler Hintergrund-Overlay */
}

/* Der Inhalt des Modals */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* Zentriert das Fenster */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

/* Der Schließen-Button (x) */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* =================================================================== */
/* --- EINHEITLICHER STIL FÜR GELESENE KOMMENTARE (Admin & Öffentlich) --- */
/* =================================================================== */

/* 1. Stil für die Tabellenzeile im Admin-Dashboard */
.comments-table tr.comment-read {
    background-color: #e6ffed; /* Sanftes Grün */
    border-left: 2px solid #28a745; /* Akzent für Konsistenz */
}

/* Optional: Ein etwas dunkleres Grün, wenn man mit der Maus darüberfährt */
.comments-table tr.comment-read:hover {
    background-color: #d1f7e0; 
}


/* 2. Stil für den Kommentar-Block im öffentlichen Forum */
.comments-section .comment.comment-read-public {
    background-color: #e6ffed;   /* Exakt derselbe Grünton wie im Admin-Bereich */
    border-left-color: #28a745;  /* Ein passender, dunklerer Grünton für den Rand */
    opacity: 1;                  /* Wichtig: Wir entfernen die alte Transparenz */
}

/* =================================================================== */
/* --- FINALES STYLING FÜR DIE AKTIONEN-SPALTE IM ADMIN-DASHBOARD -- */
/* =================================================================== */

/* Allgemeiner Abstand für ALLE Elemente (Links und Text) in der Actions-Spalte */
.comments-table .actions a,
.comments-table .actions .read-status {
    margin-right: 10px;
    vertical-align: middle;
}

/* Stil für den "Gelesen"-Status-Text (wenn bereits gelesen) */
.actions .read-status {
    color: #333; /* Dunkelgrauer, fetter Text */
    font-weight: bold;
}

/* Stil für den klickbaren "Gelesen"-Link */
.actions .mark-read { 
    color: #007bff;
    text-decoration: none;
}
.actions .mark-read:hover {
    text-decoration: underline;
}

/* Farben für Bearbeiten und Löschen (sollten schon existieren) */
.actions .edit { color: #28a745; }
.actions .delete { color: #dc3545; }

/* Stil für den klickbaren "Ungelesen"-Link */
.actions .mark-unread {
    color: #ff8c00; /* Ein auffälliges Orange */
    text-decoration: none;
    margin-right: 10px; /* Derselbe Abstand wie bei den anderen Links */
}
.actions .mark-unread:hover {
    text-decoration: underline;
}

/* =================================================================== */
/* --- ABSTAND FÜR HEADER-NAVIGATIONSLINKS IM ADMIN-BEREICH --- */
/* =================================================================== */

header nav a {
    margin-left: 20px; /* Fügt links von jedem Link einen Abstand hinzu */
    text-decoration: none;
}