/* ==================== Reset & Variables ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #06060a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #6c5ce7;
    --accent-2: #a29bfe;
    --cyan: #00cec9;
    --pink: #fd79a8;
    --orange: #e17055;
    --text-1: #f1f1f5;
    --text-2: #a0a0b8;
    --text-3: #5c5c72;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-1);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== Mesh Background ==================== */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(108, 92, 231, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(0, 206, 201, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 60% 80%, rgba(253, 121, 168, 0.06) 0%, transparent 50%);
}

/* ==================== Header ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

.header.scrolled {
    background: rgba(6, 6, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-1);
    font-weight: 800;
    font-size: 20px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    border-radius: 10px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: white;
}

.logo-text {
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 4px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 4px;
}

.nav-link {
    padding: 8px 20px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s var(--ease);
}

.nav-link:hover {
    color: var(--text-1);
}

.nav-link.active {
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.08);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s var(--ease);
}

.nav-cta:hover {
    background: var(--accent-2);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
}

.nav-cta i {
    font-size: 12px;
    transition: transform 0.2s var(--ease);
}

.nav-cta:hover i {
    transform: translateX(3px);
}

/* ==================== Hero ==================== */
.hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 48px;
}

.hero-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    text-align: center;
    max-width: 680px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-2);
    margin-bottom: 24px;
}

.hero-badge i {
    color: var(--cyan);
}

.hero-title {
    font-size: clamp(36px, 7vw, 64px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    color: var(--text-1);
}

.hero-highlight {
    background: linear-gradient(135deg, var(--accent-2) 0%, var(--cyan) 50%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-2);
    margin-bottom: 32px;
    letter-spacing: -0.2px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--text-1);
}

.stat-label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
    margin-top: 2px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== Buttons ==================== */
.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.btn-main:hover {
    background: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(108, 92, 231, 0.3);
}

.btn-main i {
    font-size: 13px;
    transition: transform 0.2s var(--ease);
}

.btn-main:hover i {
    transform: translateX(3px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--glass);
    color: var(--text-2);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.btn-ghost:hover {
    color: var(--text-1);
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ==================== Categories ==================== */
.section-categories {
    padding: 0 0 24px;
    position: sticky;
    top: 64px;
    z-index: 100;
    background: rgba(6, 6, 10, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.category-bar {
    display: flex;
    gap: 8px;
    padding: 16px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s var(--ease);
    font-family: inherit;
}

.cat-chip:hover {
    color: var(--text-1);
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--glass);
}

.cat-chip.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

.cat-chip i {
    font-size: 12px;
}

/* ==================== Section Heads ==================== */
.section-head {
    margin-bottom: 48px;
}

.section-head h2 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.section-head p {
    font-size: 16px;
    color: var(--text-3);
}

/* ==================== Games Grid ==================== */
.section-games {
    padding: 80px 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.35s var(--ease);
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(108, 92, 231, 0.15);
    background: var(--bg-card-hover);
}

.game-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.08);
}

.game-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    background: rgba(6, 6, 10, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-info {
    padding: 20px;
}

.game-header {
    margin-bottom: 10px;
}

.game-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.3px;
}

.game-title-en {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-description {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.game-links {
    display: flex;
    gap: 6px;
}

.game-link-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--glass);
    color: var(--text-3);
    border: 1px solid transparent;
    border-radius: var(--radius-xs);
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s var(--ease);
    font-weight: 500;
}

.game-link-btn:hover {
    color: var(--text-1);
    background: var(--bg-card-hover);
    border-color: var(--glass-border);
}

.game-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

.game-view-btn:hover {
    background: var(--accent-2);
    transform: translateY(-1px);
}

/* ==================== States ==================== */
.loading-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-3);
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 56px;
    color: var(--text-3);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-3);
    margin-bottom: 24px;
}

.load-more-wrap {
    text-align: center;
    margin-top: 40px;
}

/* ==================== News / 游戏资讯 ==================== */
.section-news {
    padding: 80px 0;
    border-top: 1px solid var(--glass-border);
}

.news-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 32px;
}

.news-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: transparent;
    color: var(--text-3);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s var(--ease);
}

.news-tab:hover {
    color: var(--text-2);
    border-color: rgba(255, 255, 255, 0.15);
}

.news-tab.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

.news-tab i {
    font-size: 11px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.25s var(--ease);
}

.news-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(108, 92, 231, 0.2);
    transform: translateX(4px);
}

