*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
    --font: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI",
            system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

    /* Flächen */
    --ink-900: #0f1420;
    --ink-850: #141b2d;
    --ink-800: #1a2338;
    --plum-800: #2a1f33;
    --petrol-800: #0f3532;
    --paper-100: #f5f1e8;
    --cool-100: #e8edf5;

    /* Text */
    --on-dark: #eef1f7;
    --on-dark-muted: #a9b3c9;
    --on-light: #151a26;
    --on-light-muted: #55607a;

    /* Akzente (gedeckt, kein Neon) */
    --amber: #eda93a;
    --amber-ink: #8f5406;
    --indigo: #8b98f4;
    --teal: #45b89e;
    --coral: #f0806f;

    --radius: 20px;
    --ease: cubic-bezier(.22, .8, .3, 1);
    --pad-x: clamp(16px, 4vw, 40px);
    --pad-wide: clamp(14px, 2.4vw, 44px);
    --band-r: clamp(24px, 3.5vw, 44px);
    --band-y: clamp(64px, 9vw, 112px);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 84px; }

body {
    background: var(--ink-900);
    color: var(--on-dark);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus, var(--indigo)); outline-offset: 3px; }

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wrap { width: min(1760px, 100% - 2 * var(--pad-x)); margin-inline: auto; }
.wrap--wide { width: min(2400px, 100% - 2 * var(--pad-wide)); }

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip {
    position: fixed;
    z-index: 300;
    top: -80px;
    left: 16px;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--amber);
    color: #231603;
    font-weight: 800;
    text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font: 700 15px/1 var(--font);
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s var(--ease), background-color .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--amber); color: #231603; }
.btn--primary:hover { background: #f5b955; }
.btn--ghost { color: var(--on-dark); border-color: rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .05); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); }
.btn--donate { background: #f7c65f; color: #2a1a02; }
.btn--donate:hover { background: #ffd479; }
.btn--random { display: none; }
.js .btn--random { display: inline-flex; }

/* ---------- Navigation ---------- */

.nav {
    position: fixed;
    z-index: 100;
    top: 14px;
    left: 0;
    right: 0;
    margin-inline: auto;
    width: min(1240px, 100% - 24px);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 8px 8px 18px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    background: rgba(15, 20, 32, .7);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .45);
    transition: background-color .3s;
}
.nav.is-scrolled { background: rgba(15, 20, 32, .92); }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--on-dark);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--amber);
    color: #231603;
}
.brand-mark .icon { width: 16px; height: 16px; }
.brand b { color: var(--amber); font-weight: 800; }
.brand i { color: var(--on-dark-muted); font-style: normal; font-weight: 500; }

.nav-links { display: flex; gap: 2px; margin-inline: auto; list-style: none; }
.nav-links a {
    display: block;
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--on-dark-muted);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: 14px; }

