/* ==========================================================================
   Gamoodle: public site styles
   Dark theme · mobile first · no framework, no web fonts (fast LCP)
   ========================================================================== */

:root {
    --bg: #0d0f17;
    --bg-raised: #11141f;
    --surface: #171b29;
    --surface-2: #1e2335;
    --surface-3: #262c42;
    --line: #252a3d;
    --line-strong: #343b55;
    --text: #e8ebf4;
    --text-dim: #b4bbcf;
    --muted: #8a92ab;
    --accent: #3ee6b0;
    --accent-strong: #2fd39f;
    --accent-ink: #04170f;
    --accent-2: #7b6cff;
    --like: #3ee6b0;
    --dislike: #ff5c7a;
    --warning: #ffc857;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --topbar-h: 60px;
    --sidebar-w: 232px;
    --sidebar-rail: 72px;
    --gutter: 16px;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
    --ring: 0 0 0 3px rgba(62, 230, 176, .45);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    color-scheme: dark;
}

@media (min-width: 900px) {
    :root { --gutter: 24px; }
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--topbar-h) + 12px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 15px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
::selection { background: rgba(62, 230, 176, .35); }

.icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: fixed; left: 12px; top: -60px; z-index: 2000;
    background: var(--accent); color: var(--accent-ink);
    padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 18px;
    border: 1px solid transparent; border-radius: 999px;
    font-weight: 700; font-size: 15px; line-height: 1;
    transition: background .15s, transform .15s var(--ease), box-shadow .15s, border-color .15s;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #63f0c2; color: var(--accent-ink); box-shadow: 0 8px 24px -8px rgba(62, 230, 176, .6); }
