
/* 基础样式重置与全局设定 */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #040820, #0b134f); /* 深蓝色渐变背景 */
    color: #fff;
    overflow-x: hidden; /* 防止水平滚动条 */
    scroll-behavior: smooth; /* 平滑滚动 */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* 容器和布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    margin-bottom: 40px;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.05); /* 半透明白色背景 */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.section:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 响应式网格 */
    gap: 30px;
}

/* 头部和导航 */
header {
    background: rgba(0, 0, 0, 0.2); /* 头部半透明黑色背景 */
    padding: 20px 0;
    position: sticky; /* 顶部固定导航 */
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav li {
    margin-left: 25px;
}

nav a {
    text-decoration: none;
    color: #ddd;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #fff;
}

/* 标题和文本样式 */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 3px rgba(0,0,0,0.2); /* 标题阴影 */
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 28px;
    color: #eee; /* 示例文章标题颜色稍浅 */
}

h3 {
    font-size: 22px;
    color: #ddd;
}

p {
    font-size: 16px;
    line-height: 1.7;
    color: #ccc;
}

/* 卡片样式 */
.card {
    background-color: rgba(255, 255, 255, 0.1); /* 卡片背景色 */
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 内容均匀分布 */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.card-image img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

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


.card-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.card-description {
    font-size: 15px;
    color: #bbb;
    margin-bottom: 15px;
}

.card-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer span {
    font-size: 14px;
    color: #aaa;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(to right, #6a5acd, #8470ff); /* 紫色渐变按钮 */
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: linear-gradient(to right, #5a4ab9, #7460ee); /* 悬停时颜色略微变化 */
    transform: scale(1.05);
}

/* 代码块样式 */
pre {
    background-color: rgba(0, 0, 0, 0.8); /* 深色代码块背景 */
    color: #f8f8f2; /* 代码文字颜色 */
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto; /* 水平滚动条，如果需要 */
    tab-size: 4;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    word-wrap: break-word; /* 代码自动换行 */
    white-space: pre-wrap; /* 保留空白符并换行 */
}

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


/* 分隔线样式 */
hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* 细分隔线 */
    margin: 40px 0;
}

/* 页脚样式 */
footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 30px 0;
    text-align: center;
    color: #999;
    margin-top: auto; /* 页脚置底 */
}

footer p {
    font-size: 14px;
}

/* 示例文章样式 */
.article-section {
    background-color: rgba(255, 255, 255, 0.03); /* 示例文章背景 */
    padding: 30px;
    border-radius: 12px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1); /* 内阴影 */
}

.article-section h2 {
    color: #eee; /* 示例文章标题颜色 */
}

.article-section h3 {
    color: #ddd;
}

.article-section p {
    color: #ccc;
}

/* 辅助类 */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 40px;
}

.mb-4 {
    margin-bottom: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    h1 {
        font-size: 32px;
    }
    h2 {
        font-size: 24px;
    }
    h3 {
        font-size: 20px;
    }
    nav ul {
        flex-direction: column;
        text-align: center;
        margin-top: 15px;
    }
    nav li {
        margin-left: 0;
        margin-bottom: 15px;
    }
    .grid-container {
        grid-template-columns: 1fr; /* 移动端单列布局 */
    }
    .section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }
    h2 {
        font-size: 22px;
    }
    h3 {
        font-size: 18px;
    }
}

/* 特殊颜色点缀 */
.accent-purple {
    color: #a076f2;
}

.accent-gold {
    color: #ffd700;
}

.gradient-text {
    background: linear-gradient(to right, #a076f2, #ffd700);
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
}

/* 动态背景 - 模拟3D地球 (静态渐变模拟) */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 150px 0;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(10, 20, 80, 0.7) 0%, rgba(4, 8, 32, 0.9) 100%); /* 模拟深邃空间感 */
}

.hero-content {
    position: relative;
    z-index: 1; /* 确保内容在背景之上 */
}

.hero-title {
    font-size: 48px;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 20px;
    color: #eee;
    max-width: 800px;
    margin: 0 auto 30px;
}


/* jQuery动画效果 (预留位置，实际此处CSS已经足够) */

