:root {
    color-scheme: light;
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-2: #edf7f4;
    --text: #16202a;
    --muted: #5f6b78;
    --line: #dfe6ee;
    --brand: #0f8b8d;
    --brand-dark: #0b6264;
    --accent: #e4572e;
    --shadow: 0 18px 45px rgba(22, 32, 42, .09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 14px clamp(16px, 4vw, 56px);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.top-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.top-nav a {
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.top-nav a:hover,
.top-nav a:focus {
    background: var(--surface-2);
    color: var(--brand-dark);
}

.search {
    display: flex;
    align-items: center;
    width: min(310px, 26vw);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.search input,
.search button {
    height: 40px;
    border: 0;
    font: inherit;
}

.search input {
    min-width: 0;
    flex: 1;
    padding: 0 12px;
    outline: 0;
}

.search button {
    padding: 0 14px;
    background: var(--text);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

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

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    min-height: 560px;
    padding: 56px 0 36px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 820px;
    margin-bottom: 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: .98;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: 0;
}

.hero p,
.page-title p,
.content-band p,
.game-detail p {
    max-width: 720px;
    color: var(--muted);
    font-size: 18px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 800;
}

.button--primary {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.hero__media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hero__media a,
.game-card,
.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero__media a {
    position: relative;
    aspect-ratio: 4 / 3;
}

.hero__media img,
.game-card img,
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #dde5ee;
}

.hero__media span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .92);
    font-weight: 800;
    font-size: 14px;
}

.section,
.category-grid,
.content-band,
.page-title,
.game-page {
    margin: 42px 0;
}

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

.section__head a {
    color: var(--brand-dark);
    font-weight: 800;
}

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

.game-card {
    min-width: 0;
    box-shadow: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

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

.game-card a {
    display: block;
}

.game-card img {
    aspect-ratio: 4 / 3;
}

.game-card__body {
    display: block;
    padding: 12px;
}

.game-card strong,
.game-card small {
    display: block;
}

.game-card strong {
    overflow: hidden;
    min-height: 44px;
    font-size: 15px;
    line-height: 1.35;
}

.game-card small,
.category-card small {
    margin-top: 5px;
    color: var(--muted);
}

.content-band,
.page-title {
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.content-band--narrow {
    max-width: 820px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.category-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    min-height: 126px;
    box-shadow: none;
}

.category-card span {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 14px;
}

.category-card strong {
    font-size: 18px;
}

.category-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

.game-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 28px;
    align-items: center;
    margin-top: 34px;
}

.game-player-section {
    overflow: hidden;
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #111922;
    box-shadow: var(--shadow);
}

.game-player__bar {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 10px 8px 16px;
    color: #fff;
}

.fullscreen-button {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.fullscreen-button:hover,
.fullscreen-button:focus-visible {
    background: rgba(255, 255, 255, .12);
}

.game-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #05080b;
}

.game-player iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.game-player:fullscreen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
}

.game-player__fallback {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #fff;
}

.game-player__fallback img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .35;
}

.game-player__fallback p {
    position: relative;
    z-index: 1;
}

.game-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    object-fit: cover;
}

.game-preview {
    overflow: hidden;
    border-radius: 8px;
    background: #111922;
    box-shadow: var(--shadow);
}

.game-preview video,
.game-preview img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.game-detail h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 72px;
    padding: 28px clamp(16px, 4vw, 56px);
    border-top: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
}

.site-footer p {
    max-width: 520px;
    margin-bottom: 0;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.site-footer a {
    color: var(--text);
    font-weight: 700;
}

@media (max-width: 860px) {
    .site-header {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .top-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .search {
        width: 100%;
    }

    .hero,
    .game-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hero__media {
        order: -1;
    }

    .game-player {
        aspect-ratio: 4 / 3;
    }

    h1 {
        font-size: 42px;
    }

    .site-footer {
        flex-direction: column;
    }

    .site-footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 540px) {
    main {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        padding-top: 24px;
    }

    .hero__media,
    .game-grid,
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

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

    .category-card {
        grid-template-columns: 88px 1fr;
    }

    .top-nav a {
        padding-inline: 10px;
        white-space: nowrap;
    }
}
