:root {
    --bg: #0f1420;
    --bg-card: #1a2133;
    --accent: #ff5b3a;
    --accent2: #35d0ba;
    --text: #eef1f8;
    --text-dim: #97a1b8;
    --radius: 14px;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

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

/* ---------- Header ---------- */
.site-header {
    background: #131a29;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #232c42;
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.logo img { height: 40px; }
.tagline { font-size: 12px; color: var(--text-dim); display: block; font-weight: 400; }

.search-box { flex: 1; max-width: 420px; }
.search-box input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    background: #232c42;
    color: var(--text);
    font-size: 14px;
}

.nav-cats { display: flex; gap: 6px; flex-wrap: wrap; overflow-x: auto; padding: 14px 0 4px; }
.nav-cats a {
    padding: 7px 16px;
    border-radius: 999px;
    background: #1a2133;
    font-size: 13px;
    white-space: nowrap;
    color: var(--text-dim);
}
.nav-cats a.active, .nav-cats a:hover { background: var(--accent); color: #fff; }

/* ---------- Featured banner ---------- */
.featured-banner {
    background: linear-gradient(135deg, #ff5b3a 0%, #ff8a3a 100%);
    border-radius: var(--radius);
    padding: 40px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}
.featured-banner .info h2 { font-size: 28px; margin-bottom: 8px; }
.featured-banner .info p { color: rgba(255,255,255,0.85); max-width: 480px; margin-bottom: 16px; }
.featured-banner .play-btn { background: #131a29; color: #fff; padding: 12px 26px; border-radius: 999px; font-weight: 700; display: inline-block; }
.featured-banner img { width: 160px; height: 160px; object-fit: cover; border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }

/* ---------- Games grid ---------- */
.section-title { font-size: 20px; font-weight: 700; margin: 28px 0 14px; display: flex; align-items: center; gap: 8px; }

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.game-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s ease;
    position: relative;
}
.game-card:hover { transform: translateY(-4px); }
.game-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.game-card .name {
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-card .cat-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    color: var(--accent2);
}

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 30px 0; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--bg-card);
    font-size: 14px;
}
.pagination .current { background: var(--accent); }

/* ---------- Game play page ---------- */
.play-wrap { padding: 20px 0; }
.game-frame-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}
.game-frame-box iframe { width: 100%; height: 100%; border: none; }
.game-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.game-title-row h1 { font-size: 24px; }
.game-meta { color: var(--text-dim); font-size: 13px; }
.game-desc { background: var(--bg-card); padding: 20px; border-radius: var(--radius); margin-top: 20px; }
.game-desc h3 { margin-bottom: 8px; font-size: 16px; }

.ad-slot { margin: 20px 0; text-align: center; }

/* ---------- Articles ---------- */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.article-card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; }
.article-card img { width: 100%; height: 160px; object-fit: cover; }
.article-card .body { padding: 16px; }
.article-card h3 { font-size: 16px; margin-bottom: 6px; }
.article-card p { color: var(--text-dim); font-size: 13px; }
.article-body { background: var(--bg-card); padding: 30px; border-radius: var(--radius); margin-top: 20px; line-height: 1.8; }
.article-body img { max-width: 100%; border-radius: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0e17; padding: 30px 0; margin-top: 60px; color: var(--text-dim); font-size: 13px; text-align: center; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent2); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
    .site-header .inner { flex-wrap: wrap; }
    .search-box { order: 3; max-width: 100%; }
    .featured-banner { padding: 24px; }
    .featured-banner img { width: 100px; height: 100px; }
}
