
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 渐变背景 */
    color: #ffffff;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(20, 20, 20, 0.8);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 导航菜单 */
.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.navbar li {
    margin: 0 20px;
}

.navbar a {
    text-decoration: none;
    color: #00FFFF;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: #FF00FF;
}

/* 章节导航 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background-color: rgba(20, 20, 20, 0.7);
    padding: 10px;
    border-radius: 8px;
}

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

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

.chapter-nav a {
    text-decoration: none;
    color: #FFFFFF;
    font-size: 14px;
    transition: color 0.3s;
}

.chapter-nav a:hover {
    color: #00FFFF;
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

/* 模块样式 */
.module {
    grid-column: span 12;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    color: #00FFFF;
}

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

h2 {
    font-size: 28px;
    margin-top: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #FF00FF;
    padding-bottom: 5px;
}

h3 {
    font-size: 24px;
    margin-top: 15px;
    margin-bottom: 10px;
}

h4 {
    font-size: 20px;
    margin-top: 10px;
    margin-bottom: 8px;
}

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

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

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

/* 代码块样式 */
pre {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 20px;
}

code {
    color: #00FF00;
    font-size: 14px;
}

/* 按钮样式 */
.button {
    background-color: transparent;
    border: 2px solid #00FFFF;
    color: #00FFFF;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.button:hover {
    background-color: #00FFFF;
    color: #0f2027;
}

/* 分屏设计 */
.split-screen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.text-section {
    flex: 1;
    padding-right: 20px;
    min-width: 300px;
}

.image-section {
    flex: 1;
    min-width: 300px;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
    }
    .module {
        grid-column: span 6;
    }
}

@media (max-width: 480px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
    .module {
        grid-column: span 2;
    }
}

/* 渐现动画 */
.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);
}

/* 动态星空背景 */
.starfield {
    position: absolute;
    width: 200%;
    height: 100%;
    background: url('https://images.gptkong.com/demo/sample1.png') repeat;
    animation: moveStars 60s linear infinite;
    opacity: 0.5;
    z-index: -1;
}

@keyframes moveStars {
    from { transform: translateX(0); }
    to { transform: translateX(-1000px); }
}

/* 数据可视化组件 */
.chart-container {
    position: relative;
    height: 400px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

/* 提示信息样式 */
.reference-note {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 255, 255, 0.9);
    color: #0f2027;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* CSS3示例代码块专用样式 */
.code-example {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-example code {
    color: #00FF7F;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 链接样式 */
a {
    color: #00FFFF;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #FF00FF;
}

