/* =========================================================
   H5 Game List - UI stylesheet (v2)
   Mobile-first, fluid typography, safe-area aware.
   ========================================================= */

:root {
    /* Brand */
    --brand: #f97316;
    --brand-dark: #ea580c;
    --brand-2: #f43f5e;
    --brand-soft: #fff4ec;
    --grad: linear-gradient(120deg, #f97316 0%, #fb7185 55%, #f43f5e 100%);
    --grad-soft: linear-gradient(120deg, #fff7ed 0%, #ffffff 60%);

    /* Ink */
    --ink: #1a2030;
    --ink-soft: #414a5c;
    --muted: #7b8494;
    --line: #e9edf3;

    /* Surface */
    --bg: #f5f7fb;
    --card: #ffffff;

    /* Shape */
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;

    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(26, 32, 48, .06);
    --shadow: 0 10px 24px rgba(26, 32, 48, .08);
    --shadow-lg: 0 20px 44px rgba(26, 32, 48, .16);

    /* Layout */
    --header-h: 64px;
    --maxw: 1240px;

    /* Safe areas (notch / home indicator) */
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

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

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

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

::selection {
    background: var(--brand);
    color: #fff;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-left: calc(20px + var(--safe-l));
    padding-right: calc(20px + var(--safe-r));
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: var(--safe-t);
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.site-header.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 6px 24px rgba(26, 32, 48, .07);
}

.site-header .container {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
    color: var(--ink);
    white-space: nowrap;
}

.brand img {
    height: 40px;
    width: auto;
}

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

.main-nav a {
    position: relative;
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: background .2s, color .2s;
}

.main-nav a:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.main-nav a.active {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 6px 16px rgba(249, 115, 22, .32);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    border-radius: 12px;
    position: relative;
    flex: 0 0 auto;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .28s ease, opacity .2s ease, top .28s ease;
}

.nav-toggle span {
    top: 21px;
}

.nav-toggle span::before {
    top: -6px;
}

.nav-toggle span::after {
    top: 6px;
}

.nav-toggle.is-open span {
    background: transparent;
}

.nav-toggle.is-open span::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.is-open span::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile drawer */
.mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--header-h) + var(--safe-t));
    background: #fff;
    border-radius: 0 0 22px 22px;
    box-shadow: var(--shadow-lg);
    padding: 12px calc(16px + var(--safe-r)) calc(18px + var(--safe-b)) calc(16px + var(--safe-l));
    display: grid;
    gap: 6px;
    transform: translateY(-140%);
    transition: transform .32s cubic-bezier(.2, .8, .3, 1);
    z-index: 99;
    max-height: calc(100vh - var(--header-h) - var(--safe-t));
    overflow-y: auto;
}

.mobile-nav.open {
    transform: translateY(0);
}

.mobile-nav a {
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    font-size: 15px;
    background: #f7f9fc;
}

.mobile-nav a:active,
.mobile-nav a.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s;
    z-index: 98;
}

.nav-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 26px;
    border: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 10px 24px rgba(249, 115, 22, .35);
}

.btn-ghost {
    background: rgba(255, 255, 255, .18);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .55);
    backdrop-filter: blur(4px);
}

@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 32px rgba(249, 115, 22, .45);
    }

    .btn-ghost:hover {
        background: #fff;
        color: var(--brand-dark);
        transform: translateY(-2px);
    }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--grad);
    color: #fff;
    padding: clamp(42px, 8vw, 72px) 0 clamp(46px, 8vw, 78px);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(6px);
    opacity: .5;
    pointer-events: none;
}

.hero-orb.orb-1 {
    width: 380px;
    height: 380px;
    right: -140px;
    top: -160px;
    background: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 68%);
}

.hero-orb.orb-2 {
    width: 300px;
    height: 300px;
    left: -120px;
    bottom: -150px;
    background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 68%);
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .4);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2px;
}

.hero-eyebrow .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, .28);
}

.hero h1 {
    margin-top: 18px;
    font-size: clamp(30px, 6vw, 52px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -.5px;
}

.hero p {
    margin-top: 14px;
    max-width: 620px;
    font-size: clamp(14px, 2.4vw, 17px);
    opacity: .96;
}

.hero-actions {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero .tags {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero .tags a {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .4);
    padding: 8px 17px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    transition: background .2s, transform .2s, color .2s;
}

@media (hover: hover) and (pointer: fine) {
    .hero .tags a:hover {
        background: #fff;
        color: var(--brand-dark);
        transform: translateY(-2px);
    }
}

/* =========================================================
   Sections
   ========================================================= */
.section {
    padding: clamp(28px, 5vw, 46px) 0 8px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(16px, 3vw, 24px);
    gap: 12px;
}

.section-head h2 {
    font-size: clamp(20px, 3.4vw, 26px);
    font-weight: 700;
    position: relative;
    padding-left: 16px;
}

.section-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 1.1em;
    border-radius: 4px;
    background: var(--grad);
}

.section-head .more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brand-dark);
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--brand-soft);
    white-space: nowrap;
    transition: background .2s, gap .2s;
}

