/* 保留核心样式变量，移除侧边栏/导航/搜索相关变量 */
:root {
    --primary-color: #2b6cb0;
    --primary-hover: #2563eb;
    --accent-color: #ecc94b;
    --bg-body: #f5f7fa;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-secondary: #4a5568;
    --text-tertiary: #666666;
    --text-quaternary: #999999;
    --bg-interactive: #ebf8ff;
    --border-color: #e2e8f0;
    --border-light: #eeeeee;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(43, 108, 176, 0.15);
    --shadow-mobile: rgba(43, 108, 176, 0.12);
    --gradient-start: #ebf8ff;
    --gradient-end: #f0f8fb;
    /* 新增爆红标签颜色变量 */
    --hot-color: #e53e3e;
}
:root.night-mode {
    --primary-color: #63b3ed;
    --primary-hover: #90cdf4;
    --accent-color: #f6ad55;
    --bg-body: #1a202c;
    --bg-card: #2d3748;
    --text-main: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #cbd5e0;
    --text-quaternary: #94a3b8;
    --bg-interactive: #273449;
    --border-color: #4a5568;
    --border-light: #374151;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --shadow-hover: rgba(99, 179, 237, 0.2);
    --shadow-mobile: rgba(99, 179, 237, 0.15);
    --gradient-start: #1a202c;
    --gradient-end: #273449;
    --hot-color: #fc8181;
}
:root.eye-care-mode {
    --primary-color: #8b7d6b;
    --primary-hover: #a6967c;
    --accent-color: #e6d7b9;
    --bg-body: #f9f6ed;
    --bg-card: #fffbf5;
    --text-main: #4a4032;
    --text-secondary: #7a6c58;
    --text-tertiary: #9a8c78;
    --text-quaternary: #b0a18c;
    --bg-interactive: #f2eedf;
    --border-color: #e6d9c0;
    --border-light: #f0e9d8;
    --shadow-color: rgba(139, 125, 107, 0.08);
    --shadow-hover: rgba(139, 125, 107, 0.15);
    --shadow-mobile: rgba(139, 125, 107, 0.12);
    --gradient-start: #f2eedf;
    --gradient-end: #f9f6ed;
    --hot-color: #c53030;
}

/* 基础样式 */
* {margin: 0;padding: 0;box-sizing: border-box;font-family: "Microsoft YaHei", Inter, sans-serif;}
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    transition: background-color 0.3s ease;
}

/* 头部样式 */
.site_header {
    background-color: var(--primary-color);
    margin-bottom: 20px;
    border-radius: 8px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.nav {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 15px 0;
}
.nav-item a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.nav-item.active a {
    background-color: white;
    color: var(--primary-color);
}

/* 论坛核心样式 */
.forum-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

/* 论坛统计栏 */
.forum-stats {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px var(--shadow-color);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}
.stats-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.stats-icon {
    font-size: 20px;
    color: var(--primary-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-interactive);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stats-text h4 {
    font-size: 16px;
    color: var(--text-main);
    font-weight: 600;
}
.stats-text p {
    font-size: 12px;
    color: var(--text-quaternary);
}

/* 板块分类标题 */
.forum-cate-title {
    font-size: 18px;
    color: var(--primary-color);
    margin: 30px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* 板块列表容器 */
.forum-board-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 板块卡片核心样式 */
.forum-board-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}
.forum-board-card:hover {
    box-shadow: 0 4px 16px var(--shadow-hover);
    transform: translateY(-2px);
    border-left-color: var(--primary-color);
    background-color: var(--bg-interactive);
}

/* 板块图标（优化字母显示） */
.board-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
    font-weight: 700; /* 字母加粗 */
    font-family: "Microsoft YaHei", Arial, sans-serif; /* 确保字母清晰 */
}

/* 板块主体信息 */
.board-main {
    flex: 1;
}
.board-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.board-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}
.board-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--accent-color);
    color: var(--text-main);
}
.board-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 板块统计 */
.board-stats {
    display: flex;
    gap: 20px;
    text-align: center;
    flex-shrink: 0;
}
.board-stats .stats-item {
    flex-direction: column;
    gap: 2px;
}
.stats-num {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}
.stats-label {
    font-size: 12px;
    color: var(--text-quaternary);
}

