:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    --navbar-height: 60px;
    --sidebar-width: 240px;
    --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; display: block; }

button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--navbar-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
}

.navbar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-brand {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.25rem; font-weight: 700; color: var(--gray-900);
    text-decoration: none; flex-shrink: 0;
}
.brand-icon { font-size: 1.5rem; color: var(--primary); }
.brand-text { background: linear-gradient(135deg, var(--primary), #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.brand-logo-img { height: 28px; width: auto; border-radius: var(--radius-sm); }

.navbar-nav { display: flex; gap: 0.25rem; }
.nav-link {
    padding: 0.5rem 1rem; border-radius: var(--radius);
    color: var(--gray-600); font-weight: 500; font-size: 0.9375rem;
    transition: all 0.2s;
}
.nav-link:hover { color: var(--primary); background: var(--primary-50); }
.nav-link.active { color: var(--primary); background: var(--primary-50); font-weight: 600; }

.navbar-search { flex: 1; max-width: 400px; }
.search-form { position: relative; }
.search-input {
    width: 100%; padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius-full);
    background: var(--gray-50); font-size: 0.875rem;
    transition: all 0.2s; outline: none;
}
.search-input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-100); }
.search-btn {
    position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--gray-400); padding: 0.375rem;
    transition: color 0.2s;
}
.search-btn:hover { color: var(--primary); }

.navbar-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.nav-icon-btn {
    position: relative; background: none; border: none;
    color: var(--gray-500); padding: 0.5rem; border-radius: var(--radius);
    transition: all 0.2s;
}
.nav-icon-btn:hover { color: var(--primary); background: var(--primary-50); }
.notification-dot {
    position: absolute; top: 0; right: -4px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--danger); border-radius: 8px;
    border: 2px solid white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.5625rem; font-weight: 700; color: white; line-height: 1;
}
.notification-badge {
    position: absolute; top: -4px; right: -8px;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--danger); border-radius: 9px;
    border: 2px solid white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.625rem; font-weight: 700; color: white; line-height: 1;
    box-sizing: border-box;
}

.nav-post-btn { display: flex; align-items: center; gap: 0.375rem; }

.user-menu { position: relative; }
.user-avatar-btn {
    background: none; border: 2px solid var(--gray-200);
    border-radius: 50%; padding: 0; overflow: hidden;
    width: 36px; height: 36px; cursor: pointer;
    transition: border-color 0.2s;
}
.user-avatar-btn:hover { border-color: var(--primary); }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white; font-weight: 600; font-size: 0.875rem;
}

.user-dropdown {
    position: absolute; top: calc(100% + 0.5rem); right: 0;
    width: 220px; background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200);
    opacity: 0; visibility: hidden; transform: translateY(-0.5rem);
    transition: all 0.2s; z-index: 1001;
}
.user-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-header { padding: 1rem; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; gap: 0.5rem; }
.dropdown-header strong { font-size: 0.9375rem; }
.dropdown-item {
    display: block; padding: 0.625rem 1rem; color: var(--gray-700);
    font-size: 0.875rem; transition: all 0.15s;
}
.dropdown-item:hover { background: var(--gray-50); color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 0.25rem 0; }
.text-danger { color: var(--danger) !important; }

.mobile-menu-btn {
    display: none; background: none; border: none; padding: 0.5rem;
    flex-direction: column; gap: 4px;
}
.mobile-menu-btn span {
    display: block; width: 22px; height: 2px; background: var(--gray-700);
    border-radius: 2px; transition: all 0.3s;
}

.mobile-header-actions {
    display: none; align-items: center; flex: 1; margin-left: 0.75rem; min-width: 0;
}
.mobile-inline-search {
    display: flex; align-items: center; gap: 0.375rem;
    background: var(--gray-50); border-radius: var(--radius-full);
    padding: 0.375rem 0.75rem; width: 100%; min-width: 0;
    border: 1px solid var(--gray-200); transition: all 0.2s; box-sizing: border-box;
}
.mobile-inline-search:focus-within { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-50); }
.mobile-inline-search svg { color: var(--gray-400); flex-shrink: 0; }
.mobile-inline-search-input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 0.875rem; color: var(--gray-800); min-width: 0;
}
.mobile-inline-search-input::placeholder { color: var(--gray-400); }

.mobile-tab-bar {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    height: 56px; background: white;
    border-top: 1px solid var(--gray-200);
    z-index: 1000; padding-bottom: env(safe-area-inset-bottom);
}
.mobile-tab-bar::before {
    content: ''; position: absolute; top: -1px; left: 0; right: 0;
    height: 1px; background: var(--gray-200);
}
.tab-bar-item {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 0.125rem;
    color: var(--gray-400); font-size: 0.625rem; font-weight: 500;
    text-decoration: none; position: relative; transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.tab-bar-item svg { transition: all 0.2s; }
.tab-bar-item.active { color: var(--primary); }
.tab-bar-item.active svg { stroke-width: 2.5; }
.tab-bar-icon-wrap { position: relative; }
.tab-notif-dot { top: -2px; right: -8px; }
.tab-bar-center {
    color: white;
}
.tab-bar-center-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    margin-top: -16px; transition: all 0.2s;
}
.tab-bar-center-btn svg { stroke: white; }
.tab-bar-center:active .tab-bar-center-btn {
    transform: scale(0.92);
}

.main-content {
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height) - 200px);
    padding: 1.5rem 1.5rem 0;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
    padding: 0.625rem 1.25rem; border-radius: var(--radius);
    font-weight: 500; font-size: 0.875rem; border: none;
    transition: all 0.2s; cursor: pointer; text-decoration: none;
    line-height: 1.4;
}
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--gray-600); border: 1.5px solid var(--gray-200); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-block { width: 100%; }

