
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 正文字体 */
    font-size: 16px; /* 正文字号 */
    color: #ffffff; /* 文字颜色 */
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* 背景线性渐变 */
    overflow-x: hidden; /* 禁止水平滚动 */
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定定位 */
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9); /* 半透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    transition: background 0.3s ease; /* 背景过渡效果 */
}

.navbar:hover {
    background: rgba(30, 60, 114, 1); /* 悬停时背景不透明 */
}

.navbar .logo {
    font-family: 'Montserrat', sans-serif; /* 主标题字体 */
    font-size: 20px;
    color: #FFA500; /* 辅色点缀 */
    text-decoration: none;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

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

.navbar ul li a:hover {
    color: #FFA500; /* 悬停时颜色变化 */
}

/* 主要内容区域样式 */
.container {
    padding: 100px 50px 50px 50px; /* 顶部留白避免导航遮挡 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 30px;
}

/* 模块样式 */
.module {
    background: rgba(42, 82, 152, 0.9); /* 模块背景色 */
    padding: 20px;
    border-radius: 10px; /* 圆角 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 阴影效果 */
    transition: transform 0.3s ease, background 0.3s ease;
}

.module:hover {
    transform: scale(1.05); /* 悬停时放大 */
    background: rgba(30, 60, 114, 1); /* 悬停时背景色变化 */
}

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

.module img:hover {
    transform: translateY(-10px); /* 悬停时上移 */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
}

/* 文章样式 */
article {
    background: rgba(42, 82, 152, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

article h2, article h3, article h4 {
    font-family: 'Montserrat', sans-serif; /* 标题字体 */
    color: #FFA500; /* 辅色点缀 */
}

article p {
    line-height: 1.6;
    margin-bottom: 15px;
}

article pre {
    background: #1e3c72;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
}

article pre code {
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 代码高亮 */
.highlight {
    color: #FFA500; /* 代码关键字高亮色 */
    font-weight: bold;
}

/* 标签样式 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tags span {
    background: #FFA500;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

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

    .container {
        padding: 100px 20px 20px 20px;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 按钮样式 */
.button {
    background: #FFA500;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.button:hover {
    background: #ff8c00;
}

/* 折叠区域样式 */
.collapsible {
    background: #2a5298;
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background 0.3s ease;
    border-radius: 5px;
}

.collapsible:hover {
    background: #1e3c72;
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background: rgba(30, 60, 114, 0.9);
    border-radius: 5px;
    margin-top: 5px;
}

/* 提示信息样式 */
.reference {
    text-align: center;
    font-size: 18px;
    margin: 20px 0;
    color: #FFA500;
    font-family: 'Montserrat', sans-serif;
}

/* 导航锚点样式 */
.nav-anchor {
    display: block;
    position: relative;
    top: -60px; /* 偏移量以适应固定导航栏 */
    visibility: hidden;
}

/* 特殊样式代码块 */
.code-example {
    background: #1e3c72;
    padding: 20px;
    border-radius: 10px;
    overflow: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
}

.code-example code {
    color: #FFA500;
    font-size: 14px;
}

/* 图片描述属性为空 */
img[alt=""] {
    /* 样式已在模块中定义，无需额外设置 */
}

/* 结束样式 */

