/* =============================================
   Neuridion Community Forum — Stylesheet
   ============================================= */

:root {
    /* Header / Dark Areas */
    --header-start: #0D0F1A;
    --header-mid: #1A1D35;
    --header-end: #222545;
    --footer-bg: #1A1D35;

    /* Content Area */
    --content-bg: #F5F5F8;
    --card-bg: #FFFFFF;
    --border: #EAEAEF;

    /* Akzentfarben */
    --orange: #E8713A;
    --orange-shadow: rgba(232, 113, 58, 0.3);
    --purple: #9B6DD7;

    /* Text */
    --text-heading: #1A1C2E;
    --text-body: #4A4D60;
    --text-secondary: #6B6E80;
    --text-muted: #A0A3B5;
    --text-faint: #B0B3C2;

    /* Status */
    --solved-green: #059669;
    --solved-bg: #D1FAE5;
    --error-red: #DC2626;
    --error-bg: #FEF2F2;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-body);
    background: var(--content-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.85; }

img { max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
    background: linear-gradient(180deg, var(--header-start) 0%, var(--header-mid) 50%, var(--header-end) 100%);
    position: relative;
    overflow: visible;
}

.header-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(155, 109, 215, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.nav-bar { padding: 16px 0; position: relative; z-index: 10; }

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.nav-logo:hover { opacity: 1; color: white; }

.nav-logo-text { color: #fff; }
.nav-logo-sub { color: var(--text-muted); font-weight: 400; font-size: 14px; }

.brain-icon { flex-shrink: 0; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-notif {
    position: relative;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
}
.nav-notif:hover { background: rgba(255,255,255,0.08); color: white; opacity: 1; }

.notif-badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--orange);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.nav-user-menu { position: relative; cursor: pointer; }
.nav-user-menu:hover .user-dropdown,
.nav-user-menu.open .user-dropdown { display: block; }

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 8px;
    z-index: 100;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 180px;
    padding: 6px;
    padding-top: 14px;
}
.user-dropdown a {
    display: block;
    padding: 8px 14px;
    color: var(--text-body);
    border-radius: 6px;
    font-size: 14px;
}
.user-dropdown a:hover { background: var(--content-bg); opacity: 1; }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ---- Header Spacer (pages without hero) ---- */
.header-spacer { height: 40px; }

/* ---- Hero ---- */
.hero {
    text-align: center;
    padding: 40px 20px 60px;
    position: relative;
    z-index: 5;
}

.hero h1 {
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-search {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-search svg {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.hero-search input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    backdrop-filter: blur(4px);
}

.hero-search input::placeholder { color: var(--text-muted); }
.hero-search input:focus { border-color: var(--purple); background: rgba(255,255,255,0.12); }

/* ---- Header Curve ---- */
.header-curve {
    height: 40px;
    background: var(--content-bg);
    margin-top: -40px;
    border-radius: 40% 40% 0 0 / 100% 100% 0 0;
    position: relative;
    z-index: 6;
}

/* ---- Flash Messages ---- */
.flash {
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 50;
}
.flash .container { display: flex; justify-content: space-between; align-items: center; }
.flash-success { background: var(--solved-bg); color: var(--solved-green); }
.flash-error { background: var(--error-bg); color: var(--error-red); }
.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s, opacity 0.15s;
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 4px 14px var(--orange-shadow);
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }

.btn-success { background: var(--solved-green); color: #fff; }
.btn-danger { background: var(--error-red); color: #fff; }

.btn-ghost.btn-dark {
    color: var(--text-body);
    border-color: var(--border);
}

/* ---- Forum Layout ---- */
.main-content { flex: 1; padding: 0 0 40px; }

.forum-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 28px;
    align-items: start;
}

/* ---- Sidebar ---- */
.sidebar { position: sticky; top: 20px; }

.sidebar-new { margin-bottom: 16px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: rgba(0,0,0,0.04); color: var(--text-heading); opacity: 1; }
.sidebar-link.active { background: rgba(155, 109, 215, 0.08); color: var(--purple); font-weight: 600; }

.sidebar-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; filter: grayscale(1); opacity: 0.6; }

/* ---- Join Banner ---- */
.join-banner {
    background: linear-gradient(135deg, var(--header-mid), var(--header-end));
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}
.join-banner h3 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.join-banner p { color: var(--text-muted); font-size: 13px; }
.join-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---- Sort Tabs ---- */
.sort-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--border);
}
.sort-tab {
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.sort-tab:hover { color: var(--text-heading); opacity: 1; }
.sort-tab.active { background: var(--content-bg); color: var(--text-heading); }

/* ---- Search Info ---- */
.search-info { margin-bottom: 16px; font-size: 14px; color: var(--text-secondary); }

/* ---- Thread Cards ---- */
.thread-card {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    color: var(--text-body);
    transition: box-shadow 0.15s, border-color 0.15s;
}
.thread-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-color: #D0D0D8;
    opacity: 1;
    color: var(--text-body);
}

.thread-card-left { flex-shrink: 0; position: relative; }

.solved-badge-small {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--solved-green);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid var(--card-bg);
}

