* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --dark: #2d3436;
    --dark-light: #636e72;
    --gray: #b2bec3;
    --light: #dfe6e9;
    --bg: #f5f6fa;
    --white: #ffffff;
    --danger: #d63031;
    --success: #00b894;
    --warning: #fdcb6e;
    --radius: 12px;
    --shadow: 0 2px 16px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Header ========== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav a {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    color: var(--dark-light);
    transition: var(--transition);
}

.nav a:hover,
.nav a.active {
    background: var(--primary);
    color: var(--white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: 8px;
    padding: 8px 14px;
    gap: 8px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 180px;
    color: var(--dark);
}

.search-box .icon {
    color: var(--gray);
    font-size: 16px;
}

/* ========== Hero ========== */
.hero {
    background: linear-gradient(135deg, var(--primary), #a29bfe 40%, var(--secondary));
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 620px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.7);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,92,231,0.3);
}

/* ========== Sections ========== */
.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.section-subtitle {
    color: var(--dark-light);
    font-size: 15px;
    margin-top: 4px;
}

.section-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-more:hover {
    gap: 10px;
}

/* ========== Game Cards ========== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.game-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.game-card-thumb {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.game-card-thumb .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255,255,255,0.6);
}

.thumb-1 { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.thumb-2 { background: linear-gradient(135deg, #00cec9, #81ecec); }
.thumb-3 { background: linear-gradient(135deg, #fd79a8, #fab1a0); }
.thumb-4 { background: linear-gradient(135deg, #e17055, #fdcb6e); }
.thumb-5 { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.thumb-6 { background: linear-gradient(135deg, #00b894, #55efc4); }
.thumb-7 { background: linear-gradient(135deg, #d63031, #ff7675); }
.thumb-8 { background: linear-gradient(135deg, #636e72, #b2bec3); }

.game-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
}

.badge-hot { background: var(--danger); }
.badge-new { background: var(--success); }
.badge-free { background: var(--primary); }
.badge-sale { background: var(--warning); color: var(--dark); }

.game-card-body {
    padding: 18px;
}

.game-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--dark);
}

.game-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--dark-light);
}

.game-card-desc {
    font-size: 14px;
    color: var(--dark-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.game-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--warning);
}

.game-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

.game-price .original {
    font-size: 13px;
    color: var(--gray);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 6px;
}

/* ========== Category Cards ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 18px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    color: var(--white);
}

.category-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-card p {
    font-size: 13px;
    color: var(--dark-light);
}

/* ========== News Cards ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.news-card-thumb {
    height: 200px;
    overflow: hidden;
}

.news-card-thumb .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: rgba(255,255,255,0.5);
}

.news-card-body {
    padding: 20px;
}

.news-card-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tag-update { background: #dfe6e9; color: var(--dark); }
.tag-event { background: #ffeaa7; color: #d68910; }
.tag-release { background: #55efc4; color: #00695c; }
.tag-guide { background: #a29bfe; color: var(--white); }

.news-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
    line-height: 1.4;
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--dark-light);
    line-height: 1.6;
    margin-bottom: 14px;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--gray);
}

/* ========== Game Detail Page ========== */
.page-banner {
    padding: 50px 0;
    color: var(--white);
    position: relative;
}

.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.page-banner .container {
    position: relative;
    z-index: 2;
}

.game-detail-header {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.game-detail-cover {
    width: 280px;
    height: 380px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.game-detail-cover .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: rgba(255,255,255,0.5);
}

.game-detail-info {
    flex: 1;
}

.game-detail-info h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.game-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.game-detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.game-tag {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
}

.game-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.game-detail-actions .btn {
    font-size: 16px;
    padding: 14px 32px;
}

/* ========== Content Area ========== */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    padding: 40px 0;
}

.content-main {
    min-width: 0;
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.content-block {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.content-block h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light);
}

.content-block h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px;
}

.content-block p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--dark-light);
    margin-bottom: 14px;
}

.content-block ul {
    padding-left: 20px;
    margin-bottom: 14px;
}

.content-block li {
    font-size: 15px;
    line-height: 1.8;
    color: var(--dark-light);
    margin-bottom: 4px;
}

/* ========== Sidebar Widgets ========== */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--light);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--dark);
}

.sidebar-list a:hover {
    color: var(--primary);
}

.sidebar-list .count {
    font-size: 12px;
    color: var(--gray);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ========== Stats ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 14px;
    background: var(--bg);
    border-radius: 10px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--dark-light);
    margin-top: 2px;
}

/* ========== Screenshots ========== */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.screenshot-item {
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
}

.screenshot-item .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255,255,255,0.4);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--dark-light);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 8px;
    color: var(--gray);
}

/* ========== News Detail ========== */
.news-detail-content {
    max-width: 800px;
}

.news-detail-content h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.news-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--light);
    margin-bottom: 28px;
    font-size: 14px;
    color: var(--dark-light);
}

.news-detail-content .content-block {
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.news-detail-content .content-block h2 {
    border-bottom: none;
    padding-bottom: 0;
}

/* ========== Page Banner Simple ========== */
.page-banner-simple {
    background: linear-gradient(135deg, var(--primary), #a29bfe);
    padding: 48px 0;
    color: var(--white);
    text-align: center;
}

.page-banner-simple h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-banner-simple p {
    font-size: 16px;
    opacity: 0.85;
}

/* ========== Footer ========== */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 24px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand .logo {
    margin-bottom: 14px;
    color: var(--white);
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    max-width: 300px;
}

.footer h4 {
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    opacity: 0.5;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .nav {
        display: none;
    }

    .search-box input {
        width: 120px;
    }

    .game-detail-header {
        flex-direction: column;
    }

    .game-detail-cover {
        width: 100%;
        height: 260px;
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

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

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
