
/* 全局样式设置 */
/* 设置网页的基本字体、背景和颜色 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体，增强科技感 */
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); /* 主色调为蓝色与紫色的渐变背景 */
    color: #ffffff; /* 正文字体颜色为白色，确保与深色背景形成对比 */
    line-height: 1.6;
}

/* 统一的容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto; /* 居中对齐容器 */
    padding: 20px 0;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.8); /* 半透明背景，增强层次感 */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00c6ff; /* 点缀色用于悬停效果 */
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px; /* 初始隐藏侧边栏 */
    width: 250px;
    height: 100%;
    background: rgba(42, 82, 152, 0.9); /* 辅助色调 */
    padding: 20px;
    transition: left 0.3s ease;
    z-index: 999;
}

.sidebar.active {
    left: 0; /* 显示侧边栏 */
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 20px 0;
}

.sidebar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: #ff7e5f; /* 点缀色 */
}

/* 切换按钮样式 */
.toggle-button {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

/* 面包屑导航样式 */
.breadcrumb {
    margin: 80px 0 20px 0; /* 顶部留出导航栏空间 */
}

.breadcrumb ol {
    list-style: none;
    display: flex;
}

.breadcrumb ol li {
    margin-right: 10px;
}

.breadcrumb ol li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb ol li::after {
    content: '>';
    margin-left: 10px;
    color: #ffffff;
}

.breadcrumb ol li:last-child::after {
    content: '';
}

/* 主要内容区域样式 */
article {
    background: rgba(255, 255, 255, 0.1); /* 磨砂玻璃效果 */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

article h2, article h3, article h4 {
    color: #00c6ff; /* 主色调用于标题 */
}

article pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

article code {
    color: #ff7e5f; /* 点缀色用于代码 */
}

/* 图像样式 */
img.decorative {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

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

/* 导航链接样式 */
.nav-links {
    display: flex;
    flex-wrap: wrap;
}

.nav-links a {
    margin: 5px 10px;
    font-size: 16px;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* CSS3 动画示例样式 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 20px;
    }

    .sidebar {
        width: 200px;
    }

    img.decorative {
        width: 100%;
        height: auto;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-links a {
        margin: 10px 0;
    }
}

/* 夜间模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e0e0e0;
    }

    .navbar, .sidebar {
        background: rgba(0, 0, 0, 0.8);
    }

    article {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .button {
        background: #bb86fc;
    }

    .button:active {
        background: #3700b3;
    }
}

/* 按钮样式 */
.button {
    background: radial-gradient(circle, #00c6ff 0%, #0072ff 100%);
    border: none;
    color: #ffffff;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.button:hover {
    background: radial-gradient(circle, #ff7e5f 0%, #feb47b 100%);
}

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

/* 卡片式设计样式 */
.card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.3);
}

/* 动态背景样式 */
@keyframes storm {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dynamic-background {
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #1e3c72, #2a5298);
    background-size: 400% 400%;
    animation: storm 15s ease infinite;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

table, th, td {
    border: 1px solid #ffffff;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background: #00c6ff;
}

td {
    background: rgba(255, 255, 255, 0.1);
}

/* 链接样式，所有内部链接添加rel="nofollow" */
a[rel="nofollow"] {
    color: #00c6ff;
    text-decoration: none;
}

a[rel="nofollow"]:hover {
    text-decoration: underline;
}

/* 高级图表样式 */
.k-line-chart {
    position: relative;
    width: 100%;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    padding: 20px;
}

.k-line-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(30, 60, 114, 0.8), rgba(42, 82, 152, 0.8));
    opacity: 0.7;
}

.k-line {
    position: relative;
    z-index: 1;
    /* 实际的K线图通过JavaScript动态生成 */
}

/* 工具提示样式 */
.icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    top: -30px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.icon:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: var(--accent-color);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 5px;
}

.theme-toggle:hover {
    background: #ff7e5f;
}

