
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* 渐变背景色 */
    color: #ffffff;
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9); /* 半透明背景 */
    padding: 20px 40px;
    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:hover {
    background: rgba(30, 60, 114, 1); /* 悬停时背景变深 */
}

.navbar .logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
}

.navbar .menu {
    display: flex;
    gap: 20px;
}

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

.navbar .menu a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: #ff7e5f; /* 点缀色 */
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.navbar .menu a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .navbar .menu {
        flex-direction: column;
        background: rgba(30, 60, 114, 0.95);
        position: absolute;
        top: 70px;
        right: 20px;
        padding: 10px;
        border-radius: 8px;
        display: none;
    }
    .navbar .menu.active {
        display: flex;
    }
    .navbar .toggle {
        display: block;
        cursor: pointer;
    }
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px; /* 顶部留白避免导航栏覆盖 */
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
}

/* 模块样式 */
.module {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px); /* 背景模糊 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

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

.module img:hover {
    transform: scale(1.05);
}

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

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

/* 代码块样式 */
pre {
    background: #2a5298;
    padding: 20px;
    border-radius: 8px;
    overflow: auto;
    position: relative;
}

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

/* 代码块标题 */
pre code::before {
    content: "代码示例";
    display: block;
    background: #ff7e5f;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px 4px 0 0;
    font-weight: bold;
}

pre code {
    overflow: visible; /* 确保标题显示完整 */
}

/* 按钮样式 */
.button {
    background: linear-gradient(90deg, #4b6cb7, #182848); /* 渐变背景 */
    border: none;
    padding: 12px 24px;
    color: #ffffff;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.5s ease;
}

.button:hover {
    background: linear-gradient(90deg, #ff7e5f, #feb47b); /* 悬停时变色 */
}

/* 折叠内容样式 */
.collapsible {
    background: rgba(255, 255, 255, 0.05);
    color: #f0f0f0;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.collapsible:hover {
    background: rgba(255, 255, 255, 0.1);
}

.active, .collapsible:hover {
    background: rgba(255, 255, 255, 0.1);
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 0 8px 8px;
}

/* 图片排列 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.image-gallery img {
    width: calc(25% - 20px);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .image-gallery img {
        width: calc(33.333% - 20px);
    }
}

@media (max-width: 768px) {
    .image-gallery img {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .image-gallery img {
        width: 100%;
    }
}

/* 提示信息样式 */
.info-banner {
    background: rgba(255, 126, 95, 0.8);
    color: #ffffff;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 40px;
    font-size: 18px;
    font-weight: bold;
}

/* 结束语样式 */
.footer {
    background: rgba(30, 60, 114, 0.9);
    color: #ffffff;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #ffffff;
}

