/* =====================================================
   FORUM APP — Frontend CSS
   Modern dark/light design with glassmorphism
   ===================================================== */

/* ── Google Font Fallback & CSS Reset ────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Bloquea transiciones durante la carga inicial del tema (previene FOUC) */
.no-transitions * { transition: none !important; animation: none !important; }

:root {
    /* Dark theme (default in deep forest dark) */
    --bg:          #0b1c1a;
    --bg-2:        #0f2825;
    --bg-card:     #153e3a;
    --bg-card-h:   #1a4c47;
    --border:      rgba(217, 229, 223, 0.15);
    --border-h:    rgba(217, 229, 223, 0.3);
    --text:        #eaf5f0;
    --text-2:      #a9c3b7;
    --text-3:      #78988b;
    --accent:      #ef8d6f;
    --accent-2:    #ffab91;
    --accent-dim:  rgba(239, 141, 111, 0.15);
    --accent-glow: 0 0 24px rgba(239, 141, 111, 0.35);
    --success:     #4ab78e;
    --warning:     #ef8d6f;
    --danger:      #ef4444;
    --info:        #24645c;
    --nav-h:       78px;
    --radius:      16px;
    --radius-lg:   24px;
    --shadow:      0 14px 40px rgba(0,0,0,0.3);
    --shadow-lg:   0 24px 70px rgba(0,0,0,0.5);
    --glass:       rgba(21, 62, 58, 0.85);
    --glass-b:     rgba(217, 229, 223, 0.06);
    --transition:  all 0.22s cubic-bezier(0.4,0,0.2,1);
}
[data-theme="light"] {
    --bg:          #fffefa;
    --bg-2:        #fbf8f1;
    --bg-card:     #ffffff;
    --bg-card-h:   #fbf8f1;
    --border:      #d9e5df;
    --border-h:    #bfd7cc;
    --text:        #19312f;
    --text-2:      #6d7e79;
    --text-3:      #8fa49f;
    --accent:      #153e3a;
    --accent-2:    #24645c;
    --accent-dim:  #eaf5f0;
    --accent-glow: 0 0 24px rgba(21, 62, 58, 0.15);
    --glass:       rgba(255, 254, 250, 0.94);
    --glass-b:     rgba(21, 62, 58, 0.06);
    --shadow:      0 14px 40px rgba(24, 62, 57, 0.07);
    --shadow-lg:   0 24px 70px rgba(24, 62, 57, 0.11);
}

/* ── Base ─────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}
h1, h2, h3, h4, h5, h6, .brand, .forum-hero__title, .forum-section__title {
    font-family: 'Manrope', sans-serif;
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }

/* ── Utilities ────────────────────────────────────── */
.text-muted   { color: var(--text-3) !important; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mb-24 { margin-bottom: 24px; }
.ms-auto { margin-left: auto; }

.gradient-text {
    background: linear-gradient(135deg, var(--accent), #a78bfa, #67e8f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Navbar ───────────────────────────────────────── */
.forum-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: var(--glass);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.forum-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}
.forum-nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text) !important;
    flex-shrink: 0;
}
.forum-nav__logo {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
    box-shadow: var(--accent-glow);
}
.forum-nav__name { font-weight: 700; font-size: 17px; }

.forum-nav__search {
    flex: 1; max-width: 400px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    color: var(--text-3);
    transition: var(--transition);
}
.forum-nav__search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.forum-nav__search input {
    background: none; border: none; outline: none;
    color: var(--text); width: 100%; font-size: 14px;
}
.forum-nav__search input::placeholder { color: var(--text-3); }

.forum-nav__right {
    display: flex; align-items: center; gap: 10px; margin-left: auto;
}

