/* ========================================
   雾韵社区 - 优雅主题（含暗黑模式）
   ======================================== */

:root {
    /* 亮色模式 */
    --bg: #f0f4f8;
    --bg-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.6);
    --text: #1e2e3d;
    --text-secondary: #5a748b;
    --border: #e2e9f0;
    --shadow: 0 8px 30px rgba(60, 80, 100, 0.08);
    --primary: #4a6f85;
    --primary-light: #6c8ba0;
    --primary-dark: #2f4f66;
    --navbar-bg: rgba(30, 46, 61, 0.92);
    --navbar-text: rgba(255, 255, 255, 0.8);
    --hero-bg: linear-gradient(135deg, #dce8f2, #ecf3f8);
    --input-bg: #fafcfe;
    --input-border: #dce3ec;
    --post-hover: #f8fafc;
    --btn-secondary-bg: #e8eef4;
    --btn-secondary-hover: #d5dfe8;
}

/* 暗黑模式 */
body.dark-mode {
    --bg: #1a2430;
    --bg-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    --card-bg: rgba(30, 42, 56, 0.88);
    --card-border: rgba(255, 255, 255, 0.06);
    --text: #e8edf2;
    --text-secondary: #9ab0c4;
    --border: #2c3e50;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --primary: #8bb3cb;
    --primary-light: #aac8db;
    --primary-dark: #5f859c;
    --navbar-bg: rgba(10, 18, 28, 0.92);
    --navbar-text: rgba(255, 255, 255, 0.85);
    --hero-bg: linear-gradient(135deg, #1e2f3f, #253a4a);
    --input-bg: #1e2c3a;
    --input-border: #34495e;
    --post-hover: #1e2f3f;
    --btn-secondary-bg: #2c4052;
    --btn-secondary-hover: #3a5066;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg) var(--bg-noise) repeat;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
}

/* 背景光晕（高级感） */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(74, 111, 133, 0.08), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
body.dark-mode::before {
    background: radial-gradient(circle, rgba(139, 179, 203, 0.10), transparent 70%);
}
body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(108, 139, 160, 0.06), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
body.dark-mode::after {
    background: radial-gradient(circle, rgba(170, 200, 219, 0.08), transparent 70%);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ---------- 导航栏 ---------- */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo i {
    color: #b6d4e8;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 6px;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--navbar-text);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 40px;
    transition: 0.25s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-menu a i {
    font-size: 1rem;
    opacity: 0.7;
}
.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.12);
    color: white;
}
.nav-menu a.active {
    background: rgba(255,255,255,0.18);
}

/* 用户信息 */
.user-info-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px !important;
    border-radius: 40px !important;
    background: rgba(255,255,255,0.06);
    color: white !important;
}
.user-info-link:hover {
    background: rgba(255,255,255,0.15) !important;
}
.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

/* 主题切换按钮 */
.theme-toggle {
    background: rgba(255,255,255,0.10);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.20);
    transform: rotate(20deg);
}
body.dark-mode .theme-toggle {
    background: rgba(255,255,255,0.15);
}
body.dark-mode .theme-toggle:hover {
    background: rgba(255,255,255,0.25);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.hamburger span {
    width: 26px;
    height: 2.5px;
    background: white;
    border-radius: 4px;
}

/* ---------- 其余样式保持不变（但颜色已跟随变量） ---------- */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    transition: background 0.3s, border 0.3s, box-shadow 0.3s;
}
.card:hover {
    box-shadow: 0 12px 40px rgba(60, 80, 100, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 4px 12px rgba(74, 111, 133, 0.25);
    text-decoration: none;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 111, 133, 0.35);
}
.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text);
    box-shadow: none;
}
.btn-secondary:hover {
    background: var(--btn-secondary-hover);
}
.btn-danger {
    background: linear-gradient(135deg, #e57373, #c62828);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.25);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #ef9a9a, #b71c1c);
}
.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* 帖子 */
.post-item {
    background: var(--card-bg);
    backdrop-filter: blur(4px);
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    transition: 0.25s;
}
.post-item:hover {
    border-color: var(--primary-light);
    background: var(--post-hover);
}
.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
}
.post-title:hover {
    color: var(--primary-light);
}

/* 分页 */
.pagination button {
    padding: 8px 20px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    transition: 0.25s;
    color: var(--text);
}
.pagination button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}
.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 表单 */
.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    transition: 0.25s;
    background: var(--input-bg);
    color: var(--text);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 111, 133, 0.1);
}

/* Hero */
.hero {
    background: var(--hero-bg);
    padding: 48px 32px;
    border-radius: 20px;
    margin-bottom: 32px;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: background 0.3s;
}
.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text);
}
.hero p {
    color: var(--text-secondary);
}

/* 评论 */
.comment-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.comment-author {
    font-weight: 600;
    color: var(--primary-dark);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 32px 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    margin-top: 48px;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 16px 0;
        background: var(--navbar-bg);
        border-radius: 0 0 20px 20px;
    }
    .nav-menu.active {
        display: flex;
    }
    .hamburger {
        display: flex;
    }
    .nav-container {
        flex-wrap: wrap;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .card {
        padding: 20px;
    }
}
/* 统计数字 */
#followerCount, #followingCount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}