
/* 全局样式设置，确保页面在各种设备上均有良好表现 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0d47a1 70%, #00bcd4 25%, #ff9800 5%);
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(13, 71, 161, 0.9);
    color: #ffffff;
    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);
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #ff9800;
}

/* 侧边菜单样式 */
.sidebar-menu {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    padding: 60px 20px;
}

.sidebar-menu.open {
    left: 0;
}

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

.sidebar-menu ul li {
    margin-bottom: 20px;
}

.sidebar-menu ul li a {
    color: #0d47a1;
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.sidebar-menu ul li a:hover {
    color: #ff9800;
}

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

.header {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5em;
    color: #0d47a1;
    margin-bottom: 20px;
}

.header p {
    font-size: 1.2em;
    color: #333333;
}

/* 章节样式 */
section {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* 章节标题样式 */
section h2 {
    font-family: 'Fira Sans Bold', sans-serif;
    font-size: 2em;
    color: #0d47a1;
    margin-bottom: 20px;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #ff9800;
    margin-top: 10px;
    border-radius: 2px;
}

/* 子标题样式 */
section h3 {
    font-family: 'Fira Sans Bold', sans-serif;
    font-size: 1.5em;
    color: #00bcd4;
    margin-top: 30px;
    margin-bottom: 15px;
    position: relative;
}

section h3::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: #ff9800;
    margin-top: 5px;
    border-radius: 2px;
}

/* 文本内容样式 */
section p {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    text-align: justify;
}

/* 代码块样式 */
pre {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.95em;
    position: relative;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    color: #0d47a1;
}

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

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

/* 响应式布局 */
@media (max-width: 768px) {
    .navbar ul {
        display: none;
    }
    .sidebar-menu {
        padding: 60px 10px;
    }
    .header h1 {
        font-size: 2em;
    }
    section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 15px 20px;
    }
    .header h1 {
        font-size: 1.8em;
    }
    section h2 {
        font-size: 1.5em;
    }
    section h3 {
        font-size: 1.2em;
    }
}