/* Sprachumschalter (DE | EN) */
.lang {
    display: flex;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
}
.lang a {
    display: block;
    min-width: 42px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--on-dark-muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-align: center;
    text-decoration: none;
    transition: color .2s, background-color .2s;
}
.lang a:hover { color: #fff; }
.lang a[aria-current] { background: var(--amber); color: #231603; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(120px, 15vw, 168px) 0 calc(clamp(56px, 7vw, 88px) + var(--band-r));
    background:
        radial-gradient(760px 420px at 85% 8%, rgba(139, 152, 244, .13), transparent 65%),
        radial-gradient(640px 420px at 4% 96%, rgba(237, 169, 58, .08), transparent 65%),
        var(--ink-900);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.5px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: var(--on-dark-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

.hero h1 {
    margin: 20px 0 22px;
    font-size: clamp(38px, 5.6vw, 76px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.045em;
    text-wrap: balance;
}
.hl { color: var(--amber); }
.hero .lead { max-width: 560px; color: var(--on-dark-muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.65; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    margin-top: 36px;
    list-style: none;
    color: var(--on-dark-muted);
    font-size: 14.5px;
}
.facts li { display: inline-flex; align-items: center; gap: 9px; }
.facts .icon { width: 18px; height: 18px; color: var(--amber); }
.facts strong { color: var(--on-dark); font-weight: 800; }

.hero-copy > * { animation: rise .8s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }

.hero-art { position: relative; width: 100%; max-width: 620px; aspect-ratio: 1 / .88; margin-inline: auto; }
.art {
    position: absolute;
    width: 68%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .75);
    transition: rotate .5s var(--ease);
    animation: float 8s ease-in-out infinite;
}
.art--a { left: 0; top: 2%; rotate: -6deg; }
.art--b { right: 0; top: 22%; rotate: 5deg; animation-delay: -2.7s; }
.art--c { left: 15%; bottom: 0; z-index: 2; width: 72%; rotate: -1.5deg; animation-delay: -5.3s; }
.hero-art:hover .art--a { rotate: -8.5deg; }
.hero-art:hover .art--b { rotate: 7.5deg; }
.hero-art:hover .art--c { rotate: 0deg; }

@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Bänder (wechselnde Bereiche) ---------- */

.band {
    position: relative;
    margin-top: calc(var(--band-r) * -1);
    padding: var(--band-y) 0 calc(var(--band-y) + var(--band-r));
    border-radius: var(--band-r) var(--band-r) 0 0;
    background: var(--bg);
    color: var(--fg);
}

.theme-games, .theme-apps {
    --bg: var(--paper-100);
    --fg: var(--on-light);
    --muted: var(--on-light-muted);
    --card: #fff;
    --line: rgba(21, 26, 38, .09);
    --shadow: 0 1px 2px rgba(21, 26, 38, .05), 0 14px 28px -14px rgba(70, 50, 20, .22);
    --accent: var(--amber);
    --accent-text: var(--amber-ink);
    --accent-soft: rgba(237, 169, 58, .18);
    --on-accent: #231603;
    --focus: var(--amber-ink);
}
.theme-games { --bg: var(--cool-100); }
.theme-support {
    --bg: var(--ink-900);
    --fg: var(--on-dark);
    --muted: var(--on-dark-muted);
    --accent-text: var(--amber);
    --accent-soft: rgba(237, 169, 58, .16);
    --focus: var(--amber);
}

/* ---------- Kachel-Paletten (Look je Spieltyp) ---------- */
/* Neuer Typ in content/games.js → hier eine Palette .pal-<id> ergänzen (sonst gilt der klassische Look). */

.pal-classic {
    --card: #fff;
    --fg: #151a26;
    --muted: #55607a;
    --line: rgba(21, 26, 38, .1);
    --accent: #eda93a;
    --accent-text: #8f5406;
    --accent-soft: rgba(237, 169, 58, .18);
    --on-accent: #231603;
    --tag-bg: #f4efe3;
    --tag-fg: #5d523c;
    --star-on: #e8a021;
    --star-off: rgba(21, 26, 38, .13);
    --shadow: 0 1px 2px rgba(21, 26, 38, .05), 0 14px 28px -14px rgba(30, 40, 70, .28);
    --shadow-up: 0 2px 4px rgba(21, 26, 38, .06), 0 30px 48px -20px rgba(30, 40, 70, .42);
    --focus: #8f5406;
    --swatch: #fbf3e1;
    --swatch-ink: #a2610a;
}
.pal-3d {
    --card: #1a2338;
    --fg: #eef1f7;
    --muted: #a9b3c9;
    --line: rgba(255, 255, 255, .09);
    --accent: #8b98f4;
    --accent-text: #a9b3ff;
    --accent-soft: rgba(139, 152, 244, .16);
    --on-accent: #0d1330;
    --tag-bg: rgba(255, 255, 255, .08);
    --tag-fg: #c3cbe0;
    --star-on: #8b98f4;
    --star-off: rgba(255, 255, 255, .16);
    --shadow: 0 16px 30px -18px rgba(8, 12, 30, .7);
    --shadow-up: 0 34px 50px -22px rgba(8, 12, 30, .8);
    --focus: #8b98f4;
    --swatch: #1a2338;
    --swatch-ink: #8b98f4;
}
.pal-long {
    --card: #0f3532;
    --fg: #e6f4f0;
    --muted: #9fc4bb;
    --line: rgba(255, 255, 255, .1);
    --accent: #45b89e;
    --accent-text: #6fd3ba;
    --accent-soft: rgba(69, 184, 158, .18);
    --on-accent: #04231c;
    --tag-bg: rgba(255, 255, 255, .09);
    --tag-fg: #bfe0d8;
    --star-on: #45b89e;
    --star-off: rgba(255, 255, 255, .16);
    --shadow: 0 16px 30px -18px rgba(3, 30, 26, .75);
    --shadow-up: 0 34px 50px -22px rgba(3, 30, 26, .85);
    --focus: #6fd3ba;
    --swatch: #0f3532;
    --swatch-ink: #45b89e;
}
.pal-casino {
    --card: #2a1f33;
    --fg: #f4eef6;
    --muted: #c0b0c9;
    --line: rgba(255, 255, 255, .1);
    --accent: #f0806f;
    --accent-text: #f79a8b;
    --accent-soft: rgba(240, 128, 111, .18);
    --on-accent: #2a0c08;
    --tag-bg: rgba(255, 255, 255, .09);
    --tag-fg: #d9c8e0;
    --star-on: #f0806f;
    --star-off: rgba(255, 255, 255, .16);
    --shadow: 0 16px 30px -18px rgba(20, 8, 30, .8);
    --shadow-up: 0 34px 50px -22px rgba(20, 8, 30, .9);
    --focus: #f79a8b;
    --swatch: #2a1f33;
    --swatch-ink: #f0806f;
}

/* ---------- Kategorie-Kopf ---------- */

.cat-head { max-width: 760px; margin: 0 auto clamp(32px, 4vw, 48px); text-align: center; }
.cat-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 20px;
    border-radius: 17px;
    background: var(--accent-soft);
    color: var(--accent-text);
}
.cat-icon .icon { width: 26px; height: 26px; }
.kicker { margin-bottom: 10px; color: var(--accent-text); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.cat-head h2 { margin-bottom: 14px; font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; line-height: 1.04; letter-spacing: -.04em; text-wrap: balance; }
.cat-head .lead { color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.65; }

/* ---------- Filterleiste ---------- */

.toolbar {
    display: none;
    gap: 16px;
    margin: 0 auto clamp(24px, 3vw, 36px);
    padding: clamp(14px, 1.6vw, 22px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, .62);
}
.js .toolbar { display: grid; grid-template-columns: minmax(0, 1fr); }

.tb-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tb-label {
    flex: 0 0 82px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.search { position: relative; display: flex; flex: 1 1 300px; align-items: center; max-width: 480px; }
.search .icon { position: absolute; left: 17px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search input,
.sort select {
    min-height: 46px;
    border: 1.5px solid rgba(21, 26, 38, .14);
    border-radius: 999px;
    background-color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: border-color .2s, box-shadow .2s;
}
.search input { width: 100%; padding: 0 18px 0 47px; }
.search input::placeholder { color: #8b94a8; font-weight: 500; }
.search input:hover, .sort select:hover { border-color: rgba(21, 26, 38, .35); }
.search input:focus-visible, .sort select:focus-visible { outline: none; border-color: var(--amber-ink); box-shadow: 0 0 0 3px rgba(237, 169, 58, .35); }

.sort { display: flex; min-width: 0; align-items: center; gap: 12px; }
.sort .tb-label { flex: none; }
.sort select {
    padding: 0 44px 0 18px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355607a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 15px center;
    background-repeat: no-repeat;
    background-size: 17px;
    cursor: pointer;
}

.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 15px;
    border: 1.5px solid rgba(21, 26, 38, .14);
    border-radius: 999px;
    background: #fff;
    color: #1b2233;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.chip-btn:hover { border-color: #1b2233; transform: translateY(-1px); }
.chip-btn .n { color: #7a8499; font-size: 12px; font-variant-numeric: tabular-nums; }
.chip-btn[aria-pressed="true"] { border-color: var(--ink-850); background: var(--ink-850); color: #fff; }
.chip-btn[aria-pressed="true"] .n { color: rgba(255, 255, 255, .62); }
.chip-btn:focus-visible { outline-color: var(--amber-ink); }

.chip-btn--type { padding-left: 8px; }
.t-ico {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(21, 26, 38, .14);
    border-radius: 50%;
    background: var(--swatch);
    color: var(--swatch-ink);
}
.t-ico .icon { width: 14px; height: 14px; }

.tb-meta { display: flex; align-items: center; gap: 16px; margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 700; }
.reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
    border: 0;
    background: none;
    color: var(--amber-ink);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.reset[hidden] { display: none; }
.reset .icon { width: 15px; height: 15px; }

.legend { display: flex; flex: 1; flex-wrap: wrap; gap: 4px 20px; list-style: none; color: var(--muted); font-size: 12.5px; }
.legend b { color: var(--on-light); font-weight: 800; }

/* ---------- Spiele-Raster: eine Kategorie, volle Breite ---------- */

.games {
    --gap: clamp(14px, 1.5vw, 22px);
    --tile-min: 250px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--tile-min)), 1fr));
    gap: var(--gap);
}

.game {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;   /* Fallback ohne Subgrid */
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--fg);
    box-shadow: var(--shadow);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.game[hidden] { display: none; }
.game:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: var(--shadow-up); }

/* Subgrid: Titel, Beschreibung, Sterne und Tags liegen in jeder Reihe exakt auf gleicher Höhe */
@supports (grid-template-rows: subgrid) {
    .games { row-gap: 0; margin-bottom: calc(var(--gap) * -1); }
    .game { grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; margin-bottom: var(--gap); }
}

.game.pal-long { border-color: rgba(69, 184, 158, .45); }
.game.pal-casino { border-color: rgba(240, 128, 111, .45); }
.game.look-hybrid { border-color: rgba(139, 152, 244, .55); }

.g-title, .g-desc, .g-rating, .g-tags {
    min-width: 0;
    background: var(--card);
    color: var(--fg);
    padding-inline: clamp(16px, 1.3vw, 22px);
}

.g-title {
    padding-top: 18px;
    font-size: clamp(18px, 1.2vw, 21px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
}
/* ganze Kachel klickbar, aber nur der Titel ist der Link (saubere Semantik für Suchmaschinen & Screenreader) */
.g-link { color: inherit; text-decoration: none; }
.g-link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.g-link:focus-visible { outline: none; }
.g-link:focus-visible::after { outline: 3px solid var(--focus, var(--indigo)); outline-offset: -5px; border-radius: var(--radius); }

.g-desc { padding-top: 8px; padding-bottom: 16px; }
.g-desc p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
    line-clamp: 7;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.g-rating {
    --inset: clamp(16px, 1.3vw, 22px);
    display: grid;
    align-content: start;
    gap: 7px;
    padding-top: 14px;
    padding-bottom: 14px;
    list-style: none;
    background-image: linear-gradient(var(--line), var(--line));
    background-position: center top;
    background-repeat: no-repeat;
    background-size: calc(100% - 2 * var(--inset)) 1px;
}
.g-rating li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.r-label { color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }

/* Sterne: Maske + Verlauf → auch halbe Werte (3.5) und beliebige Skalen (--max) funktionieren */
.stars {
    --size: 16px;
    --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.75 5.75 6.3.85-4.6 4.4 1.15 6.25L12 17.05 6.4 20.05l1.15-6.25-4.6-4.4 6.3-.85z' fill='%23000' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
    flex: none;
    width: calc(var(--size) * var(--max, 5));
    height: var(--size);
    background: linear-gradient(90deg, var(--star-on) calc(var(--v, 0) / var(--max, 5) * 100%), var(--star-off) 0);
    -webkit-mask: var(--star) 0 0 / var(--size) var(--size) repeat-x;
    mask: var(--star) 0 0 / var(--size) var(--size) repeat-x;
}
.stars.is-empty { opacity: .45; }

/* Sprach-Flaggen (erste Zeile über den Sternen) */
.flags { display: inline-flex; gap: 6px; }
.flag { display: inline-flex; width: 22px; height: 15px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
.flag svg { display: block; width: 100%; height: 100%; }

.g-tags {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px;
    padding-top: 2px;
    padding-bottom: 20px;
    list-style: none;
}
.g-tags li {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--tag-bg);
    color: var(--tag-fg);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.4;
}

/* ---------- Cover ---------- */

.cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-900); }
.cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease);
}
.cover::before, .cover::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cover::before { background: linear-gradient(to top, rgba(8, 12, 22, .4), transparent 45%); }
.cover::after { background: rgba(8, 12, 22, .4); opacity: 0; transition: opacity .35s; }
.game:hover .cover img { transform: scale(1.07); }
.game:hover .cover::after { opacity: 1; }

.play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: auto;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .3s, transform .4s var(--ease);
}
.play .icon { width: 22px; height: 22px; margin-left: 2px; }
.game:hover .play { opacity: 1; transform: scale(1); }
@media (hover: none) { .play { display: none; } }