@media (hover: hover) and (pointer: fine) {
    .section-head .more:hover {
        background: #ffe6d3;
        gap: 8px;
    }
}

/* =========================================================
   Game grid & cards
   ========================================================= */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: clamp(12px, 1.6vw, 20px);
}

.game-card {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s cubic-bezier(.2, .8, .3, 1), box-shadow .3s ease;
    will-change: transform;
}

.game-card:active {
    transform: scale(.97);
}

.game-card .thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(100deg, #eef1f6 30%, #e2e8f0 50%, #eef1f6 70%);
    background-size: 220% 100%;
    animation: shimmer 1.5s linear infinite;
}

.game-card .thumb.is-loaded {
    background: #eef1f6;
    animation: none;
}

.game-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .45s ease, transform .55s cubic-bezier(.2, .8, .3, 1);
}

.game-card .thumb.is-loaded img {
    opacity: 1;
}

.game-card .thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(10, 14, 22, .62));
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 1;
}

.game-card .play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(.5);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease, transform .3s cubic-bezier(.2, .8, .3, 1);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
    z-index: 2;
}

.game-card .play-badge svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
    fill: var(--brand);
}

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

.game-card .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-card .sub {
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.game-card .rate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: var(--brand-dark);
    background: var(--brand-soft);
    padding: 3px 8px;
    border-radius: 999px;
}

.game-card .rate .star {
    width: 12px;
    height: 12px;
    background: url(../imgs/start.svg) no-repeat center / contain;
}

@media (hover: hover) and (pointer: fine) {
    .game-card:hover {
        transform: translateY(-7px);
        box-shadow: var(--shadow-lg);
    }

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

    .game-card:hover .thumb::after {
        opacity: 1;
    }

    .game-card:hover .play-badge {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
    margin-top: clamp(46px, 8vw, 80px);
    background: #161b26;
    color: #c8cedb;
    padding: clamp(34px, 6vw, 56px) 0 calc(26px + var(--safe-b));
    border-top: 3px solid transparent;
    border-image: var(--grad) 1;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.site-footer .brand {
    color: #fff;
}

.site-footer .brand img {
    height: 44px;
}

.site-footer .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
}

.site-footer .links a {
    font-size: 14px;
    color: #c8cedb;
    transition: color .2s;
}

.site-footer .links a:hover {
    color: #fff;
}

.site-footer .copyright {
    font-size: 12.5px;
    color: #8b93a5;
}

/* =========================================================
   Detail page
   ========================================================= */
.page-top {
    background: var(--grad-soft);
    border-bottom: 1px solid var(--line);
    padding: clamp(22px, 4vw, 38px) 0 clamp(28px, 4vw, 40px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--ink-soft);
    font-weight: 600;
    transition: color .2s;
}

.breadcrumb a:hover {
    color: var(--brand-dark);
}

.breadcrumb .sep {
    opacity: .5;
}

.breadcrumb .current {
    color: var(--ink);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 45vw;
}

.game-detail {
    display: flex;
    gap: clamp(20px, 3vw, 32px);
    align-items: flex-start;
}

.game-detail .cover {
    position: relative;
    flex: 0 0 268px;
    width: 268px;
    height: 268px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #eef1f6;
}

.game-detail .cover::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
    pointer-events: none;
}

.game-detail .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-detail .info {
    flex: 1;
    min-width: 0;
}

.game-detail .info h1 {
    font-size: clamp(23px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.3px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
    background: #fff;
    border: 1px solid var(--line);
    padding: 6px 13px;
    border-radius: 999px;
}

.stat .star {
    width: 16px;
    height: 16px;
    background: url(../imgs/start.svg) no-repeat center / contain;
}

.stat b {
    color: var(--brand-dark);
}

.game-detail .desc {
    margin-top: 15px;
    color: var(--ink-soft);
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 15px 44px;
    border: 0;
    border-radius: 999px;
    background: var(--grad);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 12px 26px rgba(249, 115, 22, .38);
    transition: transform .2s, box-shadow .2s;
}

.play-btn:active {
    transform: scale(.98);
}

@media (hover: hover) and (pointer: fine) {
    .play-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 36px rgba(249, 115, 22, .48);
    }
}

.play-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* =========================================================
   Banner (type page)
   ========================================================= */
