/* === GameZone v2 - gamer520 Style === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: #b0b0b0; text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 15px; }

/* === Header / Navigation === */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: linear-gradient(180deg, #16213e 0%, rgba(22,33,62,0.95) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

.header-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center;
    padding: 0 15px;
    height: 56px;
    position: relative;
}

.site-logo {
    font-size: 20px; font-weight: 700;
    color: #fff !important;
    margin-right: 24px;
    white-space: nowrap;
    letter-spacing: 1px;
}
.site-logo span { color: #e94560; }

/* Multi-level Dropdown */
.main-nav { display: flex; align-items: center; flex: 1; height: 56px; }

.main-nav .nav-menu { display: flex; list-style: none; margin: 0; padding: 0; height: 100%; }

.main-nav .nav-menu > li { position: relative; height: 100%; }

.main-nav .nav-menu > li > a {
    display: flex; align-items: center;
    padding: 0 14px;
    height: 100%;
    color: #ccc !important;
    font-size: 13.5px;
    transition: all .2s;
    cursor: pointer;
    white-space: nowrap;
}
.main-nav .nav-menu > li > a:hover,
.main-nav .nav-menu > li:hover > a { color: #fff !important; background: rgba(255,255,255,0.05); }

.main-nav .nav-menu > li.menu-item-has-children > a::after {
    content: '▾'; margin-left: 4px; font-size: 10px; opacity: 0.6;
}

/* Submenu */
.main-nav .sub-menu {
    display: none; position: absolute; top: 100%; left: 0;
    min-width: 200px;
    background: #1a1a3e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 6px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 100;
}
.main-nav .nav-menu > li:hover > .sub-menu { display: block; }
.main-nav .sub-menu li { position: relative; list-style: none; }
.main-nav .sub-menu a {
    display: block; padding: 8px 16px;
    color: #aaa !important; font-size: 13px;
    transition: all .15s;
}
.main-nav .sub-menu a:hover { color: #fff !important; background: rgba(233,69,96,0.1); padding-left: 20px; }

/* 2nd level submenu */
.main-nav .sub-menu .sub-menu { left: 100%; top: -6px; }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.header-search { position: relative; }
.header-search input {
    width: 180px; height: 32px;
    padding: 0 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
    outline: none;
    transition: all .25s;
}
.header-search input:focus { width: 240px; border-color: #e94560; background: rgba(255,255,255,0.12); }
.header-search input::placeholder { color: #666; }

.search-results {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
    background: #1a1a3e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    max-height: 360px; overflow-y: auto;
    margin-top: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.search-results.active { display: block; }
.search-results .search-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background .15s;
}
.search-results .search-item:hover { background: rgba(233,69,96,0.08); }
.search-results .search-item:last-child { border-bottom: none; }
.search-results .search-item img { width: 40px; height: 28px; object-fit: cover; border-radius: 4px; }
.search-results .search-item .search-title { font-size: 13px; color: #ccc; }
.search-results .search-item .search-info { font-size: 11px; color: #888; }

.lang-switch {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: #999 !important;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
}
.lang-switch:hover { background: rgba(233,69,96,0.15); color: #e94560 !important; }

.btn-login {
    padding: 5px 14px;
    border-radius: 6px;
    background: rgba(233,69,96,0.15);
    color: #e94560 !important;
    font-size: 13px;
    transition: all .2s;
}
.btn-login:hover { background: #e94560; color: #fff !important; }

/* === Main Layout === */
.site-main { margin-top: 56px; padding-top: 24px; }

.home-layout { display: flex; gap: 24px; align-items: flex-start; }
.home-main { flex: 1; min-width: 0; }
.home-sidebar { width: 320px; flex-shrink: 0; }

@media (max-width: 900px) {
    .home-layout { flex-direction: column; }
    .home-sidebar { width: 100%; }
}

/* === Section Headers === */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.section-title {
    font-size: 18px; font-weight: 700;
    color: #f0f0f0;
    display: flex; align-items: center; gap: 8px;
}
.section-title .badge-ign {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(135deg, #e94560, #c23152);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.section-more { font-size: 13px; color: #888 !important; }
.section-more:hover { color: #e94560 !important; }

/* === IGN Banner === */
.ign-section { margin-bottom: 28px; }
.ign-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 12px;
}
.ign-item {
    display: flex; gap: 14px;
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    transition: all .25s;
}
.ign-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(233,69,96,0.3); }
.ign-item-thumb { width: 100px; height: 70px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.ign-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ign-item-body { flex: 1; min-width: 0; }
.ign-item-title { font-size: 14px; font-weight: 600; color: #e0e0e0; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ign-item-desc { font-size: 12px; color: #888; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.ign-item-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ign-item-meta .tag-free { padding: 1px 8px; background: rgba(233,69,96,0.15); color: #e94560; border-radius: 3px; font-size: 11px; font-weight: 600; }
.ign-item-meta .tag-platform { padding: 1px 8px; background: rgba(255,255,255,0.06); border-radius: 3px; font-size: 11px; color: #888; }
.ign-item-meta .tag-date { font-size: 11px; color: #666; }

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

/* Game Card */
.game-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: all .25s;
}
.game-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(233,69,96,0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.game-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #12122a;
}
.game-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.game-card:hover .game-card-thumb img { transform: scale(1.03); }

.game-card-tags {
    position: absolute; top: 8px; left: 8px;
    display: flex; gap: 4px; flex-wrap: wrap;
}
.game-card-tags .game-tag {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px; font-weight: 600;
}
.game-tag-free { background: #e94560; color: #fff; }
.game-tag-unzip { background: rgba(0,200,100,0.2); color: #00c864; }
.game-tag-hot { background: rgba(255,180,0,0.2); color: #ffb400; }
.game-tag-platform {
    background: rgba(255,255,255,0.08);
    color: #aaa;
}

.game-card-body { padding: 12px 14px 14px; }

.game-card-title {
    font-size: 13px; font-weight: 600;
    color: #e0e0e0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.5;
    margin-bottom: 6px;
    min-height: 39px;
}

.game-card-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #888;
    flex-wrap: wrap;
}
.game-card-version { color: #aaa; }
.game-card-size { color: #777; }
.game-card-date { margin-left: auto; color: #666; font-size: 11px; }

.game-card-desc {
    font-size: 12px; color: #777;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-top: 6px;
    line-height: 1.5;
}

/* === Sidebar Widgets === */
.sidebar-widget {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.widget-title {
    font-size: 15px; font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e94560;
    display: flex; align-items: center; gap: 8px;
}

.sidebar-list { list-style: none; }
.sidebar-list li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: all .15s;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list li:hover { padding-left: 4px; }
.sidebar-list li a { font-size: 13px; color: #bbb; flex: 1; }
.sidebar-list li a:hover { color: #e94560; }
.sidebar-list .hot-score {
    font-size: 11px; color: #e94560;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 8px;
}

/* Pagination */
.pagination {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 20px 0;
    margin-bottom: 20px;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px;
    padding: 0 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    font-size: 13px;
    color: #aaa;
    transition: all .2s;
}
.pagination a:hover { background: rgba(233,69,96,0.12); border-color: #e94560; color: #e94560; }
.pagination .current { background: #e94560; border-color: #e94560; color: #fff; font-weight: 600; }
.pagination .dots { border: none; background: none; color: #666; }

/* === Footer === */
.site-footer {
    background: #0f0f23;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 32px 0 20px;
    margin-top: 40px;
}
.footer-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 24px; }
.footer-title { font-size: 14px; font-weight: 700; color: #e0e0e0; margin-bottom: 12px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { font-size: 13px; color: #888 !important; transition: color .2s; }
.footer-links a:hover { color: #e94560 !important; }
.footer-message {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #777;
    line-height: 1.8;
}
.footer-message strong { color: #e94560; }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 12px; color: #666;
}
.footer-lost-link { color: #e94560 !important; font-weight: 600; padding: 4px 12px; border: 1px solid rgba(233,69,96,0.3); border-radius: 6px; transition: all .2s; }
.footer-lost-link:hover { background: rgba(233,69,96,0.1); border-color: #e94560; }

.footer-login-link { font-size: 12px; color: #888 !important; margin-left: 12px; }

@media (max-width: 768px) {
    .footer-content { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* === Single Game === */
.single-main { display: flex; gap: 24px; align-items: flex-start; }
.single-content { flex: 1; min-width: 0; }

.single-header { margin-bottom: 20px; }
.single-title { font-size: 22px; font-weight: 700; color: #f0f0f0; margin-bottom: 8px; }
.single-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #888; }

.single-cover {
    width: 100%; aspect-ratio: 16/9;
    border-radius: 12px; overflow: hidden;
    background: #12122a;
    margin-bottom: 20px;
}
.single-cover img { width: 100%; height: 100%; object-fit: cover; }

.single-downloads { margin-bottom: 20px; }
.download-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all .2s;
}
.download-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(233,69,96,0.3); }
.download-info { font-size: 13px; color: #ccc; }
.download-btn {
    padding: 6px 18px;
    background: #e94560;
    border-radius: 6px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
}
.download-btn:hover { background: #d63850; }

.single-description {
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #bbb;
    line-height: 1.8;
}

.single-rating {
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 12px;
}
.stars { display: flex; gap: 4px; }
.stars .star { cursor: pointer; font-size: 22px; color: #444; transition: color .15s; }
.stars .star.active, .stars .star:hover { color: #ffb400; }
.rating-average { font-size: 18px; font-weight: 700; color: #ffb400; }
.rating-count { font-size: 12px; color: #888; }

.single-comments { margin-top: 20px; }
.comment-list { list-style: none; }
.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comment-author { font-size: 13px; font-weight: 600; color: #ddd; margin-bottom: 4px; }
.comment-text { font-size: 13px; color: #aaa; line-height: 1.6; }
.comment-date { font-size: 11px; color: #666; margin-top: 4px; }

/* === 404 Page === */
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 72px; color: #e94560; margin-bottom: 12px; }
.error-page p { font-size: 16px; color: #888; margin-bottom: 24px; }
.error-page a { display: inline-block; padding: 10px 28px; background: #e94560; color: #fff !important; border-radius: 8px; font-weight: 600; transition: all .2s; }
.error-page a:hover { background: #d63850; transform: translateY(-2px); }

/* === Archive / Taxonomy Pages === */
.archive-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.archive-title { font-size: 20px; font-weight: 700; color: #f0f0f0; }
.archive-desc { font-size: 13px; color: #888; margin-top: 4px; }

/* === Buttons === */
.btn-download {
    display: inline-block; padding: 8px 20px;
    background: #e94560;
    border-radius: 6px;
    color: #fff !important;
    font-size: 13px; font-weight: 600;
    transition: all .2s;
}
.btn-download:hover { background: #d63850; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(233,69,96,0.3); }
.btn-download-outline {
    background: transparent;
    border: 1px solid rgba(233,69,96,0.4);
    color: #e94560 !important;
}
.btn-download-outline:hover { background: rgba(233,69,96,0.1); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* Loading Skeleton (for search) */
.search-loading { text-align: center; padding: 16px; color: #666; font-size: 13px; }
.search-none { text-align: center; padding: 16px; color: #888; font-size: 13px; display: none; }
.search-none.active { display: block; }

/* Transition utility */
.fade-in { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