/* 最新帖子信息 */
.board-latest {
    width: 220px;
    flex-shrink: 0;
    font-size: 13px;
}
.latest-post {
    color: var(--text-secondary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}
.latest-post:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.latest-info {
    color: var(--text-quaternary);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}



/* 页脚样式 */
footer {
    margin: 50px auto 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 14px;
    color: var(--text-tertiary);
    padding-bottom: 20px;
    max-width: 1200px;
    padding-left: 20px;
    padding-right: 20px;
}
footer a {
    color: var(--primary-color);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {padding: 10px;}
    
    /* 论坛移动端适配 */
    .forum-stats {justify-content: center;}
    .forum-board-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .board-icon {width: 40px;height: 40px;font-size: 20px;}
    .board-stats {
        width: 100%;
        justify-content: space-around;
        border-top: 1px solid var(--border-light);
        padding-top: 8px;
    }
    .board-latest {
        width: 100%;
        border-top: 1px solid var(--border-light);
        padding-top: 8px;
    }
}

/* ========== 顶部导航样式 ========== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 1001;
    padding: 0 20px;
}
.top-nav-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    position: relative;
}
.top-nav-container > ul {
    display: flex;
    list-style: none;
    gap: 20px;
}
.top-nav-container > ul > li {
    position: relative;
    list-style: none;
}
.top-nav-container > ul > li > a {
    color: #4a5568;
    text-decoration: none;
    font-size: 18px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}
.top-nav-container > ul > li > a:hover {
    color: #2b6cb0;
    background-color: #ebf8ff;
}
.top-nav-container > ul > li > a.active {
    color: #2b6cb0;
    font-weight: 600;
}
.top-nav-container > ul > li > ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
    min-width: 160px;
    padding: 8px 0;
    display: none;
    z-index: 1000;
    list-style: none;
}
.top-nav-container > ul > li:hover > ul {
    display: block;
}
.top-nav-container > ul > li > dl.layui-nav-child {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
    min-width: 100px;
    max-width: 180px;
    width: auto;
    padding: 6px 0;
    z-index: 1000;
    list-style: none;
    margin-top: 0;
}
.top-nav-container > ul > li:hover > dl.layui-nav-child {
    display: block;
}
.top-nav-container > ul > li > dl.layui-nav-child > dd {
    margin: 0;
    padding: 0;
}
.top-nav-container > ul > li > dl.layui-nav-child > dd > a {
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    display: block;
    transition: all 0.2s ease;
    position: relative;
    background-color: transparent;
}
.top-nav-container > ul > li > dl.layui-nav-child > dd > a::before {
    display: none;
}
.top-nav-container > ul > li > dl.layui-nav-child > dd > a:hover {
    background-color: #ebf8ff;
    color: #2b6cb0;
}
.top-nav-container > ul > li > dl.layui-nav-child > dd > a:active,
.top-nav-container > ul > li > dl.layui-nav-child > dd > a:focus {
    background-color: #ebf8ff;
    color: #2b6cb0;
}
.top-nav-container > ul > li > ul > li > a {
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    display: block;
    transition: all 0.2s ease;
    position: relative;
}
.top-nav-container > ul > li > ul > li > a::before {
    display: none;
}

/* 模式切换 */
.mode-switch {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
    align-items: center;
}
.mode-btn {
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px var(--shadow-color);
}
.mode-btn:hover {
    background-color: var(--bg-interactive);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px var(--shadow-hover);
}
.mode-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-hover);
    transform: translateY(-1px);
}


.top-nav-container > ul > li > ul > li > a:hover {
    background-color: #ebf8ff;
    color: #2b6cb0;
}
.top-nav-container > ul > li > ul > li > a:active,
.top-nav-container > ul > li > ul > li > a:focus {
    background-color: #ebf8ff;
    color: #2b6cb0;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #2b6cb0;
    cursor: pointer;
    position: absolute;
    right: 0;
}

