/* ===========================
   Grundlayout & Farben
   =========================== */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #e5e5e5;
    line-height: 1.6;
}

/* ===========================
   Header & Navigation
   =========================== */

header {
    background-color: #2a2a2a;
    color: #f0f0f0;
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 1px solid #3a3a3a;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

nav ul li {
    display: inline-block;
    margin: 0 1rem;
}

nav ul li a {
    color: #ddd;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

nav ul li a:hover {
    color: #fff;
}

/* ===========================
   Hauptbereich
   =========================== */

main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===========================
   Blog-Artikel (index.php)
   =========================== */

article {
    background: #2b2b2b;
    border: 1px solid #3a3a3a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.8rem;
}

article h2 {
    margin-top: 0;
    color: #ffffff;
}

article small {
    color: #bbbbbb;
}

/* ===========================
   Zweispaltiges Admin-Layout
   =========================== */

.admin-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Sidebar links */
.sidebar {
    width: 30%;
    background: #2b2b2b;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
}

.sidebar h3 {
    margin-top: 1.5rem;
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.post-list li {
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-list li span {
    flex: 1;
    color: #ddd;
}

.actions {
    display: flex;
    gap: 0.4rem;
}

/* Kleine Icon-Buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #444;
    color: #fff;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #666;
}

.btn-icon-danger {
    background: #8b2a2a;
}

.btn-icon-danger:hover {
    background: #b33;
}

/* ===========================
   Editor rechts
   =========================== */

.editor-card {
    flex: 1;
    background: #2b2b2b;
    border: 1px solid #3a3a3a;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.editor-card h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    color: #fff;
}

/* ===========================
   Formularelemente
   =========================== */

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    color: #f0f0f0;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #777;
    outline: none;
}

/* ===========================
   Buttons
   =========================== */

button,
.btn-primary {
    background-color: #444;
    color: #fff;
    padding: 12px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

button:hover,
.btn-primary:hover {
    background-color: #666;
}

/* ===========================
   Footer
   =========================== */

footer {
    background-color: #2a2a2a;
    color: #ccc;
    text-align: center;
    padding: 1.2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #3a3a3a;
}

article h2 a {
    color: #fff;
    text-decoration: none;
}

article h2 a:hover {
    text-decoration: underline;
}

/* ===========================
   Mobile Optimierung
   =========================== */

@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 2rem;
    }

    .editor-card {
        width: 100%;
    }

    .post-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .actions {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        gap: 0.6rem;
    }

    .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}