
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用Roboto字体，确保现代感与易读性 */
    background-color: #F5DEB3; /* 米黄色背景，营造温暖复古氛围 */
    color: #333333; /* 主文本颜色，确保可读性 */
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease; /* 背景与文本颜色的平滑过渡效果 */
}

/* 头部样式 */
header {
    background-color: #8B4513; /* 温暖的棕色，符合复古主题 */
    padding: 20px 0;
    text-align: center;
    color: #FFFFFF; /* 白色文字，确保与棕色背景的对比度 */
    font-family: 'Courier New', Courier, monospace; /* 复古字体，增强怀旧感 */
    font-size: 2em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 轻微阴影，增加层次感 */
}

/* 导航栏样式 */
nav {
    display: flex;
    justify-content: center;
    background-color: #2F4F4F; /* 深蓝色，体现科技感 */
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav a {
    color: #FFD700; /* 金色，作为点缀色增强视觉效果 */
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #FFA500; /* 橙色悬停效果，增加互动感 */
}

/* 主内容区样式 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
    padding: 40px;
}

/* 侧边栏样式 */
.sidebar {
    background-color: #A9A9A9; /* 灰色辅助色 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    font-family: 'Courier New', Courier, monospace;
    color: #2F4F4F;
    margin-bottom: 15px;
}

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

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

.sidebar ul li a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: #FFA500;
}

/* 文章内容样式 */
.article-content {
    background-color: #FFFFFF; /* 白色背景，确保内容清晰 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-content h2 {
    font-family: 'Courier New', Courier, monospace;
    color: #2F4F4F;
    margin-bottom: 20px;
    font-size: 2em;
}

.article-content h3 {
    font-family: 'Courier New', Courier, monospace;
    color: #2F4F4F;
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.article-content p {
    font-family: 'Roboto', sans-serif;
    color: #333333;
    margin-bottom: 15px;
    font-size: 1em;
}

.article-content pre {
    background-color: #F0E68C; /* 米黄色背景，保持复古感 */
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

.article-content code {
    font-family: 'Courier New', Courier, monospace;
    color: #8B4513; /* 棕色代码字体 */
}

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

.article-content img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* 按钮样式 */
.button {
    background: linear-gradient(135deg, #FFD700, #FFA500); /* 渐变色背景 */
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    color: #FFFFFF;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.5s ease, transform 0.3s ease;
}

.button:hover {
    background: linear-gradient(135deg, #FFA500, #FFD700);
    transform: scale(1.05);
}

/* 页脚样式 */
footer {
    background-color: #2F4F4F;
    color: #FFFFFF;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    nav {
        flex-direction: column;
    }

    nav a {
        margin: 10px 0;
    }
}

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

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

/* 按钮动画 */
@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.button-pulse {
    animation: buttonPulse 2s infinite;
}

/* 导航栏固定 */
.sticky {
    position: fixed;
    top: 0;
    width: 100%;
}

/* 卡片布局 */
.card {
    background-color: #F5DEB3;
    border: 1px solid #A9A9A9;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 15px;
}

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

/* 背景动态效果 */
.background-dynamic {
    background: linear-gradient(45deg, #8B4513, #F5DEB3, #2F4F4F);
    background-size: 600% 600%;
    animation: GradientAnimation 15s ease infinite;
}

@keyframes GradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 导航章节 */
.section-nav {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: rgba(255, 215, 0, 0.8); /* 半透明金色背景 */
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

.section-nav ul li a {
    color: #2F4F4F;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

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