.level-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.125rem 0.5rem; border-radius: var(--radius-full);
    color: white; font-size: 0.6875rem; font-weight: 600;
    white-space: nowrap;
}
.level-badge-sm { font-size: 0.625rem; padding: 0.0625rem 0.375rem; }
.level-badge-md { font-size: 0.75rem; padding: 0.1875rem 0.625rem; }
.level-badge-label { opacity: 0.85; margin-right: 0.125rem; }
.level-common { background: linear-gradient(135deg, #6b7280, #9ca3af); }
.level-uncommon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.level-rare { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.level-epic { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.level-legendary { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.role-badge { display: inline-flex; align-items: center; padding: 0.0625rem 0.375rem; border-radius: var(--radius-full); font-size: 0.625rem; font-weight: 700; color: white; letter-spacing: 0.025em; white-space: nowrap; }
.role-badge-sm { font-size: 0.625rem; padding: 0.0625rem 0.375rem; }
.role-badge-md { font-size: 0.75rem; padding: 0.125rem 0.5rem; }
.role-admin { background: linear-gradient(135deg, #ef4444, #dc2626); }
.role-moderator { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.user-exp-bar {
    position: relative; height: 1.25rem; background: var(--gray-100);
    border-radius: var(--radius-full); overflow: hidden; margin-top: 0.5rem;
}
.exp-progress {
    position: absolute; top: 0; left: 0; height: 100%;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: var(--radius-full); transition: width 0.5s ease;
}
.exp-text {
    position: relative; z-index: 1; display: flex; align-items: center;
    justify-content: center; height: 100%; font-size: 0.6875rem;
    color: var(--gray-600); font-weight: 500;
}

.official-badge {
    display: inline-flex; padding: 0.0625rem 0.375rem;
    background: var(--warning); color: white;
    border-radius: var(--radius-sm); font-size: 0.6875rem; font-weight: 600;
}

.badge {
    display: inline-flex; padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full); font-size: 0.6875rem; font-weight: 600;
}
.badge-pin { background: var(--danger-light); color: var(--danger); }
.badge-featured { background: var(--warning-light); color: #b45309; }
.badge-best { background: var(--success-light); color: #15803d; }

.alert {
    padding: 0.875rem 1.25rem; border-radius: var(--radius);
    margin-bottom: 1rem; font-size: 0.875rem;
    display: flex; align-items: center; justify-content: space-between;
}
.alert-success { background: var(--success-light); color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: inherit; opacity: 0.6; }
.alert-close:hover { opacity: 1; }

.hero-section {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    border-radius: var(--radius-xl); padding: 3rem 2rem;
    color: white; text-align: center; margin-bottom: 2rem;
    position: relative; overflow: hidden;
}
.hero-section::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 400px; height: 400px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.hero-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.hero-desc { font-size: 1.125rem; opacity: 0.9; margin-bottom: 1.5rem; }
.hero-search { max-width: 500px; margin: 0 auto; display: flex; gap: 0.5rem; }
.hero-search-input {
    flex: 1; padding: 0.75rem 1.25rem; border: none; border-radius: var(--radius);
    font-size: 1rem; outline: none;
}
.hero-search-btn {
    padding: 0.75rem 1.5rem; background: rgba(255,255,255,0.2);
    color: white; border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: var(--radius); font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.hero-search-btn:hover { background: rgba(255,255,255,0.3); }

.section { margin-bottom: 2rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 0.5rem; min-width: 0; overflow: hidden; }
.section-title {
    font-size: 1.25rem; font-weight: 700; color: var(--gray-900);
    padding-bottom: 0.5rem; margin-bottom: 0.75rem; position: relative;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.section-title::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 2rem; height: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), #a855f7);
}
.section-tabs { display: flex; gap: 0.25rem; }
.tab-btn {
    padding: 0.375rem 0.875rem; border: none; background: none;
    color: var(--gray-500); font-weight: 500; font-size: 0.875rem;
    border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
}
.tab-btn.active { background: var(--primary); color: white; }
.tab-btn:hover:not(.active) { background: var(--gray-100); }
.tab-content { display: none; }
.tab-content.active { display: flex; flex-direction: column; gap: 1rem; }

.home-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.home-main { min-width: 0; }
.featured-section { margin-bottom: 1.5rem; }
.home-sidebar { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.home-page { overflow-x: hidden; max-width: 100%; }
.sidebar-card {
    background: white; border-radius: var(--radius-lg);
    padding: 1.25rem; border: 1px solid var(--gray-200);
}
.sidebar-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--gray-800); }
.sidebar-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.sidebar-card-header .sidebar-card-title { margin-bottom: 0; }
.sidebar-card-more { font-size: 0.8125rem; color: var(--gray-400); font-weight: 500; transition: color 0.2s; }
.sidebar-card-more:hover { color: var(--primary); }

.author-card .author-info {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.5rem 0;
}
.author-card .author-avatar-link {
    display: block; margin-bottom: 0.25rem;
}
.author-card .author-avatar {
    width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--gray-100);
}
.author-card .author-avatar.placeholder {
    width: 56px; height: 56px; font-size: 1.25rem;
}
.author-card .author-name {
    font-size: 1rem; font-weight: 600; color: var(--gray-800); text-decoration: none;
}
.author-card .author-name:hover { color: var(--primary); }

.post-stats-card .post-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
}
.post-stats-card .stat-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    padding: 0.625rem 0; border-radius: var(--radius); background: var(--gray-50);
}
.post-stats-card .stat-value {
    font-size: 1.125rem; font-weight: 700; color: var(--gray-800); line-height: 1;
}
.post-stats-card .stat-label {
    font-size: 0.75rem; color: var(--gray-400); font-weight: 500;
}

.mobile-scroll-wrap { display: none; }
.desktop-list { display: flex; flex-direction: column; }

.mobile-scroll-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 0.75rem; padding-bottom: 0.25rem;
}
.mobile-scroll-wrap::-webkit-scrollbar { display: none; }

.mobile-forum-grid { display: none; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.mobile-forum-card {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    padding: 0.875rem 0.25rem; border-radius: var(--radius-lg);
    background: white; text-align: center;
    color: var(--gray-700); text-decoration: none; transition: all 0.15s;
    border: 1px solid var(--gray-100);
}
.mobile-forum-card:active { transform: scale(0.95); background: var(--primary-50); border-color: var(--primary-200); }
.mobile-forum-icon { font-size: 1.75rem; line-height: 1; }
.mobile-forum-name {
    font-size: 0.75rem; font-weight: 500; color: var(--gray-700);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%; line-height: 1.3;
}

.user-scroll-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
    padding: 0.5rem; border-radius: var(--radius); text-decoration: none;
    color: var(--gray-700); flex-shrink: 0;
}
.user-scroll-item:hover { color: var(--primary); }
.user-scroll-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--gray-100);
}
.user-scroll-avatar.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white; font-size: 0.875rem; font-weight: 600; border: none;
}
.user-scroll-name {
    font-size: 0.6875rem; font-weight: 500; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 56px; text-align: center;
}

.forum-grid-mini { display: flex; flex-direction: column; gap: 0.5rem; }
.forum-card-mini {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.75rem; border-radius: var(--radius-lg);
    color: var(--gray-700); text-decoration: none;
    border: 1px solid transparent; transition: all 0.2s;
}
.forum-card-mini:hover {
    background: var(--primary-50); border-color: var(--primary-200);
    transform: translateX(2px);
}
.forum-card-mini-icon {
    width: 40px; height: 40px; border-radius: var(--radius);
    background: var(--gray-50); display: flex; align-items: center;
    justify-content: center; font-size: 1.375rem; flex-shrink: 0;
    transition: all 0.2s;
}
.forum-card-mini:hover .forum-card-mini-icon { background: white; box-shadow: var(--shadow-sm); }
.forum-card-mini-body { min-width: 0; flex: 1; }
.forum-card-mini-name {
    display: flex; align-items: center; gap: 0.375rem;
    font-weight: 600; font-size: 0.875rem; color: var(--gray-800);
    margin-bottom: 0.125rem;
}
.forum-card-mini:hover .forum-card-mini-name { color: var(--primary); }
.forum-card-mini-desc {
    display: block; font-size: 0.75rem; color: var(--gray-400);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 0.25rem; line-height: 1.4;
}
.forum-card-mini-stat {
    font-size: 0.6875rem; color: var(--gray-400);
}

.user-list-mini { display: flex; flex-direction: column; gap: 0.5rem; }
.user-item-mini {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem; border-radius: var(--radius);
    color: var(--gray-700); transition: all 0.15s;
}
.user-item-mini:hover { background: var(--gray-50); }
.user-item-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.user-item-avatar.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white; font-size: 0.75rem; font-weight: 600;
}
.user-item-info { min-width: 0; }
.user-item-name { display: block; font-weight: 500; font-size: 0.875rem; }
.user-item-stat { font-size: 0.75rem; color: var(--gray-400); }

