
/* 基本样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #F5F5DC 70%, #6DBE45 25%, #FFD700 5%);
    color: #333333;
    line-height: 1.6;
}

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

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 15px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.navbar a:hover {
    background-color: #FFD700;
    border-radius: 5px;
    transform: scale(1.05);
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: rgba(30, 144, 255, 0.9);
    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: #FFD700;
}

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

article h2, article h3 {
    font-family: 'Roboto', sans-serif;
    color: #6DBE45;
}

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

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

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

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

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

/* 按钮样式 */
.button-primary {
    background-color: #1E90FF;
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

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

/* 图片样式 */
img.decorative {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

    .chapter-nav {
        position: static;
        margin-top: 20px;
    }

    .container {
        grid-template-columns: 1fr;
    }

    article h2 {
        font-size: 22px;
    }

    article h3 {
        font-size: 18px;
    }

    article p, article code {
        font-size: 15px;
    }
}

/* 加载动画样式 */
.loading-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #1E90FF;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 动态微动画 */
@keyframes sway {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

.leaf {
    animation: sway 3s infinite;
}

@keyframes drop {
    0% { transform: translateY(0); }
    50% { transform: translateY(10px); }
    100% { transform: translateY(0); }
}

.drop {
    animation: drop 2s infinite;
}

/* 信息区块样式 */
.section-block {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.section-block h3 {
    color: #1E90FF;
}

.section-block p {
    margin-bottom: 15px;
}

/* 导航链接样式 */
.nav-link {
    display: inline-block;
    margin: 5px 0;
    color: #1E90FF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #FFD700;
}

