
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #001f3f 70%, #004080 25%, #FFA500 5%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* 防止水平滚动条 */
}

/* 标题样式 */
h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    color: #FFA500; /* 点缀色 */
}

h2 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
}

h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}

h4 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* 段落样式 */
p {
    font-size: 16px;
    margin-bottom: 20px;
}

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

code {
    font-family: 'Courier New', Courier, monospace;
    color: #d63384;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 31, 63, 0.9);
    padding: 15px 30px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    color: #FFA500;
    font-size: 20px;
    text-decoration: none;
}

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

.navbar ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

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

/* 主内容区域 */
.main {
    padding: 100px 30px 50px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 图片装饰样式 */
.decorative-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
    justify-content: center;
}

.decorative-images img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 章节导航样式 */
.section-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background: rgba(0, 31, 63, 0.8);
    padding: 15px;
    border-radius: 8px;
}

.section-nav ul {
    list-style: none;
}

.section-nav ul li a {
    display: block;
    color: #fff;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.section-nav ul li a:hover {
    color: #FFA500;
}

/* 强调提示 */
.highlight {
    background-color: rgba(255, 165, 0, 0.2);
    padding: 10px;
    border-left: 5px solid #FFA500;
    margin: 20px 0;
    font-size: 18px;
    font-weight: bold;
}

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

    .navbar ul {
        flex-direction: column;
        width: 100%;
    }

    .section-nav {
        display: none;
    }

    .decorative-images {
        justify-content: center;
    }

    .main {
        padding: 120px 15px 20px 15px;
    }
}

/* 其他装饰元素 */
.footer {
    background-color: #001f3f;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.footer a {
    color: #FFA500;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
}

/* CSS3 动画示例 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 2s ease-in-out;
}

/* 图片容器样式 */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.image-container img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.image-container:hover img {
    transform: scale(1.1);
}

