
/* 全局样式设置，包含字体、背景色、主色调、辅助色调等 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #333;
    background: linear-gradient(135deg, #1e3c72 70%, #2a5298 25%, #ffa500 5%);
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9);
    color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
}
.navbar.scrolled {
    background: rgba(30, 60, 114, 1);
}
.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
}
.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}
.navbar ul li a {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s ease;
}
.navbar ul li a:hover {
    color: #ffa500;
}

/* 侧边栏菜单样式 */
.sidebar-menu {
    width: 250px;
    background: #fff;
    position: fixed;
    top: 60px;
    left: -250px;
    height: 100%;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
}
.sidebar-menu.open {
    left: 0;
}
.sidebar-menu ul {
    list-style: none;
    padding: 20px;
}
.sidebar-menu li {
    margin: 15px 0;
    cursor: pointer;
    transition: color 0.3s ease;
}
.sidebar-menu li:hover {
    color: #ffa500;
}

/* 主要内容区块样式 */
.main-content {
    padding: 100px 40px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.section {
    margin-bottom: 60px;
}
.section h2 {
    font-size: 2em;
    color: #1e3c72;
    margin-bottom: 20px;
}
.section p {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
}
.section img {
    width: 100%;
    max-width: 320px;
    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 img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}
.section pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.section pre code {
    font-family: 'Courier New', Courier, monospace;
    color: #2a5298;
}

/* 代码示例部分样式，与正文内容区分 */
.code-example {
    background: #f0f8ff;
    padding: 20px;
    border-left: 5px solid #ffa500;
    border-radius: 5px;
    margin-bottom: 20px;
}
.code-example code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
    font-family: 'Courier New', Courier, monospace;
}

/* 页脚样式 */
.footer {
    background: rgba(30, 60, 114, 0.9);
    color: #fff;
    text-align: center;
    padding: 20px 40px;
    position: relative;
}
.footer a {
    color: #ffa500;
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}

/* 黄金比配色应用 */
.primary-color {
    color: #1e3c72;
}
.secondary-color {
    color: #2a5298;
}
.accent-color {
    color: #ffa500;
}

/* 响应式设计 */
@media(max-width: 768px) {
    .navbar ul {
        display: none;
    }
    .sidebar-menu {
        top: 80px;
    }
    .main-content {
        padding: 100px 20px 20px 20px;
    }
}

/* 动画与过渡效果 */
.fade-in {
    animation: fadeIn 2s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 导航系统样式 */
.nav-links {
    display: flex;
    gap: 15px;
}
.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: #ffa500;
}

/* 图片展示样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.image-gallery img {
    width: calc(33.333% - 20px);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.image-gallery img:hover {
    transform: scale(1.05);
}

/* 章节导航系统样式 */
.chapter-nav {
    position: fixed;
    top: 100px;
    right: 40px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.chapter-nav ul {
    list-style: none;
    padding: 0;
}
.chapter-nav li {
    margin: 10px 0;
}
.chapter-nav li a {
    text-decoration: none;
    color: #2a5298;
    transition: color 0.3s ease;
}
.chapter-nav li a:hover {
    color: #ffa500;
}

/* 提示信息样式 */
.prompt-message {
    background: #ffa500;
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
}


