@import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400;500;600;700;800;900&display=swap');

        /* Layout and type follow kendoo.com/games (measured in headless Chrome).
           The accent is RGG mint green from the logo, not kendoo's orange, which
           would fight the logo it sits next to. */
        :root {
            --bg: #100823;
            --bg-lift: #1b0f3a;
            --surface: rgba(255, 255, 255, 0.045);
            --surface-2: rgba(255, 255, 255, 0.07);
            --border: rgba(255, 255, 255, 0.10);
            --text: #f4f1ff;
            --text-dim: #a79fc4;
            --accent: #4df0a8;
            --accent-2: #38e8c8;
            --accent-ink: #04241a;
            --radius-tile: 20px;
            --shell: 1300px;

            /* Accent set for iconography. Mint stays the brand colour and leads; these
               give icon tiles, steps and category chips their own identity, so six
               cards in a row stop reading as one monochrome block. All six are tuned
               for legibility on the #100823 base. */
            --c-mint: #4df0a8;
            --c-violet: #b39bff;
            --c-amber: #ffc95c;
            --c-coral: #ff8098;
            --c-sky: #5cc8ff;
            --c-lime: #b6e86a;
        }

        /* Set --ico on the element (or a parent) to colour a tile:
           <div class="icon-tile" style="--ico: var(--c-amber)">…</div> */
        .icon-tile {
            display: grid;
            place-items: center;
            width: 52px;
            height: 52px;
            border-radius: 15px;
            background: color-mix(in srgb, var(--ico, var(--c-mint)) 15%, transparent);
            border: 1px solid color-mix(in srgb, var(--ico, var(--c-mint)) 32%, transparent);
            color: var(--ico, var(--c-mint));
            font-size: 22px;
            line-height: 1;
        }
        /* 28 in a 52 tile. At 24 the slot glyphs (a reel window with three symbols, a
           3x3 grid of locked coins) turned to mush — they carry more detail than a
           generic line icon and need the extra pixels. */
        .icon-tile svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.7; }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            background: var(--bg);
            /* Faint lift at the top, as on the reference page. */
            background-image: radial-gradient(120% 70% at 50% -10%, var(--bg-lift) 0%, var(--bg) 60%);
            background-attachment: fixed;
            color: var(--text);
            font-family: Gabarito, system-ui, -apple-system, "Segoe UI", sans-serif;
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
        }

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

        /* ---------- top nav ---------- */
        .topnav {
            position: sticky;
            top: 0;
            z-index: 50;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 32px;
            background: rgba(16, 8, 35, 0.72);
            backdrop-filter: blur(14px);
            border-bottom: 1px solid var(--border);
        }

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

        /* Both sources are cropped to the same logo bounds, so the animated WebP and
           the PNG fallback occupy the frame identically. */
        .logo-media { height: 40px; width: 118px; flex: none; }
        .logo-media img { height: 100%; width: 100%; object-fit: contain; display: block; }

        .logo-sub {
            color: var(--text-dim);
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }

        .topnav-links { display: flex; align-items: center; gap: 28px; }
        .topnav-links a {
            color: var(--text-dim);
            font-size: 14px;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            padding: 6px 0;
            border-bottom: 2px solid transparent;
            transition: color .2s, border-color .2s;
        }
        .topnav-links a:hover { color: var(--text); }
        .topnav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }

        .nav-cta {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 11px 22px;
            border: none;
            border-radius: 60px;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: var(--accent-ink);
            font-family: inherit;
            font-size: 13px;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            cursor: pointer;
            white-space: nowrap;
        }

        /* ---------- shell ---------- */
        .main-shell { max-width: var(--shell); margin: 0 auto; padding: 44px 32px 56px; }

        /* ---------- hero ---------- */
        .hero { margin-bottom: 34px; }

        .eyebrow {
            display: inline-block;
            padding: 6px 16px;
            border: 1px solid rgba(77, 240, 168, 0.35);
            border-radius: 60px;
            background: rgba(77, 240, 168, 0.10);
            color: var(--accent);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.14em;
            text-transform: uppercase;
        }

        .hero h1 {
            margin: 18px 0 0;
            font-size: 56px;
            font-weight: 900;
            line-height: 1;
            letter-spacing: -0.01em;
            text-transform: uppercase;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .hero p { margin-top: 14px; max-width: 520px; color: var(--text-dim); font-size: 15px; line-height: 1.55; }

        .status-strip {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 14px;
            margin-top: 28px;
        }
        .status-item {
            padding: 18px 20px;
            border: 1px solid var(--border);
            border-radius: var(--radius-tile);
            background: var(--surface);
        }
        .status-value { display: block; font-size: 26px; font-weight: 900; line-height: 1.1; }
        .status-value.ok { color: var(--accent); }
        .status-value.err { color: #ff6b81; }
        .status-label {
            display: block;
            margin-top: 6px;
            color: var(--text-dim);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        /* ---------- toolbar ---------- */
        .catalog-toolbar {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 20px;
            margin-bottom: 22px;
        }
        .section-kicker {
            display: block;
            color: var(--accent);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.14em;
            text-transform: uppercase;
        }
        .toolbar-title h2 { margin-top: 6px; font-size: 28px; font-weight: 900; letter-spacing: -0.01em; }

        .toolbar-controls { display: flex; align-items: center; gap: 12px; }

        .search-box { position: relative; }
        .search-box input {
            width: 340px;
            max-width: 100%;
            padding: 13px 46px 13px 22px;
            border: 1px solid var(--border);
            border-radius: 60px;
            background: var(--surface);
            color: var(--text);
            font-family: inherit;
            font-size: 14px;
            outline: none;
            transition: border-color .2s, background .2s;
        }
        .search-box input::placeholder { color: var(--text-dim); }
        .search-box input:focus { border-color: var(--accent); background: var(--surface-2); }
        .search-box::after {
            content: "";
            position: absolute;
            top: 50%;
            right: 18px;
            width: 15px;
            height: 15px;
            transform: translateY(-50%);
            border: 2px solid var(--text-dim);
            border-radius: 50%;
            box-shadow: 7px 7px 0 -6px var(--text-dim);
            pointer-events: none;
        }

        .filter-btn {
            padding: 12px 22px;
            border: 1px solid var(--border);
            border-radius: 60px;
            background: var(--surface);
            color: var(--text-dim);
            font-family: inherit;
            font-size: 13px;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            cursor: pointer;
            transition: all .2s;
        }
        .filter-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
        .filter-btn.active {
            border-color: transparent;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: var(--accent-ink);
        }

        /* Circular icon button, as on the reference toolbar. */
        .refresh-btn {
            width: 46px;
            height: 46px;
            flex: none;
            display: grid;
            place-items: center;
            border: 1px solid var(--border);
            border-radius: 50%;
            background: var(--surface);
            color: var(--text-dim);
            font-family: inherit;
            font-size: 17px;
            cursor: pointer;
            transition: all .2s;
        }
        .refresh-btn:hover { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); }

        /* ---------- catalog ---------- */
        .section { margin-bottom: 40px; }
        .section-header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 16px;
        }
        .section-header .count,
        .result-summary { color: var(--text-dim); font-size: 13px; }

        /* One declaration, then media queries in source order. The previous file
           declared .game-grid five times; media queries add no specificity, so the
           last unconditional rule silently won at every width. */
        .game-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 16px;
        }

        .game-card {
            position: relative;
            cursor: pointer;
            background: transparent;
            transition: transform .22s;
        }
        .game-card:hover { transform: translateY(-4px); }

        /* RGG artwork is 520x520. A 4:3 tile cropped ~12% off the top and bottom of
           every image, cutting the game titles baked into the art in half. */
        .game-card .thumb {
            display: block;
            width: 100%;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            border-radius: var(--radius-tile);
            background: var(--surface);
            border: 1px solid var(--border);
        }

        .game-card .overlay {
            position: absolute;
            inset: 0;
            bottom: auto;
            aspect-ratio: 1 / 1;
            display: grid;
            place-items: center;
            border-radius: var(--radius-tile);
            background: rgba(8, 4, 20, 0.62);
            opacity: 0;
            transition: opacity .22s;
        }
        .game-card:hover .overlay { opacity: 1; }

        .game-card .play-btn {
            padding: 11px 24px;
            border-radius: 60px;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: var(--accent-ink);
            font-size: 12px;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }
        .game-card .play-btn::after { content: "Play Demo"; }

        .game-card .name {
            margin-top: 10px;
            padding: 0 2px;
            color: var(--text);
            font-size: 14px;
            font-weight: 700;
            line-height: 1.3;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .game-card .provider-tag {
            margin-top: 3px;
            padding: 0 2px;
            color: var(--text-dim);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        .load-more { display: flex; justify-content: center; margin-top: 34px; }
        .load-more button {
            padding: 14px 40px;
            border: 1px solid var(--border);
            border-radius: 60px;
            background: var(--surface);
            color: var(--text);
            font-family: inherit;
            font-size: 14px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            cursor: pointer;
            transition: all .2s;
        }
        .load-more button:hover { border-color: var(--accent); color: var(--accent); }

        .empty-state {
            grid-column: 1 / -1;
            padding: 60px 20px;
            border: 1px dashed var(--border);
            border-radius: var(--radius-tile);
            color: var(--text-dim);
            text-align: center;
            font-size: 15px;
        }

        .loading { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; padding: 70px 0; }
        .loading .dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--accent);
            animation: pulse 1.2s infinite ease-in-out;
        }
        .loading .dot:nth-child(2) { animation-delay: .15s; }
        .loading .dot:nth-child(3) { animation-delay: .3s; }
        @keyframes pulse { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

        /* ---------- footer ---------- */
        .footer {
            padding: 34px 32px 46px;
            border-top: 1px solid var(--border);
            text-align: center;
        }
        .footer .providers {
            display: flex;
            justify-content: center;
            margin-bottom: 12px;
            color: var(--accent);
            font-size: 15px;
            font-weight: 900;
            letter-spacing: 0.16em;
        }
        .footer p { color: var(--text-dim); font-size: 13px; }

        /* ---------- toast ---------- */
        .toast {
            position: fixed;
            left: 50%;
            bottom: 30px;
            z-index: 100;
            transform: translate(-50%, 20px);
            padding: 14px 26px;
            border: 1px solid var(--border);
            border-radius: 60px;
            background: rgba(24, 13, 51, 0.96);
            color: var(--text);
            font-size: 14px;
            font-weight: 600;
            opacity: 0;
            pointer-events: none;
            transition: opacity .25s, transform .25s;
        }
        .toast.show { opacity: 1; transform: translate(-50%, 0); }

        /* ---------- responsive ---------- */
        @media (max-width: 1100px) {
            .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
            .hero h1 { font-size: 46px; }
        }

        /* ---------- mobile drawer ---------- */
        /* Checkbox-driven so the drawer needs no script and no shared JS file across
           the three pages. The input sits before .topnav-links so ~ can reach it. */
        .nav-toggle-input { display: none; }
        .nav-toggle { display: none; }

        @media (max-width: 860px) {
            /* backdrop-filter makes .topnav a containing block for fixed descendants,
               which pinned the drawer's inset:0 to the nav bar instead of the viewport.
               Drop the blur here and use an opaque bar instead. */
            .topnav { padding: 12px 20px; backdrop-filter: none; background: #140a2c; }
            .logo-sub { display: none; }

            .nav-toggle {
                display: grid;
                place-content: center;
                gap: 5px;
                width: 44px;
                height: 44px;
                flex: none;
                margin-left: 2px;
                cursor: pointer;
                -webkit-tap-highlight-color: transparent;
                /* Above the drawer, which is its sibling, so the X stays tappable. */
                position: relative;
                z-index: 70;
            }
            .nav-toggle span {
                display: block;
                width: 22px;
                height: 2px;
                border-radius: 2px;
                background: var(--text);
                transition: transform .25s, opacity .2s;
            }
            .nav-toggle-input:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
            .nav-toggle-input:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
            .nav-toggle-input:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

            /* Full-screen drawer rather than a wrapped row: three uppercase labels do
               not fit across a phone, and the last one was being pushed off-screen. */
            .topnav-links {
                position: fixed;
                inset: 0;
                z-index: 60;
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                justify-content: center;
                gap: 8px;
                padding: 0 28px;
                background: rgba(10, 5, 24, 0.97);
                backdrop-filter: blur(8px);
                opacity: 0;
                visibility: hidden;
                transition: opacity .25s, visibility .25s;
            }
            .nav-toggle-input:checked ~ .topnav-links { opacity: 1; visibility: visible; }

            .topnav-links a {
                width: 100%;
                padding: 12px 0;
                font-size: 20px;
                font-weight: 800;
                letter-spacing: 0.02em;
                border-bottom: none;
            }
            .topnav-links a.active {
                border-bottom: none;
                text-decoration: underline;
                text-underline-offset: 8px;
                text-decoration-thickness: 3px;
            }
            .main-shell { padding: 32px 20px 44px; }
            .catalog-toolbar { flex-direction: column; align-items: stretch; }
            .toolbar-controls { flex-wrap: wrap; }
            .search-box { flex: 1 1 100%; order: 3; }
            .search-box input { width: 100%; }
        }

        @media (max-width: 640px) {
            .hero h1 { font-size: 38px; }
            /* Stacking these three pushed the catalog roughly 600px down the page.
               Keep them on one row so the grid stays near the top, as on the reference. */
            .status-strip { gap: 8px; }
            .status-item { padding: 12px 10px; }
            .status-value { font-size: 18px; }
            .status-label { font-size: 9px; letter-spacing: 0.06em; }
            .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
            .footer { padding: 28px 20px 38px; }
        }
