
/* 全局样式设置 */
/* 使用Roboto字体，确保跨设备一致的阅读体验 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 导航链接样式 */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* 章节导航系统样式 */
.chapter-nav {
    position: fixed;
    top: 80px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chapter-nav a {
    display: block;
    color: #e0e0e0;
    text-decoration: none;
    margin: 5px 0;
    transition: color 0.3s;
}

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

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

/* 章节区块样式 */
.section {
    margin-bottom: 50px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* 标题样式 */
.section h2, .section h3 {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
}

.section p {
    font-weight: 400;
    color: #e0e0e0;
    line-height: 1.6;
}

/* 高亮文本样式 */
.highlight {
    color: #ff9800;
    font-weight: 500;
}

/* 代码块样式 */
.code-block {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-block code {
    font-family: 'Courier New', Courier, monospace;
    color: #ffffff;
    display: block;
}

/* 图片样式 */
.decorative-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

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

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

/* 互动按钮样式 */
.button {
    background-color: #ff5722;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    margin: 10px 0;
}

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

/* 加载动画样式 */
.loader {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #ff9800;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 玻璃拟态卡片样式 */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.37);
}

/* 响应式图片网格布局 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .chapter-nav {
        display: none;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        padding: 10px 0;
    }
}

@media (max-width: 600px) {
    .container {
        margin: 120px 10px 20px 10px;
        padding: 10px;
    }

    .section {
        padding: 15px;
    }

    .decorative-images {
        flex-direction: column;
        align-items: center;
    }
}