/* Typ-Symbole (Legende: siehe Filter „Spieltyp“) */
.types { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; pointer-events: none; }
.type-badge {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1.5px solid rgba(255, 255, 255, .6);
    border-radius: 50%;
    background: var(--swatch);
    color: var(--swatch-ink);
    box-shadow: 0 4px 12px -3px rgba(0, 0, 0, .55);
}
.type-badge .icon { width: 16px; height: 16px; }


.chip {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(10, 14, 23, .78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, #8a93a8); }
.chip--proto { --dot: var(--amber); }
.chip--concept { --dot: var(--indigo); }
.chip--stopped { --dot: #8a93a8; }

/* Klickzähler (wird per JS eingefügt, sobald der Server Zahlen liefert) */
.hits {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px 5px 9px;
    border-radius: 999px;
    background: rgba(10, 14, 23, .78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
    line-height: 1.2;
    pointer-events: none;
}
.hits .icon { width: 13px; height: 13px; color: var(--accent, var(--amber)); }

/* Spielerzahl: unten mittig auf dem Cover (Text aus content/games.js → players) */
.players {
    position: absolute;
    bottom: 10px;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px 5px 10px;
    border-radius: 999px;
    background: rgba(10, 14, 23, .78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
}
.players .icon { width: 14px; height: 14px; color: var(--accent, var(--amber)); }

.empty { padding: 56px 0 8px; color: var(--muted); font-size: 17px; font-weight: 600; text-align: center; }
.empty[hidden] { display: none; }

/* ---------- Apps (einklappbar) ---------- */

.apps-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    margin-top: 28px;
    padding: 0 26px;
    border: 1.5px solid var(--fg);
    border-radius: 999px;
    background: transparent;
    color: var(--fg);
    font: 700 15px/1 var(--font);
    cursor: pointer;
    transition: background-color .25s, color .25s;
}
.apps-toggle:hover { background: var(--fg); color: var(--bg); }
.apps-toggle .count {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 12.5px;
    transition: background-color .25s, color .25s;
}
.apps-toggle:hover .count { background: rgba(255, 255, 255, .18); color: var(--bg); }
.apps-toggle .chev { transition: transform .35s var(--ease); }
.apps-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.apps-panel {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows .6s var(--ease), visibility 0s linear .6s;
}
.apps-panel.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .6s var(--ease), visibility 0s; }
.apps-inner { min-height: 0; overflow: hidden; }

.apps-row {
    --gap: clamp(14px, 1.6vw, 22px);
    --cols: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap);
    padding: clamp(36px, 4vw, 52px) 0 6px;
}
@media (min-width: 520px)  { .apps-row { --cols: 2; } }
@media (min-width: 800px)  { .apps-row { --cols: 3; } }
@media (min-width: 1100px) { .apps-row { --cols: 4; } }
@media (min-width: 1320px) { .apps-row { --cols: 6; } }
@media (min-width: 1680px) { .apps-row { --cols: 8; } }

.app {
    position: relative;
    display: flex;
    flex: 0 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols) - .5px);
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow);
}
.app .cover { aspect-ratio: 16 / 9; }
.app .body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 16px 18px 20px; }
.app .tags { color: var(--accent-text); font-size: 11.5px; font-weight: 800; letter-spacing: .11em; line-height: 1.5; text-transform: uppercase; }
.app .title { font-size: 17px; font-weight: 800; line-height: 1.15; letter-spacing: -.025em; }
.app .desc { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* ---------- Danke / Footer ---------- */

.support { max-width: 680px; margin: 0 auto; text-align: center; }
.support-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 20px;
    background: var(--accent-soft);
    color: var(--accent-text);
}
.support-icon .icon { width: 30px; height: 30px; }
.support h2 { margin-bottom: 14px; font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; }
.support p { color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.7; }
.support .btn { margin-top: 30px; min-height: 54px; padding: 0 30px; font-size: 16px; }
.support .fine { margin-top: 14px; font-size: 13px; }

