
/* 
整体页面背景设置为渐变极光效果，利用多个颜色层叠，营造出科技感和未来感的氛围。通过动画使背景颜色缓慢流动，提升页面的动态性和视觉吸引力。
*/
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #00ffcc, #6600ff, #ff66cc);
    background-size: 600% 600%;
    animation: gradientAnimation 20s ease infinite;
    color: #ffffff;
}

/* 渐变动画关键帧 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 设置整体容器，使用响应式网格系统 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 标题样式，使用Helvetica Neue字体，增加科技感 */
h1, h2, h3, h4 {
    font-family: 'Helvetica Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
}

/* 段落文本样式，字体大小适中，保证可读性 */
p {
    font-size: 16px;
    line-height: 1.6;
    color: #f0f2f5;
}

/* 导航栏样式，固定在顶部，采用半透明背景 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    padding: 15px 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

/* 导航链接样式，颜色鲜明，带有下划线动画 */
.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    margin: 0 15px;
    position: relative;
    transition: color 0.3s ease;
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #ff9933;
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.navbar a:hover::after {
    width: 100%;
}

/* 主标题样式，增加阴影效果，突出显示 */
.main-title {
    font-size: 32px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 100px;
}

/* 强调文本样式，使用特殊颜色突出关键词 */
.highlight {
    color: #ff66cc;
    font-weight: bold;
}

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

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

/* 代码块样式，背景色深，字体等宽，增加可读性 */
.code-block {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #00ffcc;
    margin: 20px 0;
}

/* 折叠区域按钮样式，简洁且明显 */
.collapsible {
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    cursor: pointer;
    padding: 10px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background 0.3s ease;
    border-radius: 5px;
    margin-bottom: 10px;
}

.collapsible:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.active, .collapsible:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 折叠内容样式 */
.content {
    padding: 0 20px;
    display: none;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
}

/* 章节导航样式 */
.chapter-nav {
    position: sticky;
    top: 60px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
}

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

.chapter-nav a:hover {
    color: #ff66cc;
}

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

@media (max-width: 480px) {
    .main-title {
        font-size: 24px;
    }
    
    .navbar a {
        font-size: 16px;
    }
}

