
/* 整体页面样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #032B44 70%, #81C784 25%, #FFA726 5%);
    color: #333333;
}

/* 顶部导航栏样式 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(3, 43, 68, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

header .logo {
    font-size: 24px;
    color: #FFFFFF;
    text-decoration: none;
}

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

header nav a:hover {
    color: #FFA726;
}

/* 主要内容区 */
main {
    padding: 100px 40px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 显著提示区域 */
.highlight {
    text-align: center;
    font-size: 20px;
    color: #FFFFFF;
    margin-bottom: 40px;
    padding: 20px;
    background-color: rgba(255, 167, 38, 0.8);
    border-radius: 8px;
}

/* 卡片式布局 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 20px);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.card img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.card h3 {
    font-size: 18px;
    margin-top: 15px;
    color: #032B44;
}

.card p {
    font-size: 16px;
    color: #555555;
    line-height: 1.6;
    margin-top: 10px;
}

/* 渐变分隔线 */
.separator {
    height: 4px;
    background: linear-gradient(90deg, #032B44, #81C784, #FFA726);
    margin: 40px 0;
    border: none;
    border-radius: 2px;
}

/* 文章内容样式 */
article {
    font-size: 16px;
    line-height: 1.8;
    color: #333333;
}

article h2 {
    font-size: 24px;
    color: #032B44;
    margin-top: 40px;
    margin-bottom: 20px;
}

article h3 {
    font-size: 20px;
    color: #81C784;
    margin-top: 30px;
    margin-bottom: 15px;
}

article p {
    margin-bottom: 15px;
}

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

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

/* 章节导航样式 */
.nav-sidebar {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 200px;
    background-color: rgba(3, 43, 68, 0.8);
    padding: 20px;
    border-radius: 8px;
}

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

.nav-sidebar ul li {
    margin-bottom: 10px;
}

.nav-sidebar ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-sidebar ul li a:hover {
    color: #FFA726;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .card {
        flex: 1 1 calc(50% - 20px);
    }

    .nav-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav {
        margin-top: 10px;
    }

    .card {
        flex: 1 1 100%;
    }

    main {
        padding: 100px 20px 20px 20px;
    }

    .highlight {
        font-size: 18px;
    }
}

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

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

/* CSS3 示例代码样式 */
.css-example {
    background-color: #f9f9f9;
    padding: 20px;
    border-left: 4px solid #81C784;
    margin: 20px 0;
    border-radius: 4px;
}

.css-example code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    color: #333333;
}

/* 图片展示 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.image-gallery img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 底部信息 */
footer {
    background-color: rgba(3, 43, 68, 0.9);
    color: #FFFFFF;
    text-align: center;
    padding: 20px 40px;
    margin-top: 60px;
}

footer a {
    color: #FFA726;
    text-decoration: none;
    margin: 0 10px;
    font-size: 16px;
}

footer a:hover {
    text-decoration: underline;
}

