
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 采用无衬线字体，保证阅读舒适 */
    background: linear-gradient(135deg, #ECF0F1, #BDC3C7); /* 背景采用渐变色，避免纯白 */
    color: #34495E; /* 正文字体颜色，舒适且易于阅读 */
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(90deg, #2C3E50, #8E44AD); /* 导航栏背景采用主色渐变 */
    padding: 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影效果，增强立体感 */
}

.navbar a {
    color: #ECF0F1; /* 导航链接颜色 */
    text-decoration: none;
    margin: 0 15px;
    font-family: 'Garamond', serif; /* 标题采用复古衬线字体 */
    font-size: 18px;
    transition: color 0.3s ease; /* 过渡效果，提高用户体验 */
}

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

/* 主内容区样式 */
.main-content {
    padding: 100px 20px 20px 20px; /* 留出导航栏空间 */
    max-width: 1200px;
    margin: 0 auto;
}

/* 章节导航系统 */
.chapter-nav {
    margin-bottom: 40px;
    background: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

.chapter-nav a {
    color: #2C3E50;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.chapter-nav a:hover {
    color: #E67E22;
}

/* 文章内容样式 */
article h2 {
    font-family: 'Garamond Bold', serif;
    color: #2C3E50;
    font-size: 24px;
    margin-top: 40px;
}

article h3 {
    font-family: 'Garamond Bold', serif;
    color: #8E44AD;
    font-size: 20px;
    margin-top: 30px;
}

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

article pre {
    background: #F4F6F7;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #2C3E50;
}

/* 图片样式 */
img.decorative {
    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: 20px 0;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.button {
    background-color: #F1C40F;
    color: #2C3E50;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
}

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

/* 仪表盘样式 */
.dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.widget {
    flex: 1 1 300px;
    background-color: #FFFFFF;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.widget:hover {
    transform: translateY(-5px);
}

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

    .chapter-nav ul {
        display: flex;
        flex-direction: column;
    }

    .chapter-nav li {
        margin: 5px 0;
    }
}

