:root {
    color: #17182d;
    background: #f6f1e7;
    font-family: "Segoe UI", system-ui, sans-serif;
    --blue: #2e22a3;
    --muted: #515367;
    --line: #ddd7cb;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }

.wrap { width: min(1100px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand strong { color: var(--blue); }
.brand-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #adffdf;
    background: var(--blue);
    font-size: 1.22rem;
}

main { padding-block: clamp(32px, 5vh, 58px) 42px; }
.intro { margin-bottom: clamp(22px, 3vw, 32px); }
h1 { margin: 0; font-size: clamp(3.5rem, 8vw, 6rem); font-weight: 800; letter-spacing: -.07em; line-height: .98; }
.intro p { margin: 13px 0 0; color: var(--muted); font-size: clamp(.98rem, 2vw, 1.12rem); line-height: 1.5; }

.catalog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(17px, 3vw, 30px);
    list-style: none;
    margin: 0;
    padding: 0;
}
.game-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fffcf6;
    box-shadow: 0 5px 22px #382c1510;
    text-decoration: none;
}
.game-card:hover { border-color: #9c91da; box-shadow: 0 8px 25px #34257721; }
.preview {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 86 / 37;
}
.preview-space { background: radial-gradient(ellipse at 75% 18%, #593b85, #181435 66%); }
.preview-space canvas { display: block; width: 100%; height: auto; }
.preview-code {
    background-color: #123b4a;
    background-image: linear-gradient(#80f6cd21 1px, transparent 1px),
        linear-gradient(90deg, #80f6cd21 1px, transparent 1px),
        radial-gradient(ellipse at 50% 65%, #1b796a 0%, #123b4a 70%);
    background-size: 25px 25px, 25px 25px, 100% 100%;
}
.preview-code canvas {
    width: 29%;
    height: auto;
    transform: rotate(-9deg);
    background: #f5f4ec;
    border-radius: 4px;
    box-shadow: 10px 14px 0 #091f36bb, 0 0 26px #77dfaf57;
    image-rendering: pixelated;
}
.preview-code::before, .preview-code::after {
    position: absolute;
    width: 32px;
    height: 32px;
    border: solid #a9f3db;
    content: "";
}
.preview-code::before { top: 18%; left: 27%; border-width: 2px 0 0 2px; }
.preview-code::after { right: 27%; bottom: 18%; border-width: 0 2px 2px 0; }

.game-info {
    flex: 1;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 11px;
    align-items: start;
    padding: clamp(16px, 3vw, 26px);
}
.category { margin: 0 0 4px; color: var(--blue); font-size: .77rem; font-weight: 700; }
.game-info h2 { margin: 0; font-size: clamp(1.38rem, 3vw, 1.95rem); letter-spacing: -.035em; line-height: 1.15; }
.description { max-width: 46ch; margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.play {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    min-height: 42px;
    margin-top: 4px;
    padding: 7px 13px;
    border-radius: 7px;
    color: #fff;
    background: var(--blue);
    font-size: .9rem;
    font-weight: 700;
}
.game-card:is(:hover, :focus-visible) .play { background: #4435bc; }

@media (max-width: 640px) {
    .wrap { width: calc(100% - 36px); }
    .site-header .wrap { min-height: 58px; }
    .catalog { grid-template-columns: 1fr; }
}
