
/* 全局变量定义 */
:root {
    --主色: #C19A6B; /* 驼色 */
    --辅色1: #3E4D2F; /* 墨绿 */
    --辅色2: #0F4C81; /* 深蓝 */
    --辅色3: #AEBCC7; /* 蓝灰 */
    --点缀色: #B87333; /* 金属铜 */
    --背景色: #F5F5F5; /* 浅灰背景 */
    --文字色: #333333; /* 深灰文字 */
    --标题色: #0F4C81; /* 深蓝标题 */
    --链接色: #B87333; /* 金属铜链接 */
}

/* 设置全局字体和基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--背景色);
    color: var(--文字色);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(90deg, var(--主色), var(--辅色2));
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 导航链接样式 */
.navbar a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: var(--点缀色);
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
}

/* 侧边栏样式 */
.sidebar {
    background: var(--辅色3);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.sidebar img:hover {
    transform: scale(1.05);
}

/* 主要内容样式 */
.main-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.main-content h2, .main-content h3 {
    color: var(--标题色);
}

.main-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.main-content h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.main-content p {
    font-size: 16px;
    margin-bottom: 15px;
}

/* 代码块样式 */
.main-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 14px;
    margin-bottom: 20px;
}

.main-content code {
    font-family: 'Courier New', Courier, monospace;
}

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

.main-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* 按钮样式 */
.button {
    display: inline-block;
    background: linear-gradient(45deg, var(--deep-blue), var(--blue-gray));
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
    text-decoration: none;
    font-size: 16px;
}

.button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, var(--点缀色), var(--deep-blue));
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--deep-blue);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 45%;
    padding: 20px;
    background: var(--辅色3);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 55%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: var(--点缀色);
    border: 2px solid var(--deep-blue);
    border-radius: 50%;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .timeline-item {
        width: 100%;
        left: 0 !important;
    }

    .navbar {
        padding: 15px 20px;
    }
}

