:root {
  --bg: #0b1020; --bg2: #121a33; --card: #161f3d; --line: #26315a;
  --text: #e8ecff; --muted: #9aa6d6; --brand: #38bdf8; --brand2: #a78bfa;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1d2a5c 0%, transparent 60%),
              radial-gradient(900px 500px at 100% 0%, #2a1d5c 0%, transparent 55%), var(--bg);
  color: var(--text); min-height: 100vh; display: flex; flex-direction: column; line-height: 1.5;
}
a { color: var(--brand); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

header.site { padding: 20px 0; border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: .5px; }
.logo svg { width: 34px; height: 34px; }
.logo span { background: linear-gradient(90deg, var(--brand), var(--brand2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav.top a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: .95rem; }
nav.top a:hover { color: var(--text); }

.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); margin: 0 0 8px; line-height: 1.15; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 560px; }

.tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 24px 0; }
#filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #04121c; font-weight: 600; }
#search { background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font: inherit; width: 240px; max-width: 100%; }
#search:focus, .chip:focus-visible, .card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

#grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; padding-bottom: 48px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 30px -12px var(--accent); }
.card.disabled { opacity: .55; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #0d1430; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { display: inline-block; margin-left: 8px; vertical-align: 2px; background: #f43f5e; color: #fff; font-size: .68rem; font-weight: 700; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; line-height: 1.4; }
.badge.soon { background: var(--brand2); color: #160b33; }
.body { padding: 14px 16px 8px; flex: 1; }
.body h2 { margin: 0 0 4px; font-size: 1.15rem; }
.body p { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.play { display: block; margin: 8px 16px 16px; text-align: center; background: var(--accent); color: #04121c; font-weight: 700; border-radius: 10px; padding: 8px; }
#empty { text-align: center; color: var(--muted); padding: 32px 0; }

main { flex: 1; }
footer.site { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .88rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
footer.site a { color: var(--muted); margin-left: 14px; }
footer.site .visits b { font-weight: 700; color: var(--text, inherit); }
#visits[hidden] { display: none !important; }

.page { max-width: 760px; padding: 40px 16px 60px; }
.page h1 { margin-top: 0; }

/* Leiste über einem Spiel */
.gamebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.gamebar a { color: var(--text); text-decoration: none; font-weight: 600; }
.gamebar .title { color: var(--muted); flex: 1; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gamebar .legal { display: flex; gap: 12px; }
.gamebar .legal a { color: var(--muted); font-weight: 400; font-size: .8rem; }
.gamebar .legal a:hover { color: var(--text); }
@media (max-width: 520px) { .gamebar { gap: 8px; padding: 8px 12px; } .gamebar .title { color: transparent; } .gamebar .legal { gap: 8px; } .gamebar .legal a { font-size: .72rem; } }
.gameframe { flex: 1; width: 100%; border: 0; display: block; background: #000; }

@media (max-width: 560px) {
  nav.top { display: none; }
  #search { width: 100%; }
  .tools { flex-direction: column-reverse; align-items: stretch; }
}


/* Spenden */
.donate[hidden] { display: none; }
.donate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px; }
.donate > div { flex: 1 1 320px; }
.donate h2 { margin: 0 0 4px; font-size: 1.1rem; }
.donate p { margin: 0; color: var(--muted); font-size: .92rem; }
.donate-btn { display: inline-block; background: #ffc439; color: #111; font-weight: 800; text-decoration: none; padding: 10px 18px; border-radius: 999px; white-space: nowrap; }
.donate-btn:hover { filter: brightness(1.05); }
.donate-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
