
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置字体 */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #CCCCCC;
    background: linear-gradient(135deg, #1A1A2E 70%, #16213E 25%, #E94560 5%);
    line-height: 1.6;
}

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

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

.navbar a:hover {
    color: #E94560;
}

/* 汉堡菜单样式 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #E94560;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* 响应式导航菜单 */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: rgba(22, 33, 62, 0.95);
        position: absolute;
        top: 70px;
        left: 0;
    }

    .navbar-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .navbar a {
        padding: 15px;
        border-top: 1px solid #2E2E4E;
    }
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto;
    padding: 0 20px;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: rgba(26, 26, 46, 0.8);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.chapter-nav a {
    display: block;
    color: #FFFFFF;
    text-decoration: none;
    margin: 10px 0;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

/* 章节内容样式 */
.section {
    padding: 60px 0;
    border-bottom: 1px solid #2E2E4E;
}

.section:nth-child(even) {
    background-color: #16213E;
}

.section-title {
    margin-bottom: 40px;
    text-align: center;
}

.section-title h2 {
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: bold;
    font-size: 24px;
    color: #FFFFFF;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background-color: #E94560;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

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

.image-gallery img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    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.4);
}

/* 文章内容样式 */
article {
    max-width: 800px;
    margin: 0 auto;
    color: #FFFFFF;
}

article h2, article h3, article h4 {
    font-family: 'Helvetica Neue', sans-serif;
    color: #FFFFFF;
    margin-bottom: 20px;
}

article h2 {
    font-size: 22px;
}

article h3 {
    font-size: 18px;
}

article p {
    margin-bottom: 20px;
}

article pre {
    background-color: #1A1A2E;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    color: #E94560;
}

/* 折叠内容样式 */
.collapsible {
    background-color: #16213E;
    color: #FFFFFF;
    cursor: pointer;
    padding: 10px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
    border-radius: 4px;
}

.collapsible:hover {
    background-color: #1A1A2E;
}

.content {
    padding: 0 20px;
    display: none;
    overflow: hidden;
    background-color: #1A1A2E;
    border-radius: 4px;
    margin-bottom: 20px;
}

.content p {
    margin-bottom: 10px;
}

/* 桌面与移动端调整 */
@media (max-width: 768px) {
    .chapter-nav {
        display: none;
    }
}

