
/* 
主色调与辅色调定义
采用深蓝色为主色，传递专业与信任感；亮蓝色和橙色用于突出按钮和关键信息，提升视觉层次。
*/
:root {
    --primary-color: #1E273F;
    --accent-color: #00AEEF;
    --highlight-color: #FF9500;
    --text-color: #FFFFFF;
    --subtext-color: #B0B0B0;
    --background-color: #121824;
    --secondary-background: #1F2A3A;
    --border-color: #2A3E50;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

/* 章节导航系统样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

/* 主要内容容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 50px 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* 段落独立成块 */
.section {
    background-color: var(--secondary-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 标题样式 */
h2, h3, h4 {
    color: var(--accent-color);
    margin-bottom: 20px;
    position: relative;
}

h2::after, h3::after, h4::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--highlight-color);
    bottom: -10px;
    left: 0;
}

/* 正文字体调整 */
p {
    font-size: 17px;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* 代码块样式 */
pre {
    background-color: var(--secondary-background);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

code {
    color: var(--accent-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
}

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

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

/* 按钮样式 */
.button {
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background-color: var(--highlight-color);
    transform: translateY(-5px);
}

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

a.custom-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--highlight-color);
    left: 0;
    bottom: -3px;
    transition: width 0.3s ease;
    width: 0;
}

a.custom-link:hover::after {
    width: 100%;
}

/* 响应式设计：使用Flexbox和Media Queries */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        padding: 80px 15px 30px 15px;
    }

    img.decorative {
        max-width: 100%;
    }
}

/* 关键帧动画示例 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

/* 悬浮效果 */
.hover-effect:hover {
    filter: brightness(1.1);
}

/* 过渡效果 */
.transition-all {
    transition: all 0.3s ease;
}

/* 导航栏固定位置后的内容偏移 */
body.fixed-navbar {
    padding-top: 80px;
}

