/* =========================
   公共基础样式
   ========================= */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局字体和背景 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    /*padding: 20px;*/
    padding: 0;

    /* Grid 布局：三段式结构 (header, main, footer) */
    display: grid;
    grid-template-rows: auto 1fr auto;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Main 内容区 */
main {
    /* Grid 自动放置到第2行 (1fr)，填充剩余空间 */
}

/* =========================
   头部样式
   ========================= */

header {
    /* Grid 自动放置到第1行 (auto) */
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 0;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* =========================
   卡片样式
   ========================= */

.section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.section:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.section h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* =========================
   链接网格布局
   ========================= */

.links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.links a {
    display: block;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.links a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

/* =========================
   页脚样式
   ========================= */

footer {
    /* Grid 自动放置到第3行 (auto) */
}

.footer {
    text-align: center;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
}

/* Footer 单行布局 */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-left {
    justify-content: flex-start;
}

.footer-center {
    justify-content: center;
}

.footer-right {
    justify-content: flex-end;
}

.footer a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    display: inline-flex;  /* 使用 flex 让图标和文字更好对齐 */
    align-items: center;
    gap: 5px;  /* 图标和文字之间的间距 */
}

.footer a:hover {
    opacity: 1;  /* 鼠标悬停时轻微变亮 */
}

/* 备案信息中的图标 */
.footer img {
    vertical-align: middle;
    height: 16px;  /* 统一图标高度 */
}

/* =========================
   响应式设计
   ========================= */

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1em;
    }

    .links {
        grid-template-columns: 1fr;
    }
}
