/*
Theme Name: WoKoGames
Theme URI: https://example.com/wokogames
Author: WoKoGames
Description: A clean, image-forward HTML5 game portal for WordPress.
Version: 1.0.0
Text Domain: wokogames
*/

/* =========================================================
   GAMEHUB — shared design system
   Dark theme + "liquid glass" surfaces
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
    /* base */
    --bg: #0a0b10;
    --bg-soft: #0d0f16;
    --surface: #12141c;
    --surface-2: #191c27;
    --surface-3: #20232f;

    /* glass */
    --glass-bg: rgba(255, 255, 255, .055);
    --glass-bg-strong: rgba(255, 255, 255, .1);
    --glass-border: rgba(255, 255, 255, .12);
    --glass-highlight: rgba(255, 255, 255, .5);

    /* text */
    --text: #eef0f6;
    --text-dim: #9aa0b4;
    --text-faint: #5d6379;
    --text-muted: #6b7690;

    /* accents */
    --accent: #7c5cff; /* violet */
    --accent-soft: #a48bff;
    --accent-2: #00e6c3; /* teal */
    --accent-3: #ff4d8d; /* pink/hot */
    --warn: #ffb020; /* new/star */

    --grad-1: linear-gradient(135deg, #7c5cff 0%, #00e6c3 100%);
    --grad-2: linear-gradient(135deg, #ff4d8d 0%, #7c5cff 100%);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .65);
    --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, .55);
    --shadow-glow: 0 0 0 1px rgba(124, 92, 255, .35), 0 0 40px -8px rgba(124, 92, 255, .55);

    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --header-h: 68px;
    --sidebar-w: 236px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

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

img[loading="lazy"] {
    opacity: 0;
    will-change: opacity;
    transition: opacity 0.5s ease-in-out !important;
}

/* Trạng thái khi ảnh đã nạp xong: Hiển thị đầy đủ */
img.loaded,
img.lazyloaded {
    opacity: 1;
}

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

button {
    font-family: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- ambient background blobs ---------- */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-blobs span {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .28;
    animation: float 22s ease-in-out infinite;
}

.bg-blobs span:nth-child(1) {
    width: 520px;
    height: 520px;
    background: #7c5cff;
    top: -160px;
    left: -120px;
}

.bg-blobs span:nth-child(2) {
    width: 460px;
    height: 460px;
    background: #00e6c3;
    top: 20%;
    right: -160px;
    animation-delay: -6s;
}

.bg-blobs span:nth-child(3) {
    width: 380px;
    height: 380px;
    background: #ff4d8d;
    bottom: -140px;
    left: 30%;
    animation-delay: -12s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, -40px) scale(1.08);
    }
}

/* ============ LIQUID GLASS core ============ */
.glass {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.glass::before {
    /* liquid sheen highlight along the top edge */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(160deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 30%);
    pointer-events: none;
}

.glass-strong {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}

/* ---------- layout shell ---------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .2px;
    flex-shrink: 0;
}

.brand .logo-mark {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.brand span.hl {
    color: var(--accent-2);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text);
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 520px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 42px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--glass-border);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-body);
}

.search-box input::placeholder {
    color: var(--text-faint);
}

.search-box svg {
    flex-shrink: 0;
    color: var(--text-faint);
}

@keyframes search-spinner {
    to {
        transform: rotate(360deg);
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    position: relative;
}

.icon-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .08);
}

.icon-btn .material-symbols-rounded {
    font-size: 16px;
}

.btn-signin {
    height: 40px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    background: var(--grad-1);
    color: #0a0b10;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    border: 0;
    box-shadow: var(--shadow-glow);
}

/* ---------- shell: full-width sidenav + fluid main content ---------- */
.shell {
    position: relative;
    z-index: 1;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    z-index: 40;
    height: calc(100vh - var(--header-h));
    margin: 0;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-bottom: none;
    padding: 18px 12px;
    overflow-y: auto;
}

.sidebar-section-title {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 10px 12px 6px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 14.5px;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}

.side-link svg {
    flex-shrink: 0;
    opacity: .85;
}

.side-link:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--text);
}

.side-link.active {
    color: var(--text);
    background: linear-gradient(90deg, rgba(124, 92, 255, .22), rgba(124, 92, 255, 0));
    border-left: 2px solid var(--accent-2);
    padding-left: 10px;
}