.post-list { display: flex; flex-direction: column; gap: 1rem; }
.post-item {
    display: flex; gap: 0.75rem; padding: 1rem 1.25rem;
    background: white; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200); transition: all 0.2s;
}
.post-item:hover { border-color: var(--primary-200); box-shadow: var(--shadow-md); }
.post-item-left { flex-shrink: 0; padding-top: 0.125rem; }
.post-item-avatar-link { display: block; text-decoration: none; }
.post-item-avatar-img {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--gray-100);
}
.post-item-avatar-placeholder {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white; font-weight: 600; font-size: 0.875rem;
}
.post-item-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.375rem; }
.post-item-meta {
    display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap;
    font-size: 0.8125rem; line-height: 1.4;
}
.post-item-nickname {
    font-weight: 600; color: var(--gray-700); text-decoration: none;
    transition: color 0.15s;
}
.post-item-nickname:hover { color: var(--primary); }
.post-item-time { color: var(--gray-400); font-size: 0.75rem; }
.post-item-forum-tag {
    font-size: 0.6875rem; padding: 0.0625rem 0.4375rem; border-radius: var(--radius-full);
    background: var(--primary-50); color: var(--primary); font-weight: 500;
    text-decoration: none; transition: all 0.15s;
}
.post-item-forum-tag:hover { background: var(--primary); color: white; }
.post-item-content-link {
    display: block; text-decoration: none; color: inherit;
    overflow: hidden; min-width: 0;
}
.post-item-title {
    font-size: 1rem; font-weight: 600; line-height: 1.5; color: var(--gray-800);
    transition: color 0.15s; margin-bottom: 0.125rem; word-break: break-word;
}
.post-item:hover .post-item-title { color: var(--primary); }
.badge-pin, .badge-essence {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.6875rem; font-weight: 600; padding: 0.0625rem 0.375rem;
    border-radius: var(--radius-sm); margin-right: 0.25rem; vertical-align: middle;
}
.badge-pin { background: #fef3c7; color: #d97706; }
.badge-essence { background: #ede9fe; color: #7c3aed; }
.post-item-excerpt {
    font-size: 0.8125rem; color: var(--gray-500); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 0.25rem; word-break: break-word;
}
.post-item-thumb {
    width: 100%; max-width: 320px; aspect-ratio: 16/9;
    border-radius: var(--radius); overflow: hidden; background: var(--gray-100);
    margin-top: 0.375rem; flex-shrink: 0; min-width: 0;
}
.post-item-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s;
}
.post-item:hover .post-item-thumb img { transform: scale(1.03); }
.post-item-stats {
    display: flex; align-items: center; gap: 0.875rem; margin-top: 0.25rem;
}
.stat {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.75rem; color: var(--gray-400); line-height: 1;
}
.stat svg { flex-shrink: 0; }
.stat-liked { color: #ef4444; }
.stat-liked svg { opacity: 1; }
.stat-collected { color: #f59e0b; }
.stat-collected svg { opacity: 1; }
.stat-dim { color: var(--gray-300); }
.stat-link {
    text-decoration: none; color: var(--gray-400);
    transition: color 0.15s;
}
.stat-link:hover { color: var(--primary); }

.forum-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.875rem;
}
.forum-card {
    display: flex; gap: 0.875rem; padding: 1rem 1.125rem;
    background: white; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200); transition: all 0.2s;
    text-decoration: none; color: inherit; align-items: flex-start;
}
.forum-card:hover { border-color: var(--primary-200); box-shadow: var(--shadow-md); }
.forum-card.followed { border-color: var(--primary-200); background: linear-gradient(135deg, var(--primary-50), white); }
.forum-card.official { border-top: 3px solid var(--warning); }
.forum-card-icon-wrap {
    position: relative; flex-shrink: 0;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-50); border-radius: var(--radius);
    transition: all 0.2s;
}
.forum-card:hover .forum-card-icon-wrap { background: var(--primary-50); }
.forum-card-emoji { font-size: 1.5rem; line-height: 1; }
.forum-card.official .official-badge {
    position: absolute; top: -6px; right: -6px;
    font-size: 0.5625rem; padding: 0.0625rem 0.3125rem;
}
.forum-card-body { flex: 1; min-width: 0; }
.forum-card-name {
    font-size: 0.9375rem; font-weight: 600; color: var(--gray-800);
    margin-bottom: 0.25rem; transition: color 0.15s;
}
.forum-card:hover .forum-card-name { color: var(--primary); }
.forum-card-desc {
    font-size: 0.75rem; color: var(--gray-500); line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.forum-card-meta {
    display: flex; gap: 0.75rem;
}
.forum-card-stat {
    font-size: 0.6875rem; color: var(--gray-400);
    display: inline-flex; align-items: center; gap: 0.1875rem;
}

.forum-header {
    background: white; border-radius: var(--radius-xl);
    padding: 2rem; margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}
.forum-header-inner { display: flex; align-items: flex-start; gap: 1.5rem; }
.forum-icon-large { font-size: 3rem; }
.forum-header-info { flex: 1; }
.forum-title { font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.forum-desc { color: var(--gray-500); margin-top: 0.25rem; }
.forum-stats-row { display: flex; gap: 1.5rem; margin-top: 0.75rem; font-size: 0.875rem; color: var(--gray-500); }
.stat-item strong { color: var(--gray-800); font-weight: 600; }
.forum-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

.forum-sort-bar {
    display: flex; gap: 0.25rem; margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200); padding-bottom: 0.5rem;
}
.sort-btn {
    padding: 0.375rem 0.875rem; border-radius: var(--radius-full);
    font-size: 0.8125rem; font-weight: 500; color: var(--gray-500);
    text-decoration: none; transition: all 0.2s;
}
.sort-btn:hover { color: var(--primary); background: var(--primary-50); }
.sort-btn.active { color: white; background: var(--primary); }

.post-item.pinned { border-color: var(--primary-200); background: var(--primary-50); }
.post-item.featured { border-color: var(--warning); background: rgba(245, 158, 11, 0.04); }
.pin-badge { color: var(--danger); font-weight: 600; font-size: 0.6875rem; padding: 0.125rem 0.5rem; border-radius: var(--radius-full); background: rgba(239, 68, 68, 0.1); flex-shrink: 0; }
.essence-badge { color: var(--warning); font-weight: 600; font-size: 0.6875rem; padding: 0.125rem 0.5rem; border-radius: var(--radius-full); background: rgba(245, 158, 11, 0.1); flex-shrink: 0; }

.post-page { padding: 1.5rem 0; }
.breadcrumb { font-size: 0.8125rem; color: var(--gray-400); margin-bottom: 1rem; display: flex; gap: 0.375rem; align-items: center; }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--gray-300); }