/* Theme toggle */
.theme-toggle {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--bg-2); border: 1px solid var(--border);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: 18px; transition: var(--transition);
}
.theme-toggle:hover { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

/* Auth buttons */
.btn-auth {
    padding: 7px 18px; border-radius: 10px; font-size: 14px;
    font-weight: 500; transition: var(--transition); cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-auth--ghost {
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
}
.btn-auth--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-auth--primary {
    background: linear-gradient(135deg, #153e3a, #24645c); color: #fff; border: none;
    box-shadow: 0 4px 15px rgba(21, 62, 58, 0.25);
}
.btn-auth--primary:hover { opacity: 0.88; transform: translateY(-1px); }

/* New topic nav btn */
.btn-new-topic {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 10px;
    background: var(--accent-dim); border: 1px solid var(--accent);
    color: var(--accent); font-size: 14px; font-weight: 500;
    transition: var(--transition);
}
.btn-new-topic:hover { background: var(--accent); color: #fff; }

/* Nav user dropdown */
.nav-user { position: relative; }
.nav-user__trigger {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 10px; padding: 5px 12px 5px 6px;
    cursor: pointer; color: var(--text); transition: var(--transition);
    font-size: 14px; font-weight: 500;
}
.nav-user__trigger:hover { border-color: var(--accent); }
.nav-user__avatar { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.nav-user__name { font-size: 14px; }

/* Dropdown */
.forum-dropdown {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 200px; padding: 6px;
    margin-top: 8px !important;
}
.forum-dropdown__header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 8px;
    background: var(--bg-2); margin-bottom: 4px;
}
.forum-dropdown__header img { width: 40px; height: 40px; border-radius: 10px; }
.forum-dropdown__header strong { font-size: 14px; display: block; }
.forum-dropdown .dropdown-item {
    color: var(--text-2); border-radius: 8px; padding: 8px 12px;
    font-size: 13px; display: flex; align-items: center; gap: 8px;
    transition: var(--transition);
}
.forum-dropdown .dropdown-item:hover { background: var(--accent-dim); color: var(--accent); }
.forum-dropdown .dropdown-item.text-danger:hover { background: rgba(239,68,68,0.1); color: var(--danger); }
.forum-dropdown .dropdown-divider { border-color: var(--border); margin: 4px 0; }

/* Mobile menu btn */
.nav-mobile-menu {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text); font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* Mobile search */
.mobile-search { background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 10px 0; }
.mobile-search__inner {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 8px 14px; color: var(--text-3);
}
.mobile-search__inner input { background:none; border:none; outline:none; color:var(--text); flex:1; font-size:14px; }

/* ── Flash Messages ───────────────────────────────── */
.forum-flash {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.forum-flash__inner {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-radius: 10px;
    font-size: 14px; font-weight: 500;
}
.forum-flash--success { background: rgba(16,185,129,0.12); border-bottom-color: rgba(16,185,129,0.3); }
.forum-flash--success .forum-flash__inner { color: var(--success); }
.forum-flash--error { background: rgba(239,68,68,0.1); border-bottom-color: rgba(239,68,68,0.25); }
.forum-flash--error .forum-flash__inner { color: var(--danger); }
.forum-flash button { margin-left:auto; background:none; border:none; color:inherit; cursor:pointer; font-size:18px; opacity:.7; }
.forum-flash button:hover { opacity:1; }

/* ── Main Layout ──────────────────────────────────── */
.forum-main { padding: 32px 0; min-height: calc(100vh - var(--nav-h) - 80px); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ── Hero ─────────────────────────────────────────── */
.forum-hero {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 32px;
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}
.forum-hero__content { max-width: 640px; }
.forum-hero__title { font-size: 2.6rem; font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.forum-hero__subtitle { font-size: 1.1rem; color: var(--text-2); margin-bottom: 28px; }
.forum-hero__stats {
    display: flex; gap: 24px; flex-wrap: wrap;
}
.hero-stat {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 28px;
    min-width: 100px; text-align: center;
}
.hero-stat i { font-size: 24px; color: var(--accent); margin-bottom: 4px; }
.hero-stat span { font-size: 1.5rem; font-weight: 700; }
.hero-stat small { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing:.5px; }

/* ── Section ──────────────────────────────────────── */
.forum-section {}
.forum-section__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.forum-section__title { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* ── Category Cards ───────────────────────────────── */
.category-grid { display: flex; flex-direction: column; gap: 12px; }
.category-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px 24px;
    color: var(--text); text-decoration: none;
    transition: var(--transition); position: relative; overflow: hidden;
}
.category-card__accent {
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    border-radius: 4px 0 0 4px;
    transition: var(--transition);
}
.category-card:hover { background: var(--bg-card-h); border-color: var(--border-h); transform: translateX(4px); box-shadow: var(--shadow); }
.category-card:hover .category-card__accent { width: 6px; }
.category-card__icon {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.category-card__body { flex: 1; min-width: 0; }
.category-card__name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.category-card__desc { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.category-card__meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); }
.category-card__meta span { display: flex; align-items: center; gap: 4px; }
.category-card__last { min-width: 200px; max-width: 240px; }
.category-last { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--text-2); }
.category-last i { margin-top: 2px; flex-shrink: 0; }
.category-last__topic { font-weight: 500; color: var(--text); margin-bottom: 2px; }
.category-last__meta { color: var(--text-3); }
.category-last__empty { font-size: 12px; color: var(--text-3); font-style: italic; }
.category-card__arrow { color: var(--text-3); font-size: 20px; flex-shrink: 0; }

/* ── Recent Topics ────────────────────────────────── */
.recent-topics { display: flex; flex-direction: column; gap: 6px; }
.recent-topic-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 16px;
    color: var(--text); transition: var(--transition);
}
.recent-topic-item:hover { background: var(--bg-card-h); border-color: var(--border-h); }
.recent-topic-item__cat {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    background: var(--accent-dim); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.recent-topic-item__title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.recent-topic-item__meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-3); }
.recent-topic-item__meta span { display: flex; align-items: center; gap: 4px; }

/* ── Page Header ──────────────────────────────────── */
.page-header {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 28px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 28px;
}
.page-header__icon {
    width: 60px; height: 60px; border-radius: 16px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.page-header__title { font-size: 1.7rem; font-weight: 800; margin-bottom: 4px; }
.page-header__desc { color: var(--text-2); font-size: 14px; margin-bottom: 8px; }
.page-header__meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-3); }
.page-header__meta span { display: flex; align-items: center; gap: 4px; }

/* ── Topic List ───────────────────────────────────── */
.topic-list {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.topic-row {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.topic-row:last-child { border-bottom: none; }
.topic-row:hover { background: var(--bg-card-h); }
.topic-row__status { flex-shrink: 0; }
.topic-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; font-size: 16px;
}
.topic-badge--open  { background: var(--accent-dim); color: var(--accent); }
.topic-badge--pin   { background: rgba(245,158,11,0.12); color: var(--warning); }
.topic-badge--lock  { background: rgba(239,68,68,0.1); color: var(--danger); }

.topic-row__body { flex: 1; min-width: 0; }
.topic-row__title {
    font-size: 15px; font-weight: 600; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 5px;
}
.topic-row__title:hover { color: var(--accent); }
.badge-inline {
    display: inline-block; font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 5px; text-transform: uppercase; margin-right: 6px;
}
.badge-inline--pin  { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-inline--lock { background: rgba(239,68,68,0.12); color: var(--danger); }

.topic-row__meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-3); }
.topic-row__author { display: flex; align-items: center; gap: 5px; color: var(--text-2); }
.topic-row__author:hover { color: var(--accent); }
.topic-mini-avatar { width: 20px; height: 20px; border-radius: 5px; }

.topic-row__stats { display: flex; gap: 20px; }
.topic-stat { text-align: center; }
.topic-stat__value { font-size: 15px; font-weight: 700; display: block; }
.topic-stat__label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing:.5px; }

.topic-row__last { min-width: 140px; }
.topic-last-post { display: flex; align-items: center; gap: 8px; }
.topic-last-post__avatar { width: 28px; height: 28px; border-radius: 7px; }
.topic-last-post__user { font-size: 13px; font-weight: 500; }
.topic-last-post__time { font-size: 11px; color: var(--text-3); }

/* ── Topic View / Posts ───────────────────────────── */
.topic-header { margin-bottom: 28px; }
.topic-header__badges { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.badge-topic {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px;
}
.badge-topic--pin    { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-topic--lock   { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-topic--solved { background: rgba(16,185,129,0.12); color: var(--success); }
.topic-header__title { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.topic-header__meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.topic-header__author { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.topic-header__author:hover { color: var(--accent); }

/* Posts */
.posts-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.post-card {
    display: grid; grid-template-columns: 160px 1fr;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.post-card__author {
    padding: 20px 16px; border-right: 1px solid var(--border);
    text-align: center; background: var(--bg-2);
}
.post-author { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.post-author__avatar { width: 52px; height: 52px; border-radius: 14px; }
.post-author__name { font-size: 14px; font-weight: 600; color: var(--text); }
.post-author:hover .post-author__name { color: var(--accent); }
.post-author__stats { margin-top: 12px; font-size: 11px; color: var(--text-3); display: flex; flex-direction: column; gap: 4px; }
.post-author__stats span { display: flex; align-items: center; justify-content: center; gap: 4px; }

.post-card__content { padding: 16px 20px; }
.post-card__header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.post-card__time { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.post-card__actions { display: flex; align-items: center; gap: 8px; }
.post-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 8px; font-size: 13px;
    background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text-2); cursor: pointer; transition: var(--transition);
}
.post-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.post-action-btn.liked { background: rgba(239,68,68,0.1); border-color: var(--danger); color: var(--danger); }
.post-action-btn:disabled { opacity: .5; cursor: not-allowed; }
.like-count { font-size: 12px; font-weight: 600; }

.post-card__body { font-size: 15px; line-height: 1.75; color: var(--text); word-break: break-word; }

/* Role badges */
.role-badge {
    display: inline-block; font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .4px;
}
.role-admin { background: rgba(99,102,241,0.15); color: var(--accent); }
.role-mod   { background: rgba(6,182,212,0.12); color: var(--info); }
.role-user  { background: rgba(148,163,184,0.15); color: var(--text-3); }

/* ── Reply Form ───────────────────────────────────── */
.reply-form-wrapper {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px; margin-top: 24px;
}
.reply-form__title {
    display: flex; align-items: center; gap: 10px;
    font-size: 1rem; font-weight: 700; margin-bottom: 16px;
}
.reply-form__avatar { width: 32px; height: 32px; border-radius: 8px; }
.reply-textarea {
    width: 100%; min-height: 140px; background: var(--bg-2);
    border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); padding: 14px 16px; font-size: 14px;
    font-family: inherit; line-height: 1.65; resize: vertical;
    transition: var(--transition); outline: none;
}
.reply-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.reply-form__footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 14px; flex-wrap: wrap; gap: 12px;
}

/* Locked notice */
.locked-notice {
    display: flex; align-items: center; gap: 10px;
    background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius); padding: 14px 18px;
    color: var(--danger); font-size: 14px; margin-top: 24px;
}

/* Reply CTA (for guests) */
.reply-cta {
    text-align: center; padding: 40px 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); margin-top: 24px;
}
.reply-cta i { font-size: 40px; color: var(--accent-2); margin-bottom: 12px; }
.reply-cta p { color: var(--text-2); margin-bottom: 20px; }
.d-flex.gap-3 { display: flex; gap: 12px; flex-wrap: wrap; }
.justify-content-center { justify-content: center; }

/* ── Buttons ──────────────────────────────────────── */
.btn-forum-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
    background: linear-gradient(135deg, #153e3a 0%, #24645c 100%);
    color: #fff; border: none; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 15px rgba(21, 62, 58, 0.25);
}
.btn-forum-primary:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(21, 62, 58, 0.35); }

.btn-forum-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
    background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text-2); cursor: pointer; transition: var(--transition);
}
.btn-forum-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── New Topic ────────────────────────────────────── */
.new-topic-wrapper {
    max-width: 800px; margin: 0 auto;
}
.new-topic-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.new-topic-header__icon {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.new-topic-header__title { font-size: 1.6rem; font-weight: 800; }
.new-topic-header__cat { color: var(--text-2); font-size: 14px; }
.new-topic-form {}
.form-label-custom { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.input-custom {
    width: 100%; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); padding: 12px 16px;
    font-size: 15px; font-family: inherit; transition: var(--transition); outline: none;
}
.input-custom:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.textarea-custom { min-height: 280px; resize: vertical; line-height: 1.7; }
.new-topic-rules {
    background: var(--accent-dim); border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius); padding: 16px 20px;
}
.new-topic-rules h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.new-topic-rules ul { list-style: none; font-size: 13px; color: var(--text-2); }
.new-topic-rules ul li::before { content: '✓ '; color: var(--success); font-weight: bold; }

/* ── Profile ──────────────────────────────────────── */
.profile-wrapper { max-width: 600px; margin: 0 auto; }
.profile-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.profile-card__banner {
    height: 120px;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 50%, #06b6d4 100%);
}
.profile-card__body {
    display: flex; align-items: flex-end; gap: 16px;
    padding: 0 24px 20px; margin-top: -40px; flex-wrap: wrap;
}
.profile-card__avatar {
    width: 96px; height: 96px; border-radius: 20px;
    border: 4px solid var(--bg-card); flex-shrink: 0;
}
.profile-card__info { padding-top: 16px; }
.profile-card__name { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.profile-stats {
    display: flex; gap: 1px; border-top: 1px solid var(--border);
}
.profile-stat {
    flex: 1; text-align: center; padding: 16px 8px;
    border-right: 1px solid var(--border);
}
.profile-stat:last-child { border-right: none; }
.profile-stat__value { font-size: 1.2rem; font-weight: 800; display: block; margin-bottom: 4px; }
.profile-stat__label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }

/* ── Empty State ──────────────────────────────────── */
.empty-state {
    text-align: center; padding: 64px 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.empty-state i { font-size: 52px; color: var(--text-3); margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-2); font-size: 14px; }

/* ── Breadcrumb ───────────────────────────────────── */
.forum-breadcrumb { margin-bottom: 20px; }
.forum-breadcrumb .breadcrumb { background: none; padding: 0; margin: 0; font-size: 13px; }
.forum-breadcrumb .breadcrumb-item a { color: var(--text-3); }
.forum-breadcrumb .breadcrumb-item a:hover { color: var(--accent); }
.forum-breadcrumb .breadcrumb-item.active { color: var(--text-2); }
.forum-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--text-3); }

