
/* 全局样式设置 */
body {
    /* 使用线性渐变作为背景，主色调为深蓝色，辅色为亮橙色 */
    background: linear-gradient(135deg, #0d47a1 70%, #ff9800 25%, #ffffff 5%);
    color: #333;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    /* 设置响应式布局，确保页面宽度范围在320px到1920px之间 */
    width: 100%;
    overflow-x: hidden;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #0d47a1;
    margin-bottom: 20px;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 18px;
}

h4 {
    font-size: 16px;
}

/* 段落样式 */
p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 链接样式，所有内部链接添加了rel="nofollow"属性 */
a {
    color: #ff9800;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* 容器样式，使用CSS Grid进行模块化布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 40px;
}

/* 独立视觉区块 */
.section {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 标志性提示 */
.header-banner {
    background: #0d47a1;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 18px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 导航栏样式 */
nav {
    background: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 60px;
    z-index: 999;
}
.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}
.nav-links a {
    font-size: 16px;
    color: #0d47a1;
    position: relative;
}
.nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #ff9800;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}
.nav-links a:hover::after {
    width: 100%;
}

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

/* 代码块样式，区分于正文内容 */
pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}
code {
    font-family: 'Courier New', Courier, monospace;
    color: #d14;
}

/* 渐变线条作为分隔元素 */
.separator {
    height: 2px;
    background: linear-gradient(to right, #0d47a1, #ff9800);
    margin: 40px 0;
    border: none;
}

/* 按钮样式 */
.button {
    background-color: #ff9800;
    border: none;
    padding: 15px 30px;
    color: #fff;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.button:hover {
    background-color: #e68900;
    transform: scale(1.05);
}

/* 卡片样式，用于展示模块化信息 */
.card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.chapter-nav a {
    display: block;
    margin-bottom: 10px;
    color: #0d47a1;
    font-size: 14px;
}
.chapter-nav a:last-child {
    margin-bottom: 0;
}
.chapter-nav a:hover {
    color: #ff9800;
}

/* 响应式设计，针对不同设备优化布局 */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
    .chapter-nav {
        position: static;
        margin: 20px 0;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
        margin: 0 auto;
    }
}

