
/* 
整体页面样式
采用深蓝色和灰色为主色调，橙色和绿色作为辅助色，确保色彩和谐丰富。
使用响应式设计，确保页面在320px到1920px的宽度范围内均有良好表现。
*/
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #ecf0f1;
    background: linear-gradient(135deg, #1a1a2e 70%, #16222a 25%, #f39c12 5%);
}

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

.navbar a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #f39c12;
}

/* 主要内容区块样式 */
.section {
    padding: 100px 20px 60px 20px;
    margin-top: 60px;
    background-color: #2c3e50;
    border-bottom: 2px solid #34495e;
}

.section:nth-child(even) {
    background-color: #1a1a2e;
}

.section h2, .section h3, .section h4 {
    color: #f39c12;
}

.section p {
    font-size: 17px;
    line-height: 1.6;
    color: #bdc3c7;
}

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

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

/* 代码块样式 */
.code-block {
    background-color: #34495e;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-block code {
    display: block;
    color: #ecf0f1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
}

/* 按钮样式 */
.button {
    background-color: #27ae60;
    color: #ecf0f1;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #2ecc71;
    transform: translateY(-5px);
}

/* 响应式网格系统 */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.card {
    background: linear-gradient(135deg, #16222a 0%, #3a6073 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    flex: 1 1 300px;
    margin: 15px;
    padding: 20px;
}

.card:hover {
    transform: scale(1.05);
}

/* 媒体查询 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    .section {
        padding: 80px 15px 40px 15px;
    }
    .section img {
        width: 100%;
        height: auto;
    }
}

/* 渐变线条 */
.gradient-line {
    height: 4px;
    background: linear-gradient(to right, #27ae60, #f39c12);
    margin: 40px 0;
    border: none;
}

/* 章节导航样式 */
.nav-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 200px;
    background-color: #1a1a2e;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.nav-sidebar a {
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-sidebar a:hover {
    color: #f39c12;
}

/* 内容区块的留白 */
.content {
    margin-left: 220px;
    padding: 20px;
}

@media (max-width: 768px) {
    .nav-sidebar {
        display: none;
    }
    .content {
        margin-left: 0;
    }
}

