
/* 全局样式设置 */
body {
    /* 使用柔和的蓝灰渐变背景，营造科技感和专业性 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.8); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 15px 0;
    margin: 0;
}

.navbar ul li {
    margin: 0 20px;
}

.navbar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #6a11cb; /* 点缀色悬停效果 */
}

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

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    background: rgba(32, 58, 67, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 10px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.chapter-nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.chapter-nav ul li a:hover {
    color: #6a11cb;
}

/* 视觉区块样式 */
.section {
    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: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

/* 图片样式 */
.section img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 标题样式 */
.section h2, .section h3, .section h4 {
    color: #ffffff;
    margin-bottom: 20px;
}

.section h2 {
    font-size: 24px;
}

.section h3 {
    font-size: 20px;
}

.section h4 {
    font-size: 18px;
}

/* 正文样式 */
.section p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 代码块样式 */
.code-block {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #00ffcc;
    margin-bottom: 20px;
}

/* 按钮样式 */
.btn {
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border: none;
    border-radius: 25px;
    color: #fff;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.btn:hover {
    background: linear-gradient(45deg, #2575fc, #6a11cb);
    transform: translateY(-3px);
}

/* 加载动画样式 */
.loader {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #3498db;
    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); }
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .container {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