.news-tag {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(108, 92, 231, 0.05));
    color: var(--accent-2);
}

.news-tag.tag-download { background: linear-gradient(135deg, rgba(0, 206, 201, 0.2), rgba(0, 206, 201, 0.05)); color: var(--cyan); }
.news-tag.tag-guide { background: linear-gradient(135deg, rgba(253, 121, 168, 0.2), rgba(253, 121, 168, 0.05)); color: var(--pink); }
.news-tag.tag-giftcode { background: linear-gradient(135deg, rgba(225, 112, 85, 0.2), rgba(225, 112, 85, 0.05)); color: var(--orange); }
.news-tag.tag-character { background: linear-gradient(135deg, rgba(162, 155, 254, 0.2), rgba(162, 155, 254, 0.05)); color: var(--accent-2); }
.news-tag.tag-review { background: linear-gradient(135deg, rgba(0, 206, 201, 0.15), rgba(0, 206, 201, 0.05)); color: var(--cyan); }

.news-body {
    flex: 1;
    min-width: 0;
}

.news-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
    margin-bottom: 2px;
}

.news-item:hover .news-title {
    color: var(--accent-2);
}

.news-game {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-meta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-3);
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.news-meta-item i {
    font-size: 11px;
}

.news-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
}

.news-empty i {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.news-pagination {
    text-align: center;
    margin-top: 32px;
}

/* ==================== Features ==================== */
.section-features {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.feat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s var(--ease);
}

.feat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108, 92, 231, 0.2);
    background: var(--bg-card-hover);
}

.feat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(108, 92, 231, 0.05));
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--accent-2);
}

.feat-icon-2 { background: linear-gradient(135deg, rgba(0, 206, 201, 0.2), rgba(0, 206, 201, 0.05)); color: var(--cyan); }
.feat-icon-3 { background: linear-gradient(135deg, rgba(253, 121, 168, 0.2), rgba(253, 121, 168, 0.05)); color: var(--pink); }
.feat-icon-4 { background: linear-gradient(135deg, rgba(225, 112, 85, 0.2), rgba(225, 112, 85, 0.05)); color: var(--orange); }
.feat-icon-5 { background: linear-gradient(135deg, rgba(162, 155, 254, 0.2), rgba(162, 155, 254, 0.05)); color: var(--accent-2); }
.feat-icon-6 { background: linear-gradient(135deg, rgba(0, 206, 201, 0.2), rgba(0, 206, 201, 0.05)); color: var(--cyan); }

.feat-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.feat-card p {
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.5;
}

/* ==================== Sitemap / Hot Games ==================== */
.section-sitemap {
    padding: 80px 0;
    border-top: 1px solid var(--glass-border);
}

.sitemap-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 64px;
}

.sitemap-game-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s var(--ease);
}

.sitemap-game-link:hover {
    color: var(--text-1);
    background: var(--bg-card-hover);
    border-color: rgba(108, 92, 231, 0.2);
    transform: translateX(3px);
}

.sitemap-game-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.sitemap-game-icon-fallback {
    display: none;
    color: var(--accent-2);
    font-size: 14px;
    flex-shrink: 0;
}

.sitemap-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    padding-top: 48px;
    border-top: 1px solid var(--glass-border);
}

.sitemap-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.sitemap-col a {
    display: block;
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.2s var(--ease);
}

.sitemap-col a:hover {
    color: var(--text-1);
}

/* ==================== Footer ==================== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-3);
}

.footer-link {
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.footer-link:hover {
    color: var(--accent-2);
}

/* ==================== Back to Top ==================== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    color: var(--text-1);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-container {
        padding: 0 16px;
    }

    .nav-cta {
        padding: 7px 14px;
        font-size: 13px;
        border-radius: 8px;
    }

    .hero-title {
        font-size: 32px;
        letter-spacing: -0.5px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-main, .btn-ghost {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .section-head h2 {
        font-size: 28px;
    }

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

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

    .section-categories {
        top: 56px;
    }

    .news-item {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px;
    }

    .news-meta {
        width: 100%;
        gap: 12px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .sitemap-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 0;
    }

    .logo {
        gap: 8px;
        font-size: 17px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 11px;
        border-radius: 8px;
    }

    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 80px 16px 36px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .category-bar {
        gap: 6px;
    }

    .cat-chip {
        padding: 8px 14px;
        font-size: 13px;
    }

    .sitemap-games-grid {
        grid-template-columns: 1fr;
    }

    .sitemap-links-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