.thread-card-body { flex: 1; min-width: 0; }

.thread-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.pin-badge { font-size: 11px; color: var(--text-muted); }
.lock-badge { font-size: 11px; }

.thread-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 4px;
    line-height: 1.4;
}

.thread-card-preview {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thread-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.meta-user { font-weight: 600; color: var(--text-secondary); }
.meta-dot { opacity: 0.4; }

/* ---- Avatar ---- */
.avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    user-select: none;
}

/* ---- Thread View ---- */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb-sep { margin: 0 6px; }

.post {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
}

.post-solution {
    border-color: var(--solved-green);
    background: linear-gradient(135deg, #F0FFF4 0%, var(--card-bg) 100%);
}

.post-left { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; }

.post-vote { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.like-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
    display: flex;
}
.like-btn:hover { border-color: var(--orange); color: var(--orange); }
.like-btn.liked { border-color: var(--orange); color: var(--orange); background: rgba(232, 113, 58, 0.08); }

.like-count { font-size: 12px; font-weight: 700; color: var(--text-secondary); }

.post-body { flex: 1; min-width: 0; }

.post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }

.solved-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: var(--solved-bg);
    color: var(--solved-green);
}

.solution-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: var(--solved-bg);
    color: var(--solved-green);
    margin-bottom: 10px;
}

.thread-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 16px;
    line-height: 1.3;
}

.post-content { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }

/* Markdown Body */
.markdown-body h1, .markdown-body h2, .markdown-body h3 { color: var(--text-heading); margin: 20px 0 10px; }
.markdown-body h1 { font-size: 20px; }
.markdown-body h2 { font-size: 17px; }
.markdown-body h3 { font-size: 15px; }
.markdown-body p { margin-bottom: 12px; }
.markdown-body ul, .markdown-body ol { margin: 0 0 12px 20px; }
.markdown-body li { margin-bottom: 4px; }
.markdown-body blockquote {
    border-left: 3px solid var(--purple);
    margin: 0 0 12px;
    padding: 8px 16px;
    color: var(--text-secondary);
    background: var(--content-bg);
    border-radius: 0 6px 6px 0;
}
.markdown-body code {
    font-family: ui-monospace, 'SF Mono', SFMono-Regular, monospace;
    background: var(--content-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--purple);
}
.markdown-body pre {
    background: #1E1E2E;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 12px;
}
.markdown-body pre code {
    background: none;
    padding: 0;
    color: #D4D4D4;
    font-size: 13px;
}
.markdown-body a { color: var(--orange); text-decoration: underline; }
.markdown-body img { border-radius: 8px; margin: 8px 0; }

.mention {
    color: var(--purple);
    font-weight: 600;
    background: rgba(155, 109, 215, 0.08);
    padding: 1px 4px;
    border-radius: 4px;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.post-author { font-weight: 600; color: var(--text-secondary); }

.role-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.role-admin { background: rgba(155, 109, 215, 0.15); color: var(--purple); }
.role-moderator { background: rgba(74, 143, 212, 0.15); color: #4A8FD4; }

.post-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.inline-form { display: inline; }

/* ---- Replies Section ---- */
.replies-section { margin-top: 28px; }
.replies-heading { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 16px; }

/* ---- Reply Form ---- */
.reply-form-section {
    margin-top: 28px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}
.reply-form-section h3 { font-size: 15px; font-weight: 700; color: var(--text-heading); margin-bottom: 12px; }

.editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: var(--content-bg);
}
.editor-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    font-family: inherit;
    transition: background 0.1s;
}
.editor-btn:hover { background: rgba(0,0,0,0.06); }

textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    font-family: ui-monospace, 'SF Mono', SFMono-Regular, monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    background: var(--card-bg);
    color: var(--text-body);
    transition: border-color 0.15s;
}
textarea:focus { border-color: var(--purple); }

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}
.form-hint { font-size: 12px; color: var(--text-muted); }