.post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    max-width: 100%;
}
.post-main { min-width: 0; }

.post-header {
    margin-bottom: 1.5rem; padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}
.post-header-badges {
    display: flex; gap: 0.375rem; margin-bottom: 0.5rem;
}
.post-title {
    font-size: 1.5rem; font-weight: 700; line-height: 1.4;
    color: var(--gray-900); margin-bottom: 0.75rem;
}
.post-meta {
    display: flex; align-items: center; gap: 0.625rem;
}
.post-author-link { flex-shrink: 0; text-decoration: none; }
.post-author-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--gray-100);
}
.post-author-avatar.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white; font-weight: 600; font-size: 0.875rem;
}
.post-author-info { flex: 1; min-width: 0; }
.post-author-row {
    display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.125rem;
}
.post-author-name {
    font-weight: 600; color: var(--gray-800); font-size: 0.9375rem;
    text-decoration: none; transition: color 0.15s;
}
.post-author-name:hover { color: var(--primary); }
.post-meta-row {
    display: flex; align-items: center; gap: 0.25rem;
    font-size: 0.8125rem; color: var(--gray-400);
}
.meta-dot { color: var(--gray-300); }
.post-forum-link {
    color: var(--primary); text-decoration: none; font-weight: 500;
}
.post-forum-link:hover { text-decoration: underline; }
.post-edit-btn {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius);
    color: var(--gray-400); text-decoration: none; transition: all 0.15s;
}
.post-edit-btn:hover { color: var(--primary); background: var(--primary-50); }
.post-delete-btn:hover { color: #ef4444; background: #fef2f2; }
.delete-comment-btn { color: var(--gray-300) !important; }
.delete-comment-btn:hover { color: #ef4444 !important; }

.post-content {
    font-size: 1rem; line-height: 1.8; color: var(--gray-800);
    word-break: break-word; margin-bottom: 1.5rem;
}
.post-content h1, .post-content h2, .post-content h3 { margin: 1.5rem 0 0.75rem; color: var(--gray-900); }
.post-content h2 { font-size: 1.375rem; }
.post-content h3 { font-size: 1.125rem; }
.post-content p { margin-bottom: 1rem; }
.post-content blockquote {
    border-left: 3px solid var(--primary); padding: 0.75rem 1rem;
    margin: 1rem 0; background: var(--primary-50);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content code {
    background: var(--gray-100); padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.875em;
}
.post-content pre {
    background: var(--gray-900); color: var(--gray-100);
    padding: 1rem; border-radius: var(--radius); overflow-x: auto; margin: 1rem 0;
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content img { border-radius: var(--radius); margin: 1rem 0; max-width: 100%; }
.post-content video {
    max-width: 100%; border-radius: var(--radius); margin: 1rem 0;
    background: #000;
}
.post-content .video-container {
    position: relative; margin: 1rem 0; border-radius: var(--radius);
    overflow: hidden; background: #000;
}
.post-content .video-container video {
    display: block; width: 100%; margin: 0; border-radius: 0;
}
.post-content .video-container iframe {
    display: block; width: 100%; min-height: 360px; border: none; border-radius: 0;
}
.post-content iframe {
    max-width: 100%; border-radius: var(--radius); margin: 1rem 0;
}
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.post-content hr { border: none; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.post-content th, .post-content td { border: 1px solid var(--gray-200); padding: 0.5rem 0.75rem; text-align: left; }
.post-content th { background: var(--gray-50); font-weight: 600; }

.post-tags {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    padding-bottom: 1.25rem; border-bottom: 1px solid var(--gray-100);
    margin-bottom: 1rem;
}
.tag-item {
    font-size: 0.8125rem; color: var(--primary); background: var(--primary-50);
    padding: 0.25rem 0.625rem; border-radius: var(--radius-full);
    font-weight: 500; text-decoration: none; transition: all 0.15s;
}

.post-actions-bar {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 0; margin-bottom: 1rem;
}
.post-action {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.4375rem 0.875rem; border-radius: var(--radius-full);
    font-size: 0.8125rem; color: var(--gray-500); background: var(--gray-50);
    border: 1px solid var(--gray-200); cursor: pointer;
    text-decoration: none; transition: all 0.2s; font-family: inherit;
}
.post-action:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.post-action.active { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.post-action.like-btn.active { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.post-action.collect-btn.active { border-color: #f59e0b; color: #f59e0b; background: #fffbeb; }
.post-action .label { font-weight: 500; }

.adjacent-posts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1.5rem 0; }
.adjacent-post-card { display: flex; flex-direction: column; gap: 0.375rem; padding: 0.875rem 1rem; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); text-decoration: none; color: inherit; transition: all 0.2s; background: var(--gray-50); }
.adjacent-post-card:hover { border-color: var(--primary); background: var(--primary-50); }
.adjacent-post-card.empty { background: transparent; border-color: transparent; }
.adjacent-post-direction { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--gray-400); font-weight: 500; }
.adjacent-post-card:hover .adjacent-post-direction { color: var(--primary); }
.next-post { text-align: right; }
.next-post .adjacent-post-direction { justify-content: flex-end; }
.adjacent-post-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-700); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adjacent-post-card:hover .adjacent-post-title { color: var(--primary); }

.comments-section { margin-top: 1rem; }
.comments-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }

.comment-form { margin-bottom: 1.5rem; background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.comment-form:focus-within { border-color: var(--primary-200); box-shadow: 0 0 0 3px var(--primary-50); }
.comment-form-body { display: flex; gap: 0.75rem; }
.comment-form-avatar { flex-shrink: 0; padding-top: 0.25rem; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.comment-avatar.placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), #a855f7); color: white; font-weight: 600; font-size: 0.875rem; }
.comment-input-wrap { flex: 1; min-width: 0; position: relative; }
.comment-reply-indicator { display: flex; align-items: center; justify-content: space-between; padding: 0.375rem 0.75rem; background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-size: 0.8125rem; color: var(--primary); }
.comment-reply-indicator + .comment-textarea { border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: var(--primary-100); }
.reply-indicator-text { display: flex; align-items: center; gap: 0.25rem; }
.reply-indicator-text::before { content: '↩'; font-size: 0.875rem; }
.reply-indicator-close { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 1.125rem; line-height: 1; padding: 0 0.125rem; transition: color 0.15s; }
.reply-indicator-close:hover { color: var(--gray-600); }
.comment-textarea {
    width: 100%; padding: 0.75rem; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius); resize: vertical; outline: none;
    font-size: 0.9375rem; line-height: 1.6; transition: border-color 0.2s, box-shadow 0.2s;
    background: white; min-height: 80px;
}
.comment-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.comment-textarea::placeholder { color: var(--gray-300); }
.comment-input-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0.375rem 0.25rem 0; }
.emoji-toggle-btn {
    background: none; border: none; color: var(--gray-400);
    cursor: pointer; padding: 0.25rem; border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s; display: flex; align-items: center;
}
.emoji-toggle-btn:hover { color: var(--primary); background: var(--primary-50); }
.comment-char-count { font-size: 0.75rem; color: var(--gray-300); margin-left: auto; }
.comment-char-count.warning { color: #f59e0b; }
.comment-char-count.danger { color: #ef4444; }
.emoji-picker {
    position: absolute; bottom: calc(100% + 0.5rem); right: 0;
    width: 320px; background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200);
    z-index: 100; padding: 0.5rem;
    animation: emojiPickerIn 0.15s ease;
}
@keyframes emojiPickerIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.emoji-picker-tabs {
    display: flex; gap: 0.25rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100); margin-bottom: 0.5rem;
}
.emoji-tab {
    background: none; border: none; font-size: 1.25rem;
    cursor: pointer; padding: 0.25rem 0.5rem; border-radius: var(--radius-sm);
    transition: background 0.15s; opacity: 0.5;
}
.emoji-tab:hover { background: var(--gray-100); opacity: 0.8; }
.emoji-tab.active { background: var(--gray-100); opacity: 1; }
.emoji-grid {
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.125rem;
    max-height: 200px; overflow-y: auto;
}
.emoji-grid::-webkit-scrollbar { width: 4px; }
.emoji-grid::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
.emoji-item {
    background: none; border: none; font-size: 1.375rem;
    cursor: pointer; padding: 0.25rem; border-radius: var(--radius-sm);
    transition: background 0.1s, transform 0.1s; line-height: 1; text-align: center;
}
.emoji-item:hover { background: var(--gray-100); transform: scale(1.2); }
.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 0.75rem; }
.btn-comment-submit { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1.25rem; font-weight: 600; border-radius: var(--radius); transition: all 0.2s; }
.btn-comment-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px var(--primary-200); }
.btn-comment-submit:active { transform: translateY(0); }
.btn-comment-submit.loading { opacity: 0.7; pointer-events: none; }
.btn-comment-submit.loading svg { animation: spin 0.8s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.comment-login-prompt {
    text-align: center; padding: 2rem 1.5rem; margin-bottom: 1.5rem;
    background: var(--gray-50); border: 1px dashed var(--gray-200);
    border-radius: var(--radius-lg);
}
.login-prompt-icon { color: var(--gray-300); margin-bottom: 0.75rem; }
.login-prompt-text { color: var(--gray-400); font-size: 0.9375rem; }
.login-prompt-text a { color: var(--primary); font-weight: 600; text-decoration: none; }
.login-prompt-text a:hover { text-decoration: underline; }

.comment-toast {
    position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%) translateY(-20px);
    background: var(--gray-800); color: white; padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg); font-size: 0.875rem; font-weight: 500;
    display: flex; align-items: center; gap: 0.5rem; z-index: 99999;
    box-shadow: var(--shadow-xl); opacity: 0; transition: all 0.3s ease;
    pointer-events: none; max-width: 90vw;
}
.comment-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.comment-toast svg { flex-shrink: 0; opacity: 0.8; }

