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

/* 设置网页整体字体和背景渐变色 */
body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #2E8B57 40%, #87CEEB 60%, #00FFFF 80%, #8A2BE2 100%);
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(46, 139, 87, 0.9);
    color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: #00FFFF;
}

/* 主容器样式，使用网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    padding: 120px 60px 60px 60px; /* 顶部留出导航栏空间 */
}

/* 模块样式，带有阴影和圆角 */
.module {
    background: #D2B48C;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* 文章标题样式 */
h2, h3, h4 {
    color: #2E8B57;
    margin-bottom: 15px;
}

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

/* 代码块样式 */
pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 10px;
    overflow: auto;
    position: relative;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    color: #333;
}

pre code::before {
    content: "代码块示例";
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2E8B57;
}

/* 图片样式，带有圆角、阴影和悬停效果 */
img.decorative {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 提示信息样式，显著位置 */
.reference-note {
    background: #fff3cd;
    border-left: 5px solid #ffeeba;
    padding: 20px;
    margin: 40px 0;
    font-size: 18px;
    color: #856404;
    border-radius: 5px;
}

/* 响应式设计，适配不同屏幕宽度 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar a {
        margin: 10px 0;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 100px 20px 20px 20px;
    }

    .reference-note {
        font-size: 16px;
    }
}

/* 视差滚动效果 */
.parallax-section {
    background-image: url('https://images.gptkong.com/demo/sample5.png');
    height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.parallax-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.parallax-content h2 {
    color: #8A2BE2;
}

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

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

/* 折叠区域样式 */
.collapsible {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.collapsible:hover {
    background-color: #e2e2e2;
}

.content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 10px;
}

.content.show {
    max-height: 500px; /* 根据内容调整 */
    padding: 10px;
}

