:root {
    --bg: #f5efe6;
    --bg-accent: #eadfd0;
    --surface: rgba(255, 252, 247, 0.84);
    --surface-strong: #fffaf3;
    --text: #24170f;
    --muted: #6c5c4f;
    --line: rgba(36, 23, 15, 0.12);
    --primary: #ca5a2e;
    --primary-deep: #9e3c18;
    --shadow: 0 24px 60px rgba(75, 43, 19, 0.14);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(202, 90, 46, 0.16), transparent 28%),
        radial-gradient(circle at right 20%, rgba(92, 138, 124, 0.18), transparent 20%),
        linear-gradient(180deg, var(--bg) 0%, #f7f2eb 46%, #efe5d7 100%);
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    width: 42vw;
    height: 42vw;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.38;
    z-index: 0;
}

body::before {
    top: -10vw;
    right: -12vw;
    background: rgba(255, 166, 122, 0.34);
}

body::after {
    bottom: -14vw;
    left: -10vw;
    background: rgba(71, 120, 109, 0.18);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(36, 23, 15, 0.08);
    font-family: 'Space Grotesk', monospace;
    font-size: 0.95em;
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 3rem;
}

.hero {
    display: block;
    margin-bottom: 1rem;
}

.hero__copy {
    display: grid;
    gap: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 36px rgba(75, 43, 19, 0.1);
    padding: 1rem 1.25rem;
    animation: fade-up 0.55s ease both;
}

.eyebrow {
    margin: 0;
    color: var(--primary-deep);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero__topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

.hero h1 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
    max-width: none;
}

.hero__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(202, 90, 46, 0.18);
    border-radius: 999px;
    background: rgba(202, 90, 46, 0.08);
    color: var(--primary-deep);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--ghost {
    border-color: rgba(202, 90, 46, 0.24);
    background: rgba(202, 90, 46, 0.08);
    color: var(--primary-deep);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.game-card {
    min-width: 0;
    animation: fade-up 0.8s ease both;
}

.game-card__link {
    display: grid;
    overflow: hidden;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 251, 246, 0.86);
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.game-card__link:hover {
    transform: translateY(-5px);
    border-color: rgba(202, 90, 46, 0.28);
    box-shadow: 0 28px 68px rgba(75, 43, 19, 0.2);
}

.game-card--disabled .game-card__link {
    opacity: 0.72;
}

.game-card__link--static {
    cursor: default;
}

.game-card__media {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(202, 90, 46, 0.22), rgba(71, 120, 109, 0.22));
    overflow: hidden;
}

.game-card__media img,
.game-card__placeholder {
    width: 100%;
    height: 100%;
}

.game-card__media img {
    object-fit: cover;
}

.game-card__placeholder {
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(202, 90, 46, 0.85), rgba(90, 134, 121, 0.92)),
        linear-gradient(45deg, #2f1c12, #6e3820);
}

.game-card__placeholder span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 700;
    color: rgba(255, 247, 238, 0.92);
}

.game-card__body {
    display: grid;
    gap: 0.5rem;
    padding: 1rem 1rem 1.1rem;
}

.game-card__body h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
}

.game-card__description {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.game-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.empty-state {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.empty-state h2 {
    margin-top: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.empty-state p {
    max-width: 60ch;
    color: var(--muted);
    line-height: 1.7;
}

.utility-bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(36, 23, 15, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 243, 0.62);
    box-shadow: 0 12px 30px rgba(75, 43, 19, 0.08);
}

.utility-bar__copy {
    min-width: 0;
}

.utility-bar__eyebrow {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.utility-bar__text {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.utility-bar__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.admin-refresh {
    display: grid;
    gap: 0.55rem;
    width: min(100%, 360px);
}

.admin-refresh__field {
    margin: 0;
    color: var(--muted);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-refresh__input {
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(36, 23, 15, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    font-family: 'Space Grotesk', monospace;
    font-size: 0.95rem;
}

.admin-refresh__check {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.utility-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 36px;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(36, 23, 15, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    color: var(--muted);
    font-size: 0.92rem;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 860px) {
    .page-shell {
        width: min(100% - 1rem, 1180px);
        padding-top: 0.85rem;
    }

    .hero__copy {
        padding: 0.95rem 1rem;
    }

    .hero__topline {
        align-items: center;
    }

    .hero h1 {
        max-width: 100%;
    }
}

@media (max-width: 540px) {
    .page-shell {
        width: min(100% - 0.75rem, 1180px);
        padding-bottom: 2rem;
    }

    .hero__topline,
    .utility-bar,
    .game-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero__count {
        padding: 0.45rem 0.8rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .utility-bar {
        padding: 0.9rem 1rem;
    }

    .utility-bar__meta {
        width: 100%;
    }

    .admin-refresh {
        width: 100%;
    }
}