
/* 基础样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 使用简洁易读的字体 */
    background: linear-gradient(135deg, #4A90E2, #9013FE); /* 蓝紫渐变背景 */
    color: #ffffff;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(to right, #4A90E2, #9013FE);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background 0.3s ease;
}
.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}
.navbar a:hover {
    color: #FF8C00; /* 悬停时橙色 */
}

/* 段落区块样式 */
.section {
    padding: 100px 50px;
    min-height: 100vh;
}
.section:nth-child(even) {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景区分不同区块 */
}
.section:nth-child(odd) {
    background: rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #FF8C00; /* 主要标题橙色 */
}
h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #00C851; /* 辅助标题绿色 */
}

/* 正文字体大小 */
p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 卡片式布局 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border 0.3s ease;
}
.card:hover {
    transform: scale(1.05);
    border: 2px solid #FF8C00;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 15px; /* 圆角效果 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
img.decorative:hover {
    transform: scale(1.1); /* 悬停放大效果 */
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #4A90E2, #9013FE);
    border: none;
    border-radius: 25px;
    color: #fff;
    padding: 10px 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.3s ease;
}
.button:hover {
    background: linear-gradient(45deg, #FF8C00, #00C851);
    transform: scale(1.1);
}

/* 加载动画样式 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #4A90E2;
    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); }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .navbar {
        padding: 15px 30px;
    }
    h2 {
        font-size: 24px;
    }
    h3 {
        font-size: 20px;
    }
    p {
        font-size: 15px;
    }
}
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .section {
        padding: 80px 20px;
    }
    img.decorative {
        max-width: 100%;
    }
}
@media (max-width: 480px) {
    .navbar {
        padding: 10px 15px;
    }
    .button {
        padding: 8px 20px;
        font-size: 14px;
    }
    h2 {
        font-size: 20px;
    }
    h3 {
        font-size: 18px;
    }
    p {
        font-size: 14px;
    }
}

/* 章节导航系统样式 */
.nav-anchors {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nav-anchors a {
    background: #FF8C00;
    color: #ffffff;
    padding: 10px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}
.nav-anchors a:hover {
    background: #00C851;
}

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
}
code {
    color: #00FF00;
    font-family: 'Courier New', Courier, monospace;
}

