
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 使用易读的字体 */
    background: linear-gradient(135deg, #6AB187 0%, #4567B7 100%); /* 主色调渐变背景 */
    color: #333;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(70, 103, 183, 0.9); /* 半透明背景 */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

/* 章节导航样式 */
.chapter-nav {
    margin-top: 80px; /* 给固定导航栏留出空间 */
    padding: 20px 30px;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
}

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

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

.chapter-nav a {
    text-decoration: none;
    color: #4567B7;
    font-size: 16px;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.chapter-nav a:hover {
    color: #6AB187;
    border-bottom: 2px solid #6AB187;
}

/* 主要内容区域 */
.content {
    padding: 20px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 图片装饰样式 */
.decorative-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
}

.decorative-images img {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

article h2, article h3, article h4 {
    color: #4567B7;
}

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

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

article h4 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
}

article p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

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

article code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #e8e8e8;
    padding: 2px 4px;
    border-radius: 4px;
}

/* 提示信息样式 */
.notice {
    text-align: center;
    font-size: 18px;
    color: #fff;
    background-color: rgba(70, 103, 183, 0.8);
    padding: 10px 0;
    position: fixed;
    top: 60px;
    width: 100%;
    z-index: 999;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .navbar {
        padding: 10px 20px;
    }

    .chapter-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .decorative-images img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .navbar a {
        margin: 0 10px;
        font-size: 14px;
    }

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

    .decorative-images img {
        width: 100px;
        height: 100px;
    }

    article {
        padding: 20px;
    }

    .notice {
        font-size: 16px;
        top: 50px;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .chapter-nav {
        padding: 15px 20px;
    }

    .decorative-images {
        gap: 10px;
    }

    .decorative-images img {
        width: 80px;
        height: 80px;
    }

    article h2 {
        font-size: 20px;
    }

    article h3 {
        font-size: 18px;
    }

    article h4 {
        font-size: 16px;
    }

    .notice {
        font-size: 14px;
        top: 40px;
    }
}

