/* ==========================================================================
   Steam Theme - Core Styles
   专为 Steam 游戏下载和攻略站设计
   ========================================================================== */

:root {
    /* 主题色板 - 深色模式默认 */
    --theme-bg-primary: #0a0a0a;
    --theme-bg-secondary: #1a1a1a;
    --theme-bg-tertiary: #2a2a2a;
    
    --theme-text-primary: #ffffff;
    --theme-text-secondary: #a1a1aa;
    --theme-text-muted: #71717a;
    
    --theme-accent: #8b5cf6; /* 紫色高亮 */
    --theme-accent-hover: #7c3aed;
    
    --theme-border: 1px solid #27272a;
    
    /* 间距与尺寸 */
    --nav-height: 70px;
    --content-max-width: 1280px;
    --border-radius: 8px;
}

/* === 基础重置 === */
body {
    background-color: var(--theme-bg-primary);
    color: var(--theme-text-primary);
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    line-height: 1.5;
}

a {
    color: var(--theme-text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--theme-accent);
}

/* === 导航栏样式 === */
.steam-nav {
    background: var(--theme-bg-primary);
    border-bottom: var(--theme-border);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-icon {
    background: var(--theme-accent);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-text-primary);
}

/* 桌面端导航链接 */
.nav-links {
    display: flex;
    gap: 1.2rem; /* 减小间距以容纳8个导航项 */
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap; /* 允许换行 */
}

.nav-link {
    font-size: 0.95rem; /* 略微减小字体 */
    font-weight: 500;
    color: #e5e5e5;
    padding: 0.5rem 0;
    white-space: nowrap; /* 防止文本换行 */
}

.nav-link:hover {
    color: white;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* === 移动端菜单 === */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--theme-text-primary);
    transition: 0.3s;
}

.mobile-menu {
    display: none; /* 默认隐藏 */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--theme-bg-secondary);
    border-bottom: var(--theme-border);
    flex-direction: column;
    padding: 1rem 0;
    z-index: 99;
    max-height: 80vh; /* 限制最大高度 */
    overflow-y: auto; /* 支持滚动 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    text-align: center;
    color: var(--theme-text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    background: var(--theme-bg-tertiary);
    color: white;
    transform: translateX(5px);
}

/* 响应式显隐逻辑 */
/* 中等屏幕：进一步减小导航间距 */
@media (max-width: 1024px) {
    .nav-links {
        gap: 0.8rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

/* 小屏幕：切换到移动菜单 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu.active {
        display: flex;
    }
}

/* === 通用布局 === */
main {
    min-height: calc(100vh - var(--nav-height) - 200px);
}

/* 兼容旧的CSS变量名 (为了不破坏 homepage.css 等) */
:root {
    --wiki-bg-primary: var(--theme-bg-primary);
    --wiki-text-primary: var(--theme-text-primary);
    --wiki-accent: var(--theme-accent);
}

/* ==========================================================================
   Footer Styles - 全站通用页脚样式
   ========================================================================== */
.site-footer {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.98) 0%, rgba(20, 20, 35, 0.98) 100%);
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.site-footer .footer-container {
    max-width: var(--content-max-width, 1280px);
    margin: 0 auto;
    padding: 0 4rem;
}

.site-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.site-footer .footer-left {
    flex: 1;
}

.site-footer .footer-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--theme-text-primary, #f5f5f5);
    margin-bottom: 0.5rem;
}

.site-footer .footer-subtitle {
    font-size: 1rem;
    color: var(--theme-text-secondary, #a0a0a0);
}

.site-footer .footer-right {
    text-align: right;
}

.site-footer .footer-copyright {
    font-size: 0.9rem;
    color: var(--theme-text-secondary, #a0a0a0);
    margin-bottom: 0.75rem;
}

.site-footer .footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.site-footer .footer-link {
    font-size: 0.9rem;
    color: var(--theme-text-secondary, #a0a0a0);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer .footer-link:hover {
    color: var(--theme-accent, #8b5cf6);
}

/* Footer 响应式布局 */
@media (max-width: 768px) {
    .site-footer .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .site-footer .footer-right {
        text-align: center;
    }
    
    .site-footer .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .site-footer .footer-container {
        padding: 0 2rem;
    }
}

