:root {
    --bg: #071323;
    --panel: rgba(10, 24, 52, 0.9);
    --panel-soft: rgba(255, 255, 255, 0.08);
    --text: #f5f8ff;
    --muted: #d8e0ff;
    --accent: #ffd44d;
    --accent-strong: #ff9f1c;
    --sky: #6fc1ff;
    --border: rgba(255, 255, 255, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 212, 77, 0.16), transparent 18%),
        radial-gradient(circle at 85% 12%, rgba(111, 193, 255, 0.16), transparent 18%),
        linear-gradient(180deg, #132d5c 0%, #071323 44%, #040a12 100%);
}

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

.shell,
.hero,
.section,
.game-shell {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

.shell {
    padding: 18px 22px;
    border-radius: 999px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 900;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
}

nav a.active,
nav a:hover {
    color: #102348;
    background: var(--accent);
}

.game-shell {
    margin-top: 18px;
    padding: 22px;
    border-radius: 32px;
}

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

.game-layout {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 18px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    font-weight: 900;
}

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

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    margin-bottom: 14px;
}

.game-copy,
.embed-wrap,
.game-preview {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.game-copy {
    display: grid;
    align-content: start;
}

.game-copy p,
.game-copy li,
.embed-note,
.preview-note,
.embed-toolbar p {
    color: var(--muted);
    line-height: 1.7;
}

.game-copy ul {
    padding-left: 18px;
    margin-bottom: 18px;
}

.game-preview {
    display: grid;
    gap: 12px;
}

.game-preview-button {
    position: relative;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
}

.game-preview img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 18px;
    display: block;
}

.game-preview-visual {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
}

.cover-fallback {
    position: absolute;
    inset: 0;
    display: none;
    padding: 18px;
    background:
        radial-gradient(circle at top left, rgba(255, 212, 77, 0.18), transparent 20%),
        linear-gradient(145deg, rgba(19, 45, 92, 0.95), rgba(7, 19, 35, 0.98));
    align-items: end;
    color: var(--text);
    font-weight: 900;
    font-size: 1.2rem;
    line-height: 1.1;
    z-index: 1;
}

.game-preview-visual .cover-fallback {
    border-radius: 18px;
}

.preview-start {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 28px rgba(255, 159, 28, 0.34);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d2148;
}

.icon-frame {
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.related-games {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.related-heading h2 {
    margin-bottom: 0;
    font-size: 1.5rem;
}

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

.related-card {
    display: grid;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.related-card-visual {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(circle at top left, rgba(255, 212, 77, 0.18), transparent 20%),
        linear-gradient(145deg, rgba(19, 45, 92, 0.95), rgba(7, 19, 35, 0.98));
}

.related-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-card-copy {
    display: grid;
    gap: 8px;
}

.related-card-copy strong {
    line-height: 1.15;
}

.kids-label {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #0c244c;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.back-link,
.secondary-button {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

.back-link,
.secondary-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
}

.icon-button {
    gap: 10px;
}

.icon-chip {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(13, 33, 72, 0.18);
    flex: 0 0 24px;
}

.embed-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 18px;
    background: #03060d;
}

.embed-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.embed-note {
    margin-top: 12px;
    font-size: 0.92rem;
}

code {
    font-family: "Consolas", "Courier New", monospace;
    color: #fff1aa;
}

@media (max-width: 980px) {
    .game-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .page {
        width: min(100% - 16px, 1180px);
        padding-top: 14px;
    }

    .shell,
    .game-shell {
        padding: 18px;
        border-radius: 28px;
    }
}
