:root {
    --bg-0: #071525;
    --bg-1: #0f2642;
    --bg-2: #1a3f69;
    --surface: rgba(231, 243, 255, 0.16);
    --surface-strong: rgba(194, 223, 255, 0.28);
    --line: rgba(154, 197, 243, 0.38);
    --text: #f3f8ff;
    --muted: #bfd1e7;
    --accent: #5eb7ff;
    --accent-2: #59d0ff;
    --accent-3: #ffd37a;
    --danger: #ff8f8f;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-xl: 0 24px 44px rgba(3, 11, 24, 0.54);
    --shadow-md: 0 14px 28px rgba(3, 11, 24, 0.4);
    --nav-hover-start: #ffd77d;
    --nav-hover-end: #ff9a50;
    --nav-hover-text: #2c1704;
    --font-display: 'Sora', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at 10% -12%, rgba(94, 183, 255, 0.32) 0%, transparent 42%),
        radial-gradient(circle at 90% 4%, rgba(255, 167, 96, 0.26) 0%, transparent 38%),
        radial-gradient(circle at 70% 106%, rgba(89, 208, 255, 0.22) 0%, transparent 42%),
        linear-gradient(145deg, var(--bg-0) 0%, var(--bg-1) 38%, var(--bg-2) 100%);
    min-height: 100vh;
}

/* Keep the same visual atmosphere across all public pages. */
body.home-page,
body.games-page,
body.play-page {
    background:
        radial-gradient(circle at 10% -12%, rgba(94, 183, 255, 0.32) 0%, transparent 42%),
        radial-gradient(circle at 90% 4%, rgba(255, 167, 96, 0.26) 0%, transparent 38%),
        radial-gradient(circle at 70% 106%, rgba(89, 208, 255, 0.22) 0%, transparent 42%),
        linear-gradient(145deg, var(--bg-0) 0%, var(--bg-1) 38%, var(--bg-2) 100%);
}

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

h1,
h2,
h3,
strong {
    margin: 0;
    color: #fff8f1;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
}

p {
    margin: 0;
    color: var(--muted);
    line-height: 1.72;
}

a,
button {
    color: inherit;
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
    padding: 16px 0 40px;
}

.site-header,
.spotlight-copy,
.spotlight-visual,
.game-card,
.site-footer,
.catalog-seo-copy .game-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(160deg, rgba(231, 243, 255, 0.2), rgba(152, 203, 255, 0.09));
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-xl);
}

.site-header {
    position: sticky;
    top: 12px;
    z-index: 22;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background-color: #204a81;
    background-image: url('../brand-mark.html');
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 12px 20px rgba(0, 0, 0, 0.34);
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-copy strong,
.footer-brand strong {
    font-weight: 800;
    font-size: 1rem;
}

.brand-copy small {
    color: #d4e4f6;
    font-size: 0.78rem;
}

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

.site-nav a,
.header-link,
.text-link,
.section-link,
.footer-links a {
    text-decoration: none;
}

.site-nav a {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(179, 208, 240, 0.28);
    background: rgba(228, 241, 255, 0.1);
    display: inline-flex;
    align-items: center;
    color: #e8f3ff;
    transition: transform .17s ease, background .17s ease, color .17s ease, border-color .17s ease, box-shadow .2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--nav-hover-text);
    border-color: #ffbb66;
    background: linear-gradient(180deg, var(--nav-hover-start), var(--nav-hover-end));
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(57, 30, 5, 0.4);
}

.header-link {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(179, 208, 240, 0.32);
    display: inline-flex;
    align-items: center;
    background: rgba(228, 241, 255, 0.13);
    color: #e8f3ff;
    font-weight: 700;
    transition: transform .17s ease, box-shadow .2s ease, background .2s ease;
}

.header-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 185, 108, 0.22);
    border-color: #ffbb66;
    box-shadow: 0 10px 22px rgba(57, 30, 5, 0.4);
}

.header-link.is-active {
    color: var(--nav-hover-text);
    border-color: #ffbb66;
    background: linear-gradient(180deg, var(--nav-hover-start), var(--nav-hover-end));
    box-shadow: 0 10px 22px rgba(57, 30, 5, 0.4);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #d8ebff;
}

.home-spotlight,
.catalog-hero,
.content-section,
.category-strip {
    padding-top: 18px;
}

.home-spotlight {
    display: grid;
    gap: 12px;
}

.spotlight-centerline {
    position: relative;
    display: grid;
    justify-items: center;
}

.spotlight-centerline::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(164, 240, 196, 0.92), transparent);
}

.spotlight-copy {
    width: min(100%, 1080px);
    padding: 10px 28px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.catalog-hero {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-xl);
}

