/* ============================================================
   forum.css – Tactical Forum Dark Theme
   WBB 2.3 Stil | Survival Wiki Edition
   ============================================================ */

/* --- EXTRA VARIABLEN (ergänzen wiki.css) --- */
:root {
    --terminal-green: #4ade80;
    --alert-red: #ff3333;
    --blue-user: #93c5fd;
    --gold-accent: #c0a062;
    --bg-hover: rgba(192, 160, 98, 0.05);
    --bg-input: #111311;
}

/* --- GEMEINSAME LAYOUT-ANPASSUNGEN --- */
.main-content {
    padding-top: 30px;
}

/* --- FLASH MESSAGES --- */
.flash {
    padding: 0.9rem 1.5rem;
    border-radius: 3px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border-left: 4px solid;
}

.flash-success {
    background: rgba(74, 222, 128, 0.08);
    border-color: var(--terminal-green);
    color: var(--terminal-green);
}

.flash-error {
    background: rgba(255, 51, 51, 0.08);
    border-color: var(--alert-red);
    color: var(--alert-red);
}

.flash-info {
    background: rgba(192, 160, 98, 0.08);
    border-color: var(--accent);
    color: var(--accent);
}

/* --- BREADCRUMB --- */
.breadcrumb {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.bc-sep {
    margin: 0 0.4rem;
}

/* ============================================================
   FORUM INDEX (Übersicht – Kategorien & Boards)
   ============================================================ */
.forum-category-block {
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-card);
}

.forum-cat-header {
    background: var(--bg-sidebar);
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.05rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forum-board-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    transition: background 0.2s;
    cursor: pointer;
    user-select: none;
}

.forum-board-row:last-child {
    border-bottom: none;
}

.forum-board-row:hover {
    background: var(--bg-hover);
}

.board-icon {
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-muted);
    font-size: 1.1rem;
    min-width: 36px;
    text-align: center;
}

.board-icon.has-new {
    color: var(--accent);
}

.board-info {
    flex: 1;
    min-width: 0;
}

.board-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.board-name a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.forum-board-row:hover .board-name a {
    color: var(--accent);
}

