
/* 基础重置，确保跨浏览器一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 页面主体样式 */
body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 渐变背景，主色调为深蓝至蓝绿 */
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 16px; /* 正文字号在16px */
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现横向滚动条 */
}
/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7); /* 半透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
}
.navbar a {
    color: #00ffff; /* 辅助色电光蓝 */
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}
.navbar a:hover {
    color: #ff00ff; /* 点缀色紫红色 */
    transform: scale(1.1);
}
/* 主内容容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 20px 40px 20px; /* 顶部留出导航栏空间 */
}
/* 各模块样式 */
.section {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}
.section:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}
/* 标题样式 */
h2, h3, h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 700;
}
h2 {
    font-size: 24px;
}
h3 {
    font-size: 20px;
}
h4 {
    font-size: 18px;
}
/* 文字段落样式 */
p {
    margin-bottom: 15px;
    color: #dddddd;
}
/* 图片样式 */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.7);
}
/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}
code {
    color: #00ff90;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}
/* 渐变分隔线样式 */
.separator {
    height: 4px;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    margin: 40px 0;
    border-radius: 2px;
}
/* 导航锚点样式 */
.nav-anchor {
    display: block;
    position: relative;
    top: -80px; /* 调整锚点位置以避开固定导航栏 */
    visibility: hidden;
}
/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar a {
        margin: 10px 0;
    }
    .container {
        grid-template-columns: 1fr;
        padding: 100px 10px 20px 10px;
    }
}
@media (max-width: 480px) {
    h2 {
        font-size: 20px;
    }
    h3 {
        font-size: 18px;
    }
    h4 {
        font-size: 16px;
    }
    p {
        font-size: 14px;
    }
}
/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #00ffff;
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}
.button:hover {
    background: #ff00ff;
    transform: scale(1.05);
}
/* 背景动画 */
@keyframes backgroundChange {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
body {
    animation: backgroundChange 15s ease infinite;
    background-size: 400% 400%;
}
/* 卡片悬停效果 */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
}
/* 导航菜单样式 */
.nav-menu {
    display: flex;
    list-style: none;
}
.nav-menu li {
    margin-right: 20px;
}
.nav-menu li:last-child {
    margin-right: 0;
}
/* 面包屑导航样式 */
.breadcrumb {
    font-size: 14px;
    margin-bottom: 20px;
    color: #aaaaaa;
}
.breadcrumb a {
    color: #00ffff;
    text-decoration: none;
    margin-right: 5px;
}
.breadcrumb a::after {
    content: '>';
    margin-left: 5px;
}
.breadcrumb a:last-child::after {
    content: '';
}

