
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Open Sans', sans-serif; /* 使用无衬线字体，提升现代感 */
    font-size: 16px; /* 正文字号设置为16px */
    background: linear-gradient(135deg, #0D1B2A 70%, #1B263B 25%, #FF9F1C 5%); /* 黄金比例配色渐变背景 */
    color: #FFFFFF; /* 文字颜色设置为白色，确保与深色背景的对比 */
}

/* 顶部固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 27, 42, 0.7); /* 半透明背景 */
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    z-index: 1000;
}

.navbar.scrolled {
    background: rgba(13, 27, 42, 1); /* 滚动后背景不透明 */
}

.navbar a {
    color: #FF9F1C; /* 辅色用于导航链接 */
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FFFFFF; /* 悬停时颜色变化 */
}

/* 主要容器样式 */
.container {
    display: grid;
    grid-template-columns: 250px 1fr; /* 左侧侧边栏和右侧主内容 */
    grid-gap: 20px;
    padding: 100px 20px 20px 20px; /* 留出顶部导航栏空间 */
}

/* 侧边栏样式 */
.sidebar {
    background: rgba(255, 159, 28, 0.1);
    padding: 20px;
    border-radius: 8px;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

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

.sidebar li {
    margin: 15px 0;
    transition: transform 0.3s ease;
}

.sidebar li:hover {
    transform: scale(1.1);
}

.sidebar a {
    color: #FFFFFF;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar a img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.sidebar a img:hover {
    transform: rotate(360deg);
}

/* 主内容区域样式 */
.main-content {
    background: rgba(13, 27, 42, 0.1);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.main-content h2, .main-content h3, .main-content h4 {
    color: #FF9F1C; /* 标题使用点缀色 */
}

.main-content p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.main-content pre {
    background: #1B263B;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.main-content code {
    color: #FF9F1C;
    font-family: 'Courier New', Courier, monospace;
}

/* 卡片式设计 */
.card {
    background: #1B263B;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 按钮样式 */
.button {
    background-color: #FF9F1C;
    border: none;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.button:hover {
    background-color: #e68a00;
}

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

/* 图片样式 */
.image-decor {
    width: 320px;
    height: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-decor:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0,0,0,0.3);
}

/* 加载动画样式 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #FF9F1C;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 动态数据图表样式 */
@keyframes moveParticles {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('https://images.gptkong.com/demo/sample1.png') repeat;
    animation: moveParticles 10s linear infinite;
    opacity: 0.5;
}

/* 底部区域样式 */
.footer {
    background: rgba(13, 27, 42, 0.9);
    padding: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: #FFFFFF;
    margin-top: 40px;
}

.footer a {
    color: #FF9F1C;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #FFFFFF;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background: rgba(27, 38, 59, 0.8);
    padding: 10px;
    border-radius: 8px;
}

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

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

.chapter-nav a {
    color: #FF9F1C;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .chapter-nav {
        display: none;
    }
}

