
/* 全局样式设置，包括字体、背景渐变与动画效果 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    background-size: 400% 400%;
    animation: GradientAnimation 15s ease infinite;
    font-family: 'Roboto', sans-serif;
    color: #333;
}

/* 渐变背景动画关键帧 */
@keyframes GradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 导航栏样式，固定在顶部，带有模糊效果 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.8);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar a {
    color: #ff7e5f;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #feb47b;
}

/* 面包屑导航样式 */
.breadcrumb {
    list-style: none;
    display: flex;
    gap: 5px;
    padding: 20px;
}

.breadcrumb li::after {
    content: '>';
    margin-left: 5px;
    color: #fff;
}

.breadcrumb li:last-child::after {
    content: '';
}

.breadcrumb li a {
    color: #ff7e5f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb li a:hover {
    color: #feb47b;
}

/* 章节导航栏样式，侧边固定 */
.chapter-nav {
    position: fixed;
    top: 80px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
}

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

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

/* 主容器样式，确保响应式布局 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
}

/* 模块化布局，使用Flexbox */
.module {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    transition: transform 0.3s ease;
}

.module:hover {
    transform: translateY(-10px);
}

/* 图片样式，带有圆角、阴影和悬停效果 */
.module img {
    width: 320px;
    height: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-right: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 正文内容样式 */
article {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2, article h3, article h4 {
    color: #1e3c72;
}

article h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

article h3 {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
}

article p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* 代码块样式，区别于正文 */
pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.button:hover {
    transform: scale(1.05);
}

/* 折叠区域样式 */
.collapsible {
    background-color: #ff7e5f;
    color: white;
    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: #feb47b;
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-bottom: 10px;
}

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

    .module img {
        margin: 0 0 20px 0;
    }

    .chapter-nav {
        display: none;
    }
}

/* 数据可视化柱状图样式 */
.bar {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.bar-fill {
    height: 0;
    background-color: #4caf50;
    width: 0;
    animation: grow 2s forwards;
}

@keyframes grow {
    from { height: 0; width: 0; }
    to { height: 100%; width: 80%; }
}

/* 卡片式设计 */
.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.tooltip:hover::after {
    opacity: 1;
}

/* 数据可视化图表动画 */
.network-node {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.connector {
    width: 2px;
    height: 100px;
    background-color: #ffffff;
    position: absolute;
    animation: draw 3s infinite;
}

@keyframes draw {
    0% { height: 0; }
    100% { height: 100px; }
}

