/* Thumbs Party – Übersicht der Spiele.
   Layout: schmaler Kopf mit Logo und „So geht's“, darunter ein Raster aus Spielkarten,
   jede Karte ein kleiner Fernseher mit Vorschaubild. Spielwelten bringen ihren eigenen Look
   über das Vorschaubild mit; die Seite selbst bleibt ruhig (Wohnzimmer am Abend). */

@font-face {
  font-family: "Bagel Fat One";
  src: url("/fonts/bagel-fat-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Farben: dunkel zuerst (Spieleabend), hell als Variante */
  --bg: #1c1322;
  --panel: #281c31;
  --line: #3e2f49;
  --fg: #f6ecdf;
  --muted: #b8a7c3;
  --accent: #ff9147;
  --accent-ink: #2b1206;
  --ok: #8fd6a4;
  --soon: #c9b6d6;
  /* Schrift */
  --display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --text: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3edf4;
    --panel: #ffffff;
    --line: #ddd1e2;
    --fg: #22182a;
    --muted: #65566f;
    --accent: #d55f17;
    --accent-ink: #ffffff;
    --ok: #1f7a3c;
    --soon: #6d5a7a;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3edf4;
  --panel: #ffffff;
  --line: #ddd1e2;
  --fg: #22182a;
  --muted: #65566f;
  --accent: #d55f17;
  --accent-ink: #ffffff;
  --ok: #1f7a3c;
  --soon: #6d5a7a;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.55 var(--text);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Kopf */
.top {
  padding-block: clamp(28px, 6vw, 64px) 8px;
  display: grid;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand svg {
  width: clamp(44px, 8vw, 64px);
  height: auto;
  flex: none;
}
.mark-dot {
  fill: var(--accent);
}
.mark-print {
  stroke: var(--accent-ink);
}
.logo {
  margin: 0;
  font: 400 clamp(2.4rem, 7vw, 4.4rem) / 0.95 var(--display);
  letter-spacing: 0.01em;
}
.logo span {
  color: var(--accent);
}
.lead {
  margin: 0;
  max-width: 36ch;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.4;
  text-wrap: balance;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 28px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  font-size: 0.98rem;
  min-width: 0;
}
.steps li::before {
  content: counter(step);
  font: 400 1.1rem/1 var(--display);
  color: var(--accent-ink);
  background: var(--accent);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.steps b {
  color: var(--fg);
}

/* Spiele */
.games {
  padding-block: 36px 56px;
}
.games h2 {
  margin: 0 0 18px;
  font: 700 0.8rem/1 var(--text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 24px;
  align-items: start;
}

.game {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: #000;
}
.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.status {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgb(20 12 24 / 0.78);
  color: #f6ecdf;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8fd6a4;
}
.status.soon::before {
  background: #c9b6d6;
}

.body {
  padding: 18px 20px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.series {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.game h3 {
  margin: -6px 0 0;
  font: 400 1.75rem/1.1 var(--display);
  text-wrap: balance;
}
.game p.desc {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.facts li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* Knöpfe */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.btn,
.join > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--accent);
  user-select: none;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.join > summary {
  color: var(--fg);
  list-style: none;
}
.join > summary::-webkit-details-marker {
  display: none;
}
.btn:hover,
.join > summary:hover {
  filter: brightness(1.08);
}
.btn[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
  cursor: default;
}
.more {
  font-size: 0.92rem;
  color: var(--muted);
  text-underline-offset: 3px;
}
.more:hover {
  color: var(--fg);
}

.join {
  min-width: 0;
  max-width: 100%;
}
.join[open] {
  flex-basis: 100%;
}
.join[open] > summary {
  background: var(--line);
  border-color: var(--line);
}
.join form {
  margin-top: 10px;
  min-width: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.join label {
  flex-basis: 100%;
  font-size: 0.88rem;
  color: var(--muted);
}
.join input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font: 400 1.35rem/1 var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.join input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}
.join input:focus {
  border-color: var(--accent);
  outline: none;
}

/* Fuß */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 22px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}
.foot nav {
  display: flex;
  gap: 20px;
}

/* Rechtstexte */
.legal {
  padding-block: 32px 56px;
  max-width: 68ch;
}
.legal h1 {
  font: 400 2.2rem/1.1 var(--display);
  margin: 0 0 20px;
}
.legal h2 {
  font-size: 1.1rem;
  margin: 28px 0 6px;
}
.legal p,
.legal li {
  color: var(--fg);
}
.back {
  display: inline-block;
  margin-top: 28px;
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  .game {
    transition:
      transform 0.2s ease,
      border-color 0.2s ease;
  }
  .game:not(.soon):hover {
    transform: translateY(-3px);
    border-color: var(--accent);
  }
}

/* Online-Runde am PC gibt es nur mit großem Bildschirm und Maus (wie im Spiel selbst). */
@media not ((min-width: 1000px) and (hover: hover) and (pointer: fine)) {
  .pc-only {
    display: none;
  }
}

/* Noch nicht spielbar: ausgegraut */
.game.soon {
  opacity: 0.55;
}
.game.soon .screen img {
  filter: grayscale(1);
}
