:root {
    color-scheme: light;
    --paper: #eef6fb;
    --ink: #121926;
    --muted: #637487;
    --line: #cad8e6;
    --panel: #ffffff;
    --panel-2: #edfaff;
    --console: #111827;
    --coral: #e83f6f;
    --teal: #00a6b8;
    --mint: #6ee7b7;
    --sun: #f7c948;
    --blue: #3b82f6;
    --shadow: 0 20px 48px rgba(17, 24, 39, 0.15);
    --hard-shadow: 8px 8px 0 #111827;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    background:
        linear-gradient(90deg, rgba(23, 27, 34, 0.07) 1px, transparent 1px),
        linear-gradient(rgba(23, 27, 34, 0.06) 1px, transparent 1px),
        linear-gradient(135deg, #f8fbff 0%, var(--paper) 48%, #eaf7ff 100%);
    background-size: 30px 30px, 30px 30px, auto;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    gap: 18px;
    padding: 16px;
    color: #f8faf8;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent),
        var(--console);
    border-bottom: 4px solid var(--teal);
}

.site-header__brand {
    display: inline-grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    font-weight: 900;
    min-width: 0;
}

.site-header__mark {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
}

.site-header__name {
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
}

.game-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-nav__link {
    min-height: 40px;
    padding: 8px 12px;
    color: #e9eeef;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    font-weight: 800;
}

.game-nav__link:hover,
.game-nav__link.is-active {
    color: var(--console);
    background: var(--mint);
    border-color: var(--mint);
}

.console-panel {
    display: none;
    padding: 16px;
    color: #d8e7ef;
    background:
        linear-gradient(135deg, rgba(0, 166, 184, 0.22), transparent),
        rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
}

.console-panel__eyebrow {
    margin: 0 0 8px;
    color: var(--mint);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.console-panel strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
}

.console-panel span {
    display: inline-flex;
    margin: 4px 4px 0 0;
    padding: 4px 8px;
    color: var(--console);
    background: var(--sun);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

main {
    width: min(1760px, calc(100% - 28px));
    margin: 0 auto;
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    gap: clamp(20px, 4vw, 44px);
    align-items: center;
    min-height: calc(100vh - 30px);
    margin: 18px 0 24px;
    padding: clamp(28px, 5vw, 64px);
    overflow: hidden;
    color: #f8faf8;
    background:
        linear-gradient(135deg, rgba(0, 166, 184, 0.36), transparent 42%),
        linear-gradient(155deg, #111827 0%, #17233a 54%, #2a1742 100%);
    border: 3px solid var(--console);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.home-hero::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(circle at 78% 18%, rgba(110, 231, 183, 0.30), transparent 18%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 16px);
}

.home-hero__copy,
.home-hero__arcade {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.home-hero__eyebrow,
.page-hero__eyebrow,
.section-heading__eyebrow,
.game-detail__eyebrow {
    margin: 0 0 10px;
    color: var(--coral);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-hero__eyebrow,
.game-detail__eyebrow {
    color: var(--mint);
}

.home-hero h1 {
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    margin: 0 0 18px;
    font-size: clamp(52px, 8vw, 130px);
    line-height: 0.92;
    overflow-wrap: normal;
    white-space: nowrap;
}

.home-hero h1 span {
    display: inline-block;
}

.home-hero p {
    max-width: 620px;
    color: #dce6e4;
    font-size: 18px;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 18px;
    padding: 0 22px;
    color: #ffffff;
    background: var(--coral);
    border: 3px solid #ffffff;
    border-radius: 8px;
    box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.32);
    font-weight: 900;
}

.primary-action:hover {
    transform: translate(-2px, -2px);
}

.home-hero__arcade {
    display: grid;
    grid-template-columns: 1.05fr 0.9fr;
    grid-auto-rows: clamp(150px, 16vw, 190px);
    gap: 18px;
    transform: rotate(-1deg);
    max-width: 100%;
}

.arcade-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 180px;
    padding: 18px;
    overflow: hidden;
    background: var(--panel);
    border: 4px solid #ffffff;
    border-radius: 8px;
    box-shadow: 10px 10px 0 rgba(232, 63, 111, 0.92);
}

.arcade-tile--large {
    grid-row: span 2;
}

.arcade-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
}

.arcade-tile::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.78));
}

