
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置网页字体及背景色 */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0A2463 70%, #00D1FF 25%, #FF8C00 5%);
    color: #ffffff;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

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

.navbar .logo {
    font-size: 24px;
    font-weight: bold;
}

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

.navbar ul li {
    margin-left: 20px;
}

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

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

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

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

.chapter-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.chapter-nav ul li {
    margin-right: 15px;
    margin-bottom: 10px;
}

.chapter-nav ul li a {
    background-color: #203a43;
    padding: 10px 15px;
    border-radius: 5px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s;
}

.chapter-nav ul li a:hover {
    background-color: #00D1FF;
}

/* 文章内容样式 */
article {
    background-color: rgba(32, 58, 67, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

article h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #FF8C00;
    position: relative;
    padding-left: 10px;
}

article h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background-color: #FF8C00;
    border-radius: 50%;
}

article section {
    margin-bottom: 40px;
}

article p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #ffffff;
}

/* 代码块样式 */
code {
    background-color: #1e1e1e;
    color: #00D1FF;
    padding: 10px;
    border-radius: 5px;
    display: block;
    overflow-x: auto;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
}

pre {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

pre code {
    color: #00D1FF;
}

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 分隔线样式 */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, #00D1FF, #FF8C00);
    margin: 40px 0;
    border: none;
    border-radius: 1px;
}

/* 提示信息样式 */
.alert {
    background-color: rgba(255, 140, 0, 0.8);
    color: #ffffff;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 18px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* 过渡与动画 */
.card {
    background-color: rgba(30, 30, 30, 0.9);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

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

    .navbar ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }

    .chapter-nav ul {
        flex-direction: column;
    }

    .chapter-nav ul li {
        margin-right: 0;
    }

    .image-gallery {
        flex-direction: column;
        align-items: center;
    }
}

/* 高级CSS3效果示例 */
.gradient-border {
    border: 2px solid;
    border-image-slice: 1;
    border-width: 2px;
    border-image-source: linear-gradient(45deg, #00D1FF, #FF8C00);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 20px;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.pulse-effect::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    animation: pulse 2s infinite;
}

/* 动态卡片动画 */
.card-animated {
    position: relative;
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.6s;
}

.card-animated:hover {
    transform: rotateY(10deg) scale(1.05);
}

.card-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    transition: left 0.6s;
}

.card-animated:hover::before {
    left: 100%;
}

