/* Schwarze Blume – Homepage. Farben aus dem Spiel: Rost (Druschba), Bernstein, Stahl, Cyan (U.S.I./P.A.N.O.P.T.A.) */
@font-face {
  font-family: "Pixel";
  src: url("../fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #07060d;
  --bg2: #100d18;
  --panel: rgba(18, 15, 26, 0.86);
  --line: #2e2638;
  --text: #e8e2d6;
  --dim: #a59c8e;
  --amber: #ffc845;
  --rust: #d0442a;
  --red: #ff3b30;
  --steel: #8a96a0;
  --cyan: #40e8ff;
  --ok: #5ee08a;
  --radius: 4px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; image-rendering: pixelated; }
.pixel, h1, h2, h3, .btn, .nav a, .badge, .stat .n, .tag { font-family: "Pixel", monospace; letter-spacing: 0.02em; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 0.6em; font-weight: normal; }
h2 { font-size: 22px; color: var(--amber); text-shadow: 0 0 12px rgba(255, 170, 40, 0.35); }
h3 { font-size: 13px; color: var(--text); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
section { padding: 72px 0; }
.dim { color: var(--dim); }
.center { text-align: center; }

/* Kopfzeile */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 6, 13, 0.82); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: "Pixel", monospace; font-size: 12px; }
.brand img { width: 28px; height: 28px; }
.brand span b { color: var(--amber); font-weight: normal; }
.nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { font-size: 10px; color: var(--dim); padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius); }
.nav a:hover, .nav a.on { color: var(--amber); border-color: var(--line); text-decoration: none; }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); padding: 6px 10px; font-family: "Pixel"; font-size: 10px; border-radius: var(--radius); cursor: pointer; }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; padding: 14px 18px; border-radius: var(--radius);
  border: 2px solid var(--amber); color: var(--bg); background: var(--amber);
  box-shadow: 0 4px 0 #8a5a10, 0 0 24px rgba(255, 190, 60, 0.18);
  cursor: pointer; transition: transform 0.08s, box-shadow 0.08s; text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #8a5a10, 0 0 30px rgba(255, 190, 60, 0.35); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a5a10; }