/* 移动端侧边导航菜单（面包屑）样式 */
.mobile-sidebar-nav {
    display: block;
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: left 0.3s ease;
    pointer-events: none;
    padding: 60px 10px 10px;
}

.mobile-sidebar-nav.active {
    left: 0;
    pointer-events: auto;
}

.mobile-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar-nav li {
    margin-bottom: 10px;
}

.mobile-sidebar-nav a {
    display: block;
    padding: 10px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-sidebar-nav a:hover {
    color: #2b6cb0;
    background-color: #ebf8ff;
}

.mobile-sidebar-nav a.active {
    color: #2b6cb0;
    font-weight: 600;
    background-color: #ebf8ff;
}

/* 桌面模式下为顶部导航预留空间 */
@media (min-width: 769px) {
    body {
        padding-top: 70px;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .top-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        z-index: 1001;
        padding: 0 10px;
        height: 50px;
        display: flex;
        align-items: center;
    }
    
    .top-nav-container {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .top-nav-container > ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        font-size: 24px;
        color: #333;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10001;
    }
    
    .mobile-sidebar-nav {
        display: block;
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        background: #fff;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        z-index: 10000;
        transition: left 0.3s ease;
        pointer-events: none;
        padding: 60px 10px 10px;
    }
    
    /* 移动版文章卡片布局 */
    .post-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-card-image {
        width: 100%;
        height: auto;
        margin-top: 10px;
    }
    
    .post-card-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    .mobile-sidebar-nav.active {
        left: 0;
        pointer-events: auto;
    }
    
    body {
        padding-top: 60px;
        margin: 0;
        background-color: #f5f7fa;
    }
    
    main {
        padding: 10px;
    }
    
    /* 板块分类卡片适配 */
    .forum-board-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .board-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .board-main {
        width: 100%;
    }
    
    .board-title {
        font-size: 16px;
        margin-bottom: 5px;
    }
    
    .board-desc {
        font-size: 14px;
        color: #666;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
}

/* 板块头部信息 */
.board-header {
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}
.board-header-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary-color);
    flex-shrink: 0;
}
.board-header-info {
    flex: 1;
}
.board-header-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.board-header-tag {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: var(--accent-color);
    color: var(--text-main);
}
.board-header-desc {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-bottom: 10px;
}

/* 板块操作栏 */
.board-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
}
.board-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}
.filter-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-card);
    color: var(--text-main);
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s ease;
}
.filter-select:focus {
    border-color: var(--primary-color);
}

/* 帖子列表容器 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* 帖子卡片样式 */
.post-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    padding: 12px 15px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    display: flex;
    gap: 15px;
    align-items: stretch;
}

/* 内容区域 */
.post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 图片区域 */
.post-card-image {
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}
.post-card:hover {
    box-shadow: 0 4px 16px var(--shadow-hover);
    transform: translateY(-2px);
    border-left-color: var(--primary-color);
    background-color: var(--bg-interactive);
}
.post-card.sticky {
    border-left-color: var(--accent-color);
    background-color: rgba(236, 201, 75, 0.05);
}
/* 爆红标签对应的卡片左侧边框颜色 */
.post-card.爆红 {
    border-left-color: var(--hot-color);
}

/* 帖子头部 */
.post-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 6px;
}
.post-tags {
    display: flex;
    gap: 5px;
}
.post-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--bg-interactive);
    color: var(--primary-color);
}
.post-tag.sticky {
    background-color: var(--accent-color);
    color: var(--text-main);
}
/* 爆红标签样式 */
.post-tag.爆红 {
    background-color: var(--hot-color);
    color: white;
}

/* 帖子内容 */
.post-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
    transition: color 0.3s ease;
}
.post-title a {
    color: inherit;
    text-decoration: none;
}
.post-title a:hover {
    color: var(--primary-color);
}
.post-brief {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.page-btn {
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 6px;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}
.page-btn:hover {
    background-color: var(--bg-interactive);
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.page-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 页脚样式 */
footer {
    margin: 30px auto 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 14px;
    color: var(--text-tertiary);
    padding-bottom: 20px;
    max-width: 1200px;
}
