
/* 全局样式设置 */
body {
    background: linear-gradient(135deg, #0d47a1, #424242); /* 线性渐变背景，增加深蓝与银灰的科技感 */
    color: #ffffff; /* 全局文字颜色为白色，确保良好的可读性 */
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体，增强专业感 */
    margin: 0; /* 去除默认外边距 */
    padding: 0; /* 去除默认内边距 */
    box-sizing: border-box; /* 全局盒模型设置为border-box */
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background: rgba(13, 71, 161, 0.9); /* 半透明深蓝背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px; /* 内边距确保内容不紧凑 */
    z-index: 1000; /* 确保导航栏在最上层 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* 添加阴影，增强立体感 */
    backdrop-filter: blur(10px); /* 背景模糊效果，提升视觉层次 */
}

/* 导航栏链接样式 */
.navbar a {
    color: #ffffff; /* 链接文字颜色为白色 */
    text-decoration: none; /* 去除下划线 */
    margin: 0 15px; /* 链接间距 */
    font-size: 16px; /* 字体大小适中 */
    transition: color 0.3s ease; /* 过渡效果 */
}

.navbar a:hover {
    color: #00e5ff; /* 悬停时颜色变化为电光蓝 */
}

/* 主内容区样式 */
.main-content {
    padding: 100px 20px 50px 20px; /* 上部留出导航栏空间 */
    max-width: 1200px; /* 内容最大宽度 */
    margin: 0 auto; /* 居中对齐 */
    display: grid;
    grid-template-columns: 1fr; /* 默认单列布局 */
    gap: 30px; /* 内容块间距 */
}

/* 文章样式 */
article {
    background: rgba(26, 35, 126, 0.8); /* 半透明深蓝背景 */
    padding: 20px 30px;
    border-radius: 12px; /* 圆角边框 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* 阴影增强立体感 */
    animation: fadeIn 1.5s ease-out; /* 页面加载时淡入效果 */
}

/* 文章标题样式 */
article h2 {
    font-size: 28px; /* 大标题字体大小 */
    margin-bottom: 20px; /* 标题下方间距 */
    color: #00e5ff; /* 标题颜色为电光蓝 */
}

article h3 {
    font-size: 22px; /* 子标题字体大小 */
    margin-top: 25px; /* 子标题上方间距 */
    margin-bottom: 15px; /* 子标题下方间距 */
    color: #00c853; /* 子标题颜色为荧光绿 */
}

/* 文字段落样式 */
article p {
    font-size: 16px; /* 正文字体大小 */
    line-height: 1.8; /* 行高，提升可读性 */
    margin-bottom: 15px; /* 段落下方间距 */
    color: #ffffff; /* 文字颜色为白色 */
}

/* 强调文字样式 */
article p strong {
    color: #ffeb3b; /* 加粗文字颜色为亮黄色 */
}

/* 代码块样式 */
article pre {
    background: #263238; /* 深色背景 */
    padding: 15px;
    border-radius: 8px; /* 圆角边框 */
    overflow: auto; /* 超出部分滚动 */
    margin-bottom: 20px; /* 下方间距 */
}

article code {
    color: #00e5ff; /* 代码文字颜色为电光蓝 */
    font-family: 'Courier New', Courier, monospace; /* 等宽字体 */
    font-size: 14px; /* 代码字体大小 */
}

/* 图片样式 */
.article-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* 图片间距 */
    margin-top: 20px; /* 图片上方间距 */
}

.article-images img {
    width: 100%;
    max-width: 320px; /* 最大宽度限制 */
    border-radius: 12px; /* 圆角 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* 阴影效果 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 过渡效果 */
}

.article-images img:hover {
    transform: scale(1.05); /* 悬停时放大 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); /* 增强阴影 */
}

/* 加载动画样式 */
.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh; /* 全屏高度 */
    background: #0d47a1; /* 背景颜色与主色调一致 */
}