.btn--ghost { background: var(--surface-2); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn--xl { min-height: 56px; padding: 0 30px; font-size: 18px; }
.btn--xl .icon { width: 22px; height: 22px; }
.btn--block { width: 100%; }

.icon-btn {
    position: relative;
    display: inline-grid; place-items: center;
    width: 42px; height: 42px;
    background: transparent; border: 0; border-radius: 999px;
    color: var(--text-dim);
    transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn[aria-pressed="true"] { color: var(--dislike); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm .icon { width: 18px; height: 18px; }

.badge-dot {
    position: absolute; top: 7px; right: 7px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--accent); color: var(--accent-ink);
    font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}

.link-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 0; padding: 0;
    color: var(--muted); font-size: 13px;
}
.link-btn:hover { color: var(--text); }
.link-btn .icon { width: 16px; height: 16px; }

.chip {
    display: inline-flex; align-items: center;
    padding: 6px 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line);
    color: var(--text-dim); font-size: 13px; font-weight: 600;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- Top bar */
.topbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: 8px;
    height: var(--topbar-h);
    padding: 0 12px;
    background: rgba(13, 15, 23, .92);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand:hover { color: var(--text); }
.brand__mark { width: 34px; height: 34px; }
.brand__name {
    font-size: 21px; font-weight: 800; letter-spacing: -.02em;
    background: linear-gradient(90deg, #fff 0%, #d9fff2 55%, #c9c3ff 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.topbar__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.topbar__search-toggle { display: inline-grid; }

/* ---------------------------------------------------------------- Search */
.search {
    position: relative;
    display: none;
    align-items: center;
    flex: 1 1 auto;
    max-width: 600px;
    margin: 0 auto;
}
.search.is-open {
    display: flex;
    position: absolute; inset: 0;
    max-width: none; padding: 9px 12px;
    background: var(--bg);
    z-index: 5;
}
.search__icon { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search.is-open .search__icon { left: 28px; }
.search__input {
    width: 100%; height: 42px;
    padding: 0 44px 0 44px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 999px; outline: none;
    font-size: 15px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.search__input::placeholder { color: var(--muted); }
.search__input:focus { border-color: var(--accent); background: var(--surface-2); box-shadow: var(--ring); }
.search__input::-webkit-search-cancel-button { filter: invert(.6); }
.search__kbd {
    position: absolute; right: 14px;
    padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 6px;
    color: var(--muted); font: 600 12px var(--font);
}
.search__input:focus ~ .search__kbd { display: none; }
.search--page { display: flex; max-width: 640px; margin: 0 0 28px; }

.search__results {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    padding: 6px;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: min(70vh, 520px); overflow-y: auto;
}
.search.is-open .search__results { left: 12px; right: 12px; }
.suggestion {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 8px; border-radius: var(--radius-sm);
}
.suggestion img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.suggestion__title { font-weight: 650; }
.suggestion__meta { display: block; color: var(--muted); font-size: 12px; }
.suggestion:hover, .suggestion.is-active { background: var(--surface-3); color: var(--text); }
.suggestion--all { justify-content: center; color: var(--accent); font-weight: 700; padding: 10px; }
.search__empty { padding: 14px; color: var(--muted); text-align: center; }

@media (min-width: 720px) {
    .search { display: flex; }
    .topbar__search-toggle { display: none; }
}

/* ---------------------------------------------------------------- Shell & sidebar */
.shell { display: block; }

.sidebar {
    position: fixed; z-index: 150;
    top: var(--topbar-h); bottom: 0; left: 0;
    width: 272px;
    padding: 12px 10px 24px;
    background: var(--bg-raised);
    border-right: 1px solid var(--line);
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform .25s var(--ease), width .2s var(--ease);
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
}
.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow); }
.sidebar-backdrop {
    position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 140;
    background: rgba(0, 0, 0, .55);
}

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-heading {
    margin: 18px 12px 6px;
    color: var(--muted); font-size: 11px; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase;
}
.nav-link {
    display: flex; align-items: center; gap: 14px;
    min-height: 42px; padding: 0 12px;
    border-radius: 10px;
    color: var(--text-dim); font-weight: 600; font-size: 14.5px;
    transition: background .15s, color .15s;
}
.nav-link .icon { width: 21px; height: 21px; color: var(--muted); transition: color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link:hover .icon { color: var(--accent); }
.nav-link.is-active { background: linear-gradient(90deg, rgba(62, 230, 176, .16), rgba(62, 230, 176, .04)); color: #fff; }
.nav-link.is-active .icon { color: var(--accent); }
.nav-link__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link__count { color: var(--muted); font-size: 12px; font-weight: 600; }

.content {
    min-width: 0;
    padding: 20px var(--gutter) 0;
    outline: none;
}

@media (min-width: 900px) {
    .topbar__menu { margin-left: 4px; }
    .sidebar { transform: none; width: var(--sidebar-w); box-shadow: none !important; }
    .sidebar-backdrop { display: none !important; }
    .content { margin-left: var(--sidebar-w); padding-top: 24px; }

    /* Collapsed (icon rail), toggled with the menu button and remembered. */
    .sidebar-collapsed .sidebar { width: var(--sidebar-rail); padding-inline: 10px; }
    .sidebar-collapsed .content { margin-left: var(--sidebar-rail); }
    .sidebar-collapsed .nav-link { justify-content: center; padding: 0; }
    .sidebar-collapsed .nav-link__label,
    .sidebar-collapsed .nav-link__count { display: none; }
    .sidebar-collapsed .nav-heading { visibility: hidden; height: 1px; margin: 12px 0; border-top: 1px solid var(--line); }
}

@media (min-width: 900px) and (max-width: 1099px) {
    /* Medium screens start collapsed unless the visitor expanded the menu. */
    html:not(.sidebar-expanded) .sidebar { width: var(--sidebar-rail); padding-inline: 10px; }
    html:not(.sidebar-expanded) .content { margin-left: var(--sidebar-rail); }
    html:not(.sidebar-expanded) .nav-link { justify-content: center; padding: 0; }
    html:not(.sidebar-expanded) .nav-link__label,
    html:not(.sidebar-expanded) .nav-link__count { display: none; }
    html:not(.sidebar-expanded) .nav-heading { visibility: hidden; height: 1px; margin: 12px 0; border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- Cards */
.card { min-width: 0; }
.card__link { display: block; border-radius: var(--radius); }
.card__link:hover { color: var(--text); }
.card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface) linear-gradient(110deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
    background-size: 200% 100%;
    transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s var(--ease), filter .2s;
}
.card__link:hover .card__media,
.card__link:focus-visible .card__media {
    transform: translateY(-3px);
    box-shadow: 0 0 0 2px var(--accent), 0 14px 30px -10px rgba(62, 230, 176, .4);
}
.card__link:hover .card__media img { transform: scale(1.07); }
.card__link:focus-visible { box-shadow: none; }

.card__play {
    position: absolute; left: 50%; top: 50%;
    display: grid; place-items: center;
    width: 52px; height: 52px; margin: -26px 0 0 -26px;
    border-radius: 999px;
    background: var(--accent); color: var(--accent-ink);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
    opacity: 0; transform: scale(.7);
    transition: opacity .2s, transform .2s var(--ease);
}
.card__play .icon { width: 22px; height: 22px; margin-left: 3px; }
.card__link:hover .card__play { opacity: 1; transform: none; }

.card__badge {
    position: absolute; left: 8px; top: 8px;
    padding: 3px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.card__badge--new { background: var(--accent-2); color: #fff; }
.card__badge--top { background: var(--warning); color: #241a00; }

.card__body { padding: 8px 2px 2px; }
.card__title {
    font-size: 14px; font-weight: 650; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card__meta {
    display: flex; align-items: center; gap: 8px;
    margin: 2px 0 0;
    color: var(--muted); font-size: 12.5px;
    overflow: hidden; white-space: nowrap;
}
.card__category { overflow: hidden; text-overflow: ellipsis; }
.card__rating { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--text-dim); font-weight: 600; }
.card__rating .icon { width: 13px; height: 13px; color: var(--like); }

/* ---------------------------------------------------------------- Hero */
.hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.hero .card:first-child { grid-column: span 2; }
.hero .card__media { aspect-ratio: 16 / 10; }
.hero .card__body {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 28px 12px 10px;
    background: linear-gradient(transparent, rgba(5, 7, 12, .92));
    border-radius: 0 0 var(--radius) var(--radius);
    pointer-events: none;
}
.hero .card__link { position: relative; }
.hero .card__title { font-size: 15px; }
.hero .card__meta { color: var(--text-dim); }
.hero .card--lg .card__title { font-size: clamp(18px, 2.4vw, 28px); font-weight: 800; white-space: normal; }
.hero .card--lg .card__body { padding: 60px 18px 16px; }
.hero .card--lg .card__play { width: 68px; height: 68px; margin: -34px 0 0 -34px; }

@media (min-width: 900px) {
    .hero {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: repeat(2, auto);
        gap: 16px;
    }
    .hero .card:first-child { grid-column: 1; grid-row: span 2; }
    .hero .card--lg .card__media { aspect-ratio: auto; height: 100%; min-height: 100%; }
    .hero .card--lg .card__link { height: 100%; }
    .hero .card:only-child { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- Rows */
.row { margin: 0 0 30px; }
.row__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.row__title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.row__title .icon { color: var(--accent); width: 22px; height: 22px; }
.row__actions { display: flex; align-items: center; gap: 4px; }
.row__actions .icon-btn { display: none; }
.row__more { margin-right: 6px; color: var(--accent); font-size: 14px; font-weight: 700; }
.row__more:hover { color: #7ff3cd; }
@media (hover: hover) and (min-width: 900px) {
    .row__actions .icon-btn { display: inline-grid; }
}

.row__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 44%);
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    padding: 4px 2px 10px;
    margin: -4px -2px 0;
    scrollbar-width: none;
}
.row__track::-webkit-scrollbar { display: none; }
.row__track > .card { scroll-snap-align: start; }
@media (min-width: 640px) { .row__track { grid-auto-columns: minmax(170px, 30%); gap: 14px; } }
@media (min-width: 900px) { .row__track { grid-auto-columns: calc((100% - 5 * 16px) / 6); gap: 16px; } }
@media (min-width: 1600px) { .row__track { grid-auto-columns: calc((100% - 7 * 16px) / 8); } }

/* ---------------------------------------------------------------- Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px 12px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px 16px; } }
.grid > .ad { grid-column: 1 / -1; }

.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-grid .card__meta { display: none; }
.mini-grid .card__title { font-size: 13px; }

/* ---------------------------------------------------------------- Page headers */
.page-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 20px;
}
.page-head__title { display: flex; align-items: center; gap: 14px; }
.page-head__title h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.page-head__title p { margin: 2px 0 0; }
.page-head__icon {
    display: grid; place-items: center;
    width: 48px; height: 48px; flex: none;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(62, 230, 176, .2), rgba(123, 108, 255, .2));
    color: var(--accent);
}
.page-head__icon .icon { width: 24px; height: 24px; }
.page-intro { max-width: 820px; margin: -6px 0 24px; color: var(--text-dim); }
.section-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; font-size: 19px; font-weight: 800; }
.section-title .icon { color: var(--accent); }

.tabs {
    display: flex; gap: 4px;
    padding: 4px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
    overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab {
    padding: 7px 14px; border-radius: 999px;
    color: var(--text-dim); font-size: 14px; font-weight: 650; white-space: nowrap;
}
.tabs__tab:hover { color: var(--text); background: var(--surface-2); }
.tabs__tab.is-active { background: var(--accent); color: var(--accent-ink); }

.breadcrumbs { margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] { color: var(--text-dim); }

/* ---------------------------------------------------------------- Pagination */
.pager { margin: 32px 0 8px; }
.pager__more { margin-bottom: 16px; }
.js .pager__more { display: flex !important; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.js .pager__more:not([hidden]) + .pagination { opacity: .7; }
.pagination__link, .pagination__gap {
    display: inline-grid; place-items: center;
    min-width: 40px; height: 40px; padding: 0 10px;
    border-radius: 10px;
    background: var(--surface); border: 1px solid var(--line);
    font-weight: 700; font-size: 14px;
}
.pagination__gap { background: none; border: 0; color: var(--muted); }
.pagination__link:hover { border-color: var(--accent); color: var(--accent); }
.pagination__link.is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pagination__link .icon { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- Game page */
.game-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1280px) {
    .game-layout { grid-template-columns: minmax(0, 1fr) 300px; }
    .game-layout.is-theater { grid-template-columns: minmax(0, 1fr); }
    .game-layout.is-theater .game-side { display: none; }
}
.game-main { min-width: 0; }

.player { margin-bottom: 14px; }
.player__stage {
    position: relative;
    width: min(100%, calc((100vh - var(--topbar-h) - 150px) * var(--ratio, 1.333)));
    min-width: min(100%, 300px);
    aspect-ratio: var(--ratio, 1.333);
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
.is-theater .player__stage { width: min(100%, calc((100vh - var(--topbar-h) - 90px) * var(--ratio, 1.333))); }
/* Exact size set in the admin: width × height pixels, scaled down only when the column is narrower. */
.player--fixed .player__stage,
.is-theater .player--fixed .player__stage { width: min(100%, var(--player-width, 800px)); min-width: 0; }
.player__stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

.player__cover { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.player__backdrop {
    position: absolute; inset: -40px;
    width: calc(100% + 80px); height: calc(100% + 80px); max-width: none;
    object-fit: cover;
    filter: blur(28px) brightness(.42) saturate(1.3);
}
.player__intro {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 20px; text-align: center;
}
.player__thumb {
    width: clamp(120px, 28vw, 240px);
    aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px rgba(0, 0, 0, .6);
}
.player__name { margin: 0; font-size: clamp(18px, 2.4vw, 26px); font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.player__play { animation: pulse 2.4s var(--ease) infinite; }
.player__hint { margin: 0; color: var(--text-dim); font-size: 13px; }
.player__hint--desktop { display: none; }
@media (pointer: coarse) { .player__hint--desktop { display: block; } }
.player__exit {
    position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; z-index: 3;
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border: 0; border-radius: 999px;
    background: rgba(0, 0, 0, .6); color: #fff;
}
.player.is-loading .player__cover::after {
    content: ""; position: absolute; width: 46px; height: 46px;
    border: 4px solid rgba(255, 255, 255, .2); border-top-color: var(--accent); border-radius: 50%;
    animation: spin .8s linear infinite;
}
.player.is-loading .player__intro { visibility: hidden; }

/* Fallback full screen (iPhone has no Fullscreen API for iframes) */
.player.is-pseudo-fullscreen .player__stage {
    position: fixed; inset: 0; z-index: 3000;
    width: 100%; height: 100%; min-width: 0;
    aspect-ratio: auto; border-radius: 0;
}
.pseudo-fullscreen-lock { overflow: hidden; }
.player__stage:fullscreen { width: 100%; height: 100%; border-radius: 0; aspect-ratio: auto; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(62, 230, 176, .5); }
    50% { box-shadow: 0 0 0 14px rgba(62, 230, 176, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.game-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.game-bar__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.game-bar__title img { width: 48px; height: 36px; object-fit: cover; border-radius: 8px; flex: none; }
.game-bar__title h1 { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.game-bar__category { color: var(--muted); font-size: 13px; font-weight: 600; }
.game-bar__actions { display: flex; align-items: center; gap: 4px; }

.vote { display: inline-flex; margin-right: 6px; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.vote__btn {
    display: inline-flex; align-items: center; gap: 7px;
    height: 36px; padding: 0 14px;
    background: transparent; border: 0; border-radius: 999px;
    color: var(--text-dim); font-weight: 700; font-size: 14px;
    transition: background .15s, color .15s, transform .15s var(--ease);
}
.vote__btn:hover { background: var(--surface-3); color: var(--text); }
.vote__btn:active { transform: scale(.94); }
.vote__btn--up[aria-pressed="true"] { background: rgba(62, 230, 176, .16); color: var(--like); }
.vote__btn--down[aria-pressed="true"] { background: rgba(255, 92, 122, .16); color: var(--dislike); }
.vote__btn[aria-pressed="true"] .icon { fill: currentColor; fill-opacity: .25; }
.vote__btn.is-bump { animation: bump .35s var(--ease); }
@keyframes bump { 50% { transform: scale(1.18); } }

.game-info {
    margin-top: 18px; padding: 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.game-info__stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; }
.stat__value { font-size: 22px; font-weight: 800; }
.stat__label { color: var(--muted); font-size: 13px; }

.prose { color: var(--text-dim); max-width: 78ch; }
.prose h1 { color: var(--text); font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 18px; }
.prose h2 { color: var(--text); font-size: 18px; font-weight: 800; margin: 22px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }
.prose code { padding: 1px 6px; background: var(--surface-2); border-radius: 6px; font-size: .92em; }
.prose--page { padding: 8px 0 24px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0; }

.details {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
    margin: 18px 0; padding: 14px; background: var(--bg-raised); border-radius: var(--radius-sm);
}
.details dt { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.details dd { margin: 2px 0 0; font-weight: 600; }
.details a:hover { color: var(--accent); }

.game-side { min-width: 0; }
.game-side__title { margin-bottom: 12px; font-size: 16px; font-weight: 800; }
@media (max-width: 1279px) {
    .game-side .mini-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.hide-mobile { display: none; }
@media (min-width: 1280px) { .hide-mobile { display: inline-grid; } }

/* ---------------------------------------------------------------- Ads */
.ad { position: relative; margin: 18px 0; min-height: 110px; text-align: center; }
.ad--game_sidebar { min-height: 600px; margin-top: 20px; }
.ad--in_grid { min-height: 120px; margin: 0; }
.ad__label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------------------------------------------------------------- Misc blocks */
.empty-state {
    display: grid; justify-items: center; gap: 10px;
    padding: 64px 20px; text-align: center;
    background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
}
.empty-state h2 { font-size: 22px; }
.empty-state p { max-width: 520px; color: var(--muted); }
.empty-state a { color: var(--accent); }
.empty-state__mark { width: 64px; height: 64px; }
.empty-state--compact { padding: 32px 20px; margin-bottom: 28px; }

.notice { padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-strong); }
.notice--warning { border-color: rgba(255, 200, 87, .5); background: rgba(255, 200, 87, .08); }

.seo-text {
    max-width: 900px; margin: 40px 0 10px; padding: 24px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text-dim);
}
.seo-text h2 { color: var(--text); font-size: 18px; margin-bottom: 10px; }
.seo-text a { color: var(--accent); }
.seo-text p:last-child { margin-bottom: 0; }

.error-page { padding: 48px 0 32px; text-align: center; }
.error-page__code {
    margin: 0; font-size: clamp(72px, 14vw, 140px); font-weight: 900; line-height: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page h1 { margin: 8px 0 10px; font-size: 26px; }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.error-page__debug { max-width: 900px; margin: 16px auto; padding: 14px; overflow: auto; text-align: left; background: #000; border-radius: 8px; color: #ff9fb1; font-size: 13px; white-space: pre-wrap; }

/* ---------------------------------------------------------------- Modal & toast */
.modal {
    width: min(480px, calc(100% - 32px));
    padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
    background: var(--surface); color: var(--text);
    box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(2px); }
.modal__body { display: grid; gap: 14px; padding: 22px; }
.modal__body h2 { font-size: 20px; }
.modal__body p { margin: 0; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; }
.radio-list { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.radio-list label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); cursor: pointer; }
.radio-list input { accent-color: var(--accent); }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.field textarea { padding: 10px 12px; background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); resize: vertical; }
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

.toast {
    position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 4000;
    padding: 12px 18px;
    background: #f4f6fb; color: #0d0f17;
    border-radius: 999px; font-weight: 700; font-size: 14px;
    box-shadow: var(--shadow);
    transform: translateX(-50%);
    animation: toast-in .25s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------------------------------------------------------------- Footer */
.footer {
    margin: 48px calc(-1 * var(--gutter)) 0;
    padding: 36px var(--gutter) 28px;
    border-top: 1px solid var(--line);
    background: var(--bg-raised);
    color: var(--muted); font-size: 14px;
}
.footer__grid { display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer__brand { grid-column: 1 / -1; max-width: 360px; }
.footer__brand p { margin-top: 12px; }
.footer__title { margin: 0 0 10px; color: var(--text); font-weight: 800; font-size: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: var(--accent); }
.footer__legal { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
@media (min-width: 900px) {
    .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
    .footer__brand { grid-column: auto; }
}

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