
/* 基本样式重置，确保不同浏览器的一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 定义全局字体和背景色 */
body {
    font-family: 'Roboto', sans-serif; /* 使用无衬线字体，现代感强 */
    background: linear-gradient(135deg, #1E3A8A 70%, #10B981 25%, #F59E0B 5%);
    color: #FFFFFF;
    line-height: 1.6;
    padding: 20px;
    transition: background 0.5s ease;
}

/* 固定导航栏样式 */
.navbar {
    background: rgba(30, 58, 138, 0.9); /* 半透明深蓝色背景 */
    padding: 15px 30px;
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 细微阴影效果 */
}

.navbar a {
    color: #F3F4F6;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar a:hover {
    color: #F59E0B; /* 橙色悬停效果 */
    transform: scale(1.05);
}

/* 章节导航栏样式 */
.section-nav {
    margin-top: 80px; /* 为固定导航栏预留空间 */
    background: rgba(16, 185, 129, 0.8); /* 半透明绿色背景 */
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.section-nav a {
    color: #FFFFFF;
    text-decoration: none;
    margin-right: 20px;
    font-size: 17px;
    transition: color 0.3s ease;
}

.section-nav a:hover {
    color: #F59E0B; /* 橙色悬停效果 */
}

/* 文章内容区块样式 */
.article-section {
    margin-bottom: 50px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1); /* 半透明白色背景 */
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 细微阴影效果 */
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* 标题样式 */
.article-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #F59E0B; /* 橙色标题 */
}

.article-section p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #F3F4F6;
}

/* 图片样式 */
.article-section img {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 10px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 代码块样式 */
code {
    display: block;
    background: rgba(30, 58, 138, 0.8);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    color: #F3F4F6;
    overflow-x: auto;
    margin: 20px 0;
}

pre {
    background: rgba(30, 58, 138, 0.8);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

pre code {
    color: #F3F4F6;
}

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

    .section-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-nav a {
        margin-bottom: 10px;
    }

    .article-section img {
        max-width: 100%;
    }
}

/* 按钮样式 */
.button {
    background-color: #10B981; /* 绿色背景 */
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #F59E0B; /* 橙色悬停 */
    transform: scale(1.05);
}

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

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