.arcade-tile span,
.arcade-tile strong {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.arcade-tile span {
    color: var(--sun);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.arcade-tile strong {
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.05;
}

.category-dock {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: -10px 0 34px;
}

.category-dock a {
    display: grid;
    gap: 4px;
    min-height: 88px;
    padding: 14px;
    color: var(--ink);
    background: var(--panel);
    border: 3px solid var(--console);
    border-radius: 8px;
    box-shadow: 5px 5px 0 rgba(23, 27, 34, 0.18);
    font-weight: 900;
}

.category-dock a:nth-child(2n) {
    background: var(--panel-2);
}

.category-dock span {
    color: var(--coral);
    font-size: 12px;
}

.content-section,
.article-panel,
.legal-copy,
.faq-strip {
    margin: 34px 0;
}

.content-shelf {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(260px, 16vw, 320px);
    gap: 24px;
    align-items: start;
}

.content-section--flush {
    margin-top: 0;
}

.content-rail {
    position: sticky;
    top: 22px;
    display: grid;
    gap: 12px;
    margin: 34px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 3px solid var(--console);
    border-radius: 8px;
    box-shadow: 6px 6px 0 rgba(17, 24, 39, 0.16);
}

.content-rail__eyebrow {
    margin: 0;
    color: var(--coral);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.content-rail h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1;
}

.side-pick {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: 8px;
}

.side-pick img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
}

.side-pick span,
.side-pick strong {
    grid-column: 2;
}

.side-pick span {
    color: var(--teal);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.side-pick strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.15;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px 0 12px;
    border-bottom: 4px solid var(--console);
}

.section-heading h2,
.article-panel h2,
.faq-strip h2 {
    margin: 0;
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1;
}

.text-link {
    color: var(--teal);
    font-weight: 900;
}

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

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

.game-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    min-height: 100%;
    background: var(--panel);
    border: 3px solid var(--console);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(23, 27, 34, 0.10);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.game-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--hard-shadow);
}

.game-card:nth-child(5n + 1) {
    background: #f7fbff;
}

.game-card:nth-child(5n + 2) {
    background: #ebfbff;
}

.game-card:nth-child(5n + 3) {
    background: #fff1f6;
}

.game-card:nth-child(5n + 4) {
    background: #f1f5ff;
}

.game-card__media {
    display: block;
    aspect-ratio: 1 / 1;
    padding: 9px;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.10) 0 6px, transparent 6px 12px),
        var(--console);
}

.game-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #ffffff;
    border-radius: 6px;
}

.game-card__body {
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 14px;
    min-height: 168px;
}

.game-card__title {
    font-weight: 900;
    line-height: 1.15;
}

.game-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.game-card__meta {
    display: inline-flex;
    width: fit-content;
    min-height: 27px;
    align-items: center;
    padding: 3px 9px;
    color: var(--console);
    background: var(--sun);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.page-hero,
.game-detail {
    position: relative;
    overflow: hidden;
    margin: 24px 0 34px;
    color: #f8faf8;
    background:
        linear-gradient(135deg, rgba(0, 166, 184, 0.28), transparent 45%),
        linear-gradient(150deg, var(--console), #1f2a44);
    border: 3px solid var(--console);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.page-hero {
    padding: clamp(28px, 5vw, 62px);
}

.page-hero h1,
.game-detail h1 {
    margin: 0 0 16px;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 0.92;
}

.page-hero p,
.game-detail p {
    max-width: 820px;
    color: #dce6e4;
}

.page-hero--compact h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.game-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.78fr);
    gap: clamp(24px, 5vw, 56px);
    align-items: center;
    padding: clamp(28px, 5vw, 62px);
}

.game-detail__cover {
    margin: 0;
}

.game-detail__cover img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--panel);
    border: 5px solid #ffffff;
    border-radius: 8px;
    box-shadow: 12px 12px 0 var(--mint), -10px -10px 0 var(--blue);
    transform: rotate(1.2deg);
}

.article-panel,
.legal-copy,
.faq-strip {
    padding: clamp(22px, 3vw, 32px);
    background: rgba(255, 253, 245, 0.96);
    border: 3px solid var(--console);
    border-radius: 8px;
    box-shadow: 6px 6px 0 rgba(23, 27, 34, 0.14);
}

.article-panel p,
.legal-copy p,
.faq-strip p,
.faq-item p {
    color: var(--muted);
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 0;
}

.detail-list div {
    padding: 15px;
    background: var(--panel-2);
    border: 2px solid var(--line);
    border-radius: 8px;
}

.detail-list dt {
    color: var(--muted);
    font-size: 13px;
}

.detail-list dd {
    margin: 4px 0 0;
    font-weight: 900;
}

.faq-item + .faq-item {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 2px dashed var(--line);
}

.site-footer {
    margin-top: 54px;
    padding: 38px clamp(18px, 4vw, 58px);
    color: #d9e5e4;
    background: var(--console);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.35fr) minmax(160px, 0.55fr) minmax(260px, 0.8fr);
    gap: 28px;
    align-items: start;
    width: min(1240px, 100%);
    margin: 0 auto;
}

