
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    background: linear-gradient(135deg, #0E3D71 70%, #4FC1E9 30%);
    color: #333;
    transition: background 0.5s ease;
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(14, 61, 113, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
    transition: color 0.3s ease;
}

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

/* 主容器样式 */
.main {
    padding-top: 100px;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 章节导航样式 */
.chapter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.chapter-nav a {
    background-color: #FFA500;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.chapter-nav a:hover {
    background-color: #3CB371;
}

/* 文章内容样式 */
article {
    background-color: rgba(245, 245, 245, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

article h2, article h3, article h4 {
    color: #0E3D71;
    margin-top: 20px;
    margin-bottom: 10px;
}

article p {
    line-height: 1.8;
    margin-bottom: 20px;
}

article pre {
    background-color: #333;
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 示例数据展示 */
.examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.example-item {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.example-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.example-item img {
    width: 100%;
    height: auto;
    display: block;
}

.example-content {
    padding: 20px;
}

.example-content h3 {
    margin-top: 0;
    color: #0E3D71;
}

.example-content p {
    color: #555;
}

/* CSS3示例代码块 */
.code-example {
    background-color: #f0f0f0;
    padding: 20px;
    border-left: 5px solid #FFA500;
    margin-bottom: 40px;
    border-radius: 5px;
}

.code-example pre {
    background-color: #2d2d2d;
    color: #ccc;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

/* 图片样式 */
.decorative-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.decorative-images 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;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chapter-nav {
        flex-direction: column;
    }
    
    .decorative-images {
        justify-content: center;
    }
    
    .examples {
        grid-template-columns: 1fr;
    }
}