.loader .dot {
    width: 15px;
    height: 15px;
    margin: 0 5px;
    background: #00e5ff; /* 点颜色为电光蓝 */
    border-radius: 50%; /* 圆点 */
    animation: bounce 1.5s infinite ease-in-out; /* 弹跳动画 */
}

.loader .dot:nth-child(2) {
    animation-delay: 0.3s; /* 第二个点动画延迟 */
}

.loader .dot:nth-child(3) {
    animation-delay: 0.6s; /* 第三个点动画延迟 */
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0; }
    40% { transform: scale(1); opacity: 1; }
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(26, 35, 126, 0.9); /* 半透明背景 */
    padding: 15px;
    border-radius: 8px; /* 圆角 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* 阴影 */
}

.chapter-nav a {
    display: block;
    color: #00e5ff; /* 链接颜色为电光蓝 */
    text-decoration: none; /* 去除下划线 */
    margin: 10px 0;
    font-size: 14px; /* 字体大小 */
    transition: color 0.3s ease;
}

.chapter-nav a:hover {
    color: #ffeb3b; /* 悬停时变为亮黄色 */
}

/* 响应式设计 */
@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 3fr 1fr; /* 两栏布局 */
    }

    .chapter-nav {
        top: 100px;
    }
}

@media (max-width: 767px) {
    .chapter-nav {
        display: none; /* 移动端隐藏章节导航 */
    }
}

/* 过渡效果 */
* {
    transition: all 0.3s ease; /* 全局过渡效果 */
}

/* 视觉焦点提示 */
.prominent-note {
    background: rgba(0, 229, 255, 0.2); /* 半透明电光蓝背景 */
    padding: 15px;
    border-left: 5px solid #00e5ff; /* 左侧边框 */
    margin: 20px 0; /* 上下间距 */
    border-radius: 4px; /* 圆角 */
    font-size: 18px; /* 字体大小 */
    color: #ffffff; /* 文字颜色 */
}

/* 折叠区域样式 */
.collapsible {
    background: rgba(0, 229, 255, 0.1); /* 半透明背景 */
    border-radius: 8px; /* 圆角 */
    padding: 10px;
    margin-top: 10px; /* 上方间距 */
    cursor: pointer; /* 鼠标指针变为手形 */
}

.collapsible-content {
    display: none; /* 默认隐藏 */
    padding: 10px 20px;
    background: rgba(26, 35, 126, 0.7); /* 半透明深蓝背景 */
    border-radius: 8px; /* 圆角 */
    margin-top: 5px; /* 上方间距 */
}

.collapsible.active + .collapsible-content {
    display: block; /* 激活时显示内容 */
}

/* 链接样式 */
a[rel="nofollow"] {
    color: #00e5ff; /* 链接颜色为电光蓝 */
    text-decoration: underline; /* 添加下划线 */
}

a[rel="nofollow"]:hover {
    color: #ffeb3b; /* 悬停时颜色变为亮黄色 */
}

/* 高级CSS代码示例样式 */
.code-example {
    background: #263238; /* 深色背景 */
    padding: 20px;
    border-radius: 8px; /* 圆角 */
    overflow-x: auto; /* 横向滚动 */
    margin: 20px 0; /* 上下间距 */
}

.code-example code {
    color: #00e5ff; /* 代码颜色为电光蓝 */
    font-family: 'Courier New', Courier, monospace; /* 等宽字体 */
    font-size: 14px; /* 字体大小 */
}

/* 3D模型展示样式 */
.model-viewer {
    width: 100%;
    height: 500px;
    perspective: 1000px; /* 透视效果 */
    transform-style: preserve-3d; /* 保持3D效果 */
    transition: transform 0.5s;
    border-radius: 12px; /* 圆角 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.4); /* 阴影 */
}

.model-viewer:hover {
    transform: rotateY(20deg) rotateX(10deg); /* 悬停时旋转 */
}