.comment-list { display: flex; flex-direction: column; }
.comment-item { padding: 1rem 0; border-bottom: 1px solid var(--gray-50); }
.comment-main { display: flex; gap: 0.75rem; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.375rem; }
.comment-header-left { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.comment-header-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.comment-floor { color: var(--gray-400); font-size: 0.75rem; font-weight: 500; background: var(--gray-50); padding: 0.125rem 0.375rem; border-radius: var(--radius-sm); }
.comment-author-name { font-weight: 600; color: var(--gray-700); font-size: 0.9375rem; }
.comment-author-name:hover { color: var(--primary); }
.comment-level { font-size: 0.6875rem; }
.comment-time { color: var(--gray-400); font-size: 0.8125rem; }
.comment-text { font-size: 0.9375rem; line-height: 1.6; color: var(--gray-700); }
.comment-actions { display: flex; gap: 1rem; margin-top: 0.5rem; }
.comment-action-btn {
    background: none; border: none; color: var(--gray-400);
    font-size: 0.8125rem; cursor: pointer; padding: 0.25rem 0;
    transition: color 0.2s; display: inline-flex; align-items: center; gap: 0.25rem;
}
.comment-action-btn:hover { color: var(--primary); }
.comment-action-btn.active { color: #ef4444; }
.comment-action-btn svg { flex-shrink: 0; }

.comment-replies {
    margin-top: 0.75rem; padding: 0.625rem;
    background: var(--gray-50); border-radius: var(--radius);
}
.reply-item {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.reply-item:last-child { border-bottom: none; }
.reply-user {
    display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.25rem;
}
.reply-avatar-link { display: flex; flex-shrink: 0; }
.reply-avatar {
    width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
}
.reply-avatar.placeholder {
    width: 20px; height: 20px; font-size: 0.5rem;
}
.reply-author { font-weight: 600; color: var(--primary); font-size: 0.8125rem; }
.reply-quote {
    margin: 0.375rem 0; padding: 0.5rem 0.625rem;
    background: white; border-radius: var(--radius-sm);
    border-left: 3px solid var(--gray-200);
}
.reply-quote .reply-quote {
    margin: 0.375rem 0 0 0; padding: 0.375rem 0.5rem;
    background: var(--gray-50); border-left-color: var(--gray-300);
}
.reply-quote .reply-quote .reply-quote {
    background: white; border-left-color: var(--gray-200);
}
.reply-quote-author {
    font-size: 0.75rem; font-weight: 600; color: var(--gray-500);
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.reply-quote-avatar {
    width: 14px; height: 14px; border-radius: 50%; object-fit: cover;
}
.reply-quote-avatar.placeholder {
    width: 14px; height: 14px; font-size: 0.375rem;
}
.reply-quote-text {
    font-size: 0.75rem; color: var(--gray-400); line-height: 1.5;
    margin-top: 0.25rem; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.reply-quote .reply-quote-author { font-size: 0.6875rem; }
.reply-quote .reply-quote-text { font-size: 0.6875rem; -webkit-line-clamp: 2; }
.reply-quote .reply-quote .reply-quote-author { font-size: 0.625rem; }
.reply-quote .reply-quote .reply-quote-text { font-size: 0.625rem; -webkit-line-clamp: 1; }
.reply-content { font-size: 0.875rem; color: var(--gray-700); line-height: 1.6; }
.reply-meta {
    display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem;
}
.reply-time { color: var(--gray-400); font-size: 0.75rem; }
.reply-action-btn {
    background: none; border: none; color: var(--gray-400);
    font-size: 0.75rem; cursor: pointer;
}
.reply-action-btn:hover { color: var(--primary); }

.post-sidebar {
    display: flex; flex-direction: column; gap: 1rem;
    position: sticky; top: 80px; align-self: start;
}
.forum-link { color: var(--primary); font-weight: 500; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.modal-box {
    background: white; border-radius: var(--radius-lg);
    width: 90%; max-width: 440px; box-shadow: var(--shadow-xl);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-100);
}
.modal-title { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.modal-close {
    background: none; border: none; font-size: 1.25rem; color: var(--gray-400);
    cursor: pointer; padding: 0.25rem; line-height: 1;
}
.modal-close:hover { color: var(--gray-600); }
.modal-body { padding: 1.25rem; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 0.5rem;
    padding: 0.75rem 1.25rem; border-top: 1px solid var(--gray-100);
}
.report-reasons { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.report-reason-option {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.875rem; color: var(--gray-700); cursor: pointer;
    padding: 0.5rem 0.75rem; border-radius: var(--radius);
    border: 1px solid var(--gray-200); transition: all 0.15s;
}
.report-reason-option:hover { border-color: var(--primary-200); background: var(--primary-50); }
.report-reason-option:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--primary); font-weight: 500; }
.report-reason-option input { accent-color: var(--primary); }
.report-detail-input {
    width: 100%; padding: 0.625rem 0.75rem; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius); resize: vertical; outline: none;
    font-size: 0.875rem; font-family: inherit; transition: border-color 0.2s;
}
.report-detail-input:focus { border-color: var(--primary); }

.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem; padding: 1.5rem 0;
}
.page-btn {
    padding: 0.5rem 0.875rem; border: 1px solid var(--gray-200);
    border-radius: var(--radius); color: var(--gray-600);
    font-size: 0.875rem; background: white; transition: all 0.2s;
    text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-info { color: var(--gray-400); font-size: 0.875rem; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-400); }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

.auth-page { display: flex; justify-content: center; padding: 2rem 0; }
.auth-card {
    width: 100%; max-width: 420px; background: white;
    border-radius: var(--radius-xl); padding: 2.5rem;
    border: 1px solid var(--gray-200); box-shadow: var(--shadow);
}
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; }
.auth-subtitle { color: var(--gray-400); text-align: center; margin-bottom: 2rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--gray-500); }
.auth-link { color: var(--primary); font-weight: 500; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.875rem; color: var(--gray-700); margin-bottom: 0.375rem; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius);
    background: white; font-size: 0.9375rem; outline: none;
    transition: all 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.form-input-sm { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }
.form-file { font-size: 0.875rem; }
.form-hint { font-size: 0.75rem; color: var(--gray-400); margin-top: 0.25rem; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

.wang-editor-wrap {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
    display: flex;
    flex-direction: column;
}
#wang-editor-content {
    min-height: 460px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
#wang-editor-content .w-e-text-container {
    min-height: 460px;
    background: white !important;
    flex: 1;
}
#wang-editor-content [data-slate-editor] {
    min-height: 460px;
    padding: 10px !important;
}
#wang-editor-content .w-e-text-container .w-e-text-placeholder {
    top: 10px !important;
    left: 10px !important;
}
#wang-editor-toolbar {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}
#wang-editor-toolbar .w-e-toolbar {
    border: none !important;
    background: transparent !important;
    flex-wrap: wrap;
}
#wang-editor-toolbar .w-e-bar-item button {
    border-radius: var(--radius-sm) !important;
}
.wang-editor-source {
    width: 100%; min-height: 460px; padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem; line-height: 1.6; color: var(--gray-800);
    background: #1e1e1e; color: #d4d4d4; border: none; resize: vertical;
    tab-size: 2; white-space: pre; overflow-wrap: normal; overflow-x: auto;
}
.w-e-full-screen-container {
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #fff !important;
}
body.editor-fullscreen .navbar {
    display: none !important;
}
body.editor-fullscreen .main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.wang-editor-wrap .w-e-modal {
    z-index: 10000 !important;
}
.wang-editor-wrap .w-e-drop-panel {
    z-index: 10000 !important;
}

