
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用无衬线字体，提升现代感 */
    font-size: 16px; /* 正文字号 */
    line-height: 1.6; /* 行高，提升可读性 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 主色调渐变背景 */
    color: #ffffff; /* 文字颜色 */
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.8); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 模糊效果 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
}

.navbar a {
    color: #00ffff; /* 辅色 */
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff00ff; /* 点缀色 */
}

/* 主要内容容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 40px 40px 40px; /* 顶部留白以避免被导航栏遮挡 */
}

/* 单个模块样式 */
.module {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* 阴影提升立体感 */
    backdrop-filter: blur(10px); /* 模糊效果 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-10px); /* 悬停时轻微上移 */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4); /* 阴影加深 */
}

/* 标题样式 */
h2, h3 {
    font-family: 'Helvetica', sans-serif; /* 使用另一种无衬线字体 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* 文字阴影 */
    margin-top: 0;
}

h2 {
    font-size: 24px; /* h2 字号 */
    margin-bottom: 10px;
}

h3 {
    font-size: 20px; /* h3 字号 */
    margin-bottom: 8px;
}

/* 文章内容样式 */
article {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05); /* 背景 */
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

code {
    color: #00ffea;
    font-family: 'Courier New', Courier, monospace;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #00ffff, #ff00ff); /* 渐变背景 */
    border: none;
    padding: 10px 20px;
    color: #000000;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.button:hover {
    background: linear-gradient(45deg, #ff00ff, #00ffff); /* 悬停时渐变反转 */
    transform: scale(1.05); /* 放大效果 */
}

/* 图片样式 */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* 阴影效果 */
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.05); /* 悬停时放大 */
}

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

    .container {
        padding: 100px 20px 20px 20px;
    }
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background: rgba(32, 58, 67, 0.8);
    padding: 10px;
    border-radius: 5px;
}

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

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

/* 提示文字样式 */
.reference-note {
    text-align: center;
    font-size: 18px;
    margin: 20px 0;
    color: #ffffff;
    font-weight: bold;
}

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

.active, .collapsible:hover {
    background-color: rgba(0, 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;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

thead {
    background: #203a43;
    color: #00ffff;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #2c5364;
}

tr:hover {
    background: rgba(0, 255, 255, 0.1);
}

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

/* 动画效果 */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.slide-up.visible {
    transform: translateY(0);
    opacity: 1;
}

