
/* 
整体页面样式设计
*/
/* 定义根变量，便于全局色彩管理 */
:root {
    --primary-color: #C4DFA3; /* 主色调：柔和绿色 */
    --secondary-color: #A68B5B; /* 辅助色：棕色 */
    --tertiary-color: #F7F1E5; /* 辅助色：米色 */
    --accent-color: #429AEF; /* 点缀色：科技蓝 */
    --neutral-color: #E0E0E0; /* 中性色：灰色 */
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置页面背景颜色，避免使用白色 */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--tertiary-color);
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 15px 0;
}

.navbar ul li {
    margin: 0 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 18px;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: var(--accent-color);
}

/* 章节导航样式 */
.section-nav {
    position: fixed;
    top: 60px;
    right: 20px;
    background-color: var(--neutral-color);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-nav ul {
    list-style: none;
}

.section-nav ul li {
    margin: 10px 0;
}

.section-nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s ease;
}

.section-nav ul li a:hover {
    color: var(--accent-color);
}

/* 主要内容区块样式 */
.section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section:nth-child(even) {
    background-color: #f0f0f0;
}

.section h2 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.section h3 {
    font-size: 20px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.section p {
    font-size: 16px;
    margin-bottom: 15px;
}

/* 图片样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 代码块样式 */
pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

code {
    font-family: 'Courier New', Courier, monospace;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    transform: scale(1.05);
}

/* 卡片式布局 */
.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

.card-icon {
    font-size: 40px;
    color: var(--accent-color);
    margin: 20px;
    transition: color 0.3s ease;
}

.card:hover .card-icon {
    color: var(--primary-color);
}

/* 响应式网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1920px) {
    body {
        max-width: 1920px;
        margin: 0 auto;
    }
}

/* 过渡与动画效果 */
@keyframes grow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes dash {
    to {
        stroke-dashoffset: 1000;
    }
}

.button-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button-gradient:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    transform: scale(1.05);
}

/* 固定导航栏和平滑滚动 */
.navbar a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: var(--accent-color);
}

/* 面包屑导航样式 */
.breadcrumb {
    list-style: none;
    display: flex;
    padding: 10px 20px;
    background-color: var(--neutral-color);
    border-radius: 5px;
    margin-bottom: 20px;
}

.breadcrumb li + li::before {
    content: ">";
    padding: 0 8px;
    color: #555;
}

.breadcrumb li a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.breadcrumb li a:hover {
    color: var(--accent-color);
}

/* 英雄区样式 */
.hero {
    position: relative;
    height: 60vh;
    background: url('https://images.gptkong.com/demo/sample1.png') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(66, 154, 239, 0.6), rgba(196, 223, 163, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* 数据可视化样式 */
.chart-leaf {
    fill: var(--primary-color);
    transform-origin: bottom center;
    animation: grow 1s ease-out forwards;
}

.network-node {
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-dasharray: 5,5;
    animation: dash 5s linear infinite;
}

/* 留白与分隔 */
.section {
    padding: 60px 20px;
    background-color: var(--tertiary-color);
}

.section:nth-child(even) {
    background-color: var(--neutral-color);
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* 固定导航与滚动效果 */
body {
    scroll-behavior: smooth;
}

