
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 页面背景，采用渐变极光效果，并添加动画 */
body {
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #00ff7f, #8a2be2, #1e90ff);
    background-size: 600% 600%;
    animation: gradientAnimation 15s ease infinite;
    color: #ffffff; /* 使用白色作为基础文字颜色，确保对比度 */
    line-height: 1.6;
    padding: 20px;
}
/* 渐变背景动画关键帧 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* 头部导航栏样式 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
/* 导航菜单样式 */
nav ul {
    list-style: none;
    display: flex;
}
nav ul li {
    margin-left: 20px;
}
nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    transition: color 0.3s ease;
}
nav ul li a:hover {
    color: #00ff7f;
}
/* 移动端菜单按钮样式 */
.menu-button {
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.menu-button div {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 4px 0;
    transition: all 0.3s ease;
}
/* 移动端下拉菜单样式 */
.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.9);
    position: absolute;
    top: 60px;
    right: 20px;
    width: 200px;
    border-radius: 8px;
    padding: 10px 0;
}
.mobile-menu a {
    padding: 10px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s ease;
}
.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}
/* 汉堡菜单按钮悬停动画 */
.menu-button:hover + .mobile-menu {
    display: flex;
    animation: slideIn 0.5s forwards;
}
/* 下拉菜单动画关键帧 */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 主内容容器，顶部留出导航栏空间 */
.main-content {
    margin-top: 80px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}
/* 明显提示文字样式 */
.notice {
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
    color: #ff6b6b;
    font-weight: bold;
    animation: fadeInNotice 2s ease-in-out;
}
@keyframes fadeInNotice {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* 章节导航系统样式 */
.section-nav {
    position: sticky;
    top: 100px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.section-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.section-nav ul li {
    margin: 5px 15px;
}
.section-nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    padding: 5px 10px;
    transition: background 0.3s ease, color 0.3s ease;
}
.section-nav ul li a:hover {
    background: #00ff7f;
    color: #000000;
    border-radius: 5px;
}
/* 文章内容样式 */
article h2, article h3, article h4 {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    margin-bottom: 15px;
    animation: fadeIn 2s ease-in-out;
}
article h2 {
    font-size: 24px;
}
article h3 {
    font-size: 20px;
}
article h4 {
    font-size: 18px;
}
article p {
    font-size: 16px;
    margin-bottom: 20px;
}
/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}
code {
    color: #00ff7f;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}
/* 图片样式，包含圆角、阴影和悬停效果 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 15px 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.5);
}
/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #ff6b6b, #f06595);
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
/* 折叠区域样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.2);
    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;
}
.collapsible:hover {
    background: rgba(255, 255, 255, 0.3);
}
.collapsible:after {
    content: '\002B';
    font-size: 13px;
    float: right;
}
.active:after {
    content: "\2212";
}
.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 20px;
}
.content p {
    margin: 10px 0;
}
/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    .menu-button {
        display: flex;
    }
    .section-nav ul {
        flex-direction: column;
    }
    .section-nav ul li {
        margin: 10px 0;
    }
}

