:root {
    color-scheme: light;
    --ink: #17202a;
    --muted: #5c6975;
    --panel: #ffffff;
    --panel-soft: #e4fff6;
    --line: rgba(22, 32, 42, 0.14);
    --mint: #88f4d8;
    --teal: #21bea6;
    --aqua: #bdf8ec;
    --blue: #2788d9;
    --yellow: #ffb429;
    --pink: #ec3f79;
    --shadow: 0 16px 38px rgba(8, 55, 64, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0) 0 34%, rgba(0, 0, 0, 0.06) 34% 35%, transparent 35%),
        linear-gradient(30deg, rgba(255, 255, 255, 0.22) 0 18%, transparent 18% 100%),
        linear-gradient(120deg, #8df5dc 0%, #c9fff3 48%, #70e2cb 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.arcade-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 58px;
    padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 900;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-mark,
.game-icon {
    display: inline-grid;
    place-items: center;
    border: 2px solid #12202b;
    background: linear-gradient(135deg, var(--yellow), var(--teal));
    color: #12202b;
    font-weight: 1000;
}

.brand-mark {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
}

.site-nav,
.site-footer nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(0.7rem, 2vw, 1.25rem);
}

.site-nav a,
.site-footer a {
    color: #384653;
    font-weight: 800;
    text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
    color: #0d6f6b;
}

.arcade-stage {
    display: grid;
    grid-template-columns: 118px minmax(520px, 1fr) 310px;
    gap: 1.5rem;
    width: min(1760px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
    align-items: start;
}

.rail {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.left-rail {
    position: sticky;
    top: 76px;
}

.mini-logo {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: var(--panel);
    color: #123147;
    font-size: 2.1rem;
    font-weight: 1000;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.mini-logo img {
    display: block;
    width: 76%;
    height: auto;
}

.rail-list,
.side-grid,
.bottom-row,
.games-grid {
    display: grid;
    gap: 0.85rem;
}

.play-column {
    min-width: 0;
    --main-game-width: min(100%, calc((100vh - 175px) * 16 / 10));
}

@supports (height: 100dvh) {
    .play-column {
        --main-game-width: min(100%, calc((100dvh - 175px) * 16 / 10));
    }
}

.game-window {
    position: relative;
    width: var(--main-game-width);
    margin-inline: auto;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111a20;
    box-shadow: var(--shadow);
}

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

.game-splash {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 1.25rem;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(9, 22, 31, 0.5), rgba(9, 22, 31, 0.72)),
        url("../assets/images/preload/back.jpg") center / cover;
    color: #fff;
}

.game-window.is-loaded .game-splash {
    display: none;
}

.game-logo {
    width: min(330px, 58vw);
    height: auto;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
}

h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.12;
}

h3 {
    margin: 0;
    line-height: 1.25;
}

.game-splash p {
    max-width: 540px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.button,
.modal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 2px solid #12202b;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    background: var(--yellow);
    color: #12202b;
}

.button-primary:hover {
    background: #ffc95f;
}

.direct-link {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.92rem;
    font-weight: 800;
}

.game-info-bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    width: var(--main-game-width);
    margin-inline: auto;
    padding: 1rem;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.game-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.game-identity strong,
.game-identity span {
    display: block;
}

.game-identity strong {
    font-size: 1.2rem;
}

.game-identity span,
.reaction-stats {
    color: var(--muted);
    font-size: 0.92rem;
}

.reaction-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.below-strip,
.discover-panel,
.seo-content,
.faq-section {
    margin: 1.25rem auto 0;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
}

.strip-heading,
.section-heading {
    margin-bottom: 1rem;
}

.strip-heading h2,
.section-heading h2 {
    font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.strip-heading p,
.section-heading p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.bottom-row {
    grid-auto-flow: column;
    grid-auto-columns: minmax(118px, 150px);
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.right-rail {
    gap: 1rem;
}

.top-feature {
    display: grid;
}

.top-feature .arcade-card {
    height: 100%;
}

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

.arcade-card {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--panel);
    color: var(--ink);
    text-align: left;
    box-shadow: 0 8px 24px rgba(8, 55, 64, 0.14);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.arcade-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(8, 55, 64, 0.2);
}

.arcade-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #d6e5e7;
}

.arcade-card span,
.arcade-card strong {
    display: block;
    margin-left: 0.6rem;
    margin-right: 0.6rem;
}

.arcade-card span {
    margin-top: 0.55rem;
    color: #0f7770;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.arcade-card strong {
    margin-top: 0.15rem;
    margin-bottom: 0.65rem;
    font-size: 0.88rem;
}

.arcade-card.feature img {
    aspect-ratio: 16 / 10;
}

.arcade-card.feature strong {
    font-size: 1rem;
}

.discover-panel,
.seo-content,
.faq-section,
.site-footer {
    width: min(1240px, calc(100% - 2rem));
}

.arcade-tools {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 1rem;
    align-items: end;
}

.search-box {
    display: grid;
    gap: 0.35rem;
    font-weight: 900;
}

.search-box input {
    width: 100%;
    min-height: 44px;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    font: inherit;
    background: #fff;
}

.search-box input:focus {
    border-color: var(--blue);
}

.category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.category-button.is-active {
    background: #12202b;
    color: #fff;
}

.games-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 1rem;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 2rem;
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, 0.65);
    text-align: center;
    font-weight: 900;
}

