/* ============================================
   EraNova 全局基础样式（base.css）
   仅包含：全局变量、重置、背景、导航栏、页脚、
   通用容器、通用区块、通用卡片/按钮、辅助类、动画
   不包含任何页面特定的布局（如网格、卡片排列等）
   ============================================ */

/* ---------- 重置 & 变量 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6B9AC4;
    --primary-dark: #4A7A9E;
    --card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #1A2A3A;
    --text-gray: #3A4A5A;
    --text-light: #5A6A7A;
    --white: #FFFFFF;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Noto Sans SC', 'Source Han Sans', 'Noto Sans CJK SC', system-ui, -apple-system, sans-serif;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-dark);
    line-height: 1.6;
}

/* 半透明遮罩层 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 30, 45, 0.45);
    z-index: -1;
}

/* ---------- 布局容器 ---------- */
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

/* ---------- 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(20, 30, 40, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
    padding: 12px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 28px;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--white);
    transform: translateX(-50%);
    transition: width 0.25s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* ---------- 页脚基础 ---------- */
.footer {
    background: rgba(15, 25, 35, 0.7);
    backdrop-filter: blur(8px);
    padding: 40px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.footer p {
    margin-bottom: 8px;
}

.footer .copyright {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

/* 注意：页脚内部的网格布局（多列）由 _footer.html 中的内联样式提供，此处不定义 */

/* ---------- 通用区块 ---------- */
.section {
    padding: 80px 0;
    background: transparent;
    position: relative;
}

.section-gray {
    background: rgba(20, 30, 40, 0.15);
    backdrop-filter: blur(3px);
}

.section-title {
    font-size: 38px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--white);
    font-weight: 600;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

/* 通用卡片（不预设网格，只定义卡片本身样式） */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

/* 通用按钮 */
.btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(139, 69, 19, 0.25);
    border-radius: 40px;
    padding: 10px 24px;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* 辅助类 */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* MC 像素风格图片 */
img[src*=".png"] {
    image-rendering: pixelated;
}

/* ---------- 滚动揭示动画 ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- 全局响应式 ---------- */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 0;
    }
    .nav-container {
        flex-direction: column;
        gap: 8px;
    }
    .nav-links {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .section {
        padding: 60px 0;
    }
    .section-title {
        font-size: 28px;
    }
    .container {
        padding: 0 15px;
    }
}