
/* 全局变量 */
:root {
    --primary-color: #0074D9; /* 深蓝 */
    --accent-color: #FFC300; /* 柠檬黄 */
    --background-color: #F5F5F5; /* 浅灰 */
    --text-color: #333333; /* 文字颜色 */
    --heading-color: #0074D9; /* 标题颜色 */
    --link-color: #FFC300; /* 链接颜色 */
    --hover-color: #0056b3; /* 悬停颜色 */
    --font-primary: 'Roboto', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

/* 重置样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 基本样式 */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.1), transparent), linear-gradient(135deg, #ffffff, #e0e0e0);
    color: var(--text-color);
    padding: 1rem;
}

/* 容器 */
.container {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    padding: 1rem;
}

/* 头部样式 */
header {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.3), transparent);
    animation: aurora-move 15s linear infinite;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

header p {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
}

/* 文章样式 */
article {
    grid-column: 2 / span 10;
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 2rem;
}

article h2, article h3 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin-bottom: 1rem;
}

article p {
    margin-bottom: 1rem;
    line-height: 1.8;
    text-align: justify;
}

article pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

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

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

table th, table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

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

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

/* 按钮样式 */
button.primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

button.primary:hover {
    transform: scale(1.05);
    background-color: #0056b3;
}

/* 链接样式 */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--hover-color);
    text-decoration: underline;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: var(--border-radius);
}

/* 动画效果 */
@keyframes aurora-move {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* SVG路径样式 */
svg path {
    stroke: var(--accent-color);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 2s ease-in-out forwards;
}

/* 数据可视化仪表盘 */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.chart {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    fill: var(--accent-color);
}

/* 卡片样式 */
.card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* 互动效果 */
.interactive:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease-in-out;
}

/* 对话式界面 */
.chat-interface {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin-top: 1rem;
}

.chat-interface p {
    margin-bottom: 0.5rem;
}

/* 留白与布局 */
.section {
    margin-bottom: 2rem;
}

/* 提示样式 */
.note {
    text-align: center;
    padding: 1rem;
    background-color: #fffae6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    margin-top: 2rem;
    font-size: 1rem;
    color: #665c00;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    header h1 {
        font-size: 2.5rem;
    }
    article {
        padding: 1.5rem;
    }
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(10, 1fr);
    }
    header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(8, 1fr);
    }
    header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
    }
    article {
        grid-column: 1 / -1;
        padding: 1rem;
    }
    header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        grid-template-columns: repeat(4, 1fr);
    }
    header h1 {
        font-size: 1.5rem;
    }
    article {
        padding: 0.8rem;
    }
}

@media (max-width: 320px) {
    header h1 {
        font-size: 1.2rem;
    }
    .note {
        font-size: 0.9rem;
    }
}