.user-page { margin: 0 auto; }
.user-header {
    background: white; border-radius: var(--radius-xl);
    padding: 2rem; margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}
.user-header-inner { display: flex; align-items: flex-start; gap: 1.5rem; }
.user-page-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-page-avatar.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white; font-size: 2rem; font-weight: 700;
}
.user-header-info { flex: 1; }
.user-page-name { font-size: 1.375rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.user-bio { color: var(--gray-500); margin-top: 0.25rem; font-size: 0.9375rem; }
.user-bio-empty { color: var(--gray-400); font-style: italic; }
.user-bio-empty a { color: var(--primary); font-style: normal; font-weight: 500; }
.user-stats-row { display: flex; gap: 1.5rem; margin-top: 0.75rem; font-size: 0.875rem; color: var(--gray-500); }

.user-tabs {
    display: flex; gap: 0; margin-bottom: 1.5rem;
    background: white; border-radius: var(--radius); border: 1px solid var(--gray-200);
    overflow: hidden;
}
.user-tab {
    flex: 1; text-align: center; padding: 0.75rem 1rem;
    font-size: 0.9375rem; font-weight: 500; color: var(--gray-500);
    text-decoration: none; transition: all 0.2s;
    border-bottom: 2px solid transparent;
}
.user-tab:hover { color: var(--gray-700); background: var(--gray-50); }
.user-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); background: var(--primary-50); }

