
/* 全局字体和背景设定 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1E90FF 70%, #32CD32 25%, #FFA500 5%);
    color: #333333;
    line-height: 1.6;
    transition: background 0.5s ease;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
}

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

.navbar a:hover {
    color: #32CD32;
}

/* 主要内容区域 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto; /* 留出导航栏空间 */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* 章节导航 */
.chapter-nav {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-nav a {
    background-color: #FFA500;
    color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.chapter-nav a:hover {
    background-color: #1E90FF;
}

/* 文章样式 */
article {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2, article h3 {
    color: #1E90FF;
}

article pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

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

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

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

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

/* 交互按钮 */
.button {
    background-color: #FFA500;
    color: #FFFFFF;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 固定导航栏和滚动指示器的样式 */
.scroll-indicator {
    position: fixed;
    right: 10px;
    top: 50%;
    width: 5px;
    height: 100px;
    background: linear-gradient(#1E90FF, #32CD32);
    border-radius: 5px;
    transform: translateY(-50%);
}

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

    .chapter-nav {
        display: none;
    }

    .container {
        margin: 120px 20px 20px 20px;
    }

    .image-gallery {
        justify-content: center;
    }
}

