/* ============ 基础重置 ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary: #1a1a2e;
    --secondary: #e94560;
    --accent: #0f3460;
    --bg: #0a0a1a;
    --bg-card: #16213e;
    --bg-card-hover: #1a2744;
    --text: #e0e0e0;
    --text-muted: #8892a4;
    --text-bright: #ffffff;
    --border: #2a3a5c;
    --success: #00d2a0;
    --warning: #ffc107;
    --danger: #e94560;
    --gradient: linear-gradient(135deg, #e94560 0%, #0f3460 100%);
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --radius: 12px;
    --radius-sm: 8px;
}
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: #ff6b81; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; }

/* ============ 顶部通知栏 ============ */
.top-bar {
    background: var(--gradient);
    padding: 8px 0;
    font-size: 13px;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-text { color: #fff; font-weight: 500; }
.top-bar-links { display: flex; gap: 10px; }
.btn-register, .btn-login {
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-register {
    background: #fff;
    color: var(--secondary);
}
.btn-register:hover { background: #f0f0f0; color: var(--secondary); }
.btn-login {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-login:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* ============ 导航栏 ============ */
.header {
    background: var(--primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-bright);
}
.logo-icon { font-size: 28px; }
.nav { display: flex; gap: 0; height: 100%; }
.nav-link {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-bright);
    border-bottom-color: var(--secondary);
    background: rgba(233,69,96,0.05);
}
.nav-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--text-bright); }

/* ============ 英雄区域 ============ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, #16213e 100%);
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(233,69,96,0.08) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite;
}
@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
}
.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============ 热门关键词栏 ============ */
.keywords-bar {
    background: var(--bg-card);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.keywords-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.keywords-scroll::-webkit-scrollbar { display: none; }
.keyword-tag {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(233,69,96,0.1);
    border: 1px solid rgba(233,69,96,0.2);
    border-radius: 20px;
    font-size: 13px;
    color: var(--secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}
.keyword-tag:hover {
    background: rgba(233,69,96,0.2);
    border-color: var(--secondary);
}
.keyword-tag.loading { color: var(--text-muted); border-color: var(--border); background: none; }

/* ============ 主内容区 ============ */
.main-content { padding: 40px 0; }
.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
}
.category-tabs { display: flex; gap: 6px; }
.tab {
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.tab:hover, .tab.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

/* ============ 文章卡片 ============ */
.articles-list { display: flex; flex-direction: column; gap: 16px; }
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    overflow: hidden;
}
.article-card .card-image {
    width: 220px;
    min-width: 220px;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}
.article-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.article-card:hover .card-image img {
    transform: scale(1.05);
}
.article-card .card-content {
    padding: 16px 20px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 600px) {
    .article-card {
        flex-direction: column;
    }
    .article-card .card-image {
        width: 100%;
        min-width: unset;
        height: 180px;
    }
}
.article-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.article-card .card-category {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(233,69,96,0.15);
    border-radius: 4px;
    font-size: 12px;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.article-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
    line-height: 1.4;
}
.article-card .card-lede {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tags span {
    padding: 2px 8px;
    background: rgba(15,52,96,0.5);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ============ 侧边栏 ============ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.sidebar-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.cta-card {
    background: var(--gradient);
    border: none;
    text-align: center;
}
.cta-card h3 {
    font-size: 22px;
    border: none;
    color: #fff;
}
.cta-card p { color: rgba(255,255,255,0.8); margin-bottom: 16px; }
.btn-cta-primary, .btn-cta-secondary {
    display: block;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    margin-bottom: 8px;
    transition: all 0.2s;
}
.btn-cta-primary {
    background: #fff;
    color: var(--secondary);
}
.btn-cta-primary:hover { background: #f0f0f0; color: var(--secondary); }
.btn-cta-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-cta-secondary:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* 热门文章 */
.hot-articles { display: flex; flex-direction: column; gap: 12px; }
.hot-article-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(42,58,92,0.5);
    cursor: pointer;
    transition: color 0.2s;
}
.hot-article-item:last-child { border-bottom: none; }
.hot-article-item:hover .hot-title { color: var(--secondary); }
.hot-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--accent);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.hot-rank.top { background: var(--secondary); color: #fff; }
.hot-title {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    transition: color 0.2s;
}

/* 分类统计 */
.category-stats { display: flex; flex-direction: column; gap: 10px; }
.cat-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(15,52,96,0.3);
    border-radius: var(--radius-sm);
}
.cat-stat-item .cat-name { font-size: 14px; color: var(--text); }
.cat-stat-item .cat-count {
    padding: 2px 10px;
    background: rgba(233,69,96,0.15);
    border-radius: 12px;
    font-size: 13px;
    color: var(--secondary);
    font-weight: 600;
}

/* ============ 游戏网址 ============ */
.game-urls-section {
    background: var(--bg-card);
    padding: 50px 0;
    border-top: 1px solid var(--border);
}
.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-bright);
    text-align: center;
    margin-bottom: 24px;
}
.game-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}
.game-tab {
    padding: 10px 28px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.game-tab:hover, .game-tab.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.game-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}
.game-card:hover {
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.game-card .game-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 10px;
}
.game-card .game-links { display: flex; flex-direction: column; gap: 6px; }
.game-card .game-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: rgba(233,69,96,0.1);
    border: 1px solid rgba(233,69,96,0.2);
    border-radius: 6px;
    font-size: 14px;
    color: var(--secondary);
    transition: all 0.2s;
    font-weight: 600;
}
.game-card .game-link:hover {
    background: var(--secondary);
    color: #fff;
}
.game-link .link-name {
    font-weight: 600;
    font-size: 14px;
}

/* ============ 加载更多 ============ */
.load-more { text-align: center; padding: 20px 0; }
.btn-load-more {
    padding: 12px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-load-more:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* ============ 页脚 ============ */
.footer {
    background: var(--primary);
    padding: 50px 0 20px;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 12px;
}
.footer-col p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px 0;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--secondary); }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

/* ============ 弹窗 ============ */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--secondary); }
.modal-body h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 16px;
    line-height: 1.3;
}
.modal-body .article-lede {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    font-style: italic;
}
.modal-body .article-body {
    font-size: 15px;
    color: var(--text);
    line-height: 1.8;
    white-space: pre-wrap;
}
.modal-body .article-bullets {
    list-style: none;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-body .article-bullets li {
    padding: 8px 16px;
    background: rgba(15,52,96,0.3);
    border-left: 3px solid var(--secondary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
}
.modal-body .article-opinion {
    margin-top: 20px;
    padding: 16px;
    background: rgba(233,69,96,0.1);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    border-left: 3px solid var(--secondary);
}
.modal-body .article-meta {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============ 骨架屏 ============ */
.loading-skeleton { display: flex; flex-direction: column; gap: 16px; }
.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    height: 140px;
    animation: skeletonPulse 1.5s infinite;
}
.skeleton-card.small { height: 80px; }
.skeleton-line {
    background: var(--bg-card);
    border-radius: 4px;
    height: 20px;
    animation: skeletonPulse 1.5s infinite;
}
@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .content-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 28px; }
    .hero-stats { gap: 24px; }
    .stat-num { font-size: 28px; }
    .nav { display: none; }
    .nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px; left: 0; right: 0;
        background: var(--primary);
        border-bottom: 1px solid var(--border);
        z-index: 99;
    }
    .nav.open .nav-link {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border);
    }
    .nav-toggle { display: block; }
    .category-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .top-bar-text { font-size: 11px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 16px; }
    .hero h1 { font-size: 24px; }
    .game-tabs { flex-wrap: wrap; }
}
