
/* 网页通用样式 */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background: linear-gradient(135deg, #f0f2f5, #e1e5ea);
    overflow-x: hidden;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h2, h3 {
    font-family: 'Montserrat Bold', sans-serif;
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    text-align: center;
}

p, ul, ol {
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

ul, ol {
    padding-left: 25px;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 头部区域样式 */
.header {
    background: linear-gradient(to right, #1a2a6c, #b21f1f, #fca17f); /* 绚丽渐变背景 */
    color: white;
    text-align: center;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.2), transparent); /* 模拟光晕 */
    animation: aurora-move 15s linear infinite alternate; /* 极光动画效果 */
    pointer-events: none;
}

@keyframes aurora-move {
    0% { transform: translateX(-50px) translateY(-50px); }
    100% { transform: translateX(50px) translateY(50px); }
}

.header-content {
    position: relative;
    z-index: 1; /* 确保内容在光晕之上 */
}

.header h1 {
    font-family: 'Montserrat Bold', sans-serif;
    font-size: 2.8em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6); /* 标题阴影 */
}

.header p {
    font-size: 1.2em;
    color: #eee;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* 副标题阴影 */
}

/* 内容区域样式 */
.content-section {
    padding: 60px 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border-radius: 8px;
}

.content-section h2 {
    color: #3498db; /* 醒目的章节标题 */
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: start;
}

.grid-item {
    padding: 20px;
    border-radius: 5px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
}

.grid-item h3 {
    color: #e67e22; /* 重点小标题 */
    text-align: left;
    margin-bottom: 15px;
}

.grid-item p {
    color: #666;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 20px;
}

.gallery-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin: 5px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 代码块样式 */
pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    color: #2d3436;
    border: 1px solid #ddd;
    line-height: 1.4;
    margin-bottom: 20px;
}

code {
    display: block; /* 确保代码块独占一行 */
    white-space: pre-wrap; /* 允许代码换行 */
    word-break: break-all; /* 防止长单词溢出 */
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #ff6f61; /* 活力橙色 */
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.button:hover {
    background-color: #e056fd; /* 悬停时变为紫色 */
}

/* 底部区域样式 */
.footer {
    background-color: #333;
    color: #ddd;
    text-align: center;
    padding: 30px 20px;
}

.footer p {
    color: #ddd;
    font-size: 0.9em;
}

.footer-links a {
    color: #ddd;
    margin: 0 10px;
}

.footer-links a:hover {
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 60px 15px;
    }
    .header h1 {
        font-size: 2em;
    }
    .header p {
        font-size: 1em;
    }
    .content-section {
        padding: 40px 15px;
    }
    .container {
        padding: 10px;
    }
    .content-grid {
        grid-template-columns: 1fr; /* 移动端单列布局 */
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.7em;
    }
    .header p {
        font-size: 0.9em;
    }
}

/* 示例文章样式 */
.example-article-section {
    background-color: #f8f8ff;
    padding: 40px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.example-article-section h2 {
    color: #e74c3c; /* 示例文章标题颜色 */
    border-bottom-color: #e74c3c;
    text-align: left;
}

.example-article-section h3 {
    color: #9b59b6; /* 示例文章子标题颜色 */
    text-align: left;
}

.example-article-section p, .example-article-section ul, .example-article-section ol {
    color: #777;
}

.example-article-section pre {
    background-color: #f0f0f5;
    border-color: #ccc;
}

/* 代码预览样式 */
.css-preview-box {
    background-color: #e0f7fa;
    border: 1px dashed #b2ebf2;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.css-preview-box p {
    color: #0097a7;
    font-size: 0.9em;
    font-style: italic;
}

