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

:root {
    --bg-0: #07080a;
    --bg-1: #0c0e12;
    --bg-2: #12151b;
    --bg-3: #1a1e26;
    --border: #1c2028;
    --border-hi: #262c38;
    --text-0: #e8eaed;
    --text-1: #a8adb8;
    --text-2: #6b7280;
    --text-3: #4b5563;
    --blue: #2563eb;
    --blue-hi: #3b82f6;
    --blue-lo: #1d4ed8;
    --green: #22c55e;
    --red: #dc2626;
    --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 10px;
    --radius-sm: 7px;
}

html, body {
    font-family: var(--sans);
    background: var(--bg-0);
    color: var(--text-0);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ============ BG ============ */
.bg-neverenige {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18vw;
    font-weight: 900;
    letter-spacing: -1vw;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 30%, #2563eb 70%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.05;
    z-index: 0;
    user-select: none;
    pointer-events: none;
    animation: pulse 10s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.09; transform: scale(1.02); }
}

.glow {
    position: fixed;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}
.glow-1 { top: -200px; left: -200px; animation: float1 15s ease-in-out infinite; }
.glow-2 { bottom: -200px; right: -200px; animation: float2 18s ease-in-out infinite; }
@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(100px, 50px); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-100px, -50px); }
}

main { position: relative; z-index: 5; min-height: calc(100vh - 200px); }

