
/* 全局样式设置 */
body {
    /* 使用线性渐变作为背景，营造科技感 */
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    font-family: 'Roboto', 'Helvetica', sans-serif;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.8);
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 1000;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar a:hover {
    color: #ff9800;
    transform: scale(1.1);
}

/* 提示信息样式 */
.notice {
    text-align: center;
    padding: 20px;
    background: rgba(42, 82, 152, 0.9);
    font-size: 20px;
    font-weight: bold;
}

/* 章节导航系统样式 */
.chapter-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 250px;
    height: 100%;
    background: rgba(30, 60, 114, 0.9);
    backdrop-filter: blur(10px);
    padding-top: 20px;
    transition: transform 0.3s ease;
}

.chapter-nav.collapsed {
    transform: translateX(-250px);
}

.chapter-nav a {
    display: block;
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.chapter-nav a:hover {
    background: #2a5298;
}

/* 主内容区样式 */
.main-content {
    padding: 80px 20px 20px 270px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* 文章区块样式 */
article {
    flex: 1 1 60%;
    min-width: 300px;
}

/* 图片展示区块样式 */
.image-gallery {
    flex: 1 1 35%;
    min-width: 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-gallery img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* CSS代码示例区块样式 */
.code-example {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    margin: 20px 0;
    color: #ffffff;
    overflow-x: auto;
}

.code-example pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chapter-nav {
        transform: translateX(-250px);
    }

    .chapter-nav.active {
        transform: translateX(0);
    }

    .main-content {
        padding: 80px 10px 10px 20px;
        flex-direction: column;
    }

    .image-gallery {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .navbar a {
        font-size: 16px;
    }

    .notice {
        font-size: 18px;
    }
}

/* 按钮样式 */
.button {
    background-color: #ff9800;
    border: none;
    border-radius: 25px;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
    background-color: #e68900;
}

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

/* 加载动画样式 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e3c72;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loadingBlur 3s infinite;
    z-index: 2000;
}

@keyframes loadingBlur {
    0% {
        filter: blur(10px);
    }
    50% {
        filter: blur(5px);
    }
    100% {
        filter: blur(10px);
    }
}

/* 卡片式布局样式 */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

/* 横幅样式 */
.banner {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('abstract_lines.png') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
}

.banner .lightburst {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.8), transparent);
    border-radius: 50%;
    animation: burst 5s infinite;
}

@keyframes burst {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

/* 横幅中的指标样式 */
.banner .metrics {
    z-index: 1;
    text-align: center;
}

.banner .metrics h1 {
    font-size: 48px;
    margin: 0;
}

.banner .metrics p {
    font-size: 24px;
    margin-top: 10px;
}

/* 数据可视化样式 */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 交互动效细节 */
.interactive-element {
    transition: all 0.3s ease;
}

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

.modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

