
/* 基础样式重置，消除不同浏览器的默认边距和内边距 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 定义颜色变量，遵循黄金比例配色法则 */
:root {
    /* 主色调 */
    --main-color-1: #8B5E3C; /* 棕褐色 */
    --main-color-2: #556B2F; /* 橄榄绿 */
    --main-color-3: #F0E68C; /* 淡黄色 */
    
    /* 辅色调 */
    --secondary-color-1: #00BFFF; /* 蓝色 */
    --secondary-color-2: #00CED1; /* 青色 */
    
    /* 点缀色 */
    --accent-color: #FF4500; /* 橙红色 */
    
    /* 文字颜色 */
    --text-color: #FFFFFF; /* 白色 */
    --heading-color: var(--main-color-3);
    
    /* 背景颜色 */
    --background-gradient: linear-gradient(135deg, var(--main-color-1), var(--main-color-2));
}

/* 设置全局字体和背景 */
body {
    font-family: 'Roboto', sans-serif;
    background: var(--background-gradient);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    transition: background 0.5s ease;
    padding: 20px;
}

/* 样式设计参考提示 */
.header-banner {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin-bottom: 30px;
}

.header-banner h1 {
    font-family: 'Bodoni', serif;
    font-size: 2em;
    color: var(--heading-color);
    margin-bottom: 10px;
}

.header-banner p {
    font-size: 1.2em;
    color: #FFD700;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 5px;
}

.navbar a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    font-size: 1em;
    position: relative;
    transition: color 0.3s ease;
}

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

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

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

/* 主容器样式，使用网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 文章内容样式 */
article {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

article h2, article h3, article h4 {
    font-family: 'Bodoni', serif;
    color: var(--heading-color);
    margin-bottom: 15px;
}

article h2 {
    font-size: 1.8em;
}

article h3 {
    font-size: 1.5em;
}

article h4 {
    font-size: 1.2em;
}

article p {
    margin-bottom: 15px;
    font-size: 1em;
    color: #f0f0f0;
}

/* 代码块样式，区别于正文 */
pre {
    background: #2d2d2d;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #00CED1;
    font-size: 0.95em;
}

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

table, th, td {
    border: 1px solid var(--secondary-color-2);
}

th, td {
    padding: 10px;
    text-align: left;
    color: #f0f0f0;
}

th {
    background: var(--secondary-color-1);
}

td {
    background: rgba(85, 107, 47, 0.8);
}

/* 图片样式，限定最大宽度并添加装饰 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
}

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

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

.button:hover {
    background: linear-gradient(45deg, var(--secondary-color-1), var(--secondary-color-2));
    transform: scale(1.05);
}

/* 悬停效果的链接样式 */
a {
    color: var(--secondary-color-2);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary-color-2);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

a:hover {
    color: var(--main-color-3);
}

a:hover::after {
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
    }
    
    .header-banner h1 {
        font-size: 1.5em;
    }
    
    .header-banner p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .navbar a {
        margin: 10px 0;
    }
    
    article {
        padding: 15px;
    }
}

/* 按需添加动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.fade-in.visible {
    opacity: 1;
}

/* 滚动视差效果 */
.parallax {
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-bottom: 30px;
}

/* 交互式学习模块卡片翻转 */
.learning-card {
    perspective: 1000px;
}

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

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

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

.card-front {
    background: var(--main-color-1);
    color: var(--text-color);
}

.card-back {
    background: var(--secondary-color-2);
    color: var(--text-color);
    transform: rotateY(180deg);
}

/* 数据可视化图表容器 */
.chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(85, 107, 47, 0.8);
    border-radius: 10px;
    margin-bottom: 20px;
}

.chart {
    width: 100%;
    max-width: 800px;
    height: 400px;
    background: var(--main-color-3);
    border: 2px solid var(--secondary-color-1);
    border-radius: 10px;
    margin-bottom: 20px;
}

/* 仪表盘卡片样式 */
.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--main-color-1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    background: var(--secondary-color-2);
    color: #fff;
}

/* 面包屑导航样式 */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 10px 0;
    margin-bottom: 20px;
}

.breadcrumb li {
    margin-right: 5px;
    position: relative;
}

.breadcrumb li::after {
    content: '>';
    position: absolute;
    right: -10px;
    color: var(--secondary-color-1);
}

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

/* 分割线样式 */
.divider {
    height: 2px;
    background: var(--secondary-color-1);
    margin: 20px 0;
}

/* 色块样式 */
.color-block {
    background: var(--main-color-2);
    padding: 10px;
    border-radius: 5px;
    color: #fff;
    margin-bottom: 15px;
}