.seo-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
    align-items: start;
    background: rgba(255, 255, 255, 0.86);
}

.eyebrow {
    margin: 0 0 0.55rem;
    color: #b54168;
    font-size: 0.78rem;
    font-weight: 1000;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prose h2 {
    margin-top: 1.35rem;
}

.prose h2:first-of-type {
    margin-top: 0;
}

.prose h3 {
    margin-top: 1rem;
    color: #17202a;
    font-size: 1.05rem;
}

.prose p {
    margin: 0.9rem 0 0;
    color: #33414d;
}

.facts-panel {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.facts-panel h2 {
    font-size: 1.25rem;
}

dl {
    margin: 0.75rem 0 0;
}

.facts-panel dl > div {
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
}

dt {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 1000;
    text-transform: uppercase;
}

dd {
    margin: 0.2rem 0 0;
    font-weight: 850;
}

.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-list details {
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
}

.faq-list summary {
    cursor: pointer;
    font-weight: 900;
}

.faq-list p {
    margin: 0.75rem 0 0;
    color: var(--muted);
}

.game-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    padding: clamp(0.5rem, 2vw, 1.5rem);
    background: rgba(12, 20, 28, 0.78);
}

.game-modal.is-open {
    display: grid;
    place-items: center;
}

.modal-panel {
    display: grid;
    grid-template-rows: auto 1fr;
    width: min(1180px, 100%);
    height: min(760px, 92vh);
    overflow: hidden;
    background: #101820;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.modal-bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 1rem;
    background: #fff;
}

.modal-bar h2 {
    font-size: 1.1rem;
}

.modal-bar span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.modal-button {
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    background: #eef6f6;
    color: #12202b;
    font-size: 0.9rem;
}

#modalFrame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.25rem auto 0;
    padding: 1.5rem 0 2rem;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer-logo {
    display: block;
    width: 2.75rem;
    height: 2.75rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.site-footer p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

@media (max-width: 1180px) {
    .arcade-stage {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .right-rail {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 260px 1fr;
        align-items: start;
    }

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

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

@media (max-width: 820px) {
    .arcade-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .arcade-stage {
        grid-template-columns: 1fr;
        width: min(100% - 1rem, 720px);
        gap: 1rem;
    }

    .arcade-stage > *,
    .play-column,
    .left-rail,
    .right-rail {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .play-column {
        order: -1;
    }

    .left-rail,
    .right-rail {
        position: static;
        display: block;
    }

    .mini-logo {
        display: none;
    }

    .rail-list,
    .side-grid {
        grid-auto-flow: column;
        grid-auto-columns: 112px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        padding-bottom: 0.35rem;
    }

    .right-rail {
        grid-column: auto;
    }

    .top-feature {
        margin-bottom: 0.85rem;
    }

    .arcade-tools,
    .seo-content {
        grid-template-columns: 1fr;
    }

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

    .game-info-bar,
    .modal-bar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .site-nav {
        gap: 0.55rem;
    }

    .site-nav a {
        font-size: 0.88rem;
    }

    .game-window {
        aspect-ratio: 1 / 1;
    }

    .game-logo {
        width: min(250px, 72vw);
    }

    .bottom-row {
        grid-auto-columns: 108px;
    }
}
