
/* 定义颜色变量 */
:root {
    /* 主色调 */
    --soft-green: #C4E2B9;
    --deep-blue: #0A3D62;
    /* 辅助色 */
    --brown: #A57164;
    /* 点缀色 */
    --bright-orange: #FFA726;
    /* 文本颜色 */
    --text-color: #333;
    /* 背景颜色 */
    --background-color: #f5f5f5;
}

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 固定顶部导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--deep-blue);
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 导航栏链接样式 */
.navbar a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

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

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 200px;
    height: 100%;
    background-color: var(--brown);
    padding: 20px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar a {
    color: #fff;
    text-decoration: none;
    display: block;
    margin: 15px 0;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: var(--bright-orange);
}

/* 主要内容区域 */
.main-content {
    margin-left: 220px;
    padding: 80px 40px 40px 40px;
    max-width: 1200px;
    margin: 80px auto 40px auto;
}

/* 章节导航 */
.chapter-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: rgba(10, 61, 98, 0.8);
    padding: 10px;
    border-radius: 8px;
}

.chapter-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    margin: 10px 0;
    transition: color 0.3s ease;
}

.chapter-nav a:hover {
    color: var(--bright-orange);
}

/* 标题样式 */
h2, h3, h4 {
    color: var(--deep-blue);
    margin-top: 40px;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* 段落样式 */
p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* 图片样式 */
img {
    width: 100%;
    max-width: 320px;
    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;
}

img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* 代码块样式 */
pre {
    background-color: #2d2d2d;
    color: #ccc;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

/* 按钮样式 */
.button-primary {
    background-color: var(--bright-orange);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    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);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 20px;
        padding: 80px 20px 20px 20px;
    }
    .chapter-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        transform: translateY(0);
    }
    .main-content {
        margin-left: 0;
        padding: 80px 10px 10px 10px;
    }
}

/* 背景渐变 */
.hero {
    position: relative;
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample1.png') center center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(10, 61, 98, 0.5), rgba(196, 226, 185, 0.5));
    pointer-events: none;
}

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

/* SVG 动画 */
.svg-animation {
    width: 100%;
    height: 200px;
}

@keyframes pulse {
    0% {
        stroke: var(--deep-blue);
        stroke-width: 2;
    }
    50% {
        stroke: var(--bright-orange);
        stroke-width: 4;
    }
    100% {
        stroke: var(--deep-blue);
        stroke-width: 2;
    }
}

.svg-animation circle {
    fill: none;
    stroke: var(--deep-blue);
    stroke-width: 2;
    animation: pulse 2s infinite;
}

/* 交互动效：悬停与滚动加载 */
.interactive-element {
    background-color: var(--soft-green);
    transition: background-color 0.3s ease, transform 0.3s ease;
    padding: 15px;
    border-radius: 8px;
}

.interactive-element:hover {
    background: linear-gradient(135deg, var(--soft-green), var(--bright-orange));
    transform: scale(1.05);
}

.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 底部样式 */
.footer {
    background-color: var(--deep-blue);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.footer a {
    color: var(--bright-orange);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--soft-green);
}

/* 提示信息样式 */
.reference-note {
    background-color: var(--bright-orange);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 40px;
    font-size: 18px;
}

