* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
}

/* Header */
header {
    height: 20vh;
    background: #222;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
    padding: 0 2rem;
}

header h1 {
    font-size: 3rem;
    font-weight: bold;
}

/* Navigation */
nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: #888;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s, font-size 0.15s;
}

nav a.active {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

nav a:not(.active):hover {
    color: #bbb;
}

#auth-area {
    position: absolute;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

#auth-area a, #auth-area button {
    color: white;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

#auth-area a:hover, #auth-area button:hover {
    background: rgba(255,255,255,0.25);
}

#user-info {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

/* Login / Auth Box */
.auth-box {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.auth-tabs .tab {
    flex: 1;
    padding: 0.6rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #888;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.auth-tabs .tab.active {
    color: #222;
    border-bottom-color: #222;
}

.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-box input {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.auth-box form > button[type=submit] {
    padding: 0.7rem;
    background: #222;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.auth-box form > button[type=submit]:hover {
    background: #444;
}

.error { color: #c0392b; font-size: 0.9rem; }
.success { color: #27ae60; font-size: 0.9rem; }

/* Admin Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #eee;
}

table th { font-weight: bold; color: #555; font-size: 0.85rem; }

table button {
    padding: 0.3rem 0.7rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    background: white;
}

table button:hover { background: #f0f0f0; }

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge.admin { background: #ffeeba; color: #856404; }
.badge.guest { background: #d1ecf1; color: #0c5460; }

/* Admin Tabellen-Box (breiter als auth-box) */
.admin-table-box {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    width: 90%;
    margin: 2vh auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.table-scroll {
    overflow-x: auto;
}

.cell-email { color: #888; font-size: 0.88rem; white-space: nowrap; }
.cell-actions { white-space: nowrap; }

/* Nutzername Inline-Edit */
.uname-view {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.uname-edit input {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 140px;
}

.inline-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    opacity: 0.4;
    line-height: 1;
}

.inline-edit-btn:hover { opacity: 1; }

.btn-confirm, .btn-cancel {
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 0.85rem;
    background: white;
}

.btn-confirm { border-color: #a8d5b5; color: #27ae60; }
.btn-confirm:hover { background: #f0faf4; }
.btn-cancel:hover { background: #f5f5f5; }

/* Footer */
footer {
    height: 8vh;
    min-height: 50px;
    background: #222;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4vh;
}

.footer-inner a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-inner a:hover { color: white; }

/* Admin Panel (Post erstellen) */
#admin-panel {
    background: #fffbea;
    border-bottom: 2px solid #f0c040;
}

.admin-panel-inner {
    width: 90%;
    margin: 0 auto;
    padding: 1.25rem 0;
}

.admin-panel-inner h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #555;
}

#post-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

#post-form input[type=file] {
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
}

#post-form textarea {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: sans-serif;
}

#post-form button {
    padding: 0.5rem 1.2rem;
    background: #222;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
}

#post-form button:hover { background: #444; }

/* Post-Karten: Beschreibung + Löschen-Button */
.post-footer {
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.post-footer p {
    color: #444;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.delete-btn {
    padding: 0.3rem 0.7rem;
    background: white;
    border: 1px solid #e0a0a0;
    color: #c0392b;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}

.delete-btn:hover { background: #fdecea; }

/* ── Kommentare ────────────────────────────────────── */
.comments-section {
    border-top: 1px solid #f0f0f0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.no-comments {
    color: #bbb;
    font-size: 0.85rem;
}

.comment {
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    background: #f8f8f8;
    margin-bottom: 0.35rem;
}

.comment-reply {
    margin-left: 1.5rem;
    background: #f2f2f2;
    border-left: 3px solid #ddd;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.88rem;
    color: #333;
}

.comment-time {
    font-size: 0.78rem;
    color: #aaa;
    flex: 1;
}

.comment-delete-btn {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
}

.comment-delete-btn:hover { opacity: 1; }

.comment-body {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.reply-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.3rem 0 0;
    margin-top: 0.1rem;
}

.reply-btn:hover { color: #333; }

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-form textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.92rem;
    font-family: sans-serif;
    resize: vertical;
    background: #fafafa;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #aaa;
    background: white;
}

.comment-form button[type=submit] {
    align-self: flex-end;
    padding: 0.35rem 1rem;
    background: #222;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.88rem;
}

.comment-form button[type=submit]:hover { background: #444; }

.comment-form-reply { margin-top: 0.5rem; }

.comment-login-hint {
    font-size: 0.85rem;
    color: #aaa;
}

.comment-login-hint a { color: #666; }

.alle-beitraege-link {
    color: #555;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.alle-beitraege-link:hover { color: #111; }

/* Impressum */
.impressum-box {
    max-width: 680px;
}

.impressum-text {
    white-space: pre-wrap;
    color: #333;
    line-height: 1.8;
    font-size: 0.95rem;
}

#impressum-editor {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: sans-serif;
    line-height: 1.6;
    resize: vertical;
}

.edit-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.edit-actions button {
    padding: 0.5rem 1.2rem;
    background: #222;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}

.edit-actions button:hover { background: #444; }

.btn-secondary {
    background: white !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
}

.btn-secondary:hover { background: #f0f0f0 !important; }

/* Haupt-Layout */
main {
    width: 90%;
    margin: 2vh auto;
    display: flex;
    flex-direction: column;
    gap: 3vh;
}

/* Home-Abschnitte */
.home-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8e8e8;
}

.section-empty {
    color: #aaa;
    font-size: 0.95rem;
}

/* Einzelner Blog-Eintrag */
article {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

article img {
    width: 100%;
    display: block;
}

article p {
    color: #444;
    font-size: 1rem;
    line-height: 1.5;
}