.page-banner {
    position: relative;
    overflow: hidden;
    background: var(--grad);
    color: #fff;
    padding: clamp(30px, 6vw, 52px) 0;
}

.page-banner::after {
    content: "";
    position: absolute;
    right: -100px;
    top: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .4), transparent 68%);
}

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

.page-banner h1 {
    font-size: clamp(24px, 5vw, 34px);
    font-weight: 700;
}

.page-banner p {
    margin-top: 8px;
    opacity: .94;
    font-size: clamp(14px, 2.4vw, 16px);
}

/* =========================================================
   Policy pages
   ========================================================= */
.policy {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 44px);
    color: var(--ink-soft);
}

.policy h1 {
    font-size: clamp(21px, 4vw, 26px);
    color: var(--ink);
    margin-bottom: 10px;
    line-height: 1.3;
}

.policy h4 {
    font-size: 16.5px;
    color: var(--ink);
    margin-top: 26px;
}

.policy p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.75;
}

.policy ul {
    padding-left: 20px;
    margin-top: 8px;
}

.policy li {
    margin-top: 6px;
    font-size: 14px;
}

.policy a {
    color: var(--brand-dark);
    word-break: break-word;
}

/* =========================================================
   Ads
   ========================================================= */
.ad-slot {
    display: block;
    width: 100%;
    max-width: 970px;
    margin: 22px auto;
    min-height: 90px;
    text-align: center;
    overflow: hidden;
}

.ad-slot ins {
    display: block;
}

/* =========================================================
   Back to top
   ========================================================= */
.back-to-top {
    position: fixed;
    right: calc(18px + var(--safe-r));
    bottom: calc(18px + var(--safe-b));
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 26px rgba(249, 115, 22, .4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
    z-index: 90;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* =========================================================
   Play page
   ========================================================= */
body.play-body {
    height: 100%;
    background: #0b0e14;
}

.play-shell {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #0b0e14;
    height: 100dvh;
}

.play-bar {
    flex: 0 0 auto;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: calc(8px + var(--safe-t)) calc(12px + var(--safe-r)) 8px calc(12px + var(--safe-l));
    background: #141925;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.play-bar .back,
.play-bar .fs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s;
    flex: 0 0 auto;
}

.play-bar .back:active,
.play-bar .fs:active {
    background: rgba(255, 255, 255, .26);
}

.play-bar svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.play-bar .title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.game-frame {
    flex: 1 1 auto;
    position: relative;
    background: #000;
}

.game-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.frame-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #cfd4de;
    background: #0b0e14;
    z-index: 2;
    transition: opacity .4s ease;
    padding: 20px;
    text-align: center;
}

.frame-loading img {
    width: 54px;
    height: 54px;
}

.frame-loading.hide {
    opacity: 0;
    pointer-events: none;
}

/* =========================================================
   Notice
   ========================================================= */
.notice {
    max-width: 520px;
    margin: clamp(40px, 10vw, 80px) auto;
    text-align: center;
    color: var(--muted);
    padding: 0 20px;
}

.notice h1 {
    color: var(--ink);
    margin-bottom: 12px;
}

.notice a {
    color: var(--brand-dark);
    font-weight: 600;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 992px) {
    .game-detail .cover {
        flex-basis: 220px;
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 820px) {
    .main-nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

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

    .game-detail {
        flex-direction: column;
        gap: 18px;
    }

    .game-detail .cover {
        width: 100%;
        height: auto;
        flex: none;
        aspect-ratio: 16 / 10;
        border-radius: var(--radius);
    }

    .game-detail .desc {
        -webkit-line-clamp: 6;
    }

    .play-btn {
        width: 100%;
    }

    .breadcrumb .current {
        max-width: 55vw;
    }
}

@media (max-width: 560px) {
    .container {
        padding-left: calc(14px + var(--safe-l));
        padding-right: calc(14px + var(--safe-r));
    }

    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

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

    .game-card .name {
        font-size: 13px;
    }

    .game-card .rate {
        padding: 2px 7px;
    }

    .play-badge {
        display: none;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1 1 auto;
    }

    .tag-row {
        gap: 8px;
    }
}

@media (max-width: 380px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hero .tags a {
        padding: 7px 13px;
        font-size: 12.5px;
    }
}

/* Fallback for browsers without aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
    .game-card .thumb {
        height: 0;
        padding-bottom: 100%;
    }

    .game-card .thumb img {
        position: absolute;
        inset: 0;
    }
}

/* =========================================================
   Motion preferences
   ========================================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .game-card .thumb {
        animation: none;
        background: #eef1f6;
    }

    .game-card .thumb img {
        opacity: 1;
    }
}
