
/* 全局样式重置，确保不同浏览器的一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体和背景 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72 70%, #2a5298 25%, #f39c12 5%);
    color: #ffffff;
    line-height: 1.6;
}

/* 主要容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(31, 38, 135, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 16px;
}

.navbar a:hover {
    color: #f39c12;
    transition: color 0.3s;
}

/* 侧边菜单样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: left 0.3s ease;
    padding: 20px;
    z-index: 999;
}

.sidebar.active {
    left: 0;
}

.sidebar a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 15px 0;
    font-size: 16px;
}

.sidebar a:hover {
    color: #f39c12;
    transition: color 0.3s;
}

/* 主导航切换按钮 */
.toggle-btn {
    font-size: 24px;
    cursor: pointer;
}

/* 章节导航样式 */
.chapter-nav {
    margin-top: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chapter-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.chapter-nav li {
    margin: 10px;
}

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

.chapter-nav a:hover {
    background: rgba(243, 156, 18, 0.3);
}

/* 主要内容区域样式 */
main {
    margin-top: 150px;
}

section {
    margin: 50px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #ffffff;
    margin-bottom: 20px;
}

h1 {
    font-size: 30px;
    text-align: center;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

/* 段落样式 */
p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #ecf0f1;
}

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

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

/* CSS代码展示样式 */
.code-snippet {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-snippet pre {
    color: #ecf0f1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 按钮样式 */
.button {
    background: rgba(243, 156, 18, 0.8);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.button:hover {
    background: rgba(243, 156, 18, 1);
    transform: scale(1.05);
}

/* 响应式网格系统 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .chapter-nav ul {
        flex-direction: column;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animated-element {
    animation: fadeIn 2s ease-in-out;
}

/* 浮动效果 */
.card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* 高质量图像展示 */
.header-illustration {
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 300px;
    animation: backgroundTransition 10s infinite alternate;
    border-radius: 15px;
}

@keyframes backgroundTransition {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* 数据图表样式 */
.data-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

