
/* 页面整体样式设定 */
/* 设置页面背景色为纯白，使用统一的字体 */
body {
    background-color: #ffffff;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #333333;
}

/* 主导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(90deg, #1A237E 70%, #673AB7 25%, #32CD32 5%);
    padding: 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #32CD32;
}

/* 章节导航系统 */
.sidebar {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 200px;
    background: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar a {
    display: block;
    margin-bottom: 10px;
    color: #1A237E;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #32CD32;
}

/* 主内容区域 */
.main-content {
    margin-left: 240px;
    padding: 100px 40px 40px 40px;
}

/* 文章标题样式 */
.main-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    color: #1A237E;
    margin-bottom: 20px;
    position: relative;
}

.main-content h2::after {
    content: "";
    display: block;
    width: 50px;
    height: 4px;
    background: #32CD32;
    margin-top: 10px;
    border-radius: 2px;
}

/* 文章段落样式 */
.main-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 图片样式 */
.main-content img {
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 320px;
}

.main-content img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #32CD32, #03A9F4);
    border: none;
    padding: 12px 24px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background: linear-gradient(45deg, #03A9F4, #32CD32);
    transform: translateY(-2px);
}

/* 模块化布局 */
.section {
    margin-bottom: 60px;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: background 0.3s ease;
}

.section:hover {
    background: #f1f1f1;
}

/* 装饰性渐变线 */
.divider {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #1A237E, #673AB7, #32CD32);
    margin: 40px 0;
    border: none;
    border-radius: 1px;
}

/* 按需展示内部链接的样式 */
a[rel="nofollow"] {
    color: #03A9F4;
    text-decoration: none;
    border-bottom: 1px dashed #03A9F4;
}

a[rel="nofollow"]:hover {
    color: #32CD32;
    border-bottom: 1px solid #32CD32;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 20px;
        padding: 100px 20px 20px 20px;
    }

    .navbar {
        flex-direction: column;
    }

    .navbar a {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .main-content h2 {
        font-size: 20px;
    }

    .main-content p {
        font-size: 14px;
    }

    .button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 2s ease-in-out;
}

/* 装饰性图片布局 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

/* 装饰性图片样式 */
.image-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 提示信息样式 */
.prompt {
    text-align: center;
    font-size: 18px;
    color: #FF5722;
    margin: 40px 0;
    font-weight: bold;
}

/* 高级图表样式 */
.chart {
    position: relative;
    width: 100%;
    height: 400px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
}

/* 动画加载样式 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #32CD32;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 背景层次效果 */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26,35,126,0.05);
    z-index: -1;
    transform: translateZ(-10px);
    border-radius: 12px;
}

/* 隐藏外部链接样式 */
a.external-link {
    display: none;
}

