/* ==================================================
   FORUM – BEREINIGT & USERFREUNDLICH
   kompatibel mit main.css & dashboard.css
================================================== */

/* =========================
   Container & Header
========================= */
.forum-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px;
}

.forum-header {
    background: #1b1b1b;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 25px;
}

.forum-header h1 {
    margin: 0 0 6px 0;
    font-size: 1.9em;
    font-weight: 600;
    color: #ffffff;
}

.forum-header p {
    margin: 0;
    font-size: 0.95em;
    color: #b0b0b0;
}

/* =========================
   Neuer Thread (Card)
========================= */
.card {
    background: #1b1b1b;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 25px;
}

.card h2 {
    margin-top: 0;
    color: #fff;
    font-size: 1.3em;
}

.card input[type="text"],
.card textarea {
    width: 100%;
    background: #121212;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    margin-bottom: 10px;
}

.card input::placeholder {
    color: #777;
}

.card button {
    background: #007bff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
}

.card button:hover {
    background: #0062cc;
}

/* =========================
   Threads Liste
========================= */
.forum-threads {
    background: #1b1b1b;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
}

.forum-threads h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
    color: #fff;
}

/* =========================
   Tabelle
========================= */
.forum-table {
    width: 100%;
    border-collapse: collapse;
    background: #000000d4;
    border-radius: 10px;
    overflow: hidden;
}

.forum-table th,
.forum-table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.forum-table th {
    background: #242424;
    color: #fff;
    font-weight: 600;
    border-bottom: 1px solid #333;
}

.forum-table td {
    border-bottom: 1px solid #2f2f2f;
    color: #ddd;
}

.forum-table tr:nth-child(even) {
    background: #1a1a1a;
}

.forum-table tr:hover {
    background: #2c2c2c;
}

.forum-table a {
    color: #4da6ff;
    font-weight: 600;
    text-decoration: none;
}

.forum-table a:hover {
    text-decoration: underline;
}

/* =========================
   Autor & Avatar
========================= */
.forum-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.forum-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #3a3a3a;
}

/* =========================
   Leer-Zustand
========================= */
.forum-empty {
    padding: 20px;
    text-align: center;
    background: #181818;
    border: 1px dashed #333;
    border-radius: 10px;
    color: #888;
}

/* =========================
   THREAD VIEW / POSTS
========================= */
.forum-posts {
    margin-bottom: 30px;
}

.forum-post-card {
    background: #1b1b1b;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.forum-post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.forum-post-author strong {
    color: #fff;
}

.forum-post-time {
    font-size: 0.85em;
    color: #888;
}

.forum-post-content {
    color: #ddd;
    line-height: 1.6;
    font-size: 0.95em;
}

.forum-post-actions {
    margin-top: 12px;
    text-align: right;
}

.forum-post-actions a {
    color: #ff6b6b;
    font-size: 0.9em;
    text-decoration: none;
}

.forum-post-actions a:hover {
    text-decoration: underline;
}

.forum-reply {
    margin-top: 30px;
}

/* =============================== */
/* MOBILE & SEO FIX – ERGÄNZUNGEN */
/* =============================== */

/* Beiträge semantisch klarer */
.forum-post-card {
    overflow-wrap: anywhere;
}

/* Autorbereich auf Mobile stapeln */
@media (max-width: 768px) {
    .forum-post-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .forum-post-author img {
        width: 42px;
        height: 42px;
    }

    .forum-post-author div {
        line-height: 1.3;
    }
}

/* Post Inhalt besser lesbar */
.forum-post-content {
    word-break: break-word;
}

/* Aktionen Mobile-freundlich */
.forum-post-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.forum-post-actions a {
    padding: 6px 10px;
    border-radius: 6px;
    background: #242424;
}

.forum-post-actions a:hover {
    background: #2f2f2f;
}

/* Pagination Touch-Ziele (falls vorhanden) */
.forum-pagination a {
    padding: 8px 12px;
    border-radius: 6px;
}

/* Antwortformular Mobile */
@media (max-width: 768px) {
    .forum-reply textarea {
        min-height: 180px;
    }

    .forum-reply button {
        width: 100%;
        padding: 12px;
        font-size: 1em;
    }
}

/* Verhindert horizontales Scrollen */
.forum-container,
.forum-posts {
    max-width: 100%;
    overflow-x: hidden;
}