/* ============ NAV ============ */
.nav {
    background: rgba(12, 14, 18, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1.5px;
    color: var(--text-0);
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-brand-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    background: var(--blue);
    color: #fff;
    border-radius: 5px;
    letter-spacing: 0.5px;
    -webkit-text-fill-color: #fff;
}
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.nav-link:hover { color: var(--text-0); background: var(--bg-2); }
.nav-link.active { color: var(--blue-hi); background: rgba(37, 99, 235, 0.1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-user {
    font-size: 12px;
    font-family: var(--mono);
    color: var(--blue-hi);
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
    background: var(--blue-lo);
    border-color: var(--blue-lo);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}
.btn-ghost {
    background: transparent;
    color: var(--text-1);
    border-color: var(--border-hi);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text-0); }
.btn-lg { padding: 12px 28px; font-size: 14px; border-radius: var(--radius); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-full { width: 100%; }

/* ============ LAYOUT ============ */
.main { max-width: 1280px; margin: 0 auto; padding: 40px 24px 80px; }

/* ============ HERO ============ */
.hero {
    padding: 100px 24px 80px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-2);
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 50px;
    margin-bottom: 28px;
}
.hero-badge .dot {
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 2s infinite;
    box-shadow: 0 0 8px var(--green);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero-title {
    font-size: 84px;
    font-weight: 900;
    letter-spacing: -3px;
    line-height: 1;
    background: linear-gradient(135deg, #60a5fa, #3b82f6, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--text-1);
    margin-bottom: 14px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.15s backwards;
}
.hero-desc {
    font-size: 14px;
    color: var(--text-2);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.45s backwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ SECTIONS ============ */
.section { padding: 64px 24px; max-width: 1100px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.section-desc { font-size: 13px; color: var(--text-2); }

/* ============ GRID ============ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.grid-item {
    padding: 24px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}
.grid-item:hover {
    border-color: var(--border-hi);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.grid-item-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--blue-hi);
    background: rgba(37, 99, 235, 0.1);
    padding: 3px 8px;
    border-radius: 5px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.grid-item-title { font-size: 15px; font-weight: 600; color: var(--text-0); margin-bottom: 6px; }
.grid-item-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* ============ CTA ============ */
.cta {
    padding: 64px 32px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    max-width: 800px;
    margin: 40px auto 0;
}
.cta-title { font-size: 28px; font-weight: 800; color: var(--text-0); margin-bottom: 10px; letter-spacing: -0.5px; }
.cta-desc { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }

/* ============ AUTH ============ */
.auth-wrap {
    min-height: calc(100vh - 260px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: rgba(12, 14, 18, 0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease-out;
}
.auth-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-sub { font-size: 13px; color: var(--text-2); margin-bottom: 28px; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-0);
    background: var(--bg-0);
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.form-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #05070a;
}
.form-input::placeholder { color: var(--text-3); }
.form-textarea {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-0);
    background: var(--bg-0);
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    resize: vertical;
    line-height: 1.6;
}
.form-textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
select.form-input { cursor: pointer; }

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-2);
}
.form-footer a { color: var(--blue-hi); font-weight: 500; }
.form-footer a:hover { text-decoration: underline; }

.alert {
    padding: 12px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-family: var(--mono);
}
.alert-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

/* ============ DASHBOARD ============ */
.dashboard {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 24px;
}
.dashboard-header { margin-bottom: 30px; }
.dashboard-header h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dashboard-header .welcome { color: var(--text-2); font-size: 14px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.dash-card {
    padding: 28px;
    background: rgba(12, 14, 18, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
}
.dash-card h3 {
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.key-value {
    font-family: var(--mono);
    font-size: 15px;
    color: var(--blue-hi);
    background: rgba(37, 99, 235, 0.08);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    word-break: break-all;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(37, 99, 235, 0.2);
    text-align: center;
}
.key-value:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.5);
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}
.stat-label { color: var(--text-2); font-size: 14px; }
.stat-value { font-weight: 700; font-size: 18px; color: var(--text-0); }

.invite-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.invite-row:last-child { border-bottom: none; }
.invite-code {
    font-family: var(--mono);
    color: var(--blue-hi);
    font-weight: 500;
}
.used { color: var(--text-3); font-size: 12px; }
.free { color: var(--green); font-size: 12px; }

.btn-download {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    text-align: center;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.6);
}

.block {
    padding: 28px;
    background: rgba(12, 14, 18, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    margin-bottom: 20px;
}
.block h3 {
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* ============ FOOTER ============ */
.footer {
    position: relative;
    z-index: 5;
    border-top: 1px solid var(--border);
    background: rgba(12, 14, 18, 0.7);
    backdrop-filter: blur(20px);
    margin-top: 80px;
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
}
.footer-logo {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-desc {
    font-size: 12px;
    color: var(--text-2);
    max-width: 280px;
    line-height: 1.7;
}
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-0);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 14px;
}
.footer-link {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    padding: 5px 0;
    transition: color 0.15s;
}
.footer-link:hover { color: var(--blue-hi); }
.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-family: var(--mono);
    color: var(--text-3);
}
.footer-status { display: flex; align-items: center; gap: 6px; }
.footer-status .dot {
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--green);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .footer-container { grid-template-columns: 1fr; gap: 32px; }
    .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    .hero { padding: 60px 20px 50px; }
    .hero-title { font-size: 52px; letter-spacing: -2px; }
    .hero-subtitle { font-size: 15px; }
    .dash-grid { grid-template-columns: 1fr; }
    .nav-container { gap: 12px; padding: 0 16px; }
    .nav-links { display: none; }
    .footer-cols { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============ FORUM (XenForo / Nixware style) ============ */
.forum-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px;
}

.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.forum-header-title { font-size: 24px; font-weight: 700; color: var(--text-0); }
.forum-header-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.forum-back { margin-top: 20px; }

.forum-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}
.forum-tab {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.forum-tab:hover { color: var(--text-0); }
.forum-tab.active { color: var(--blue-hi); border-bottom-color: var(--blue-hi); }

.forum-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}
.forum-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* Секция (группа категорий) */
.forum-section {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.forum-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.forum-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-0);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.forum-section-toggle { font-family: var(--mono); font-size: 14px; color: var(--text-3); }

/* КАТЕГОРИЯ — сетка как в XenForo */
.forum-row {
    display: grid;
    grid-template-columns: 44px 1fr 80px 100px 200px;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.forum-row:last-child { border-bottom: none; }
.forum-row:hover { background: var(--bg-2); }

.forum-row-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-3);
    border-radius: var(--radius-sm);
    font-size: 20px;
}
.forum-row-info { min-width: 0; }
.forum-row-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.forum-row-name a { color: var(--text-0); }
.forum-row-name a:hover { color: var(--blue-hi); }
.forum-row-desc {
    font-size: 12px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-row-stat {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stat-num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text-0); }
.stat-lbl { font-size: 10px; color: var(--text-3); text-transform: uppercase; }

.forum-row-last {
    font-size: 11px;
    min-width: 0;
    text-align: right;
}
.last-title {
    font-size: 11px;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}
.last-meta { font-size: 10px; color: var(--text-3); font-family: var(--mono); }

/* СПИСОК ТЕМ в категории */
.forum-topics {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.forum-topics-empty {
    padding: 32px;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
    font-style: italic;
}

.forum-topic-row {
    display: grid;
    grid-template-columns: 50px 1fr 100px 100px 200px;
    gap: 14px;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.forum-topic-row:last-child { border-bottom: none; }
.forum-topic-row:hover { background: var(--bg-2); }

.topic-tag {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    padding: 3px 0;
    border-radius: 3px;
    background: var(--bg-3);
    color: var(--text-3);
}
.topic-tag.blue { background: rgba(37, 99, 235, 0.15); color: var(--blue-hi); }

.topic-main { min-width: 0; }
.topic-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    display: block;
    margin-bottom: 3px;
}
.topic-title:hover { color: var(--blue-hi); }
.topic-meta { font-size: 11px; color: var(--text-3); font-family: var(--mono); }
.topic-meta a { color: var(--blue-hi); }

.topic-stats { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.topic-last { font-size: 11px; color: var(--text-3); text-align: right; font-family: var(--mono); }

/* ОНЛАЙН */
.forum-online {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.online-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-0);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.online-users { font-size: 12px; color: var(--text-2); line-height: 1.7; word-break: break-word; }
.online-stats {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    font-family: var(--mono);
    color: var(--text-3);
}

/* САЙДБАР */
.forum-sidebar { display: flex; flex-direction: column; gap: 12px; }
.sidebar-card {
    padding: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-0);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-title .dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 2s infinite;
}
.sidebar-text { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.sidebar-hint { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-top: 6px; text-align: right; }

.progress-bar { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 3px; }

.sidebar-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
}
.sidebar-row:last-child { border-bottom: none; }
.sidebar-row .mono { font-family: var(--mono); color: var(--text-0); font-weight: 600; }

/* ТЕМА (thread) */
.forum-breadcrumb { font-size: 12px; color: var(--text-3); margin-bottom: 16px; font-family: var(--mono); }
.forum-breadcrumb a { color: var(--blue-hi); }
.forum-breadcrumb a:hover { text-decoration: underline; }

.thread-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.thread-title { font-size: 24px; font-weight: 700; color: var(--text-0); margin-bottom: 6px; }
.thread-meta { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.thread-meta a { color: var(--blue-hi); }

.thread-body { display: flex; flex-direction: column; gap: 12px; }

.post {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.post-side {
    padding: 16px;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    text-align: center;
}
.post-avatar {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 10px;
}
.post-author { font-size: 13px; color: var(--text-0); font-weight: 600; }
.post-author:hover { color: var(--blue-hi); }

.post-content { padding: 20px; }
.post-text { font-size: 14px; color: var(--text-1); line-height: 1.7; white-space: pre-wrap; word-wrap: break-word; }
.post-meta { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-top: 12px; }

.thread-locked {
    padding: 16px;
    text-align: center;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 12px;
}

.thread-reply {
    padding: 20px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 12px;
}
.thread-reply-title { font-size: 14px; font-weight: 700; color: var(--text-0); margin-bottom: 12px; }
.thread-reply form { display: flex; flex-direction: column; gap: 12px; }

.forum-form { display: flex; flex-direction: column; gap: 16px; max-width: 700px; }

/* ПРОФИЛЬ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.profile-avatar-lg {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    font-size: 32px;
    font-weight: 700;
    flex-shrink: 0;
}
.profile-main { flex: 1; }
.profile-username { font-size: 28px; font-weight: 700; color: var(--text-0); margin-bottom: 4px; }
.profile-meta { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.profile-stat {
    padding: 20px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}
.profile-stat-value { font-size: 32px; font-weight: 800; color: var(--blue-hi); font-family: var(--mono); margin-bottom: 4px; }
.profile-stat-label { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.5px; }

/* Адаптив */
@media (max-width: 1000px) {
    .forum-layout { grid-template-columns: 1fr; }
    .forum-row { grid-template-columns: 40px 1fr 60px 60px; }
    .forum-row-last { display: none; }
    .forum-topic-row { grid-template-columns: 40px 1fr 70px 70px; }
    .topic-last { display: none; }
    .post { grid-template-columns: 1fr; }
    .post-side { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============ ROLE BADGES (Discord style) ============ */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    border-radius: 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1.4;
}

.role-badge.role-owner     { background: rgba(239, 68, 68, 0.15);  color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.role-badge.role-admin     { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.4); }
.role-badge.role-moderator { background: rgba(34, 197, 94, 0.15);  color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.4); }
.role-badge.role-vip       { background: rgba(234, 179, 8, 0.15);  color: #eab308; border: 1px solid rgba(234, 179, 8, 0.4); }
.role-badge.role-beta      { background: rgba(6, 182, 212, 0.15);  color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.4); }
.role-badge.role-user      { background: rgba(107, 114, 128, 0.15); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.4); }

.user-with-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

/* ============ ROLE BADGES ============ */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    border-radius: 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1.4;
}
.role-badge.role-owner     { background: rgba(239, 68, 68, 0.15);  color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.role-badge.role-admin     { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.4); }
.role-badge.role-moderator { background: rgba(34, 197, 94, 0.15);  color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.4); }
.role-badge.role-vip       { background: rgba(234, 179, 8, 0.15);  color: #eab308; border: 1px solid rgba(234, 179, 8, 0.4); }
.role-badge.role-beta      { background: rgba(6, 182, 212, 0.15);  color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.4); }
.role-badge.role-user      { background: rgba(107, 114, 128, 0.15); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.4); }

.user-with-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-hi);
}

.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-hi);
    flex-shrink: 0;
}

.post-avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-hi);
    margin: 0 auto 10px;
    display: block;
}

.online-users a {
    color: var(--blue-hi);
    text-decoration: none;
}
.online-users a:hover {
    text-decoration: underline;
}
