
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    font-size: 16px; /* 正文字号约16px */
    line-height: 1.6;
    background: linear-gradient(135deg, #1A237E, #6200EA, #33CC99); /* 渐变背景 */
    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 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* 段落样式 */
p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #f0f0f0;
}

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

code {
    color: #33CC99;
    font-family: 'Courier New', Courier, monospace;
}

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

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

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(26, 35, 126, 0.9);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    transition: background 0.3s, color 0.3s;
    border-radius: 4px;
}

.navbar a:hover {
    background: #33CC99;
    color: #000000;
}

/* 部分区块样式 */
.section-block {
    padding: 40px 20px;
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 分隔线样式 */
.separator {
    height: 2px;
    background: linear-gradient(90deg, #1A237E, #6200EA, #33CC99);
    margin: 40px 0;
    border: none;
}

/* 按钮样式 */
.button {
    background-color: #6200EA;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background-color: #33CC99;
    transform: scale(1.05);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    .section-block {
        padding: 20px 10px;
    }
    h2 {
        font-size: 20px;
    }
    h3 {
        font-size: 18px;
    }
    h4 {
        font-size: 16px;
    }
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    display: flex;
    flex-direction: column;
}

.chapter-nav a {
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(50, 50, 50, 0.7);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.chapter-nav a:hover {
    background: #33CC99;
}

/* 提示文本样式 */
.reference-note {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(26, 35, 126, 0.8);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
}

