/* =========================================================
   NH – Design-Tokens
   Idee: dunkles "Obsidian" im Hintergrund, Blöcke als Raster,
   ein Lime-Grün als "aktiv/erlaubt"-Farbe (wie XP-Orbs/Smaragd)
   und ein gedämpftes Redstone-Rot für Fehler/Warnungen.
   ========================================================= */
:root {
  --bg: #131318;
  --bg-raised: #1b1c24;
  --bg-inset: #0d0e12;
  --border: #2c2e3a;
  --border-bright: #3d4052;

  --text: #ece9e2;
  --text-muted: #8c8fa0;

  --accent: #a6e33d;       /* Smaragd/XP-Grün */
  --accent-dim: #6f9b2c;
  --accent-glow: rgba(166, 227, 61, 0.35);

  --warn: #ff6b57;         /* Redstone */
  --warn-dim: #7a2d26;

  --purple: #8b7cf6;       /* Enderman-Akzent, sparsam */

  --font-display: "Press Start 2P", monospace;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(19,19,24,0.94), rgba(19,19,24,0.98)),
    repeating-linear-gradient(0deg, #17181f 0px, #17181f 31px, #1a1b23 31px, #1a1b23 32px),
    repeating-linear-gradient(90deg, #17181f 0px, #17181f 31px, #1a1b23 31px, #1a1b23 32px);
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Sichtbarer Fokus-Ring für Tastaturbedienung */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Kopfzeile ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text);
}

.brand .block {
  width: 18px;
  height: 18px;
  background: var(--accent);
  box-shadow: 3px 3px 0 var(--accent-dim);
  flex-shrink: 0;
}

.nav-links { display: flex; gap: 18px; align-items: center; font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-bright);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #10130a;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn-ms {
  background: #0d0e12;
  border-color: var(--border-bright);
}
.btn-ms svg { flex-shrink: 0; }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: block;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.6;
  margin: 0 0 22px;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}

.hero p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 56ch;
  margin: 0 0 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Karten / Panels ---------- */
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.panel + .panel { margin-top: 16px; }

.panel-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* ---------- Formulare ---------- */
.form-page {
  padding: 64px 0;
  display: flex;
  justify-content: center;
}

.form-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: var(--radius);
}

.form-card h1 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 24px;
  line-height: 1.7;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.field input:focus { border-color: var(--accent); outline: none; }

.form-footer {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.msg {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: none;
}
.msg.show { display: block; }
.msg.error { background: rgba(255,107,87,0.12); border: 1px solid var(--warn-dim); color: #ffb3a6; }
.msg.success { background: rgba(166,227,61,0.1); border: 1px solid var(--accent-dim); color: var(--accent); }

/* ---------- Dashboard ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 40px 0 80px;
}
@media (max-width: 640px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.player-card {
  text-align: center;
}

.player-head {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  border: 1px solid var(--border-bright);
  background: var(--bg-inset);
  margin: 0 auto 14px;
  display: block;
}

.player-name {
  font-family: var(--font-mono);
  font-size: 14px;
  margin-bottom: 4px;
}

.player-status {
  font-size: 12px;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
}
.status-pill.linked { border-color: var(--accent-dim); color: var(--accent); }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.download-row:first-of-type { border-top: none; }

.file-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.file-name { font-size: 15px; color: var(--text); margin-bottom: 4px; }

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}