.main {
    min-width: 0;
    width: 100%;
    padding: 24px 28px 60px;
}

@media (min-width: 1081px) {
    .main {
        margin-left: var(--sidebar-w);
        width: calc(100% - var(--sidebar-w));
        padding: 24px 36px 60px;
    }
}

.section {
    margin: 36px 0;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.section-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--grad-1);
    box-shadow: 0 0 12px 2px rgba(124, 92, 255, .7);
}

.section-link {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

/* ---------- game card grid ---------- */
.game-grid {
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.game-grid.dense {
    grid-template-columns:repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.game-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, .06);
    cursor: pointer;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease, border-color .28s ease;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: var(--shadow-lg);
    border-color: rgba(124, 92, 255, .5);
}

.game-card .thumb-wrap {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.game-card .thumb-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
    transition: transform .5s ease, filter .4s ease;
}

.game-card:hover .thumb-wrap img {
    transform: scale(1.08);
    filter: brightness(.55) saturate(1.1);
}

.game-card .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 4px 8px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(8px);
}

.badge.hot {
    background: rgba(255, 77, 141, .22);
    color: #ff9ec1;
    border: 1px solid rgba(255, 77, 141, .45);
}

.badge.new {
    background: rgba(0, 230, 195, .18);
    color: #7cf2de;
    border: 1px solid rgba(0, 230, 195, .4);
}

.badge.updated {
    background: rgba(59, 130, 246, .22);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, .45);
}

.game-card .play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .28s ease;
    background: linear-gradient(180deg, rgba(10, 11, 16, .15), rgba(10, 11, 16, .65));
}

.game-card:hover .play-overlay {
    opacity: 1;
}

/* liquid glass play button (signature element) */
.play-droplet {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(.6);
    transition: transform .3s cubic-bezier(.2, .9, .3, 1.3);
    box-shadow: 0 0 0 0 rgba(0, 230, 195, .5), inset 0 1px 6px rgba(255, 255, 255, .4);
}

.game-card:hover .play-droplet {
    transform: scale(1);
    animation: ripple 1.8s ease-out infinite;
}

.play-droplet svg {
    margin-left: 3px;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6));
}

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 230, 195, .45), inset 0 1px 6px rgba(255, 255, 255, .4);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(0, 230, 195, 0), inset 0 1px 6px rgba(255, 255, 255, .4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 230, 195, 0), inset 0 1px 6px rgba(255, 255, 255, .4);
    }
}

.game-card .meta {
    padding: 10px 12px 12px;
}

.game-card .title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card .tags {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
}

.game-card .tags .rating {
    color: var(--warn);
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 280px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(120% 140% at 100% 0%, rgba(124, 92, 255, .35), transparent 60%),
    radial-gradient(80% 100% at 0% 100%, rgba(0, 230, 195, .22), transparent 60%);
}

.hero-copy {
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-2);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.hero-eyebrow::before {
    content: "";
    width: 20px;
    height: 1px;
    background: var(--accent-2);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    margin: 0 0 14px;
    font-weight: 700;
}

.hero p {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 24px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    height: 46px;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14.5px;
    border: 0;
}

.btn-primary {
    background: var(--grad-1);
    color: #08090c;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-ghost {
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .11);
}

.hero-art {
    width: 280px;
    height: 220px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-art .glow-orb {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--grad-2);
    filter: blur(2px);
    box-shadow: 0 0 80px 10px rgba(255, 77, 141, .45);
    animation: float 8s ease-in-out infinite;
}

/* ---------- category chips ---------- */
.chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dim);
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .2s ease;
}

.chip:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .09);
}

