
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #F5F5DC 70%, #FFD700 25%, #FF9900 5%); /* 渐变背景，遵循色彩比例 */
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* 避免水平滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 51, 102, 0.9); /* 半透明深蓝色 */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FF9900; /* 点缀色悬停效果 */
}

/* 主内容区样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto; /* 顶部留出导航栏空间 */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 文章样式 */
article {
    background-color: rgba(245, 245, 220, 0.8); /* 半透明米色背景 */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

article h2, article h3 {
    font-family: 'Playfair Display', serif; /* 复古衬线字体 */
    color: #003366; /* 主色调深蓝 */
}

article h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

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

article p {
    font-size: 16px;
    margin-bottom: 15px;
}

/* 代码块样式 */
article pre {
    background-color: #2d2d2d;
    color: #ccc;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 14px;
}

article pre code {
    font-family: 'Courier New', Courier, monospace;
}

/* 按钮样式 */
.button {
    display: inline-block;
    background-color: #FF9900;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #e68a00;
    transform: scale(1.05);
}

/* 图片样式 */
img {
    max-width: 650px;
    width: 100%;
    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;
}

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

/* 导航菜单响应式 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px 0;
    }

    .navbar a {
        padding: 10px 0;
    }

    .container {
        padding: 10px;
        margin: 80px auto 20px auto;
    }

    article {
        padding: 20px;
    }
}

/* 折叠区域样式 */
.collapsible {
    background-color: #003366;
    color: #fff;
    cursor: pointer;
    padding: 10px 20px;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #002244;
}

.content {
    padding: 0 20px;
    display: none;
    overflow: hidden;
    background-color: #F5F5DC;
    border-radius: 5px;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 加载动画样式 */
.loader {
    border: 8px solid #F5F5DC;
    border-top: 8px solid #FF9900;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 100px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 固定导航栏优化 */
.navbar-fixed {
    padding: 10px 0;
    background-color: rgba(0, 51, 102, 1);
}

/* 代码示例样式 */
.code-example {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* 提示信息样式 */
.highlight {
    background-color: #FFEB3B;
    padding: 10px;
    border-left: 4px solid #FF9900;
    margin-bottom: 20px;
    font-weight: bold;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    padding: 50px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: #003366;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}