.footer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(56px, 7vw, 88px);
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: var(--muted);
    font-size: 13.5px;
}
.footer-bar .brand { font-size: 16px; }
.footer-bar .brand-mark { width: 30px; height: 30px; border-radius: 10px; }

/* ---------- Einblenden beim Scrollen ---------- */

.js :is(.cat-head, .game, .support) { opacity: 0; }
.js :is(.cat-head, .game, .support).in {
    opacity: 1;
    animation: rise .7s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 70ms);
}
.js .game.in { animation-name: rise-tile; }
@keyframes rise-tile { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Responsive ---------- */

@media (max-width: 899px) {
    .nav-links { display: none; }
    .lang { margin-left: auto; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { display: none; }
}
@media (max-width: 720px) {
    .tb-label { flex-basis: 100%; }
    .sort { width: 100%; }
    .sort .tb-label { flex: none; }
    .sort select { flex: 1; min-width: 0; }
    .search { max-width: none; flex-basis: 100%; }
    .tb-meta { margin-left: 0; }
}
@media (max-width: 520px) {
    .nav { gap: 8px; padding-left: 14px; }
    .brand i { display: none; }
    .nav .btn span { display: none; }
    .nav .btn { width: 44px; padding: 0; }
    .hero-cta .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    .js :is(.cat-head, .game, .support) { opacity: 1; }
}