.chip.active {
    color: #08090c;
    background: var(--grad-1);
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

/* ---------- footer ---------- */
.app-footer {
    margin-top: 60px;
    padding: 40px 28px 90px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    color: var(--text-faint);
    font-size: 13px;
}

@media (min-width: 1081px) {
    .app-footer {
        margin-left: var(--sidebar-w);
        padding: 40px 36px 90px;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns:1.4fr repeat(3, 1fr);
    gap: 28px;
    width: 100%;
}

.footer-grid h4 {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 14px;
    margin: 0 0 12px;
}

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

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

.footer-bottom {
    width: 100%;
    margin: 28px 0 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-language select {
    width: 100%;
    max-width: 180px;
    padding: 9px 32px 9px 11px;
    color: var(--text);
    font: inherit;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--wp-editor-canvas-background);
    border-radius: 8px;
    cursor: pointer;
}

.footer-language select:focus {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

/* ---------- mobile bottom nav ---------- */
.mobile-tabbar {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 60;
    border-radius: var(--radius-lg);
    padding: 8px 6px;
    align-items: center;
    justify-content: space-around;
}

.mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    color: var(--text-faint);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

.mobile-tabbar a.active {
    color: var(--accent-2);
}

/* ---------- drawer (mobile sidebar) ---------- */
.drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 7, 10, .6);
    backdrop-filter: blur(2px);
    z-index: 70;
}

.drawer-backdrop.open {
    display: block;
}

.drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 78%;
    max-width: 300px;
    z-index: 71;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    padding: 18px 14px;
    overflow-y: auto;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
    .sidebar {
        display: none;
    }

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

@media (max-width: 760px) {
    :root {
        --header-h: 60px;
    }

    .search-box {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 70px;
        z-index: 45;
    }

    .header-inner .search-box {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .brand {
        font-size: 17px;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 22px;
        text-align: left;
    }

    .hero-art {
        display: none;
    }

    .main {
        padding: 16px 14px 110px;
    }

    .mobile-tabbar {
        display: flex;
    }

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

    .app-footer {
        padding-bottom: 110px;
    }
}

@media (max-width: 420px) {
    .game-grid {
        grid-template-columns:repeat(auto-fill, minmax(135px, 1fr));
        gap: 10px;
    }
}

/* ---------- utility ---------- */

.show-mobile {
    display: none;
}

@media (max-width: 760px) {

    .hide-mobile {
        display: none;
    }

    .show-mobile {
        display: initial;
    }
}

/* =========================================================
   Professional portal refinement
   A quieter, higher-contrast interface that lets the games lead.
   ========================================================= */
:root {
    --bg: #f5f7fb;
    --bg-soft: #eef2f8;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --surface-3: #edf2fb;
    --glass-bg: rgba(255, 255, 255, .86);
    --glass-bg-strong: rgba(255, 255, 255, .96);
    --glass-border: rgba(30, 54, 92, .1);
    --text: #13213a;
    --text-dim: #61708a;
    --text-faint: #8b98ad;
    --accent: #246bfe;
    --accent-soft: #246bfe;
    --accent-2: #0caf9e;
    --accent-3: #e84b78;
    --warn: #dc8b05;
    --grad-1: linear-gradient(135deg, #246bfe 0%, #4c7dff 58%, #28bda9 100%);
    --grad-2: linear-gradient(135deg, #fb7185 0%, #5b7cfa 100%);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-lg: 0 24px 55px -25px rgba(0, 0, 0, .82);
    --shadow-md: 0 14px 32px -20px rgba(0, 0, 0, .72);
    --shadow-glow: 0 0 0 1px rgba(109, 141, 255, .3), 0 12px 28px -12px rgba(79, 124, 255, .8);
}

body {
    background: radial-gradient(900px 500px at 92% -12%, rgba(70, 120, 255, .12), transparent 70%),
    radial-gradient(800px 460px at -15% 85%, rgba(37, 197, 174, .1), transparent 70%),
    var(--bg);
}

.bg-blobs span {
    filter: blur(120px);
    opacity: .08;
    animation: none;
}

.bg-blobs span:nth-child(1) {
    background: #3974ff;
}

.bg-blobs span:nth-child(2) {
    background: #24b9a9;
}

.bg-blobs span:nth-child(3) {
    background: #7c5cff;
}

.glass {
    box-shadow: 0 10px 26px -22px rgba(21, 43, 78, .38), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.glass::before {
    background: linear-gradient(160deg, rgba(255, 255, 255, .7), transparent 28%);
}

.app-header {
    background: rgba(255, 255, 255, .9);
    border-color: rgba(30, 54, 92, .1);
    box-shadow: 0 1px 0 rgba(30, 54, 92, .06);
}

.brand {
    letter-spacing: -.4px;
}

.search-box {
    background: #f4f7fc;
    border-color: transparent;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.search-box:focus-within {
    background: #fff;
    border-color: rgba(36, 107, 254, .45);
    box-shadow: 0 0 0 3px rgba(36, 107, 254, .11);
}

.search-box .material-symbols-rounded {
    font-size: 16px;
}

@media (min-width: 761px) {
    .header-inner {
        position: relative;
        justify-content: space-between;
    }

    .header-inner .search-box {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: min(520px, 42vw);
        max-width: none;
    }

    .header-actions {
        margin-left: auto;
    }
}

.icon-btn, .btn-signin {
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.icon-btn:hover, .btn-signin:hover {
    transform: translateY(-1px);
}

.sidebar {
    background: rgba(255, 255, 255, .78);
    border-color: rgba(30, 54, 92, .09);
}

.side-link {
    border: 1px solid transparent;
}

.side-link:hover {
    background: #f1f5fb;
}

.side-link.active {
    color: #1455d9;
    background: linear-gradient(90deg, rgba(36, 107, 254, .12), rgba(36, 107, 254, .025));
    border-left: 0;
    border-color: rgba(36, 107, 254, .12);
    padding-left: 12px;
}

.main {
    max-width: 1800px;
}

.section {
    margin: 42px 0;
}

.section-title {
    font-size: 20px;
    letter-spacing: -.35px;
}

.section-link {
    color: var(--accent-soft);
}

.game-grid {
    gap: 18px;
}

.game-card {
    background: #fff;
    border-color: rgba(30, 54, 92, .1);
    box-shadow: 0 10px 22px -20px rgba(28, 50, 86, .5);
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(36, 107, 254, .4);
    box-shadow: 0 20px 32px -22px rgba(27, 55, 106, .36), 0 0 0 1px rgba(36, 107, 254, .08);
}

.game-card .meta {
    padding: 12px 13px 13px;
}

.game-card .title {
    font-size: 14.5px;
    letter-spacing: -.15px;
}

.game-card .tags {
    font-size: 10.5px;
}

.play-droplet {
    width: 52px;
    height: 52px;
    background: rgba(36, 107, 254, .95);
    border-color: rgba(255, 255, 255, .85);
}

.hero {
    min-height: 310px;
    padding: 48px;
    color: #fff;
    background: linear-gradient(118deg, #102a62 0%, #1e58c6 56%, #267ec3 100%);
    border-color: rgba(255, 255, 255, .25);
    box-shadow: 0 24px 46px -26px rgba(27, 77, 173, .55);
}

.hero::after {
    background: radial-gradient(62% 120% at 100% 0%, rgba(126, 201, 255, .42), transparent 70%), radial-gradient(64% 110% at 0% 100%, rgba(23, 218, 185, .2), transparent 70%);
}

.hero p {
    color: rgba(255, 255, 255, .78);
}

.hero-eyebrow {
    color: #8ff7e8;
}

.hero-eyebrow::before {
    background: #8ff7e8;
}

.hero .btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .25);
}

.hero .btn-ghost:hover {
    background: rgba(255, 255, 255, .2);
}

.hero h1 {
    max-width: 590px;
    letter-spacing: -1.2px;
}

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

.hero-art {
    background: radial-gradient(circle at 50% 50%, rgba(109, 141, 255, .18), transparent 65%);
}

.hero-art .glow-orb {
    width: 138px;
    height: 138px;
    box-shadow: 0 0 90px 18px rgba(79, 124, 255, .32);
}

.btn {
    transition: transform .18s ease, filter .18s ease, background .18s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.chip {
    background: #fff;
    border-color: rgba(30, 54, 92, .1);
}

.chip:hover {
    background: #f0f5ff;
    color: #1455d9;
}

.chip.active {
    color: #fff;
}

.app-footer {
    border-color: rgba(30, 54, 92, .1);
    background: rgba(255, 255, 255, .6);
}

.app-footer ul,
.game-fact-value ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-footer li {
    margin-bottom: 10px;
    padding: 0;
    list-style: none;
}

/* Game-detail metadata, inspired by familiar app-store information cards. */
.game-facts {
    display: grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 24px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: var(--radius-md);
    background: rgba(30, 54, 92, .1);
}

.game-fact {
    min-height: 88px;
    padding: 15px 16px;
    background: #fff;
}

.game-fact-label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.game-fact-value {
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
}

.game-fact-value small {
    display: block;
    margin-top: 4px;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 500;
}

.game-fact-value .store {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 1px 4px 0 0;
    color: var(--accent-soft);
    font-size: 12px;
}

.game-fact.fact-wide {
    grid-column: span 2;
}

.player-stage:fullscreen {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.player-stage:fullscreen .player-frame {
    flex: 1;
    min-height: 0;
    height: auto;
}

.player-stage:fullscreen iframe {
    height: 100%;
    aspect-ratio: auto;
}

.player-stage:fullscreen .player-splash {
    inset: 0;
}

@media (max-width: 760px) {
    .game-facts {
        grid-template-columns:1fr 1fr;
    }

    .game-fact {
        min-height: 76px;
        padding: 13px;
    }

    .game-fact.fact-wide {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .hero {
        min-height: 0;
        padding: 30px 24px;
    }

    .section {
        margin: 32px 0;
    }

    .game-grid {
        gap: 12px;
    }
}

/* =========================================================
   Clean game-portal layout — image-forward, quiet, editorial
   ========================================================= */
:root {
    --sidebar-w: 170px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    background: #fbfaf9;
}

.bg-blobs {
    display: none;
}

.app-header {
    height: 56px;
    padding: 0 28px;
    background: rgba(251, 250, 249, .95);
    backdrop-filter: blur(12px);
}

.brand {
    font-size: 18px;
}

.btn-signin {
    height: 34px;
    padding: 0 14px;
    font-size: 12px;
    box-shadow: none;
}

.icon-btn {
    width: 34px;
    height: 34px;
    background: transparent;
    border-color: transparent;
}

.icon-btn:hover {
    background: #f0efed;
}

.search-box {
    height: 34px;
    width: min(360px, 34vw) !important;
    background: #f0efed;
    font-size: 12px;
}

.search-box input {
    font-size: 12px;
}

.shell {
    max-width: 1840px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    padding: 20px 20px 0;
}

.sidebar {
    position: sticky;
    top: 76px;
    width: var(--sidebar-w);
    height: calc(100vh - 92px);
    margin: 0 34px 0 0;
    padding: 0 0 20px;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow-y: auto;
}

.sidebar-section-title {
    padding: 10px 8px 6px;
    font-size: 9px;
}

.side-link {
    min-height: 31px;
    padding: 6px 9px;
    gap: 8px;
    border-radius: 7px;
    font-size: 12px;
}

.side-link.active {
    background: #f0efed;
    color: #35313a;
    border-color: transparent;
}

.main {
    flex: 1;
    width: auto;
    max-width: none;
    margin-left: 0;
    padding: 0 0 52px;
}

.section {
    margin: 30px 0;
}

.section-head {
    margin-bottom: 12px;
}

.section-title {
    font-size: 18px;
    letter-spacing: -.5px;
}

.section-title .dot {
    display: none;
}

.section-link {
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 500;
}

.hero {
    min-height: 0;
    padding: 4px 0 12px;
    background: transparent;
    color: var(--text);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.hero::after {
    display: none;
}

.hero-copy {

}

.hero-eyebrow {
    margin-bottom: 7px;
    color: #6f6574;
    font-size: 10px;
}

.hero-eyebrow::before {
    background: #6f6574;
}

.hero h1 {
    font-size: 30px;
    letter-spacing: -1.25px;
    margin-bottom: 6px;
}

.hero p {
    color: #5f5a63;
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: 14px;
    text-align: justify;
}

.hero-art {
    display: none;
}

.hero .btn {
    height: 36px;
    padding: 0 15px;
    font-size: 12px;
}

.hero .btn-ghost {
    color: #4f4a53;
    background: #f0efed;
    border-color: transparent;
}

.chip-row {
    gap: 7px;
}

.chip {
    padding: 7px 12px;
    font-size: 12px;
    background: transparent;
    border-color: transparent;
}

.chip:hover {
    background: #f0efed;
    color: var(--text);
}

.chip.active {
    color: #27232a;
    background: #eceae8;
    box-shadow: none;
}

.game-grid, .game-grid.dense {
    grid-template-columns:repeat(auto-fill, minmax(135px, 1fr));
    gap: 14px;
}

.game-card {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.game-card:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: none;
}

.game-card .thumb-wrap {
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(20, 16, 25, .08);
}

.game-card:hover .thumb-wrap {
    box-shadow: 0 8px 18px -10px rgba(25, 20, 30, .35);
}

.game-card .meta {
    padding: 8px 1px 1px;
}

.game-card .title {
    font-size: 13px;
    margin-bottom: 3px;
}

.game-card .tags {
    font-family: var(--font-body);
    font-size: 10.5px;
}

.game-card .badge {
    top: 7px;
    left: 7px;
    font-size: 9px;
    padding: 3px 6px;
}

.play-droplet {
    width: 42px;
    height: 42px;
}

.app-footer {
    max-width: 1840px;
    margin: 0 auto;
    padding: 26px 20px 60px calc(var(--sidebar-w) + 54px);
    background: transparent;
    border-color: #ebe8e5;
}

.footer-grid {
    gap: 20px;
}

@media (min-width: 1081px) {
    .main {
        margin-left: 0;
        width: auto;
        padding: 0 0 52px;
    }

    .app-footer {
        margin-left: auto;
    }
}

@media (max-width: 1080px) {
    .shell {
        display: block;
        max-width: 980px;
        padding: 18px 24px 0;
    }

    .main {
        padding: 0 0 52px;
    }

    .app-footer {
        padding: 26px 24px 90px;
    }
}

@media (max-width: 760px) {
    .app-header {
        padding: 0 14px;
    }

    .shell {
        padding: 12px 14px 0;
    }

    .hero h1 {
        font-size: 25px;
    }

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

    .game-grid, .game-grid.dense {
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
    }
}


.game-card.is-hidden {
    display: none;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wp-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Single-game template. */
.content-row {
    display: flex;
    align-items: flex-start;
    gap: 22px;
}

.main-col {
    flex: 1 1 1280px;
    min-width: 0;
}

.side-rail {
    width: 300px;
    flex: 0 0 300px;
    position: sticky;
    top: 76px;
}

.player-stage {
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e8edf4;
}

.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.player-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    overflow: hidden!important;
}

.player-splash {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    background: #fff;
    opacity: 1;
    transition: opacity .45s ease, visibility .45s ease;
}

.player-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-splash img {
    width: 128px;
    height: 128px;
    animation: player-splash-pulse 1.3s ease-in-out infinite;
}

.player-splash span {
    font: 600 14px var(--font-display);
}

@keyframes player-splash-pulse {
    50% {
        transform: scale(1.08);
        opacity: .7;
    }
}

.player-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 14px;
    background: #fff;
}

.player-toolbar .g-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-right: auto;
    font-weight: 700;
}

.player-toolbar .g-title img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.ptool-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #e3e9f2;
    border-radius: 8px;
    background: #f5f7fb;
    color: #30415c;
    cursor: pointer;
}

.ptool-btn:hover {
    background: #e9f0ff;
    color: #246bfe;
}

.ptool-btn .material-symbols-rounded {
    font-size: 16px;
}

.ptool-btn.liked {
    color: #e53e72;
    background: #fff0f4;
    border-color: #f6b7c9;
}

.below-content {
    margin-top: 26px;
}

.title-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 18px;
    justify-content: space-between;
}

.title-bar h1 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -.8px;
}

.meta-row, .action-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #71809a;
    font-size: 13px;
}

.stars {
    color: #d88900;
    font-weight: 700;
}

.game-facts {
    display: grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 0 0 24px;
    border: 1px solid #e4e9f0;
    border-radius: 12px;
    background: #e4e9f0;
}

.game-fact {
    min-height: 85px;
    padding: 14px;
    background: #fff;
}

.game-fact.fact-wide {
    grid-column: span 2;
}

.game-fact-label {
    display: block;
    margin-bottom: 7px;
    color: #8592a7;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.game-fact-value {
    color: #1f2d44;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.game-fact-value small {
    display: block;
    color: #8592a7;
    font-size: 11px;
    font-weight: 500;
}

.entry-content {
    color: #526078;
    line-height: 1.75;
}

.side-panel {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid #e6ebf1;
    border-radius: 12px;
    background: #fff;
}

.side-panel h4 {
    margin: 0 0 12px;
}

.mini-list {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.mini-item {
    display: flex;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: 100%;
    opacity: 1;
}

.mini-item div {
    display: none;
}

.mini-item:hover {
    opacity: 0.5;
    transition: all 0.5s ease-in-out;
}

.mini-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
}

.mini-item p {
    margin: 0;
}

.mini-item .n {
    font-size: 13px;
    font-weight: 700;
}

.mini-item .r {
    margin-top: 3px;
    color: #8592a7;
    font-size: 11px;
}

@media (max-width: 1080px) {
    .content-row {
        display: block;
    }

    .side-rail {
        width: auto;
        position: static;
        margin-top: 28px;
    }

    .game-facts {
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .action-cluster {
        margin-top: 14px;
    }

    .game-facts {
        grid-template-columns:1fr 1fr;
    }

    .game-fact.fact-wide {
        grid-column: span 2;
    }
}

.sidebar-section-title,
.app-footer,
.footer-bottom {
    color: var(--text-muted);
}

/* ---------- full-screen search ---------- */
.search-overlay,
.bookmarks-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(9, 11, 16, .38);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: min(700px, 100%);
    transform: translateY(12px) scale(.985);
    transition: transform .2s ease;
}

.search-overlay.is-open .search-overlay-content {
    transform: translateY(0) scale(1);
}

.search-overlay-form {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 0 22px;
    color: var(--text-dim);
    background: var(--surface-2);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    box-shadow: var(--shadow-lg);
}

.search-overlay-form > .material-symbols-rounded {
    font-size: 26px;
}

.search-overlay-form input {
    min-width: 0;
    flex: 1;
    color: var(--text);
    font: 400 20px var(--font-display);
    background: transparent;
    border: 0;
    outline: 0;
}

.search-overlay-form input::placeholder {
    color: var(--text-faint);
}

.search-overlay-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: var(--accent-2);
    border-radius: 50%;
    animation: search-spinner .7s linear infinite;
}

.search-overlay.is-loading .search-overlay-loader {
    display: block;
}

.search-results {
    max-height: min(52vh, 440px);
    margin-top: 10px;
    overflow-y: auto;
    background: var(--surface-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.search-results:empty {
    display: none;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 10px 16px;
    color: var(--text);
    transition: background .16s ease;
}

.search-result + .search-result {
    border-top: 1px solid var(--glass-border);
}

.search-result a {
    opacity: 1;
}

.search-result a:hover {
    opacity: 0.5;
    transition: opacity 0.5s ease-in-out;
}

.search-result img {
    width: 48px;
    height: 48px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
}

.search-results-message {
    padding: 0 16px;
}

.bookmarks-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.bookmarks-content {
    width: min(700px, 100%);
    max-height: min(70vh, 640px);
    overflow-y: auto;
    padding: 24px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateY(12px) scale(.985);
    transition: transform .2s ease;
}

.bookmarks-overlay.is-open .bookmarks-content {
    transform: translateY(0) scale(1);
}

.bookmarks-content h2 {
    margin: 0 0 16px;
    font: 600 22px var(--font-display);
}

.bookmarks-list {
    display: grid;
    gap: 8px;
}

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
}

.bookmark-item:hover, .bookmark-item:focus {
    background: rgba(255, 255, 255, .08);
}

.bookmark-item img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
}

.bookmark-item span {
    font-weight: 600;
}

.bookmarks-empty {
    margin: 0;
    padding: 16px 0;
    color: var(--text-dim);
    text-align: center;
}

body.search-is-open {
    overflow: hidden;
}

body.bookmarks-is-open {
    overflow: hidden;
}

.rating-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 2rem;
}

.star {
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s ease-in-out;
    margin-right: 3px;
}

/* Hiệu ứng hover chỉ hoạt động khi container KHÔNG có class .disabled */
.rating-container:not(.disabled) .star:hover,
.rating-container:not(.disabled) .star:hover ~ .star {
    color: #ffca28;
}

/* Hiển thị sao đã chọn */
.star.selected,
.star.selected ~ .star {
    color: #ff9800;
}

.star .material-symbols-rounded {
    font-size: 32px;
}

/* Đổi con trỏ chuột thành mặc định sau khi đã chọn */
.rating-container.disabled .star {
    cursor: default;
}