/* Hauptseite der Spielesammlung
   Farben und Abstände zentral als Variablen, damit sich das Aussehen an einer Stelle ändern lässt. */
:root {
  --bg: #14112b;
  --bg-2: #1d1840;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f4f1ff;
  --muted: #b9b3d9;
  --accent: #ff7a59;
  --accent-2: #ff4f9a;
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-2) 0%, var(--bg) 60%) fixed, var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---------- Hintergrund: weiche, langsam treibende Farbflächen ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute;
  width: 46vmax; height: 46vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: drift 28s ease-in-out infinite alternate;
}
.b1 { background: #ff7a59; top: -18vmax; left: -12vmax; }
.b2 { background: #6c5cff; bottom: -22vmax; right: -14vmax; animation-delay: -9s; }
.b3 { background: #ff4f9a; top: 30%; left: 55%; width: 30vmax; height: 30vmax; opacity: 0.22; animation-delay: -17s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(6vmax, 4vmax) scale(1.12); }
}

/* ---------- Kopfbereich ---------- */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(48px, 10vw, 110px) var(--gutter) clamp(24px, 5vw, 48px);
  text-align: center;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ffd166 0%, var(--accent) 40%, var(--accent-2) 75%, #a78bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  max-width: 34em;
  margin: 18px auto 0;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  color: var(--muted);
}

/* ---------- Spielekarten ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter) 40px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(16px, 3vw, 28px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(6px);
  transition: transform 0.25s cubic-bezier(.2,.8,.3,1.3), box-shadow 0.25s, border-color 0.25s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
a.card:hover, a.card:focus-visible {
  transform: translateY(-6px) rotate(-0.4deg);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
  outline: none;
}
a.card:focus-visible { box-shadow: 0 0 0 3px #ffd166, 0 22px 50px rgba(0, 0, 0, 0.4); }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--c1, #3a2f7a), var(--c2, #6c5cff));
  overflow: hidden;
}
.thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.8,.3,1);
}
a.card:hover .thumb img { transform: scale(1.06); }
.thumb .icon {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 4rem;
}

.badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1b1440;
  background: #ffd166;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.body h2 { margin: 0; font-size: 1.45rem; font-weight: 900; letter-spacing: -0.01em; }
.tagline { margin: 0; color: #ffd9c9; font-weight: 700; }
.desc { margin: 0; color: var(--muted); font-size: 0.95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.tags li {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.play {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(100deg, var(--c1, var(--accent)), var(--c2, var(--accent-2)));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.play::after { content: " ▶"; font-size: 0.8em; }

/* Platzhalter, solange die Spiele geladen werden */
.skeleton .thumb { background: rgba(255, 255, 255, 0.05); }
.skeleton .line { height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.08); }
.skeleton .w60 { width: 60%; height: 22px; }
.skeleton .w90 { width: 90%; }
.skeleton .w40 { width: 40%; }
.skeleton .thumb, .skeleton .line { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

.status { text-align: center; color: var(--muted); padding: 30px 0; }

footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 10px var(--gutter) 40px; opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .blob, .skeleton .thumb, .skeleton .line { animation: none; }
  .card, .thumb img { transition: none; }
}
