/* 覆盖全局body样式，确保首页布局不受限制 */
body {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
}

/* 首页布局：仅展示左侧折叠树+中间提示 */
.page-wrapper {
    display: flex;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    position: relative;
    min-height: calc(100vh - 120px);
    gap: 0;
    padding: 20px 0;
}

/* 左侧折叠树：固定不滚动 - 与文章详情页保持一致 */
.left-sidebar {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid #eaeef5;
    padding: 20px 15px;
    height: calc(100vh - 160px);
    overflow-y: auto;
    position: sticky;
    top: 20px;
    background: #fff;
    box-shadow: 2px 0 8px rgba(66, 153, 255, 0.05);
    border-radius: 12px 0 0 12px;
    z-index: 10;
}
.left-sidebar .title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #4299FF; /* 改为蓝色主题 */
    border-bottom: 2px solid #f0f5ff;
    padding-bottom: 12px;
}

/* 折叠树样式 - 与文章详情页保持一致 */
.category-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}
/* 一级：类别 */
.category-node {
    margin: 8px 0;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.category-node:hover {
    background: #f8fbff;
}
.category-name {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #2c3e50;
    transition: all 0.3s ease;
    font-size: 14px;
}
.category-name:hover {
    color: #4299FF;
    background: #f0f7ff;
}
.category-name .icon {
    font-size: 12px;
    color: #4299FF; /* 蓝色主题 */
    transition: transform 0.3s ease;
    min-width: 12px;
}
.category-name .icon.expanded {
    transform: rotate(90deg);
}
/* 二级：日期 */
.date-list {
    list-style: none;
    padding-left: 10px;
    margin: 5px 0;
}
.date-node {
    margin: 6px 0;
    border-radius: 4px;
    overflow: hidden;
}
.date-str {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #5a6c7d;
    padding: 8px 12px 8px 30px;
    font-size: 13px;
    transition: all 0.2s ease;
}
.date-str:hover {
    color: #4299FF;
    background: #f8fbff;
}
.date-str .icon {
    font-size: 10px;
    color: #4299FF; /* 蓝色主题 */
    transition: transform 0.3s ease;
    min-width: 10px;
}
.date-str .icon.expanded {
    transform: rotate(90deg);
}
/* 三级：文章 */
.article-list {
    list-style: none;
    padding-left: 20px;
    margin: 5px 0;
}
.article-node {
    margin: 4px 0;
    padding: 6px 12px 6px 46px;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.article-node:hover {
    background: #f0f7ff;
}
.article-node a {
    color: #5a6c7d;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    display: block;
    transition: all 0.2s ease;
}
.article-node a:hover {
    color: #4299FF; /* 蓝色主题 */
    text-decoration: none;
}

/* 中间默认提示 - 扩大面积，居中显示 */
.main-tips {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
    min-height: 600px;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border-radius: 16px;
    margin: 0 30px;
    border: 1px solid #e6f2ff;
    box-shadow: 0 8px 32px rgba(66, 153, 255, 0.1);
}
.main-tips .tips-content {
    max-width: 800px;
    text-align: center;
    padding: 40px;
}
.main-tips .tips-content i {
    font-size: 96px;
    color: #4299FF; /* 蓝色主题 */
    margin-bottom: 30px;
    display: block;
    text-shadow: 0 4px 12px rgba(66, 153, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.main-tips .tips-content h3 {
    font-size: 36px;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #4299FF, #2c5282);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-tips .tips-content p {
    font-size: 18px;
    color: #5a6c7d;
    line-height: 1.6;
    margin: 15px 0;
}

.main-tips .tips-content .sub-tips {
    font-size: 16px;
    color: #94a3b8;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* 添加一些装饰元素 */
.main-tips .decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
}

.main-tips .decorations .circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(66, 153, 255, 0.05);
}

.main-tips .decorations .circle:nth-child(1) {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 10%;
}

.main-tips .decorations .circle:nth-child(2) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    right: 10%;
}

/* 统计信息卡片 - 核心修改部分 */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 30px; /* 保持原有间距 */
    margin-top: 40px;
    flex-wrap: wrap;
    width: 100%; /* 新增：确保容器占满宽度 */
}

.stat-card {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    /* 修改：移除min-width，改为flex:1确保平分宽度 */
    flex: 1;
    max-width: 220px; /* 新增：限制最大宽度，避免卡片过宽 */
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(66, 153, 255, 0.15);
    border-color: #4299FF;
}

/* 核心修改：调小数字字体大小（从32px改为24px） */
.stat-card .stat-number {
    font-size: 24px; /* 原32px，改为24px，视觉更协调 */
    font-weight: 700;
    color: #4299FF;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #718096;
}

/* 响应式调整 */
@media (max-width: 1400px) {
    .page-wrapper {
        max-width: 100%;
        padding: 20px;
    }

    .left-sidebar {
        width: 240px;
    }

    .main-tips {
        margin: 0 20px;
        padding: 0 40px;
    }
}

@media (max-width: 1200px) {
    .left-sidebar {
        width: 220px;
    }

    .main-tips .tips-content h3 {
        font-size: 30px;
    }

    .main-tips .tips-content i {
        font-size: 80px;
    }
}

@media (max-width: 1024px) {
    .page-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .left-sidebar {
        width: 100%;
        height: auto;
        position: static;
        margin-bottom: 0;
    }

    .main-tips {
        margin: 0;
        padding: 0 20px;
        min-height: 400px;
    }

    .stats-container {
        gap: 20px;
    }

    .stat-card {
        /* 修改：适配平板端 */
        flex: 1;
        max-width: 180px;
        padding: 15px 20px;
    }

    /* 平板端数字字体微调 */
    .stat-card .stat-number {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 10px;
    }

    .main-tips {
        padding: 0 15px;
    }

    .main-tips .tips-content {
        padding: 20px;
    }

    .main-tips .tips-content h3 {
        font-size: 24px;
    }

    .main-tips .tips-content i {
        font-size: 64px;
    }

    .main-tips .tips-content p {
        font-size: 16px;
    }

    .stats-container {
        flex-direction: column;
        align-items: center;
    }

    .stat-card {
        width: 100%;
        max-width: 250px;
        /* 移动端数字字体 */
        flex: none;
    }

    /* 移动端数字字体微调 */
    .stat-card .stat-number {
        font-size: 20px;
    }
}

/* 文章加载相关样式 */
.article-loading {
    padding: 10px 12px 10px 46px;
    color: #94a3b8;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #4299FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.article-error {
    padding: 10px 12px 10px 46px;
    color: #f56565;
    font-size: 13px;
    background: #fff5f5;
    border-radius: 4px;
    margin: 4px 0;
}

.article-error .retry {
    color: #4299FF;
    cursor: pointer;
    margin-left: 8px;
    text-decoration: underline;
}

/* 空状态提示 */
.article-empty {
    padding: 10px 12px 10px 46px;
    color: #94a3b8;
    font-style: italic;
    font-size: 13px;
}

/* 已加载状态 */
.date-str.loaded .icon {
    color: #48bb78; /* 绿色表示已加载 */
}

.date-str.loading .icon {
    color: #ed8936; /* 橙色表示正在加载 */
}

.main-content {
    /*padding: 0 !important;  !* 强制覆盖所有padding *!*/
}

.latest-articles {
    background: #f8fbff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.latest-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.latest-title span:first-child {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}
.latest-count {
    font-size: 12px;
    color: #718096;
}
.latest-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}
.latest-article-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.latest-article-item:last-child {
    border-bottom: none;
}
.article-index {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: #4299e1;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    margin-right: 10px;
}
.article-title-index {
    flex: 1;
    color: #2d3748;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.article-title:hover {
    color: #4299e1;
    text-decoration: underline;
}
.article-category {
    font-size: 12px;
    color: #94a3b8;
    margin-right: 10px;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
}
.article-time {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}
.no-latest-articles {
    text-align: center;
    padding: 30px 0;
    color: #718096;
}
/* 注意：这里的样式和上方page-wrapper重复，已保留原有逻辑 */
.page-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
}
.left-sidebar {
    width: 300px;
    background: #f8fbff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 免费试用按钮样式 */
.trial-button-container {
    margin: 25px 0;
}
.free-trial-btn {
    display: inline-block;
    background: linear-gradient(90deg, #4299FF, #2c5282);
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 36px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(66, 153, 255, 0.3);
    transition: all 0.3s ease;
}
.free-trial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 255, 0.4);
    color: white;
    text-decoration: none;
}

/* 文章模块横向排列容器 */
.articles-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}
.article-module {
    flex: 1;
    background: #f8fbff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .articles-container {
        flex-direction: column;
        gap: 15px;
    }
    .free-trial-btn {
        padding: 10px 28px;
        font-size: 15px;
    }
}
@media (max-width: 768px) {
    .free-trial-btn {
        padding: 10px 24px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }
}
