
/* 全局样式重置，确保不同浏览器的一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置基础字体和背景颜色 */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
    padding: 20px;
}

/* 容器设置，确保宽度不小于500px，并且响应式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 20px;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0d47a1;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #42a5f5;
}

/* 标题样式 */
h2 {
    font-size: 24px;
    color: #0d47a1;
    margin-bottom: 20px;
    position: relative;
}

h3 {
    font-size: 20px;
    color: #1976d2;
    margin-top: 30px;
    margin-bottom: 15px;
}

h4 {
    font-size: 18px;
    color: #1565c0;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* 段落样式 */
p {
    font-size: 16px;
    color: #424242;
    margin-bottom: 20px;
    text-align: justify;
}

/* 强调文字样式 */
strong {
    color: #0d47a1;
}

/* 代码块样式 */
pre {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

code {
    font-family: 'Courier New', monospace;
    color: #d32f2f;
}

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

img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 重点提示样式 */
.highlight {
    background: #ffe082;
    padding: 10px;
    border-left: 5px solid #ffa000;
    margin: 20px 0;
}

/* 链接样式 */
a {
    color: #1e88e5;
    text-decoration: none;
    position: relative;
}

a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #1e88e5;
    transition: width 0.3s;
}

a:hover::after {
    width: 100%;
}

/* 按钮样式 */
button, .cta-button {
    background-color: #ff9800;
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover, .cta-button:hover {
    background-color: #e65100;
    transform: scale(1.05);
}

/* 加载动画样式 */
.loader {
    border: 4px solid rgba(66, 165, 245, 0.3);
    border-top: 4px solid #42a5f5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 悬停效果与过渡 */
.cta-button {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: #e65100;
    transform: scale(1.05);
}

/* 渐变背景样式 */
.hero-section {
    background: linear-gradient(135deg, #0d47a1, #42a5f5);
    color: #ffffff;
    padding: 100px 20px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 动态线条动画样式 */
.line-animation {
    stroke: #42a5f5;
    stroke-width: 2;
    fill: none;
    animation: draw 5s infinite;
}

@keyframes draw {
    0% {
        stroke-dasharray: 0, 200;
    }
    50% {
        stroke-dasharray: 150, 50;
    }
    100% {
        stroke-dasharray: 0, 200;
    }
}

/* 光点动画样式 */
.light-point {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(66, 165, 245, 0.7);
    border-radius: 50%;
    animation: move 10s infinite, blink 2s infinite;
}

@keyframes move {
    0% { transform: translate(0, 0); }
    50% { transform: translate(500px, 300px); }
    100% { transform: translate(0, 0); }
}

@keyframes blink {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.3; }
}

/* 淡入动画样式 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式网格布局 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 章节样式 */
.section {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 代码块高亮样式 */
pre code {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    display: block;
    overflow-x: auto;
}

/* 折叠区域样式 */
.details {
    margin: 20px 0;
}

.details summary {
    cursor: pointer;
    font-weight: bold;
    color: #0d47a1;
    margin-bottom: 10px;
}

.details[open] summary {
    color: #ff9800;
}

/* 页面提示样式 */
.page-note {
    background: #ffecb3;
    padding: 15px;
    border-left: 5px solid #ffa000;
    margin: 30px 0;
    font-size: 18px;
    color: #795548;
    border-radius: 5px;
    text-align: center;
}

