
/* 
主样式文件：智能投顾与量化交易的梦幻空间体验网页设计
设计者: 资深前端工程师兼视觉设计专家
日期: 2024年4月

本样式文件采用HTML5与CSS3技术，结合玻璃拟态与梦幻空间视觉风格，打造高端金融服务平台。页面设计注重响应式布局、多样化排版及微交互效果，确保在320px至1920px宽度范围内均有良好表现。色彩运用遵循黄金比例，即70%主色、25%辅色、5%点缀色，整体画面色彩丰富而协调。

以下为各部分样式定义：
*/

/* 颜色变量定义 */
:root {
    --primary-color: #3a7bd5; /* 主色调 - 淡蓝 */
    --secondary-color: #00d2ff; /* 辅助色 - 紫罗兰 */
    --accent-color: #ff9800; /* 点缀色 - 橙色 */
    --background-color: #1e1e1e; /* 页面背景色 - 深灰 */
    --text-color: #ffffff; /* 文字颜色 - 白色 */
    --secondary-text-color: #cccccc; /* 辅助文字颜色 */
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* 链接样式 */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--secondary-color);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(58, 123, 213, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}

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

.navbar-menu {
    display: flex;
    gap: 20px;
}

.navbar-menu a {
    font-size: 1rem;
    color: var(--text-color);
    position: relative;
}

.navbar-menu a::after {
    content: '';
    display: block;
    width: 0%;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.navbar-menu a:hover::after {
    width: 100%;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 60px;
    right: 20px;
    background: rgba(255, 152, 0, 0.8);
    backdrop-filter: blur(8px);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chapter-nav h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-color);
}

.chapter-nav ul {
    list-style: none;
}

.chapter-nav li {
    margin-bottom: 8px;
}

.chapter-nav a {
    color: var(--text-color);
    font-size: 0.95rem;
}

.chapter-nav a:hover {
    color: var(--secondary-color);
}

/* 主要内容容器 */
.main-content {
    max-width: 1200px;
    margin: 100px auto 50px auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* 章节样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

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

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* 段落样式 */
p {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--secondary-text-color);
}

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

img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.95rem;
    position: relative;
}

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

/* 高亮代码样式 */
.language-css {
    color: #00d2ff;
}

/* 按钮样式 */
.button {
    background-color: var(--accent-color);
    border: none;
    border-radius: 25px;
    color: var(--text-color);
    padding: 15px 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 背景渐变动画 */
body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    animation: gradientAnimation 15s ease infinite;
    background-size: 400% 400%;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar-menu {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .chapter-nav {
        position: static;
        margin-top: 20px;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .button {
        width: 100%;
        padding: 10px 0;
    }
}

/* 滚动平滑 */
html {
    scroll-behavior: smooth;
}

/* 装饰性元素 */
.decorative-line {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 20px 0;
    border: none;
}

/* 虚拟投资顾问卡片 */
.virtual-advisor {
    perspective: 1000px;
    margin-bottom: 40px;
}

.advisor-card {
    width: 300px;
    height: 400px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    margin: 0 auto;
}

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

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

.advisor-card .front {
    background: rgba(58, 123, 213, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
}

.advisor-card .back {
    background: rgba(255, 152, 0, 0.8);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
}

/* 图表样式 */
.chart {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.bar {
    width: 30px;
    background-color: var(--secondary-color);
    position: absolute;
    bottom: 0;
    transition: height 0.5s ease;
}

.bar:hover {
    background-color: var(--accent-color);
}

/* 页面提示 */
.page-note {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    font-size: 0.9rem;
    z-index: 1000;
}