.site-footer__brand strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
}

.site-footer__brand p {
    max-width: 520px;
    margin: 0;
    color: #b8c7c5;
}

.site-footer__column,
.site-footer__links {
    display: grid;
    gap: 8px;
}

.site-footer__column span,
.site-footer__links span {
    margin-bottom: 4px;
    color: var(--mint);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.site-footer__column a,
.site-footer__links a {
    color: #eef6fb;
    font-weight: 800;
}

.site-footer__column a:hover,
.site-footer__links a:hover {
    color: var(--sun);
}

.play-body {
    padding-left: 0 !important;
    background: #101419;
    overflow: hidden;
}

.play-shell {
    width: 100%;
    min-height: 100vh;
}

.play-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--console);
    border-bottom: 3px solid var(--teal);
}

.play-toolbar a:last-child {
    justify-self: end;
}

.play-frame {
    display: grid;
    place-items: center;
    height: calc(100vh - 58px);
    background: #101419;
}

.play-frame__game,
.play-frame__missing {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.play-frame__missing {
    display: grid;
    place-items: center;
    color: #ffffff;
}

@media (min-width: 980px) {
    body {
        padding-left: 264px;
    }

    .site-header {
        position: fixed;
        inset: 0 auto 0 0;
        width: 264px;
        align-content: start;
        border-right: 4px solid var(--teal);
        border-bottom: 0;
    }

    .game-nav {
        display: grid;
    }

    .console-panel {
        display: block;
        margin-top: 22px;
    }

    .game-nav__link {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .game-nav__link::after {
        content: ">";
        color: var(--sun);
    }

    .game-nav__link.is-active::after,
    .game-nav__link:hover::after {
        color: var(--console);
    }

    main {
        padding: 8px 0 0;
    }

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

    main > .content-section .game-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1440px) {
    main {
        width: min(1840px, calc(100% - 36px));
    }

    .content-shelf {
        gap: 28px;
    }

    .content-shelf .game-grid,
    .content-shelf .game-grid--featured {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1920px) {
    main {
        width: min(100% - 44px, 1960px);
    }
}

@media (max-width: 979px) {
    .home-hero,
    .game-detail,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        min-height: 0;
    }

    .home-hero h1 {
        display: flex;
        flex-wrap: nowrap;
        font-size: clamp(40px, 9vw, 64px);
        white-space: nowrap;
    }

    .home-hero h1 span + span {
        margin-top: 0;
        margin-left: 0;
    }

    .home-hero h1 span + span {
        margin-top: -0.08em;
        margin-left: clamp(34px, 12vw, 92px);
    }

    .home-hero__arcade {
        transform: none;
    }

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

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

    .content-shelf {
        grid-template-columns: 1fr;
    }

    .content-rail {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        margin-top: 0;
    }

    .content-rail__eyebrow,
    .content-rail h3 {
        grid-column: 1 / -1;
    }
}

@media (min-width: 760px) and (max-width: 1320px) {
    .home-hero h1 {
        display: grid;
        justify-items: start;
        font-size: clamp(58px, 8.6vw, 96px);
        white-space: normal;
    }

    .home-hero h1 span + span {
        margin-top: -0.1em;
        margin-left: clamp(54px, 10vw, 118px);
    }
}

@media (max-width: 620px) {
    main {
        width: min(100% - 22px, 1760px);
    }

    .site-header {
        gap: 12px;
    }

    .game-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .game-nav::-webkit-scrollbar {
        display: none;
    }

    .game-nav__link {
        min-width: max-content;
        min-height: 38px;
        padding: 7px 10px;
    }

    .home-hero {
        padding: 22px;
    }

    .home-hero h1 {
        display: flex;
        flex-wrap: nowrap;
        font-size: clamp(32px, 12.5vw, 48px);
        white-space: nowrap;
    }

    .home-hero h1 span + span {
        margin-top: 0;
        margin-left: 0;
    }

    .home-hero__arcade {
        grid-template-columns: 1fr;
        grid-auto-rows: 210px;
    }

    .arcade-tile--large {
        grid-row: span 1;
    }

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

    .content-rail {
        grid-template-columns: 1fr;
    }

    .section-heading {
        grid-template-columns: 1fr;
        align-items: start;
    }

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

@media (min-width: 520px) and (max-width: 1320px) {
    .home-hero h1 {
        display: grid;
        justify-items: start;
        font-size: clamp(58px, 10vw, 98px);
        white-space: normal;
    }

    .home-hero h1 span + span {
        margin-top: -0.1em;
        margin-left: clamp(42px, 11vw, 118px);
    }
}