.catalog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 84% 8%, rgba(255, 176, 100, 0.2), transparent 42%),
        radial-gradient(circle at 14% -4%, rgba(116, 198, 255, 0.22), transparent 44%);
}

.catalog-hero > * {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #beedd3;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
}

.eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent-3);
}

.spotlight-copy h1,
.catalog-hero h1 {
    margin-top: 0;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.05;
    max-width: 30ch;
}

.spotlight-copy h1 {
    margin-inline: auto;
}

.catalog-text {
    margin-top: 6px;
    max-width: 86ch;
    margin-inline: auto;
    line-height: 1.5;
    font-size: 0.95rem;
}

.main-game-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spotlight-actions {
    justify-content: center;
}

.spotlight-note {
    margin-top: 8px;
    font-size: 0.9rem;
}

.spotlight-visual {
    position: relative;
    padding: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.spotlight-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(198, 243, 220, 0.54);
    background: rgba(7, 38, 28, 0.82);
    color: #eafff3;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 22px rgba(1, 18, 12, 0.46);
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.spotlight-nav-prev {
    left: 20px;
}

.spotlight-nav-next {
    right: 20px;
}

.spotlight-nav svg {
    width: 20px;
    height: 20px;
}

.spotlight-nav svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.spotlight-visual:hover .spotlight-nav,
.spotlight-visual:focus-within .spotlight-nav {
    opacity: 1;
    pointer-events: auto;
}

.spotlight-nav:hover,
.spotlight-nav:focus-visible {
    transform: translateY(-50%) scale(1.04);
    color: #2b1705;
    border-color: #ffbe6d;
    background: linear-gradient(180deg, #ffd981, #ff9f59);
}

.spotlight-nav:disabled {
    opacity: 0 !important;
    pointer-events: none !important;
}

.spotlight-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 175, 99, 0.22), transparent 44%),
        radial-gradient(circle at 8% 2%, rgba(108, 191, 255, 0.24), transparent 42%);
    pointer-events: none;
}

.spotlight-viewport {
    overflow: hidden;
    position: relative;
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(186, 239, 214, 0.3);
    background: rgba(7, 34, 25, 0.44);
    z-index: 2;
}

.spotlight-track {
    display: flex;
    gap: 12px;
    width: max-content;
    padding: 10px;
    will-change: transform;
}

