
/* 主体背景采用深蓝色渐变，营造科技感氛围 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 全局容器设置，采用流式布局 */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 导航栏样式，固定在顶部，使用Flexbox布局 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9);
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

nav a {
    color: #00c6ff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ff8c00;
}

/* 主要内容区域，采用Grid布局实现模块化 */
.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 20px 20px 20px; /* 顶部预留导航栏空间 */
    width: 100%;
}

/* 每个模块的样式，带有阴影和过渡效果 */
.module {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

/* 标题样式，带有文本阴影和动画效果 */
h1, h2, h3, h4 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 20px;
    animation: fadeInText 2s ease-in-out;
}

@keyframes fadeInText {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

h4 {
    font-size: 20px;
    margin-bottom: 8px;
}

/* 段落样式，适中字号和行间距 */
p {
    font-size: 16px;
    margin-bottom: 15px;
}

/* 代码块样式，背景半透明，内边距，圆角 */
pre code {
    display: block;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: Consolas, monospace;
    color: #00ffcc;
    margin-bottom: 15px;
}

/* 链接样式，去除下划线，颜色变化 */
a {
    color: #00c6ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff8c00;
}

/* 提示信息样式，居中且突出 */
.reference-note {
    background: rgba(255, 140, 0, 0.2);
    border-left: 5px solid #ff8c00;
    padding: 10px 20px;
    margin: 20px 0;
    font-size: 18px;
}

/* 响应式设计，适配不同屏幕尺寸 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: center;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 120px 10px 10px 10px;
    }

    .module {
        padding: 15px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    p {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .module {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    p {
        font-size: 14px;
    }
}

/* 快速跳转按钮样式，固定在页面侧边 */
.quick-links {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.quick-links a {
    background: #00c6ff;
    color: #ffffff;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 0 5px 5px 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.quick-links a:hover {
    background: #ff8c00;
    transform: translateX(5px);
}

/* 折叠区域的样式，隐藏和显示时的过渡效果 */
.collapsible {
    background: rgba(32, 58, 67, 0.8);
    border-radius: 8px;
    padding: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.collapsible.active {
    max-height: 500px;
    opacity: 1;
}

/* 悬停头部触发折叠内容显示 */
.collapsible-trigger:hover + .collapsible {
    background: rgba(32, 58, 67, 1);
}

/* 浮动按钮样式，固定在页面右下角 */
.float-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #00c6ff;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.float-button:hover {
    background: #ff8c00;
    transform: rotate(360deg);
}

/* 导航链接的活动状态样式 */
nav a.active {
    border-bottom: 2px solid #ff8c00;
}

/* 章节导航样式 */
.chapter-nav {
    margin-bottom: 20px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chapter-nav li {
    background: rgba(255, 140, 0, 0.2);
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.chapter-nav li:hover {
    background: rgba(255, 140, 0, 0.4);
}

/* 骨架屏动画样式 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 20px;
    margin-bottom: 10px;
}

@keyframes loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 自定义字体导入 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

