
/* 全局样式设置，确保字体、颜色和布局的一致性 */
body {
    font-family: 'Roboto', sans-serif; /* 使用Roboto无衬线字体，增强现代感 */
    font-size: 16px; /* 正文字号设为16px，确保可读性 */
    color: #333333; /* 文字颜色为深灰，减少视觉疲劳 */
    background: linear-gradient(135deg, #2c3e50 70%, #95a5a6 25%, #e74c3c 5%); /* 背景使用渐变，按照黄金比例配色 */
    margin: 0;
    padding: 0;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(90deg, #2c3e50, #34495e); /* 深色渐变背景 */
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 轻微阴影提升层次感 */
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    color: #ecf0f1; /* 导航链接颜色为浅灰 */
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #e74c3c; /* 悬停时变为点缀色 */
}

/* 章节导航系统样式 */
.chapter-nav {
    margin-top: 100px; /* 避免被固定导航栏遮挡 */
    padding: 20px 40px;
    background-color: rgba(255, 255, 255, 0.1); /* 半透明背景 */
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.chapter-nav li {
    margin-right: 20px;
}

.chapter-nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

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

/* 文章内容区块样式 */
.article-section {
    padding: 60px 40px;
    background-color: rgba(255, 255, 255, 0.05); /* 低透明度背景，增加层次感 */
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* 阴影增强质感 */
}

.article-section h2, .article-section h3, .article-section h4 {
    color: #ecf0f1; /* 标题颜色为浅灰 */
    margin-bottom: 20px;
}

.article-section p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.article-section code {
    background-color: rgba(46, 204, 113, 0.2); /* 代码块背景色 */
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

/* 代码块样式，使其与正文区分 */
.article-section pre code {
    display: block;
    background-color: #34495e;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    color: #ecf0f1;
    font-size: 14px;
    margin-bottom: 20px;
}

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

.article-section th, .article-section td {
    border: 1px solid #7f8c8d;
    padding: 10px;
    text-align: left;
}

.article-section th {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.article-section tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 无序列表样式 */
.article-section ul, .article-section ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

/* 强调文本样式 */
.highlight {
    color: #e74c3c;
    font-weight: bold;
}

/* 图片样式，添加圆角、阴影和悬停效果 */
.article-section img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

.article-section img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* 按钮样式 */
.button-primary {
    background: linear-gradient(45deg, #00c6ff, #0072ff); /* 渐变背景 */
    color: #ffffff;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.3);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
}

.button-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 198, 255, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .chapter-nav ul {
        flex-direction: column;
    }

    .chapter-nav li {
        margin-bottom: 10px;
    }

    .article-section {
        padding: 40px 20px;
    }

    .button-primary {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 微交互效果，滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease both;
}

/* 提示文本样式 */
.reference-note {
    background-color: rgba(231, 76, 60, 0.1);
    padding: 15px 20px;
    border-left: 5px solid #e74c3c;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 16px;
    color: #ecf0f1;
}

