
/* 
    全局样式设置
    设置页面的背景为渐变色，从浅灰色过渡到白色，传达出科技感与未来感。
    字体统一使用无衬线字体Roboto，确保现代感与可读性。
*/
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to bottom, #f0f0f0, #ffffff);
    color: #121F4F;
    line-height: 1.6;
}

/* 
    导航栏样式
    固定在页面顶部，使用深蓝色作为背景，包含主要模块的链接。
    链接在悬停时会变为辅助色橙色，增强互动性。
*/
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #121F4F;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}
.navbar a:hover {
    color: #FF9800;
}

/* 
    主内容区域样式
    每个section占据全屏高度，使用flex布局居中对齐。
    偶数节使用浅灰色背景，增强层次感。
*/
.section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    box-sizing: border-box;
}
.section:nth-child(even) {
    background-color: #f9f9f9;
}

/* 
    标题样式
    使用深蓝色字体，确保与整体色调一致。
    不同级别标题设有不同字号，确保层次分明。
*/
h2, h3, h4 {
    color: #121F4F;
}
h2 {
    font-size: 56px;
    margin-bottom: 20px;
}
h3 {
    font-size: 48px;
    margin-bottom: 15px;
}
h4 {
    font-size: 32px;
    margin-bottom: 10px;
}

/* 
    段落与代码块样式
    段落字体大小适中，保证可读性。
    代码块采用深色背景，白色字体，带有圆角和阴影效果，区分于正文内容。
*/
p {
    font-size: 16px;
    color: #333333;
    margin-bottom: 20px;
}
pre {
    background-color: #121F4F;
    color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 
    图片样式
    所有装饰性图片采用圆角、阴影和悬停效果，增强视觉美感。
    使用指定的图片URL，并确保alt属性为空。
*/
.image-container {
    text-align: center;
    margin: 20px 0;
}
.image-container img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}
.image-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 
    代码示例区域样式
    确保代码示例块有独立的样式，与正文内容区分开来。
    增加代码高亮和滚动条样式。
*/
.code-example {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.code-example code {
    color: #121F4F;
    font-family: 'Courier New', Courier, monospace;
}

/* 
    折叠区域样式
    次要信息采用折叠形式，通过JavaScript控制显示与隐藏。
*/
.collapsible {
    background-color: #FF9800;
    color: white;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 5px;
    margin-bottom: 10px;
}
.active, .collapsible:hover {
    background-color: #e68900;
}
.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 20px;
}
.content p {
    color: #333333;
}

/* 
    导航章节样式
    清晰的章节导航，使用固定定位，帮助用户快速定位内容。
*/
.chapter-nav {
    position: fixed;
    top: 60px;
    right: 20px;
    background-color: rgba(18,31,79,0.8);
    padding: 10px;
    border-radius: 8px;
}
.chapter-nav a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 5px 0;
    font-size: 14px;
    transition: color 0.3s;
}
.chapter-nav a:hover {
    color: #FF9800;
}

/* 
    卡片式布局样式
    用户案例与性能数据部分的卡片设计，带有悬停效果。
    卡片带有阴影和圆角，提升视觉层次。
*/
.card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 20px;
    margin: 20px;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 
    表格样式
    优化数据表格的可读性，突出表头，交替行背景颜色区分。
*/
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
thead {
    background-color: #121F4F;
    color: #ffffff;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* 
    底部导航样式
    补充主要导航，使用flex布局，确保响应式适配。
    链接在悬停时变为辅助色绿色，增强互动性。
*/
.footer {
    background-color: #121F4F;
    color: #ffffff;
    padding: 20px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}
.footer a {
    color: #FF9800;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}
.footer a:hover {
    color: #67C23A;
}

/* 
    响应式设计
    通过媒体查询确保在不同设备上的良好展示。
    调整导航栏、字体大小和布局等。
*/
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px 0;
    }
    .section {
        padding: 20px;
    }
    h2 {
        font-size: 36px;
    }
    h3 {
        font-size: 28px;
    }
    h4 {
        font-size: 22px;
    }
    p {
        font-size: 14px;
    }
    .chapter-nav {
        display: none;
    }
}

/* 
    动画效果
    定义渐显上升动画，用于元素进入视窗时的动态展示。
*/
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 
    按钮样式
    样式化的按钮，使用辅助色和渐变背景，增加点击感。
*/
button.primary {
    background: linear-gradient(45deg, #FF9800, #FFB74D);
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}
button.primary:hover {
    background: linear-gradient(45deg, #e68900, #FFA726);
}

/* 
    模拟投资工具样式
    虚拟操作体验的容器，带有悬停放大效果。
*/
.investment-tool {
    width: 100%;
    height: 500px;
    background-color: #ffffff;
    border: 2px solid #67C23A;
    border-radius: 10px;
    transition: transform 0.5s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.investment-tool:hover {
    transform: scale(1.02);
}

/* 
    章节导航链接样式
    确保章节导航链接具有良好的点击区域和可视效果。
*/
.chapter-nav a {
    font-weight: bold;
}

/* 
    继续添加其他所需的CSS样式，确保所有设计需求被满足。
    包括更多的动画效果、布局调整及视觉装饰等。
*/

