
/* 
整体页面样式设计
以下样式旨在实现一个极简线条艺术与智能投顾相结合的网页，采用现代化的HTML5和CSS3技术，确保响应式设计和丰富的用户体验。主色调选用了蓝色，辅以灰色和橙色，营造出科技感与专业感。布局采用Flexbox和Grid系统，保证内容的有序排列与适配多种屏幕尺寸。通过高级CSS技术，如渐变、阴影、动画和过渡效果，增强视觉层次和互动性。
*/

/* 定义CSS变量，便于全局色彩管理 */
:root {
    --primary-color: #1E90FF; /* 主色调蓝色 */
    --secondary-color: #F5F5F5; /* 辅助色灰色 */
    --accent-color: #FFA500; /* 点缀色橙色 */
    --text-color: #333333; /* 文字颜色 */
    --background-gradient: linear-gradient(135deg, #1E90FF, #FFA500); /* 背景渐变 */
    --font-family-primary: 'Roboto', sans-serif; /* 主字体 */
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置网页背景和字体 */
body {
    background: var(--secondary-color);
    color: var(--text-color);
    font-family: var(--font-family-primary);
    line-height: 1.6;
    padding-top: 60px; /* 为固定导航栏预留空间 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

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

.navbar ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: var(--accent-color);
}

/* 汉堡菜单样式 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* 响应式设计：移动端导航 */
@media (max-width: 768px) {
    .navbar ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #ffffff;
        position: absolute;
        top: 50px;
        left: 0;
        padding: 10px 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .navbar ul.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 20px;
}

/* 章节导航 */
.sidebar {
    grid-column: 1 / 4;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: var(--accent-color);
}

/* 文章内容 */
.article-content {
    grid-column: 4 / 13;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 18px;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 14px;
}

/* 正文样式 */
p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
}

/* 代码块样式 */
pre {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

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

table th, table td {
    border: 1px solid #dddddd;
    padding: 10px;
    text-align: left;
}

table th {
    background-color: var(--primary-color);
    color: #ffffff;
}

table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

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

.article-content img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* 提示文字样式 */
.reference-note {
    background: var(--accent-color);
    color: #ffffff;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* 按钮样式 */
.button {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* 3D卡片效果 */
.card {
    perspective: 1000px;
    margin-bottom: 20px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
}

.card-front {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-back {
    background-color: var(--accent-color);
    transform: rotateY(180deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 动态线条动画 */
@keyframes moveLines {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.dynamic-lines {
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-dasharray: 1000;
    animation: moveLines 5s linear infinite;
}

/* 数据图表线条动画 */
@keyframes drawChart {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.chart-line {
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-dasharray: 1000;
    animation: drawChart 3s ease forwards;
}

