/* Rahmenseiten: Anmelden, Welten, Figur anlegen. Dunkel, ruhig, mit einem
   Hauch Pixel. Das Spiel selbst liegt in spiel.css. */

:root {
  color-scheme: dark;
  --hintergrund: #141824;
  --karte: #1e2434;
  --rand: #2f3850;
  --text: #ece6d8;
  --text-leise: #9aa3b8;
  --akzent: #e8c170;
  --akzent-dunkel: #c9843b;
  --gruen: #5bb777;
  --rot: #e06c6c;
  --radius: 6px;
  --schrift: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--hintergrund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.45;
}
a { color: var(--akzent); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.kopf { border-bottom: 1px solid var(--rand); background: #10131c; }
.kopf-innen { max-width: 960px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.kopf-luft { flex: 1; }
.kopf-konto { color: var(--text-leise); font-size: .95rem; }
.kopf-form { margin: 0; }
.marke { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.kopf-zurueck { text-decoration: none; color: var(--text-leise); }
.kopf-zurueck:hover { color: var(--text); }

.marke-pixel {
  display: inline-block; width: 20px; height: 20px;
  background: url("/static/favicon.svg") center / contain no-repeat;
  image-rendering: pixelated;
}
.marke-pixel.gross { width: 64px; height: 64px; }

.inhalt { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px 40px; }
.fuss { text-align: center; color: var(--text-leise); font-size: .85rem; padding: 12px 16px 20px; }

.abschnitt { margin-bottom: 28px; }
.schmal { max-width: 560px; }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 18px; }
.hinweis { color: var(--text-leise); }

.formular label { display: block; margin: 12px 0 4px; font-size: .95rem; color: var(--text-leise); }
.formular label:first-child { margin-top: 0; }
.formular input, .formular select {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text);
  background: #11151f; border: 1px solid var(--rand); border-radius: var(--radius);
}
.formular input:focus, .formular select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.formular .knopf { margin-top: 18px; }

.knopf {
  display: inline-block; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer;
  color: #1b1f2a; background: var(--akzent); border: none; border-radius: var(--radius);
  text-decoration: none; min-height: 44px;
}
.knopf:hover { background: #f0cf8a; }
.knopf.breit { width: 100%; }
.knopf.leise { background: transparent; color: var(--text-leise); border: 1px solid var(--rand); }
.knopf.leise:hover { color: var(--text); border-color: var(--text-leise); }
.knopf.klein { padding: 6px 12px; min-height: 36px; font-weight: 500; }
.knopf.rot { background: var(--rot); color: #fff; }

.meldung { padding: 10px 14px; border-radius: var(--radius); margin: 0 0 14px; }
.meldung ul { margin: 0; padding-left: 18px; }
.meldung.fehler { background: #3a1f24; border: 1px solid #7a3a44; color: #f3c2c2; }
.meldung.ok { background: #1f3a2a; border: 1px solid #3a7a4e; color: #c2f3d0; }

/* Anmelden / Registrieren */
.seite-anmelden .inhalt { display: flex; align-items: center; justify-content: center; }
.anmelden { width: 100%; max-width: 420px; }
.anmelden-marke { text-align: center; margin-bottom: 18px; }
.anmelden-marke h1 { margin-top: 8px; letter-spacing: .04em; }
.anmelden-fuss { text-align: center; margin-top: 16px; color: var(--text-leise); }

/* Welten */
.welten { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.welt-karte h2 { margin-bottom: 4px; }
.welt-karte .leise { color: var(--text-leise); font-size: .9rem; }
.welt-karte .zeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; background: #11151f; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--rand); }
.zwei-spalten { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .zwei-spalten { grid-template-columns: 1fr 1fr; } }

/* Figur erstellen */
.figur-editor { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .figur-editor { grid-template-columns: 240px 1fr; } }
.figur-vorschau { background: #0f1218; border: 1px solid var(--rand); border-radius: var(--radius); min-height: 260px; display: flex; align-items: center; justify-content: center; image-rendering: pixelated; }
.figur-vorschau canvas { image-rendering: pixelated; }
.farbzeile { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.farbzeile input.farbhex { width: 120px; font-family: ui-monospace, Consolas, monospace; }
.farbzeile input.farbhex[hidden] { display: none !important; }
.schnellwahl { display: flex; gap: 4px; flex-wrap: wrap; }
.schnellwahl button, .schnell { width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(255,255,255,.2); cursor: pointer; padding: 0; }
/* Eigenes Farbfeld (public/js/bedienung/farbfeld.js, Klasse ff-feld – .farbfeld sind unten die Hautfelder), gleiche Masse wie im Spiel */
.ff-feld { display: flex; flex-direction: column; gap: 6px; width: 168px; }
.ff-kopf { display: flex; align-items: center; gap: 6px; }
.ff-vorschau { width: 28px; height: 28px; border-radius: 4px; border: 1px solid rgba(255,255,255,.25); flex: none; }
.formular .ff-feld input.ff-hex { width: 96px; margin: 0; padding: 4px 6px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.ff-flaeche, .ff-ton { display: block; width: 168px; border-radius: 4px; cursor: crosshair; touch-action: none; border: 1px solid rgba(255,255,255,.15); }
.ff-flaeche { height: 112px; }
.ff-ton { height: 16px; }
.haut-wahl { display: flex; gap: 6px; flex-wrap: wrap; }
.haut-wahl label { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 4px 8px; border: 1px solid var(--rand); border-radius: 4px; cursor: pointer; }
.haut-wahl input { width: auto; }
.farbfeld { display: inline-block; width: 16px; height: 16px; border-radius: 3px; border: 1px solid rgba(255,255,255,.25); }

.ohne-skript { padding: 20px; text-align: center; }
