
/* 全局样式设置，确保网页在不同设备上均有良好的显示效果 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72 70%, #2a5298 25%, #ff4b2b 5%);
    color: #ffffff;
    line-height: 1.6;
}

/* 固定导航栏的样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar a {
    color: #fff;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    transition: color 0.3s, transform 0.3s;
}

.navbar a:hover {
    color: #39ff14;
    transform: scale(1.1);
}

/* 侧边导航栏的样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 200px;
    height: 100%;
    background: rgba(30, 60, 114, 0.8);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar a {
    color: #fff;
    margin: 10px 0;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #39ff14;
}

/* 主要内容区域的样式 */
.main-content {
    margin-left: 220px;
    padding: 80px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 章节区块的样式 */
.section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: background 0.3s, transform 0.3s;
}

.section:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* 标题的样式 */
h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    margin-bottom: 15px;
}

h2 {
    font-size: 24px;
    border-bottom: 2px solid #39ff14;
    padding-bottom: 10px;
}

h3 {
    font-size: 20px;
    border-bottom: 1px solid #39ff14;
    padding-bottom: 5px;
}

h4 {
    font-size: 18px;
}

/* 段落的样式 */
section {
    font-size: 16px;
    color: #e0e0e0;
}

/* 图片样式，包含圆角、阴影和悬浮效果 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

/* CSS代码块样式，与正文内容区分开来 */
pre code {
    display: block;
    background: rgba(0,0,0,0.8);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #39ff14;
    margin: 20px 0;
}

/* 导航提示样式 */
.navigation {
    position: fixed;
    top: 70px;
    right: 20px;
    background: rgba(30, 60, 114, 0.9);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navigation a {
    display: block;
    color: #fff;
    text-decoration: none;
    margin: 10px 0;
    font-size: 14px;
    transition: color 0.3s;
}

.navigation a:hover {
    color: #39ff14;
}

/* 响应式设计，适配不同屏幕尺寸 */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
        padding: 80px 20px 20px 20px;
    }
    .navbar {
        flex-direction: column;
    }
    .navbar a {
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 20px;
    }
    h3 {
        font-size: 18px;
    }
    h4 {
        font-size: 16px;
    }
    section {
        font-size: 14px;
    }
}