/* ── Back Link ────────────────────────────────────── */
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-3); transition: var(--transition);
}
.back-link:hover { color: var(--accent); }

/* ── Pagination ───────────────────────────────────── */
.pagination { gap: 4px; }
.page-link {
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-2); border-radius: 8px !important;
    padding: 6px 12px; font-size: 13px; transition: var(--transition);
}
.page-link:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-item.disabled .page-link { opacity: .4; }

/* ── Footer ───────────────────────────────────────── */
.forum-footer {
    background: var(--bg-2); border-top: 1px solid var(--border);
    padding: 24px 0;
}
.forum-footer__inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.forum-footer__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.forum-footer__brand i { color: var(--accent); font-size: 20px; }
.forum-footer__copy { font-size: 13px; color: var(--text-3); margin: 0; }
.forum-footer__links { display: flex; gap: 16px; }
.forum-footer__links a { font-size: 13px; color: var(--text-3); }
.forum-footer__links a:hover { color: var(--accent); }

/* ── Bootstrap Override ───────────────────────────── */
.dropdown-menu { --bs-dropdown-bg: var(--bg-card); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .forum-hero__title { font-size: 1.9rem; }
    .post-card { grid-template-columns: 1fr; }
    .post-card__author {
        display: flex; align-items: center; gap: 12px;
        border-right: none; border-bottom: 1px solid var(--border);
        padding: 14px 16px; text-align: left;
    }
    .post-author { flex-direction: row; align-items: center; }
    .post-author__stats { flex-direction: row; margin-top: 0; }
    .category-card__last { display: none; }
    .forum-hero { flex-direction: column; text-align: center; }
    .forum-hero__stats { justify-content: center; }
}
@media (max-width: 576px) {
    .forum-hero__title { font-size: 1.6rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .forum-footer__inner { flex-direction: column; align-items: flex-start; }
    .forum-nav__name { display: none; }
}

/* ── Animations ───────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.category-card,
.topic-row,
.post-card,
.recent-topic-item {
    animation: fadeInUp .3s ease both;
}
.category-card:nth-child(1) { animation-delay: .04s; }
.category-card:nth-child(2) { animation-delay: .08s; }
.category-card:nth-child(3) { animation-delay: .12s; }
.category-card:nth-child(4) { animation-delay: .16s; }
.category-card:nth-child(5) { animation-delay: .20s; }
