/* RRC Arcade – Grundstil */
@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/press-start-2p-latin-ext-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0d1124;
  --bg-2: #161c38;
  --panel: #1d2547;
  --line: #2f3a6b;
  --text: #e8ecff;
  --muted: #9aa5d6;
  --gold: #ffd23f;
  --red: #ff4b4b;
  --green: #7fd13b;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Szene im Header: 150 px hoch, 3-fach vergrößert */
  --scene-h: 450px;
  --sky-extra: 96px;
  --sky: #44a1fd;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0) 0 0 / 8px 8px,
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img.pixel, .pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold); }

/* ---------- Header mit RRC-Gebäude ---------- */
.hero {
  position: relative;
  height: calc(var(--scene-h) + var(--sky-extra));
  background-color: var(--sky);
  background-image: var(--scene);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: auto var(--scene-h);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  overflow: hidden;
  transition: background-color .6s;
  border-bottom: 6px solid #000;
}
.hero[data-wetter="tag"]    { --sky: #44a1fd; --scene: url("../img/header-tag.png"); }
.hero[data-wetter="nacht"]  { --sky: #0c1d3f; --scene: url("../img/header-nacht.png"); }
.hero[data-wetter="regen"]  { --sky: #435c78; --scene: url("../img/header-regen.png"); }
.hero[data-wetter="schnee"] { --sky: #9bb7db; --scene: url("../img/header-schnee.png"); }
.hero[data-wetter="sturm"]  { --sky: #758fb3; --scene: url("../img/header-sturm.png"); }

.hero canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.logo {
  position: absolute;
  left: 50%; top: 34px;
  transform: translateX(-50%);
  margin: 0;
  text-align: center;
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
}
.logo .rrc {
  display: block;
  font-size: 64px;
  color: var(--gold);
  letter-spacing: 4px;
  text-shadow:
    4px 0 #000, -4px 0 #000, 0 4px #000, 0 -4px #000,
    4px 4px #000, -4px 4px #000, 4px -4px #000, -4px -4px #000,
    8px 8px 0 #b3261e;
}
.logo .arcade {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 12px 7px;
  font-size: 18px;
  letter-spacing: 6px;
  color: #fff;
  background: #000;
  box-shadow: 4px 4px 0 #b3261e;
}

.wetter-wahl {
  position: absolute;
  right: 16px; top: 14px;
  display: flex; gap: 6px;
  z-index: 3;
}
.wetter-wahl button {
  width: 34px; height: 34px;
  padding: 0;
  font-size: 17px; line-height: 1;
  background: rgba(0,0,0,.45);
  border: 2px solid rgba(0,0,0,.7);
  color: #fff;
  cursor: pointer;
  filter: grayscale(.6);
  opacity: .75;
}
.wetter-wahl button:hover { opacity: 1; filter: none; }
.wetter-wahl button[aria-pressed="true"] {
  opacity: 1; filter: none;
  border-color: var(--gold);
  background: rgba(0,0,0,.7);
}

/* ---------- Inhalt ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}
.intro {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 640px;
  color: var(--muted);
}
h2 {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--text);
  margin: 0 0 22px;
  display: flex; align-items: center; gap: 14px;
}
h2::after { content: ""; flex: 1; height: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 12px); }

.spiele {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.karte {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000, inset 0 0 0 2px var(--line);
  text-decoration: none;
  color: inherit;
  transition: transform .12s, box-shadow .12s;
}
a.karte:hover, a.karte:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 #000, inset 0 0 0 2px var(--gold);
  outline: none;
}
.karte .bild {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000;
  border-bottom: 4px solid #000;
}
.karte .bild img.cover {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.karte .bild img.fahne {
  position: absolute;
  width: 56px; left: 58%; top: 70%;
}
.karte .inhalt { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.karte h3 {
  font-family: var(--pixel); font-weight: 400;
  font-size: 15px; line-height: 1.4;
  margin: 0;
}
.karte p { margin: 0; color: var(--muted); font-size: 15px; }
.karte .knopf {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--pixel);
  font-size: 11px;
  padding: 10px 12px;
  background: var(--gold);
  color: #000;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
}

.status {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--pixel); font-size: 9px;
  padding: 6px 8px;
  background: var(--red); color: #fff;
  border: 2px solid #000;
  z-index: 1;
}
.status.dev { background: #ff8a1f; color: #000; }

/* Platzhalter-Karten */
.karte.leer { opacity: .75; }
.karte.leer .bild {
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 4px),
    linear-gradient(#141a35, #0b0f22);
}
.karte.leer .bild span {
  font-family: var(--pixel); font-size: 40px; color: var(--line);
}
.blinken { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Footer ---------- */
footer {
  border-top: 4px solid #000;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 14px;
}
footer .zeile {
  max-width: 1080px; margin: 0 auto; padding: 18px 20px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
}
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--gold); }

/* ---------- Unterseiten ---------- */
.seite {
  max-width: 720px;
}
.seite h1 {
  font-family: var(--pixel); font-weight: 400; font-size: 22px; line-height: 1.4;
  color: var(--gold);
}
.mini-header {
  background: #000;
  border-bottom: 4px solid var(--line);
}
.mini-header a {
  display: inline-block;
  max-width: 1080px;
  padding: 16px 20px;
  font-family: var(--pixel); font-size: 16px;
  color: var(--gold); text-decoration: none;
}
.mini-header a span { color: #fff; font-size: 11px; margin-left: 8px; }

/* ---------- Mobil ---------- */
@media (max-width: 700px) {
  :root { --scene-h: 300px; --sky-extra: 100px; }
  .logo { top: 54px; }
  .logo .rrc { font-size: 40px; letter-spacing: 2px;
    text-shadow: 3px 0 #000, -3px 0 #000, 0 3px #000, 0 -3px #000, 3px 3px #000, -3px 3px #000, 3px -3px #000, -3px -3px #000, 5px 5px 0 #b3261e; }
  .logo .arcade { font-size: 12px; letter-spacing: 4px; margin-top: 10px; }
  .wetter-wahl { right: 50%; transform: translateX(50%); top: 8px; }
  .wetter-wahl button { width: 30px; height: 30px; font-size: 15px; }
  main { padding-top: 32px; }
  h2 { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .blinken { animation: none; }
  a.karte { transition: none; }
}

/* weicher Übergang vom einfarbigen Himmel in die Szene */
.hero::before {
  content: "";
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--scene-h) - 66px);
  height: 66px;
  background: linear-gradient(var(--sky), color-mix(in srgb, var(--sky) 0%, transparent));
  pointer-events: none;
}