.spotlight-track.is-marquee-running {
    animation-duration: var(--spotlight-marquee-duration, 60s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.spotlight-track.is-marquee-running.is-marquee-right {
    animation-name: spotlight-marquee-right;
}

@keyframes spotlight-marquee-right {
    from { transform: translateX(-50%); }
    to { transform: translateX(0%); }
}

.spotlight-visual.is-paused .spotlight-track.is-marquee-running,
.spotlight-visual:hover .spotlight-track.is-marquee-running,
.spotlight-visual:focus-within .spotlight-track.is-marquee-running {
    animation-play-state: paused;
}

.spotlight-card {
    flex: 0 0 clamp(160px, 16vw, 220px);
    border-radius: 14px;
    border: 1px solid rgba(176, 235, 207, 0.38);
    padding: 6px;
    background: rgba(10, 42, 31, 0.56);
    transition: transform 180ms ease, border-color 180ms ease;
}

.spotlight-card:hover {
    transform: translateY(-2px);
    border-color: rgba(168, 245, 137, 0.85);
}

.spotlight-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 9px;
    background: #103528;
}

.spotlight-empty {
    min-height: 110px;
    display: grid;
    place-items: center;
    color: #c9e8d9;
    padding: 12px 16px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.button,
.filter-chip {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(199, 220, 255, 0.32);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform .17s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.button-primary,
.filter-chip.is-selected {
    color: #2c1704;
    border-color: #ffbf74;
    background: linear-gradient(180deg, #ffd982, #ff9b53);
    font-weight: 700;
}

.button-secondary,
.filter-chip {
    background: rgba(228, 241, 255, 0.12);
    color: #e8f3ff;
}

.button:hover,
.filter-chip:hover {
    transform: translateY(-2px);
    border-color: #7cc7ff;
    box-shadow: 0 10px 20px rgba(4, 31, 68, 0.36);
}

.button-primary:hover,
.filter-chip.is-selected:hover {
    background: linear-gradient(180deg, #ffe4a6, #ffab67);
    color: #271201;
}

.button-secondary:hover,
.filter-chip:hover:not(.is-selected) {
    background: rgba(120, 193, 255, 0.2);
    color: #f3f9ff;
}

.catalog-controls {
    display: grid;
    gap: 12px;
    justify-items: center;
}

.catalog-search {
    width: min(100%, 760px);
}

.catalog-search-label {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 0.83rem;
    color: #bfd7f1;
    font-weight: 700;
}

.catalog-search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.catalog-search input[type="search"] {
    flex: 1;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(199, 220, 255, 0.35);
    background: rgba(2, 15, 29, 0.62);
    color: #e5f4ff;
    padding: 0 16px;
}

.catalog-sort {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: #bfd7f1;
    font-size: 0.9rem;
    font-weight: 700;
}

.catalog-sort select {
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(199, 220, 255, 0.34);
    background: rgba(2, 15, 29, 0.62);
    color: #e5f4ff;
    padding: 0 14px;
}

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

.section-head h2 {
    margin-top: 8px;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-link,
.text-link {
    color: #93efbf;
    font-weight: 700;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.game-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.game-art {
    padding: 11px;
}

.game-art-link {
    position: relative;
    display: block;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(23, 74, 53, 0.9), rgba(10, 34, 25, 0.92));
}

.game-art img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 15px;
    background: #103528;
    transition: transform 220ms ease;
}

.game-art-link:hover img {
    transform: scale(1.04);
}

.spotlight-card.has-lowres-thumb img,
.game-art-link.has-lowres-thumb img {
    object-fit: contain;
    padding: 8px;
    background: radial-gradient(circle at 30% 20%, rgba(161, 235, 195, 0.26), rgba(8, 31, 22, 0.92));
}

.game-art-link.has-lowres-thumb:hover img {
    transform: none;
}

.game-art-cta {
    position: absolute;
    right: 10px;
    bottom: 10px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(4, 25, 44, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #e6f4ff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.game-copy {
    display: grid;
    gap: 10px;
    padding: 0 16px 16px;
}

.card-topline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.card-topline strong {
    font-size: 1.1rem;
}

.card-topline span {
    font-size: 0.78rem;
    color: #d6ebff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    min-height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
}

.game-genre {
    color: #99edf8;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.game-genre a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}

.game-genre a:hover,
.game-genre a:focus-visible {
    color: #c8fbff;
    border-bottom-color: currentColor;
}

.game-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.game-stats span {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(199, 220, 255, 0.28);
    background: rgba(2, 18, 34, 0.56);
    color: #c7dcf4;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
}

.catalog-pagination {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pagination-chip {
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(199, 220, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #d8ecff;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-chip.is-active {
    color: #08253f;
    background: linear-gradient(180deg, #ffd97d, #ffba52);
    border-color: #ffd97d;
}

.pagination-chip.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pagination-ellipsis {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    color: #b8d0eb;
    font-weight: 700;
}

.site-footer {
    margin-top: 26px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.footer-brand p {
    font-size: 0.92rem;
}

.footer-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-links a {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(199, 220, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: #c7ddf6;
    display: inline-flex;
    align-items: center;
}

.footer-note {
    color: #b7d0ea;
    white-space: nowrap;
    font-size: 0.88rem;
}

.playable-hero {
    padding-top: 20px;
}

.compact-head {
    justify-items: center;
    text-align: center;
    display: grid;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto;
}

.tighter-head h1 {
    max-width: 14ch;
}

.main-player-wrap {
    position: relative;
    width: min(100%, 960px);
    margin: 0 auto;
    aspect-ratio: var(--game-ratio, 16 / 10);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #051323;
    box-shadow: var(--shadow-xl);
}

.main-player-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #051323;
}

.minimal-player-card {
    justify-items: center;
    padding: 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.minimal-player-card.is-portrait .main-player-wrap {
    width: min(100%, 360px);
    max-height: min(64vh, 560px);
}

.minimal-player-card.is-landscape .main-player-wrap {
    width: min(100%, 920px);
    max-height: min(66vh, 620px);
}

@media (max-width: 1080px) {
    .home-spotlight {
        grid-template-columns: 1fr;
    }

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

    .site-footer {
        display: grid;
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100%, calc(100% - 14px));
    }

    .site-header {
        padding: 10px;
    }

    .header-link {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        border-radius: 18px;
        border: 1px solid var(--line);
        background: rgba(6, 21, 38, 0.94);
        box-shadow: var(--shadow-xl);
    }

    body.nav-open .site-nav {
        display: flex;
    }

    .site-nav a {
        width: 100%;
        justify-content: center;
    }

    .spotlight-visual {
        padding: 12px;
    }

    .spotlight-nav {
        display: none;
    }

    .spotlight-copy {
        padding: 10px 12px;
    }

    .catalog-search-row {
        flex-wrap: wrap;
    }

    .catalog-search input[type="search"],
    .catalog-search .button {
        width: 100%;
    }

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

    .section-head,
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .spotlight-card {
        flex-basis: min(82vw, 260px);
    }

    .spotlight-copy,
    .game-copy,
    .site-footer,
    .catalog-seo-copy .game-card {
        padding: 14px;
    }

    .game-art {
        padding: 9px;
    }
}
