
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #2c3e50, #4ca1af); /* 背景渐变色，传达科技感 */
    color: #ecf0f1;
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.8); /* 磨砂玻璃效果背景 */
    backdrop-filter: blur(5px); /* 背景模糊效果 */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 轻微阴影增加层次感 */
}

/* 导航链接样式 */
.navbar a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff8c00; /* 强调色用于悬停效果 */
}

/* 主内容区容器 */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 12栅格系统 */
    gap: 20px;
    padding: 100px 50px 50px 50px; /* 上方留出导航空间 */
}

/* 响应式设计：中等屏幕 */
@media (max-width: 992px) {
    .container {
        grid-template-columns: repeat(8, 1fr);
        padding: 80px 30px 30px 30px;
    }
}

/* 响应式设计：小屏幕 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
        padding: 70px 20px 20px 20px;
    }
    .navbar a {
        font-size: 16px;
    }
}

/* 章节导航样式 */
.chapter-nav {
    grid-column: 1 / -1; /* 跨越所有列 */
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.chapter-nav a {
    margin: 0 15px;
    padding: 10px 20px;
    background: rgba(255, 140, 0, 0.7); /* 点缀色背景 */
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease;
}

.chapter-nav a:hover {
    background: rgba(255, 140, 0, 0.9); /* 悬停时背景色加深 */
}

/* 主要内容区块样式 */
.section {
    grid-column: span 12;
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 模糊效果 */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    transition: transform 0.3s ease, backdrop-filter 0.3s ease;
}

.section:hover {
    transform: scale(1.02); /* 微放大效果 */
    backdrop-filter: blur(12px); /* 增加模糊度 */
}

/* 标题样式 */
h2, h3, h4 {
    color: #ecf0f1;
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

h3 {
    font-size: 24px;
    margin-top: 20px;
    margin-bottom: 15px;
}

h4 {
    font-size: 20px;
    margin-top: 15px;
    margin-bottom: 10px;
}

/* 段落样式 */
p {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #bdc3c7;
}

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

code {
    color: #1abc9c;
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}

/* 按钮样式 */
.btn-primary {
    background-color: #ff8c00; /* 强调色背景 */
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #e57c00; /* 悬停时背景色加深 */
}

/* 加载动画样式 */
.loader {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #32cd32;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
    margin: auto;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 高亮文本样式 */
.highlight {
    color: #32cd32;
    font-weight: bold;
}

/* 卡片式展示样式 */
.card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, backdrop-filter 0.3s ease;
}

.card:hover {
    transform: scale(1.05);
    backdrop-filter: blur(12px);
}

/* 动态视差效果样式 */
.parallax {
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    border-radius: 10px;
}

.parallax::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

/* 动态图表容器样式 */
.chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 10px;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.gptkong.com/demo/sample2.png') repeat;
    opacity: 0.1;
}

canvas {
    position: relative;
    z-index: 1;
}

/* 固定提示信息样式 */
.reference-note {
    grid-column: span 12;
    text-align: center;
    font-size: 20px;
    color: #ff8c00;
    margin-bottom: 40px;
}

/* 阴影样式 */
.shadow-box {
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* 代码示例样式 */
.code-example {
    background: #34495e;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-example code {
    color: #2ecc71;
}

