
/* 整体页面样式设置 */
/* 设置页面的默认字体、颜色和背景 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 深色背景渐变 */
    color: #ffffff;
    line-height: 1.6;
}

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(20, 20, 20, 0.9); /* 半透明背景 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    margin: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #00ffcc; /* 点缀色 */
    font-size: 16px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ffffff;
}

/* 主标题样式 */
.header {
    padding: 100px 20px 50px 20px;
    text-align: center;
    background: rgba(32, 58, 67, 0.8);
    margin-top: 60px;
}

.header h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #00ffcc;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header p {
    font-size: 18px;
    color: #ffffff;
}

/* 章节导航样式 */
.section-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background: rgba(32, 58, 67, 0.9);
    padding: 10px;
    border-radius: 8px;
}

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

.section-nav ul li {
    margin: 10px 0;
}

.section-nav ul li a {
    text-decoration: none;
    color: #00ffcc;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

/* 内容区块样式 */
.article-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.article-section h2, .article-section h3, .article-section h4 {
    color: #00ffcc;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.article-section p {
    font-size: 16px;
    margin-bottom: 20px;
}

.article-section pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.article-section code {
    color: #00ffcc;
    font-family: 'Courier New', Courier, monospace;
}

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

.image-grid img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* CSS3 示例代码块样式 */
.css-example {
    background: rgba(20, 20, 20, 0.8);
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    color: #00ffcc;
    margin-bottom: 40px;
}

.css-example pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #0f2027, #203a43, #2c5364);
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 8px;
    transition: background 0.5s ease, transform 0.3s ease;
    cursor: pointer;
}

.button:hover {
    background: linear-gradient(45deg, #2c5364, #203a43, #0f2027);
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }

    .section-nav {
        position: static;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .image-grid img {
        width: 100%;
        height: auto;
    }

    .header h1 {
        font-size: 28px;
    }

    .section-nav ul li a {
        font-size: 16px;
    }
}

/* 微交互动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

/* 分隔线样式 */
.separator {
    height: 2px;
    background: linear-gradient(90deg, rgba(0,255,204,0), rgba(0,255,204,1), rgba(0,255,204,0));
    margin: 40px 0;
    border: none;
}

/* 结束语样式 */
.footer {
    padding: 40px 20px;
    text-align: center;
    background: rgba(32, 58, 67, 0.8);
}

.footer p {
    font-size: 16px;
    color: #ffffff;
}

