:root {
  --bg: #14122b;
  --bg-2: #1d1a3d;
  --surface: #262250;
  --surface-2: #322d66;
  --text: #f3f1ff;
  --muted: #a9a3d6;
  --accent: #ffb547;
  --accent-text: #2a1a00;
  --radius: 20px;
  --display: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(90% 50% at 15% -10%, rgba(226, 85, 122, .28) 0%, transparent 60%),
    radial-gradient(80% 45% at 100% 0%, rgba(108, 140, 255, .22) 0%, transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

main, .site-header, .site-footer {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ---------- Kopfzeile ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 13px);
  gap: 3px;
}
.brand-mark i { width: 13px; height: 13px; border-radius: 4px; display: block; }
.brand-mark i:nth-child(1) { background: #ffb547; }
.brand-mark i:nth-child(2) { background: #e2557a; }
.brand-mark i:nth-child(3) { background: #5ee6a8; }
.brand-mark i:nth-child(4) { background: #6c8cff; transform: translate(2px, 2px) rotate(12deg); }

.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: .2px;
}

.lang-switch {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  background: var(--surface);
  border-radius: 999px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 13px/1 system-ui, sans-serif;
  letter-spacing: .5px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

/* ---------- Hero ---------- */

main { flex: 1; }

.hero { padding: 36px 0 28px; max-width: 640px; }

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 7vw, 52px);
  line-height: 1.08;
  letter-spacing: -.5px;
  margin: 0 0 14px;
  text-wrap: balance;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2.6vw, 18px);
  text-wrap: pretty;
}

/* ---------- Spieleliste ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  margin: 0;
}
.count { color: var(--muted); font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  padding-bottom: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 10px 30px rgba(0, 0, 0, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.card:hover, a.card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 18px 40px rgba(0, 0, 0, .4);
}
a.card:active { transform: scale(.98); }
a.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.card-cover {
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  overflow: hidden;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
a.card:hover .card-cover img { transform: scale(1.04); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  flex: 1;
}

.card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.card-text { margin: 0; color: var(--muted); font-size: 15px; }

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags li {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
}

.play {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px 11px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 16px;
}

.card.soon {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 32px 24px;
  min-height: 220px;
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--surface-2);
  border: 0;
}
.card.soon .card-title { font-size: 19px; }
.soon-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ---------- Fußzeile ---------- */

.site-footer {
  padding-top: 20px;
  padding-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