.settings-page {  margin: 0 auto; }
.settings-nav { display: flex; gap: 0.25rem; margin-bottom: 1.5rem; background: white; padding: 0.25rem; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.settings-nav-link {
    padding: 0.5rem 1rem; border-radius: var(--radius-sm);
    color: var(--gray-600); font-weight: 500; font-size: 0.875rem;
    transition: all 0.2s;
}
.settings-nav-link.active { background: var(--primary); color: white; }
.settings-nav-link:hover:not(.active) { background: var(--gray-50); }
.settings-card { background: white; padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }

.notifications-page { margin: 0 auto; }
.notifications-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.notification-list { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); overflow: hidden; }
.notification-item {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s; position: relative;
}
.notification-item:last-child { border-bottom: none; }
.notification-item.unread { background: var(--primary-50); }
.notification-item[onclick] { cursor: pointer; }
.notification-item[onclick]:hover { background: var(--gray-50); }
.notification-item.unread[onclick]:hover { background: #ede9fe; }
.notification-avatar { flex-shrink: 0; position: relative; }
.notif-avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.notif-avatar-badge {
    position: absolute; bottom: -2px; right: -2px;
    width: 18px; height: 18px; background: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.625rem; box-shadow: 0 0 0 1px var(--gray-200);
}
.notif-avatar-placeholder {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gray-100); display: flex; align-items: center; justify-content: center;
    font-size: 1.125rem;
}
.notification-body { flex: 1; min-width: 0; }
.notification-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.notification-type-tag {
    display: inline-flex; padding: 0.0625rem 0.375rem;
    border-radius: var(--radius-full); font-size: 0.6875rem; font-weight: 500;
}
.notification-type-tag.type-comment { background: #dbeafe; color: #1e40af; }
.notification-type-tag.type-like { background: #fce7f3; color: #9d174d; }
.notification-type-tag.type-follow { background: #ede9fe; color: #5b21b6; }
.notification-type-tag.type-system { background: #fef3c7; color: #92400e; }
.notification-type-tag.type-mention { background: #e0e7ff; color: #3730a3; }
.notification-type-tag.type-report { background: #fee2e2; color: #991b1b; }
.notification-type-tag.type-review { background: #d1fae5; color: #065f46; }
.notification-type-tag.type-exp_gain { background: #fef9c3; color: #854d0e; }
.notification-type-tag.type-level_up { background: #fce7f3; color: #9d174d; }
.notification-text { font-size: 0.9375rem; color: var(--gray-700); line-height: 1.5; }
.notification-content { font-size: 0.8125rem; color: var(--gray-400); margin-top: 0.25rem; line-height: 1.5; }
.notification-time { font-size: 0.75rem; color: var(--gray-400); }
.notification-link {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.75rem; color: var(--primary); font-weight: 500;
    margin-top: 0.375rem;
}
.mark-read-btn {
    background: none; border: none; color: var(--primary); font-size: 1rem;
    cursor: pointer; padding: 0.25rem; flex-shrink: 0;
    border-radius: var(--radius-sm); transition: background 0.15s;
}
.mark-read-btn:hover { background: var(--primary-50); }

@media (max-width: 768px) {
    .notification-item { padding: 0.875rem 1rem; }
    .notif-avatar-img, .notif-avatar-placeholder { width: 36px; height: 36px; }
    .notif-avatar-badge { width: 16px; height: 16px; font-size: 0.5625rem; }
}

.search-page {  margin: 0 auto; }
.search-header { margin-bottom: 1.5rem; }
.search-form-large { display: flex; gap: 0.75rem; margin-top: 1rem; }
.search-input-large {
    flex: 1; padding: 0.75rem 1rem; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius); font-size: 1rem; outline: none;
}
.search-input-large:focus { border-color: var(--primary); }
.search-info { color: var(--gray-500); font-size: 0.9375rem; margin-bottom: 1rem; }

.groups-hero { text-align: center; margin-bottom: 2.5rem; padding: 2rem 0; }
.groups-hero-title { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.5rem; }
.groups-hero-desc { font-size: 1rem; color: var(--gray-400); }

.post-create-page { margin: 0 auto; }
.post-form { background: white; padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }

.avatar-upload-area { text-align: center; margin-bottom: 1.5rem; }
.current-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto; display: block; }
.current-avatar.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white; font-size: 2.5rem; font-weight: 700;
}

.site-footer {
    background: white; border-top: 1px solid var(--gray-200);
    padding: 2rem 1.5rem; margin-top: 3rem;
}
.footer-inner {
    max-width: var(--container-max); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.footer-brand { font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 0.375rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--gray-500); font-size: 0.875rem; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { color: var(--gray-400); font-size: 0.8125rem; }

@media (max-width: 768px) {
    .navbar-nav, .navbar-search, .navbar-actions { display: none; }
    .mobile-header-actions { display: flex; }
    .mobile-tab-bar { display: grid; grid-template-columns: repeat(5, 1fr); }

    .main-content { width: 100%; max-width: 100%; padding: 0.75rem; padding-bottom: calc(0.75rem + 56px + env(safe-area-inset-bottom)); overflow-x: hidden; box-sizing: border-box; }

    .post-list { gap: 0.75rem; }
    .tab-content.active { gap: 0.75rem; }
    .post-item { padding: 0.75rem; gap: 0.5rem; max-width: 100%; box-sizing: border-box; }
    .post-item-thumb { max-width: 100%; width: 100%; }
    .post-item-right { overflow: hidden; }
    .post-item-avatar-img, .post-item-avatar-placeholder { width: 32px; height: 32px; font-size: 0.75rem; }
    .post-item-title { font-size: 0.9375rem; }
    .post-item-excerpt { -webkit-line-clamp: 2; font-size: 0.75rem; }
    .post-item-meta { font-size: 0.75rem; gap: 0.25rem; }
    .post-item-stats { gap: 0.625rem; }
    .stat { font-size: 0.6875rem; }
    .post-item-nickname { font-size: 0.75rem; }
    .post-item-time { font-size: 0.625rem; }
    .post-item-header-right .pin-badge,
    .post-item-header-right .essence-badge { font-size: 0.625rem; padding: 0.0625rem 0.375rem; }
    .post-item-forum-tag { font-size: 0.625rem; padding: 0.0625rem 0.375rem; }
    .post-item-stats { gap: 0.75rem; font-size: 0.6875rem; }
    .stat-item svg { width: 14px; height: 14px; }

    .hero-section { padding: 2rem 1rem; border-radius: var(--radius-lg); }
    .hero-title { font-size: 1.5rem; }
    .hero-search { flex-direction: column; }

    .home-layout { grid-template-columns: 1fr; gap: 1rem; }
    .home-main { width: 100%; min-width: 0; overflow: hidden; }
    .home-sidebar { order: 1; width: 100%; min-width: 0; }
    .featured-section { margin-bottom: 1rem; }
    .mobile-forum-grid { display: grid; }
    .mobile-scroll-wrap { display: flex; }
    .desktop-list { display: none; }
    .sidebar-card { padding: 1rem; width: 100%; box-sizing: border-box; }
    .sidebar-card-title { font-size: 0.875rem; margin-bottom: 0.75rem; }

    .forum-grid { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
    .forum-card { padding: 0.75rem; gap: 0.625rem; }
    .forum-card-icon-wrap { width: 40px; height: 40px; }
    .forum-card-emoji { font-size: 1.25rem; }
    .forum-card-name { font-size: 0.8125rem; }
    .forum-card-desc { -webkit-line-clamp: 2; font-size: 0.6875rem; }
    .forum-card-stat { font-size: 0.625rem; }
    .forum-card.official { border-top: 2px solid var(--warning); }

    .section { margin-bottom: 1.25rem; }
    .section-title { font-size: 1rem; padding-bottom: 0.375rem; margin-bottom: 0.625rem; }
    .section-title::after { width: 1.5rem; height: 2px; }
    .groups-hero { margin-bottom: 1.25rem; padding: 1rem 0; }
    .groups-hero-title { font-size: 1.375rem; }
    .groups-hero-desc { font-size: 0.875rem; }
    .page-title { font-size: 1.25rem; }
    .page-desc { font-size: 0.8125rem; }


    .forum-header { padding: 1rem; margin-bottom: 1rem; border-radius: var(--radius-lg); }
    .forum-header-inner { flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
    .forum-icon-large { font-size: 2.25rem; }
    .forum-header-info { width: 100%; }
    .forum-title { font-size: 1.125rem; justify-content: center; }
    .forum-desc { font-size: 0.8125rem; }
    .forum-stats-row { justify-content: center; gap: 1rem; margin-top: 0.5rem; font-size: 0.8125rem; }
    .forum-actions { align-self: center; }

    .user-header { padding: 1.25rem; }
    .user-header-inner { flex-direction: column; align-items: center; text-align: center; }
    .user-page-name { justify-content: center; }
    .user-stats-row { justify-content: center; }

    .post-title { font-size: 1.25rem; }
    .post-layout { grid-template-columns: 1fr; }
    .post-sidebar { display: none; }
    .post-header { margin-bottom: 1rem; padding-bottom: 1rem; }
    .post-author-avatar, .post-author-avatar.placeholder { width: 36px; height: 36px; font-size: 0.75rem; }
    .post-author-name { font-size: 0.875rem; }
    .post-meta-row { font-size: 0.75rem; }
    .post-actions-bar { gap: 0.375rem; }
    .post-action { padding: 0.375rem 0.625rem; font-size: 0.75rem; }
    .post-action .label { display: none; }

    .adjacent-posts { grid-template-columns: 1fr; gap: 0.5rem; margin: 1rem 0; }
    .next-post { text-align: left; }
    .next-post .adjacent-post-direction { justify-content: flex-start; flex-direction: row-reverse; }

    .post-content { font-size: 0.9375rem; line-height: 1.7; margin-bottom: 1rem; }
    .post-content h2 { font-size: 1.125rem; }
    .post-content h3 { font-size: 1rem; }
    .post-content blockquote { padding: 0.5rem 0.75rem; margin: 0.75rem 0; }
    .post-content pre { padding: 0.75rem; font-size: 0.8125rem; }
    .post-content img { margin: 0.75rem 0; }

    .editor-content-area { min-height: 350px; }
    .editor-content-area .w-e-text-container { min-height: 310px; }
    #wang-editor-content { min-height: 320px; }
    #wang-editor-content .w-e-text-container { min-height: 320px; }
    #wang-editor-toolbar { display: none; }
    #wang-editor-toolbar .w-e-toolbar { flex-wrap: wrap; }
    #wang-editor-toolbar .w-e-bar-item { padding: 0 2px !important; }
    .post-tags { margin-bottom: 1rem; }
    .tag-item { font-size: 0.75rem; padding: 0.125rem 0.5rem; }

    .post-actions-bar { gap: 0.375rem; padding: 0.75rem 0; margin-bottom: 1.5rem; }
    .action-btn { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
    .action-btn svg { width: 16px; height: 16px; }

    .comments-section { margin-top: 0; }
    .comments-title { font-size: 1rem; margin-bottom: 0.75rem; }
    .comment-form { margin-bottom: 1rem; padding: 0.75rem; }
    .comment-form-body { gap: 0.5rem; }
    .comment-form-avatar { display: none; }
    .comment-avatar { width: 32px; height: 32px; font-size: 0.75rem; }
    .comment-textarea { font-size: 0.875rem; padding: 0.625rem; min-height: 72px; }
    .emoji-picker { width: calc(100vw - 3rem); right: -0.5rem; }
    .comment-item { padding: 0.75rem 0; border-bottom: 1px solid var(--gray-100); }
    .comment-main { gap: 0.5rem; }
    .comment-author-avatar .comment-avatar { width: 28px; height: 28px; }
    .comment-header { margin-bottom: 0.25rem; }
    .comment-header-left { gap: 0.25rem; }
    .comment-author-name { font-size: 0.8125rem; }
    .comment-level { font-size: 0.625rem; }
    .comment-time { font-size: 0.6875rem; }
    .comment-text { font-size: 0.875rem; line-height: 1.5; }
    .comment-actions { gap: 0.75rem; margin-top: 0.25rem; }
    .comment-action-btn { font-size: 0.75rem; padding: 0.375rem 0; }
    .comment-replies { padding: 0.5rem; margin-top: 0.5rem; border-radius: var(--radius-sm); }
    .reply-item { font-size: 0.8125rem; margin-bottom: 0.25rem; line-height: 1.5; }
    .reply-action-btn { font-size: 0.6875rem; }

    .site-footer { display: none; }

    .settings-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
    .settings-nav-link { white-space: nowrap; }

    .auth-card { padding: 1.5rem; border-radius: var(--radius-lg); }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.25rem; }
    .navbar-inner { padding: 0 0.75rem; }
    .main-content { width: 100%; max-width: 100%; padding: 0.75rem; padding-bottom: calc(0.75rem + 56px + env(safe-area-inset-bottom)); overflow-x: hidden; box-sizing: border-box; }
    .mobile-forum-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .mobile-forum-card { padding: 0.75rem 0.125rem; }
    .mobile-forum-icon { font-size: 1.5rem; }
    .mobile-forum-name { font-size: 0.6875rem; }
}