.locked-notice, .login-prompt {
    margin-top: 28px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---- Auth Pages ---- */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 { font-size: 22px; font-weight: 800; color: var(--text-heading); margin-top: 16px; }
.auth-header p { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

.brain-icon-large { display: inline-block; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { font-weight: 600; }

/* ---- Form Elements ---- */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.form-link { font-size: 12px; font-weight: 500; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    background: var(--card-bg);
    color: var(--text-body);
    transition: border-color 0.15s;
}
input:focus, select:focus { border-color: var(--purple); }

.input-disabled { background: var(--content-bg); color: var(--text-muted); cursor: not-allowed; }

input[type="color"] { padding: 2px; height: 38px; width: 60px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }

.color-picker-row { display: flex; align-items: center; gap: 12px; }

.form-page { display: flex; justify-content: center; padding: 20px 0; }
.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.form-card h1 { font-size: 22px; font-weight: 800; color: var(--text-heading); margin-bottom: 24px; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.form-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: end; }
.form-group-sm { max-width: 100px; }

/* ---- Profile ---- */
.profile-header-card {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
}
.profile-info h1 { font-size: 22px; font-weight: 800; color: var(--text-heading); }
.profile-joined, .profile-last-seen { font-size: 13px; color: var(--text-muted); }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.stat-card {
    text-align: center;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.stat-number { display: block; font-size: 24px; font-weight: 800; color: var(--text-heading); }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.section-heading { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 16px; }

.category-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-top: 6px; }

/* ---- Settings ---- */
.settings-section-title { font-size: 16px; font-weight: 700; color: var(--text-heading); margin: 8px 0 16px; }
.settings-divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.settings-form { margin-bottom: 8px; }

/* ---- Notifications ---- */
.notifications-header { margin-bottom: 20px; }
.notifications-header h1 { font-size: 22px; font-weight: 800; color: var(--text-heading); }

.notification-list { display: flex; flex-direction: column; gap: 4px; }

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-body);
    transition: box-shadow 0.15s;
}
.notification-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.05); opacity: 1; color: var(--text-body); }
.notification-item.unread { border-left: 3px solid var(--orange); }

.notif-icon { font-size: 20px; flex-shrink: 0; padding-top: 2px; }
.notif-body { flex: 1; }
.notif-body p { font-size: 14px; margin-bottom: 4px; }
.notif-thread { font-size: 13px; color: var(--text-secondary); display: block; }
.notif-time { font-size: 12px; color: var(--text-muted); }

/* ---- Admin ---- */
.admin-card { max-width: 900px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-nav .btn-ghost { color: var(--text-body); border-color: var(--border); }

.admin-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
}
.admin-edit-form { flex: 1; }
.admin-item-actions { margin-top: 8px; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-user-link { display: flex; align-items: center; gap: 8px; color: var(--text-body); font-weight: 500; }

.role-select {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 24px; }
.pagination-btn, .pagination-num {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: var(--card-bg);
    transition: all 0.15s;
}
.pagination-btn:hover, .pagination-num:hover { border-color: var(--orange); color: var(--orange); opacity: 1; }
.pagination-num.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.pagination-dots { color: var(--text-muted); font-size: 14px; padding: 0 4px; }

/* ---- Empty State ---- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { margin-bottom: 16px; }
.empty-state p { font-size: 15px; margin-bottom: 16px; }

/* ---- Footer ---- */
.site-footer {
    background: var(--footer-bg);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: auto;
}

/* ---- Mobile Menu Button ---- */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.2s;
}

/* ---- Install Page ---- */
.install-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(180deg, var(--header-start), var(--header-mid));
}
.install-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.install-card h1 { font-size: 22px; font-weight: 800; color: var(--text-heading); margin-bottom: 8px; }
.install-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.install-card .form-group { margin-bottom: 14px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .forum-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        background: var(--card-bg);
        z-index: 1000;
        padding: 20px;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        overflow-y: auto;
    }
    .sidebar.open { display: block; }

    .mobile-menu-btn { display: flex; }

    .nav-actions { gap: 8px; }

    .hero h1 { font-size: 24px; }
    .hero-search input { padding: 12px 12px 12px 42px; font-size: 14px; }

    .join-banner { flex-direction: column; text-align: center; }

    .thread-card-preview { display: none; }

    .post { padding: 14px; gap: 10px; }
    .thread-title { font-size: 18px; }

    .form-row { grid-template-columns: 1fr 1fr; }

    .admin-table { font-size: 11px; }
    .admin-table th, .admin-table td { padding: 6px 4px; }

    .profile-header-card { flex-direction: column; text-align: center; }
    .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }

    .auth-card { padding: 24px 20px; }

    .form-card { padding: 24px 20px; }

    .sort-tabs { overflow-x: auto; }
}

@media (max-width: 480px) {
    .nav-logo-sub { display: none; }
    .btn-ghost { display: none; }
    .profile-stats { grid-template-columns: 1fr 1fr 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
}

/* ---- Sidebar Overlay ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.sidebar-overlay.open { display: block; }