.board-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.board-last-post {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.board-last-post a {
    color: var(--accent);
    text-decoration: none;
}

.board-last-post a:hover {
    text-decoration: underline;
}

.board-stats {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 110px;
    line-height: 1.7;
    flex-shrink: 0;
}

.board-stats span {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Forum-Index Footer Bar */
.forum-index-footer {
    margin-top: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.forum-index-footer strong {
    color: var(--text-main);
}

.forum-index-footer .stat-item::before {
    content: '›';
    margin-right: 8px;
    color: var(--accent);
}

/* ============================================================
   BOARD VIEW (Thread-Liste)
   ============================================================ */
.board-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-tactic {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-tactic:hover {
    background: var(--accent);
    color: #000;
}

.btn-tactic.btn-primary {
    background: var(--accent);
    color: #000;
    font-weight: bold;
}

.btn-tactic.btn-primary:hover {
    background: #d4af37;
    border-color: #d4af37;
}

.btn-tactic.btn-danger {
    color: var(--alert-red);
    border-color: var(--alert-red);
}

.btn-tactic.btn-danger:hover {
    background: var(--alert-red);
    color: #fff;
}

.thread-list-container {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    overflow: hidden;
}

.thread-list-header {
    background: var(--bg-sidebar);
    padding: 8px 1.5rem;
    display: grid;
    grid-template-columns: 1fr 100px 100px 170px;
    gap: 1rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.thread-row {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 100px 100px 170px;
    gap: 1rem;
    align-items: center;
    transition: background 0.2s;
}

.thread-row:last-child {
    border-bottom: none;
}

.thread-row:hover {
    background: var(--bg-hover);
}

.thread-row.pinned {
    background: rgba(74, 222, 128, 0.025);
}

.thread-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.thread-icon-sym {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 28px;
}

.thread-icon-sym.locked {
    color: var(--alert-red);
}

.thread-icon-sym.pinned {
    color: var(--terminal-green);
}

.thread-title-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-bottom: 3px;
}

.thread-title-link:hover {
    color: var(--accent);
}

.thread-meta-small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.u-link {
    color: var(--blue-user);
    text-decoration: none;
}

.u-link:hover {
    text-decoration: underline;
}

.u-link.admin {
    color: var(--alert-red);
}

.u-link.mod {
    color: #f59e0b;
}

.thread-stat-col {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

.thread-stat-col strong {
    display: block;
    color: var(--text-main);
    font-size: 0.95rem;
}

.last-post-col {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.last-post-col a {
    color: var(--accent);
    text-decoration: none;
}

.last-post-col a:hover {
    text-decoration: underline;
}

/* ============================================================
   THREAD VIEW (Posts)
   ============================================================ */
.thread-header-bar {
    margin-bottom: 1.5rem;
}

.thread-title-h1 {
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.thread-badge {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 2px;
    vertical-align: middle;
}

.badge-pinned {
    background: rgba(74, 222, 128, 0.15);
    color: var(--terminal-green);
    border: 1px solid var(--terminal-green);
}

.badge-locked {
    background: rgba(255, 51, 51, 0.1);
    color: var(--alert-red);
    border: 1px solid var(--alert-red);
}

.post-container {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Linke Spalte: Nutzer-Profil (WBB 2.3 Stil) */
.post-author-box {
    width: 190px;
    min-width: 190px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-avatar {
    width: 80px;
    height: 80px;
    background: #2a2d2a;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    color: var(--text-muted);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.post-author-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--blue-user);
    margin-bottom: 4px;
    text-decoration: none;
    display: block;
}

.post-author-name:hover {
    color: var(--accent);
}

.post-author-name.admin {
    color: var(--alert-red);
}

.post-author-name.mod {
    color: #f59e0b;
}

.post-author-rank {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.post-author-stats {
    text-align: left;
    font-size: 0.78rem;
    color: var(--text-muted);
    width: 100%;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    line-height: 1.8;
}

.post-author-stats strong {
    color: var(--text-main);
}

/* Rechte Spalte: Beitragsinhalt */
.post-content-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.post-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(22, 24, 20, 0.5);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-meta-bar a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.post-meta-bar a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.post-body {
    flex: 1;
    padding: 1.2rem 1.5rem;
    font-size: 0.97rem;
    line-height: 1.75;
    color: var(--text-main);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-signature {
    padding: 0.8rem 1.5rem;
    border-top: 1px dashed var(--border);
    font-size: 0.83rem;
    color: var(--text-muted);
    font-style: italic;
}

/* BBCode Styles */
.quote-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent);
    padding: 0.7rem 1rem;
    margin: 0.8rem 0;
    border-radius: 0 3px 3px 0;
}

.quote-author {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.quote-content {
    color: #aaa;
    font-size: 0.93rem;
}

.bb-code {
    background: #0d0f0e;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.8rem 1rem;
    margin: 0.8rem 0;
    overflow-x: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.88rem;
    color: var(--terminal-green);
    white-space: pre;
}

.bb-link {
    color: var(--accent);
}

.bb-link:hover {
    text-decoration: underline;
}

.bb-img {
    max-width: 100%;
    border-radius: 3px;
    border: 1px solid var(--border);
    display: block;
    margin: 0.5rem 0;
}

.bb-list {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.bb-list li::marker {
    color: var(--accent);
}

/* ============================================================
   QUICK REPLY & FORMS
   ============================================================ */
.reply-section,
.form-section {
    margin-top: 2rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
}

.reply-section h3,
.form-section h2 {
    margin: 0 0 1rem 0;
    font-family: 'Share Tech Mono', monospace;
    color: var(--accent);
    font-size: 1rem;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.83rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-family: 'Share Tech Mono', monospace;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.65rem 0.9rem;
    font-family: inherit;
    font-size: 0.97rem;
    border-radius: 2px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
    font-family: inherit;
    line-height: 1.6;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-submit {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* BBCode Toolbar */
.bb-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.bb-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 3px 9px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.bb-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1.5rem;
    justify-content: center;
}

.page-link {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 2px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.page-link:hover,
.page-link.active {
    color: var(--accent);
    border-color: var(--accent);
}

.page-link.active {
    background: rgba(192, 160, 98, 0.1);
    font-weight: bold;
}

.page-dots {
    color: var(--text-muted);
    padding: 5px 4px;
    font-size: 0.85rem;
}

/* ============================================================
   LOGIN & REGISTER FORMS (Zentriert)
   ============================================================ */
.auth-wrap {
    max-width: 440px;
    margin: 2rem auto;
}

.auth-wrap .wiki-header {
    margin-bottom: 1.5rem;
}

/* ============================================================
   PROFIL & MITGLIEDERLISTE
   ============================================================ */
.profile-card {
    display: flex;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: #2a2d2a;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 3rem;
    color: var(--text-muted);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-username {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    font-size: 0.87rem;
    color: var(--text-muted);
}

.profile-stats div strong {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
}

.member-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-card);
}

.member-table th {
    background: var(--bg-sidebar);
    padding: 0.7rem 1rem;
    text-align: left;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.member-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-main);
}

.member-table tr:last-child td {
    border-bottom: none;
}

.member-table tr:hover td {
    background: var(--bg-hover);
}

/* ============================================================
   FORUM FOOTER BAR
   ============================================================ */
.forum-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding: 1.2rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: 'Share Tech Mono', monospace;
}

/* ============================================================
   MOD ACTIONS BAR (Unter Thread-Titel)
   ============================================================ */
.mod-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Thread actions at bottom */
.thread-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {

    .thread-list-header,
    .thread-row {
        grid-template-columns: 1fr 80px;
    }

    .thread-list-header .col-replies,
    .thread-row .thread-stat-col:first-of-type,
    .last-post-col {
        display: none;
    }
}

@media (max-width: 768px) {
    .post-container {
        flex-direction: column;
    }

    .post-author-box {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .post-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .post-author-stats {
        display: none;
    }

    .board-stats {
        display: none;
    }

    .forum-index-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
}