
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 设置网页的背景为渐变色，并添加动态动画 */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e3c72, #2a5298, #6a11cb, #2575fc);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
}
/* 渐变背景动画关键帧 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* 顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}
.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 16px;
    transition: color 0.3s ease;
}
.navbar a:hover {
    color: #feb47b;
}
/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 250px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px;
}
.sidebar.open {
    transform: translateX(0);
}
.sidebar a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 15px 0;
    font-size: 16px;
    transition: color 0.3s ease;
}
.sidebar a:hover {
    color: #feb47b;
}
/* 侧边栏切换按钮样式 */
.sidebar-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}
/* 主内容区域样式 */
.main-content {
    margin-top: 60px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}
/* 章节导航栏样式 */
.chapter-navigation {
    position: fixed;
    top: 60px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
}
.chapter-navigation a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 10px 0;
    font-size: 14px;
    transition: color 0.3s ease;
}
.chapter-navigation a:hover {
    color: #feb47b;
}
/* 玻璃拟态卡片样式 */
.glass-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.glass-card:hover {
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}
/* 标题样式 */
h2, h3, h4 {
    color: #ffffff;
    margin-bottom: 15px;
}
h2 {
    font-size: 24px;
}
h3 {
    font-size: 20px;
}
h4 {
    font-size: 18px;
}
/* 段落样式 */
p {
    line-height: 1.6;
    margin-bottom: 15px;
}
/* 图片样式 */
.decorative-image {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
.decorative-image:hover {
    transform: scale(1.05);
}
/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}
.button:hover {
    background: linear-gradient(45deg, #2575fc, #6a11cb);
    transform: scale(1.05);
}
/* 代码块样式 */
code {
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    color: #ffeb3b;
    font-family: 'Courier New', Courier, monospace;
}
pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}
pre code {
    display: block;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .chapter-navigation {
        display: none;
    }
    .main-content {
        padding: 10px;
        gap: 20px;
    }
    h2 {
        font-size: 20px;
    }
    h3 {
        font-size: 18px;
    }
    h4 {
        font-size: 16px;
    }
    .navbar a {
        font-size: 14px;
    }
}

