
/* 
 * 全局样式设置
 * 设定页面的基本字体、背景、颜色和布局
 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #6a11cb, #2575fc); /* 渐变极光背景 */
    background-size: 400% 400%;
    animation: gradientAnimation 15s 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: 40px;
}

/* 模块化布局，每个模块的样式 */
.module {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

/* 鼠标悬停时模块的效果 */
.module:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

/* 按钮样式 */
.btn {
    background: linear-gradient(45deg, #83ffd9, #19a7ce);
    border: none;
    border-radius: 50px;
    color: #ffffff;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

/* 按钮悬停效果 */
.btn:hover {
    background: linear-gradient(45deg, #19a7ce, #83ffd9);
    transform: translateY(-5px);
}

/* 图标样式 */
.icon {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    transition: fill 0.3s ease;
}

/* 图标悬停效果 */
.icon:hover {
    fill: #19a7ce;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

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

/* 导航链接悬停效果 */
.navbar a:hover {
    color: #19a7ce;
}

/* 章节导航系统样式 */
.chapter-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
}

/* 章节链接样式 */
.chapter-nav a {
    display: block;
    color: #ffffff;
    margin: 10px 0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

/* 章节链接悬停效果 */
.chapter-nav a:hover {
    color: #83ffd9;
}

/* 主要内容区域样式 */
.main-content {
    margin-top: 100px;
    padding: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 标题样式 */
h2, h3, h4 {
    color: #ffffff;
    margin-bottom: 20px;
}

/* 正文字体大小 */
p {
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
}

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

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

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 14px;
}

/* 代码文本样式 */
code {
    color: #00ff90;
    font-family: 'Courier New', Courier, monospace;
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.active, .collapsible:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .chapter-nav {
        position: static;
        margin-top: 20px;
    }

    .main-content {
        padding: 10px;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* 过渡效果 */
.transition {
    transition: all 0.3s ease;
}

/* 阴影效果 */
.shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* 精致边框 */
.border {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

/* 三维变换 */
.transform-3d {
    transform: perspective(600px) rotateY(10deg);
}

/* 链接样式 */
a.internal-link {
    color: #19a7ce;
    text-decoration: underline;
}

/* 链接悬停效果 */
a.internal-link:hover {
    color: #83ffd9;
}

/* 点缀色 */
.accent {
    color: #ff4e50;
}

/* 渐变线条 */
.gradient-line {
    height: 4px;
    background: linear-gradient(90deg, #6a11cb, #2575fc, #83ffd9);
    border-radius: 2px;
    margin: 20px 0;
}

