/* ========== 基础变量与重置 ========== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #f59e0b;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ========== 顶部导航 ========== */
.top-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    height: 64px; display: flex; align-items: center;
    justify-content: space-between; gap: 32px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; color: var(--text-primary); }
.logo a { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    width: 36px; height: 36px; background: var(--accent-gradient);
    border-radius: 10px; display: flex; align-items: center;
    justify-content: center; color: white;
}
.logo-icon svg { width: 20px; height: 20px; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav-link {
    padding: 8px 18px; border-radius: var(--radius-md);
    font-weight: 500; font-size: 15px; color: var(--text-secondary);
    transition: all 0.2s ease;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.nav-link.active { color: var(--primary); background: rgba(99, 102, 241, 0.1); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-page); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 8px 14px; width: 240px;
    transition: all 0.2s ease;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); background: white; }
.search-box svg { width: 18px; height: 18px; color: var(--text-muted); }
.search-box input { border: none; background: none; outline: none; flex: 1; font-size: 14px; color: var(--text-primary); }
.search-box input::placeholder { color: var(--text-muted); }

/* ========== Banner 轮播 ========== */
.banner-section { max-width: 1280px; margin: 24px auto 0; padding: 0 24px; }
.banner-container {
    position: relative; height: 360px; border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}
.banner-slide {
    position: absolute; inset: 0; background: var(--banner-bg);
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
    display: flex; align-items: center;
}
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.3) 50%, transparent 100%);
}
.banner-content {
    position: relative; z-index: 2; padding: 0 56px; max-width: 600px; color: white;
}
.banner-tag {
    display: inline-flex; align-items: center; padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px);
    border-radius: 999px; font-size: 13px; font-weight: 500;
    margin-bottom: 16px; width: fit-content;
}
.banner-title { font-size: 48px; font-weight: 900; margin-bottom: 12px; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2); }
.banner-desc { font-size: 16px; opacity: 0.9; margin-bottom: 20px; }
.banner-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
    background: white; color: var(--primary-dark); border-radius: 999px;
    font-weight: 700; font-size: 16px; transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.banner-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.banner-btn svg { width: 18px; height: 18px; }

/* Banner 右侧圆形装饰 */
.art-core {
    position: absolute; right: 80px; top: 50%; transform: translateY(-50%);
    width: 200px; height: 200px; border-radius: 50%;
    background: transparent; box-shadow: none; z-index: 1;
}
.art-inner {
    width: 100%; height: 100%; border-radius: 50%;
    background-size: cover; background-position: center;
}

.banner-dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 3; display: flex; gap: 8px;
}
.dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.4); transition: all 0.3s ease; padding: 0; }
.dot.active { width: 24px; background: white; }
.banner-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px);
    color: white; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.banner-arrow:hover { background: rgba(255, 255, 255, 0.3); }
.banner-arrow svg { width: 22px; height: 22px; }
.banner-arrow.prev { left: 16px; }
.banner-arrow.next { right: 16px; }

/* ========== 主内容区 ========== */
.main-content { max-width: 1280px; margin: 32px auto 0; padding: 0 24px 48px; }
.content-wrapper { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }

/* 分类标签栏 */
.category-bar { margin-bottom: 20px; display: flex; justify-content: center; }
.category-tabs {
    display: flex; align-items: center; gap: 6px; padding: 4px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 999px; width: fit-content; box-shadow: var(--shadow-card);
}
.cat-tab {
    padding: 8px 20px; border-radius: 999px; font-size: 14px;
    font-weight: 500; color: var(--text-secondary); transition: all 0.2s ease;
}
.cat-tab:hover { color: var(--text-primary); }
.cat-tab.active { background: var(--accent-gradient); color: white; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35); }

/* 游戏卡片网格 */
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.game-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}
.game-card > * { position: relative; z-index: 1; }
.game-card:hover { transform: translateY(-6px); border-color: var(--border-hover); box-shadow: var(--shadow-glow), var(--shadow-card); }
.game-icon-wrap {
    position: relative; width: 100%; aspect-ratio: 1;
    margin-bottom: 16px; border-radius: var(--radius-xl);
    overflow: hidden; background: transparent;
}
.game-icon {
    width: 100%; height: 100%; border-radius: var(--radius-xl);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; font-weight: 900; color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative; overflow: hidden;
}
.game-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-info { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.game-type { padding: 2px 8px; background: rgba(99, 102, 241, 0.1); color: var(--primary); border-radius: 6px; font-weight: 500; }
.download-btn {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 6px 14px; background: var(--accent-gradient); color: white;
    border-radius: 999px; font-size: 13px; font-weight: 600;
    transition: all 0.2s ease; margin-top: 12px; width: 100%;
}
.download-btn:hover { transform: scale(1.02); }
.download-btn svg { width: 14px; height: 14px; }

/* 右侧边栏 */
.content-right { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card); }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sidebar-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.sidebar-title svg { width: 18px; height: 18px; color: var(--primary); }
.more-link { font-size: 12px; color: var(--text-muted); transition: color 0.2s ease; }
.more-link:hover { color: var(--primary); }

/* 排行榜 */
.rank-list { display: flex; flex-direction: column; gap: 12px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-md); transition: background 0.2s ease; cursor: pointer; }
.rank-item:hover { background: var(--bg-card-hover); }
.rank-num { width: 22px; text-align: center; font-size: 15px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.rank-item:nth-child(1) .rank-num { color: #ef4444; }
.rank-item:nth-child(2) .rank-num { color: #f97316; }
.rank-item:nth-child(3) .rank-num { color: #eab308; }
.rank-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: rgba(255, 255, 255, 0.9); flex-shrink: 0; background-size: cover; background-position: center; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; }
.rank-download { font-size: 12px; font-weight: 600; color: var(--primary); }

/* 资讯列表 */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-list li { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.news-list li:last-child { border-bottom: none; padding-bottom: 0; }
.news-title { flex: 1; font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s ease; }
.news-title:hover { color: var(--primary); }
.news-date { flex-shrink: 0; font-size: 12px; color: var(--text-muted); }

/* ========== 底部 ========== */
.site-footer { background: #0f172a; color: #94a3b8; margin-top: 48px; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 48px 24px 32px; display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 40px; }
.footer-col h4 { color: white; font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: #94a3b8; transition: color 0.2s ease; display: flex; align-items: center; }
.footer-col a:hover { color: white; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 900; color: white; margin-bottom: 12px; }
.footer-desc { font-size: 13px; line-height: 1.7; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 16px 24px; text-align: center; font-size: 12px; }

/* ========== 动画 ========== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.game-card { animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .content-wrapper { grid-template-columns: 1fr; }
    .game-grid { grid-template-columns: repeat(3, 1fr); }
    .search-box { width: 180px; }
    .art-core { width: 140px; height: 140px; right: 40px; }
}
@media (max-width: 768px) {
    .main-nav { display: none; }
    .search-box { display: none; }
    .banner-container { height: 280px; }
    .banner-content { padding: 0 28px; }
    .banner-title { font-size: 32px; }
    .art-core { display: none; }
    .game-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}
