/* 全局重置+基础配置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
:root {
    --primary: #2563eb; /* 论坛主色调-深海蓝 */
    --primary-light: #3b82f6;
    --primary-hover: #1d4ed8;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}
body {
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}
/* 通用容器 */
.container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 0 16px;
}
/* 按钮样式（论坛风格） */
.btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-radius: var(--radius-md);
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}
/* 输入框（论坛表单风格） */
.input-box {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    margin-bottom: 16px;
    outline: none;
    transition: all 0.2s ease;
    background-color: white;
}
.input-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* 标题样式 */
.title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 28px;
    text-align: center;
    color: var(--gray-800);
}
/* 卡片（论坛核心组件） */
.card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px 0;
    color: var(--gray-600);
    font-size: 14px;
}
/* ---------------- 登录/注册页（论坛登录风格） ---------------- */
.auth-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 0;
}
.auth-form {
    background-color: white;
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.auth-switch {
    text-align: center;
    margin-top: 24px;
    color: var(--gray-600);
    font-size: 14px;
}
.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
/* ---------------- 主页（论坛核心界面） ---------------- */
.home-page {
    padding: 24px 0 80px; /* 底部tab栏占位 */
}
/* 轮播图（论坛头部横幅风格） */
.carousel {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}
.carousel-inner {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}
.carousel-item {
    width: 100%;
    height: 100%;
}
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 轮播指示器（论坛风格） */
.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}
.carousel-indicator.active {
    background-color: white;
    width: 24px;
    border-radius: 4px;
}
/* 功能宫格（论坛快捷导航） */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px 16px;
    margin-bottom: 20px;
}
.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 0;
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
    transition: all 0.2s ease;
    border: 1px solid var(--gray-100);
}
.grid-item:hover {
    background-color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
/* 宫格图标配色（论坛功能区分） */
.grid-item i {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary);
}
.grid-item.member i {
    color: var(--warning);
}
.grid-item.history i {
    color: var(--success);
}
.grid-item.mall i {
    color: var(--danger);
}
.grid-item span {
    font-size: 15px;
    color: var(--gray-700);
    font-weight: 500;
}
/* 热门功能（论坛常用功能区） */
.hot-functions {
    padding: 20px 16px;
}
/* 区域标题（论坛板块标题风格） */
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: var(--gray-800);
    position: relative;
}
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--gray-200);
    margin-left: 12px;
}
/* 热门功能列表（论坛标签风格） */
.function-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.function-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background-color: var(--gray-50);
    border-radius: 20px;
    font-size: 14px;
    color: var(--gray-700);
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
}
.function-item:hover {
    background-color: var(--primary-light);
    color: white;
    border-color: var(--primary);
}
.function-item:hover i {
    color: white;
}
.function-item i {
    font-size: 14px;
    color: var(--primary);
}
/* 最新帖子（论坛核心内容区） */
.latest-posts {
    padding: 20px 16px;
}
/* 帖子项（论坛帖子卡片） */
.post-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}
.post-item:hover {
    background-color: var(--gray-50);
    padding-left: 8px;
    margin-left: -8px;
    margin-right: -8px;
    border-radius: var(--radius-sm);
}
.post-item:last-child {
    border-bottom: none;
}
/* 帖子头部（用户+板块信息） */
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-100);
}
.post-author-info {
    display: flex;
    flex-direction: column;
}
.post-author {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
}
.post-time {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 2px;
}
.post-board {
    font-size: 12px;
    color: white;
    background-color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 500;
}
/* 帖子内容（论坛正文风格） */
.post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-800);
    line-height: 1.4;
}
.post-content {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
/* 帖子底部（互动数据） */
.post-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--gray-600);
}
.post-footer-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
/* 底部tab栏（论坛导航栏） */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -1px 4px rgba(0,0,0,0.05);
    z-index: 999;
    border-top: 1px solid var(--gray-100);
}
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 0;
}
.tab-item.active {
    color: var(--primary);
}
.tab-item i {
    font-size: 22px;
    margin-bottom: 4px;
}
/* ---------------- 聚合页（论坛板块页） ---------------- */
.aggregate-page {
    padding: 24px 0 80px;
}
/* 板块列表（论坛核心板块） */
.board-list {
    padding: 16px;
}
.board-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
}
.board-item:last-child {
    border-bottom: none;
}
.board-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-right: 16px;
}
.board-info {
    flex: 1;
}
.board-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}
.board-desc {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 6px;
}
.board-stats {
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    gap: 12px;
}
/* ---------------- 我的页（论坛个人中心） ---------------- */
.mine-page {
    padding: 0 0 80px;
}
/* 个人信息头部（论坛个人资料卡） */
.user-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    padding: 32px 16px;
    color: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: 16px;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
}
.user-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}
.user-qq {
    font-size: 14px;
    opacity: 0.8;
}
/* 个人数据卡片（论坛个人统计） */
.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.stat-item {
    text-align: center;
    padding: 12px 0;
    background-color: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
}
.stat-value {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 12px;
    opacity: 0.8;
}
/* 功能菜单（论坛个人中心菜单） */
.mine-menu {
    padding: 16px;
}
.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}
.menu-item:last-child {
    border-bottom: none;
}
.menu-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.menu-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
}
.menu-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-800);
}
.menu-arrow {
    color: var(--gray-400);
    font-size: 16px;
}