
/* 页面全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif; /* 使用无衬线字体，增强现代感 */
    font-size: 16px; /* 设置正文字号 */
    line-height: 1.6; /* 提高可读性 */
    color: #1B5E20; /* 主色调深绿色，象征稳健 */
    background: linear-gradient(135deg, #F5F5DC 70%, #E0E0E0 25%, #03A9F4 5%); /* 渐变背景，遵循黄金比例配色 */
    background-repeat: no-repeat;
    background-attachment: fixed; /* 固定背景，增强视觉效果 */
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #1B5E20; /* 主色调 */
    color: #FFFFFF; /* 文字颜色白色 */
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000; /* 保证导航栏在最上层 */
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: #FFFFFF;
    position: relative;
    transition: color 0.3s ease;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #03A9F4; /* 点缀色 */
    transition: width 0.3s ease;
}

.navbar ul li a:hover {
    color: #03A9F4; /* 点缀色 */
}

.navbar ul li a:hover::after {
    width: 100%; /* 动画效果 */
}

/* 主要内容容器样式 */
.container {
    display: flex;
    flex-wrap: wrap;
    padding: 120px 60px 60px 60px; /* 顶部留出导航栏空间 */
    max-width: 1920px;
    margin: 0 auto;
}

/* 侧边栏样式 */
.sidebar {
    flex: 1;
    min-width: 250px;
    background-color: #F5F5DC; /* 辅色 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-right: 20px;
    transition: transform 0.3s ease;
}

.sidebar:hover {
    transform: translateY(-5px); /* 悬停微动画 */
}

/* 主要内容区域样式 */
.main-content {
    flex: 3;
    min-width: 300px;
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

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

img.decorative:hover {
    transform: scale(1.05); /* 悬停放大效果 */
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

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

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.75em;
}

h4 {
    font-size: 1.5em;
}

/* 段落样式 */
p {
    font-size: 1em;
    margin-bottom: 15px;
    color: #333333;
    text-align: justify;
}

/* 提示信息样式 */
.notice {
    background-color: #1B5E20;
    color: #FFFFFF;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    font-size: 1.2em;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 链接样式 */
a.internal-link {
    color: #03A9F4;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

a.internal-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #03A9F4;
    transition: width 0.3s ease;
}

a.internal-link:hover {
    color: #1B5E20;
}

a.internal-link:hover::after {
    width: 100%;
}

/* 代码块样式 */
pre code {
    display: block;
    background-color: #F0F0F0;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    line-height: 1.5em;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* 折叠区域样式 */
.details {
    margin-bottom: 20px;
}

.summary-title {
    cursor: pointer;
    position: relative;
    padding: 10px;
    background-color: #03A9F4;
    color: #FFFFFF;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.summary-title:hover {
    background-color: #0288D1;
}

.summary-title::after {
    content: '▼';
    position: absolute;
    right: 20px;
    transition: transform 0.3s ease;
}

.details[open] .summary-title::after {
    transform: rotate(180deg);
}

.details>summary {
    list-style: none;
}

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* 应用动画 */
.fade-in-up {
    animation: fadeInUp 1s ease forwards;
    opacity: 0; /* 初始状态为透明 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 80px 20px 20px 20px;
    }

    .sidebar {
        margin-right: 0;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.75em;
    }

    h3 {
        font-size: 1.5em;
    }

    h4 {
        font-size: 1.25em;
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }

    .navbar {
        padding: 15px 20px;
    }
}

/* 按钮样式 */
.button {
    background-color: #03A9F4;
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.button:hover {
    background-color: #0288D1;
    transform: translateY(-2px);
}

.button:active {
    background-color: #0277BD;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 卡片样式 */
.card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    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);
}

/* 动态图表样式 */
.chart-bar {
    width: 50px;
    height: 0;
    background-color: #03A9F4;
    animation: grow 2s forwards;
    margin: 0 5px;
}

@keyframes grow {
    to {
        height: 200px;
    }
}

/* 流式布局确保无水平滚动 */
.container, .main-content, .sidebar {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* 保证所有内容可见，避免内容被遮挡 */
body, html {
    overflow-x: hidden;
}

/* 创建视觉层次 */
.section {
    margin-bottom: 40px;
}

/* 增加留白，营造呼吸感 */
.section {
    padding: 20px;
}

/* 突出重点区域 */
.highlight {
    background-color: #E0F7FA;
    padding: 10px;
    border-left: 5px solid #03A9F4;
    margin-bottom: 20px;
    border-radius: 3px;
}

/* 使用Grid布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 点缀色应用 */
.accent {
    color: #03A9F4;
}

/* 文字阴影 */
.text-shadow {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* 过渡效果 */
.transition-effect {
    transition: all 0.3s ease;
}

/* 立体感文字 */
.raised-text {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 折叠区域样式 */
details summary {
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    background-color: #03A9F4;
    color: #FFFFFF;
    border-radius: 5px;
}

details[open] summary {
    background-color: #0288D1;
}

details p {
    padding: 10px;
    margin: 0;
    background-color: #E0F7FA;
}