.btn.ghost { background: transparent; color: var(--amber); box-shadow: 0 4px 0 #3a2a10; }
.btn.red { background: var(--rust); border-color: var(--rust); color: #fff; box-shadow: 0 4px 0 #6a1c10; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 9px; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--dim); background: rgba(0, 0, 0, 0.35); }
.badge.ok { color: var(--ok); border-color: #1f5a34; }
.badge.warn { color: var(--amber); border-color: #5a4614; }

/* Startbild */
.hero { padding: 0; position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; filter: saturate(1.1) brightness(0.75); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 13, 0.15) 0%, rgba(7, 6, 13, 0.55) 55%, var(--bg) 100%); }
.hero .wrap { position: relative; z-index: 2; padding-bottom: 70px; }
.hero h1 { font-size: clamp(30px, 6.5vw, 68px); color: var(--amber); margin: 0 0 6px;
  text-shadow: 0 0 2px #fff6, 4px 4px 0 #6a1c10, 0 0 40px rgba(255, 80, 30, 0.45); }
.hero .sub { font-family: "Pixel"; font-size: clamp(11px, 1.6vw, 15px); color: var(--text); margin-bottom: 22px; opacity: 0.92; }
.hero p.lead { max-width: 640px; font-size: 19px; color: #f2ece2; text-shadow: 0 2px 10px #000; }
.hero .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.scanlines { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px); }

/* Karten und Raster */
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.card .in { padding: 18px 20px 20px; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.card:hover { border-color: #4a3c58; }
.card.mode img { transition: transform 0.3s; }
.card.mode:hover img { transform: scale(1.03); }
.card ul { margin: 8px 0 0; padding-left: 18px; }
.card li { margin-bottom: 6px; }
.faction { border-top: 3px solid var(--fc, var(--amber)); }
.faction h3 { color: var(--fc, var(--amber)); }

.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.story img { border: 1px solid var(--line); border-radius: var(--radius); }
.quote { font-family: "Pixel"; font-size: 12px; line-height: 2; color: var(--amber); border-left: 3px solid var(--rust); padding: 6px 0 6px 16px; margin: 18px 0; }
.ru { color: var(--dim); font-size: 14px; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery a { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: filter 0.2s, transform 0.2s; }
.gallery a:hover img { filter: brightness(1.15); transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.92); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 20px; }
.lightbox.on { display: flex; }
.lightbox img { max-height: 82vh; max-width: 96vw; border: 1px solid var(--line); }
.lightbox .cap { font-family: "Pixel"; font-size: 11px; color: var(--amber); }
.lightbox .x { position: absolute; top: 16px; right: 20px; font-size: 28px; color: var(--text); background: none; border: 0; cursor: pointer; }
.lightbox .prev, .lightbox .next { position: absolute; top: 50%; font-size: 34px; color: var(--text); background: none; border: 0; cursor: pointer; padding: 20px; }
.lightbox .prev { left: 4px; } .lightbox .next { right: 4px; }

/* Zahlen und Listen */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 22px; color: var(--amber); display: block; margin-bottom: 6px; }
.stat .l { color: var(--dim); font-size: 14px; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); margin-right: 8px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th { text-align: left; font-family: "Pixel"; font-size: 9px; color: var(--dim); font-weight: normal; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 9px 10px; border-bottom: 1px solid #1c1724; }
table.list tr.me td { color: var(--amber); background: rgba(255, 200, 70, 0.06); }
table.list td.r { text-align: right; font-variant-numeric: tabular-nums; }
.ki { font-family: "Pixel"; font-size: 8px; color: var(--steel); border: 1px solid #39424a; padding: 2px 4px; border-radius: 3px; margin-left: 6px; }
.feed li { list-style: none; padding: 7px 0; border-bottom: 1px solid #1c1724; color: var(--dim); }
.feed { padding: 0; margin: 0; }
.feed b { color: var(--text); font-weight: 600; }

/* Fortschritt (Spenden) */
.bar { height: 22px; background: #15111d; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--rust) 0 10px, #e0582e 10px 20px); box-shadow: 0 0 16px rgba(240, 90, 40, 0.5); transition: width 1.2s; }
.bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: "Pixel"; font-size: 10px; color: #fff; text-shadow: 1px 1px 0 #000; }
.costs li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 8px 0; }
.costs { padding: 0; margin: 0 0 12px; list-style: none; }

/* Formulare (Konto) */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
input[type=text] { font-family: "Pixel"; font-size: 16px; padding: 14px; width: 100%; max-width: 340px; background: #0d0a14; color: var(--amber); border: 2px solid var(--line); border-radius: var(--radius); letter-spacing: 0.2em; text-transform: uppercase; }
input[type=text]:focus { outline: none; border-color: var(--amber); }
input.name { text-transform: none; letter-spacing: 0.02em; font-size: 13px; }
.msg { min-height: 1.6em; margin-top: 10px; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--ok); }
.hidden { display: none !important; }
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.profile-head .avatar { width: 72px; height: 72px; border: 2px solid var(--amber); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-family: "Pixel"; font-size: 26px; color: var(--amber); background: #1a1424; }
.levelbar { height: 10px; background: #15111d; border-radius: 5px; overflow: hidden; margin-top: 6px; max-width: 280px; }
.levelbar i { display: block; height: 100%; background: var(--amber); }
.danger { border-color: #5a1c16; }
.steps { counter-reset: s; padding: 0; list-style: none; }
.steps li { counter-increment: s; padding: 8px 0 8px 46px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 6px; width: 30px; height: 30px; border: 2px solid var(--amber); color: var(--amber); font-family: "Pixel"; font-size: 11px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); }

/* Hinweis-Leiste Testphase */
.notice { border: 1px solid #5a4614; background: rgba(255, 200, 70, 0.06); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start; }
.notice .pixel { color: var(--amber); font-size: 11px; white-space: nowrap; margin-top: 4px; }

/* Musik-Knopf */
.music { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 10px; background: rgba(12, 10, 18, 0.92); border: 1px solid var(--line); border-radius: 30px; padding: 6px 14px 6px 6px; box-shadow: 0 6px 24px #000a; }
.music button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--amber); background: #1a1424; color: var(--amber); font-size: 15px; cursor: pointer; }
.music .t { font-family: "Pixel"; font-size: 9px; color: var(--dim); max-width: 210px; }
.music .t b { color: var(--amber); font-weight: normal; display: block; margin-top: 4px; }
.music .eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; margin-left: 4px; }
.music .eq i { width: 3px; background: var(--amber); height: 3px; }
.music.on .eq i { animation: eq 0.9s infinite ease-in-out; }
.music.on .eq i:nth-child(2) { animation-delay: 0.2s; } .music.on .eq i:nth-child(3) { animation-delay: 0.4s; } .music.on .eq i:nth-child(4) { animation-delay: 0.1s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

/* Fuß */
footer { border-top: 1px solid var(--line); padding: 40px 0 90px; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--dim); }
footer a:hover { color: var(--amber); }
.legal h2 { margin-top: 1.4em; font-size: 15px; }
.legal { max-width: 820px; }

/* Einblenden beim Scrollen */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s, transform 0.6s; }
.reveal.vis { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .g3, .g4, .gallery { grid-template-columns: repeat(2, 1fr); }
  .story { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 60px; right: 0; left: 0; background: var(--bg2); border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px; }
  .nav.open { display: flex; }
  .music .t { display: none; }
  section { padding: 52px 0; }
  /* Handy: Spielszenen ganz zeigen (nicht beschneiden), Text darunter */
  .hero { display: block; min-height: 0; padding: 0; }
  .hero video, .hero .poster { display: block; position: static; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #000; filter: none; margin: 0; }
  .hero::after { display: none; }
  .hero .scanlines { height: calc(100vw * 9 / 16); bottom: auto; }
  .hero .wrap { padding-top: 18px; padding-bottom: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero video { display: none; }
}

/* Roadmap */
.road { position: relative; margin-top: 28px; padding-left: 28px; }
.road::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--ok), var(--amber) 45%, var(--line)); }
.road .step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 14px; margin-bottom: 18px; }
.road .step::before { content: ""; position: absolute; left: -26px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); }
.road .step h3 { margin: 8px 0 6px; }
.road .step ul { margin: 0; padding-left: 18px; }
.road .step li { margin-bottom: 5px; }
.road .tag { font-family: "Pixel", monospace; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.road .fertig::before { background: var(--ok); border-color: var(--ok); }
.road .fertig .tag { color: var(--ok); }
.road .fertig li::marker { content: "✓  "; color: var(--ok); }
.road .jetzt { border-color: var(--amber); box-shadow: 0 0 24px rgba(255, 200, 69, 0.12); }
.road .jetzt::before { background: var(--amber); border-color: var(--amber); animation: roadpulse 1.6s ease-in-out infinite; }
.road .jetzt .tag { color: var(--amber); }
.road .bald::before { border-color: var(--amber); }
.road .bald .tag { color: var(--cyan); }
.road .spaeter { opacity: 0.85; }
@keyframes roadpulse { 50% { box-shadow: 0 0 0 6px rgba(255, 200, 69, 0.18); } }
@media (prefers-reduced-motion: reduce) { .road .jetzt::before { animation: none; } }
@media (max-width: 600px) { .road { padding-left: 22px; } .road .step { padding: 14px 14px 10px; } .road .step::before { left: -20px; } }

/* Tabs, Download */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { font-family: "Pixel", monospace; font-size: 10px; background: none; color: var(--dim); border: 1px solid var(--line); padding: 8px 10px; border-radius: var(--radius); cursor: pointer; }
.tabs button.on { color: var(--amber); border-color: var(--amber); }
.codeform { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.codeform input { flex: 1 1 200px; }
.steps { padding-left: 18px; } .steps li { margin-bottom: 10px; }
code { background: #0d0a14; border: 1px solid var(--line); padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }

/* Galaxie live */
.gxmap { display: grid; gap: 4px; margin: 10px 0; }
.gxmap .sec { position: relative; aspect-ratio: 1.25; border: 1px solid var(--line); border-radius: 3px; padding: 5px; font-size: 11px; line-height: 1.25; overflow: hidden; background: #0d0a14; }
.gxmap .sec b { font-family: "Pixel", monospace; font-size: 9px; display: block; color: var(--text); }
.gxmap .sec .ctl { position: absolute; left: 0; bottom: 0; height: 3px; background: currentColor; opacity: 0.8; }
.gxmap .sec.core { box-shadow: inset 0 0 0 1px var(--amber); }
.gxmap .sec.fight { animation: gxfight 1.2s ease-in-out infinite; }
@keyframes gxfight { 50% { border-color: var(--red); box-shadow: 0 0 12px rgba(255, 59, 48, 0.4); } }
.fac-druschba { color: #e0503a; } .fac-usi { color: #5a86f0; } .fac-panopta { color: #6cf0b0; } .fac-neutral { color: #777; }
.gxmap .sec.o-druschba { background: rgba(217, 64, 46, 0.18); } .gxmap .sec.o-usi { background: rgba(77, 128, 242, 0.18); } .gxmap .sec.o-panopta { background: rgba(115, 242, 179, 0.14); }
.gxfac { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gxfac .panel { padding: 16px; } .gxfac h3 { margin: 0 0 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 14px; } .kv span { color: var(--dim); } .kv b { text-align: right; font-weight: 600; }
.gxfeed { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; font-size: 14px; }
.gxfeed li { padding: 5px 0; border-bottom: 1px solid #1c1726; } .gxfeed .h { color: var(--dim); font-size: 12px; margin-right: 6px; }
.chart svg { width: 100%; height: 180px; display: block; } .chart .leg { font-size: 12px; color: var(--dim); }
pre.json { background: #0d0a14; border: 1px solid var(--line); padding: 10px; font-size: 12px; max-height: 360px; overflow: auto; white-space: pre-wrap; }
@media (max-width: 800px) { .gxfac { grid-template-columns: 1fr; } .gxmap .sec { font-size: 9px; padding: 3px; } .gxmap .sec b { font-size: 7px; } }
