/* Project FreeJarvis · © Max Kröner · Lizenz: PolyForm Noncommercial 1.0.0 (siehe LICENSE) */
/* Project FreeJarvis · Design-System
   Alle Oberflächen bauen auf diesen Tokens auf. --akzent kommt aus der Einstellung „Grundfarbe“,
   data-schema="hell|dunkel" auf <html> aus „Farbschema“ (auto = Systemeinstellung).
   Abgeleitete Farben entstehen per color-mix aus dem Akzent: eine Farbe einstellen, alles passt. */
:root {
  --akzent: #36d6ff;
  --akzent-weich: color-mix(in srgb, var(--akzent) 18%, transparent);
  --akzent-mittel: color-mix(in srgb, var(--akzent) 40%, transparent);
  --akzent-glanz: color-mix(in srgb, var(--akzent) 70%, white);
  --grund: #04070c;
  --grund-2: #0a1018;
  --flaeche: rgba(255, 255, 255, 0.045);
  --flaeche-2: rgba(255, 255, 255, 0.08);
  --rand: rgba(255, 255, 255, 0.10);
  --rand-stark: rgba(255, 255, 255, 0.18);
  --text: #e8f1f8;
  --leise: #8a9bab;
  --gefahr: #ff5d6c;
  --gut: #5dffa8;
  --warn: #ffc65d;
  --schatten: 0 18px 50px rgba(0, 0, 0, .45);
  --radius: 16px;
  --radius-klein: 10px;
  --schrift: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Cascadia Code", Consolas, "SFMono-Regular", monospace;
  --blur: blur(18px) saturate(140%);
  --tempo: 1;
  color-scheme: dark;
}
html[data-schema="hell"] {
  --grund: #eef3f8;
  --grund-2: #ffffff;
  --flaeche: rgba(255, 255, 255, 0.72);
  --flaeche-2: rgba(255, 255, 255, 0.9);
  --rand: rgba(10, 30, 50, 0.12);
  --rand-stark: rgba(10, 30, 50, 0.22);
  --text: #0f1a24;
  --leise: #5b6b7a;
  --akzent-glanz: color-mix(in srgb, var(--akzent) 75%, black);
  --gut: #0b8a4c;
  --warn: #a8640a;
  --gefahr: #c62838;
  --schatten: 0 18px 40px rgba(20, 40, 70, .15);
  color-scheme: light;
}
html[data-bewegung="wenig"] { --tempo: 0; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); font: 15px/1.5 var(--schrift);
  background:
    radial-gradient(1100px 700px at 15% -10%, color-mix(in srgb, var(--akzent) 16%, transparent), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, color-mix(in srgb, var(--akzent) 10%, transparent), transparent 60%),
    var(--grund);
}
a { color: var(--akzent-glanz); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: .02em; }
.leise { color: var(--leise); }
.glas { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--schatten); }
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 22px; backdrop-filter: var(--blur); }
.seite { max-width: 980px; margin: 0 auto; padding: 32px 16px 80px; }
.kopf { display: flex; gap: 18px; align-items: center; margin-bottom: 24px; }
.ring { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--akzent); box-shadow: 0 0 24px var(--akzent), inset 0 0 18px var(--akzent-mittel); flex: none; }

/* Symbole (web/symbole/icons.svg): Linienstil, Farbe = Schriftfarbe */
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; overflow: visible; }
.knopf .ic { width: 1.15em; height: 1.15em; }

/* Knöpfe und Felder */
.knopf { display: inline-flex; align-items: center; gap: 8px; background: var(--akzent-weich); color: var(--text); border: 1px solid var(--akzent-mittel); border-radius: 999px; padding: 8px 18px; font: inherit; cursor: pointer; transition: background calc(.15s * var(--tempo)), transform calc(.1s * var(--tempo)); }
.knopf:hover { background: var(--akzent-mittel); }
.knopf:active { transform: scale(.97); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf.leer { background: none; border-color: var(--rand-stark); }
.knopf.gefahr { border-color: var(--gefahr); background: color-mix(in srgb, var(--gefahr) 14%, transparent); }
.knopf.rund { width: 40px; height: 40px; padding: 0; justify-content: center; }
input[type=text], input[type=password], input[type=number], input[type=url], select, textarea {
  background: color-mix(in srgb, var(--grund) 70%, transparent); color: var(--text); border: 1px solid var(--rand-stark);
  border-radius: var(--radius-klein); padding: 8px 10px; font: inherit; width: 100%; }
textarea.json { font-family: var(--mono); font-size: 13px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .knopf:focus-visible, button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
fieldset { border: 1px solid var(--rand); border-radius: var(--radius-klein); margin: 16px 0; padding: 12px 14px; }
legend { color: var(--akzent-glanz); padding: 0 6px; }
.feld { display: grid; gap: 4px; margin: 12px 0; }
.feld small { color: var(--leise); }
.zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Dateiauswahl: der Knopf des Browsers bekommt den Stil der Jarvis-Knöpfe (lesbar in Hell und Dunkel) */
input[type=file] { color: var(--text); font: inherit; font-size: 14px; max-width: 100%; }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--akzent);
  background: color-mix(in srgb, var(--akzent) 22%, var(--grund-2)); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; transition: background calc(.15s * var(--tempo));
}
input[type=file]::file-selector-button:hover { background: color-mix(in srgb, var(--akzent) 40%, var(--grund-2)); }
input[type=file]:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: 999px; }

/* Schalter */
.schalter { position: relative; width: 46px; height: 26px; flex: none; }
.schalter input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.schalter span { position: absolute; inset: 0; border-radius: 999px; background: var(--flaeche-2); border: 1px solid var(--rand-stark); transition: background calc(.2s * var(--tempo)); }
.schalter span::after { content: ""; position: absolute; width: 20px; height: 20px; top: 2px; left: 2px; border-radius: 50%; background: var(--leise); transition: transform calc(.2s * var(--tempo)), background calc(.2s * var(--tempo)); }
.schalter input:checked + span { background: var(--akzent-mittel); border-color: var(--akzent); }
.schalter input:checked + span::after { transform: translateX(20px); background: var(--akzent); box-shadow: 0 0 10px var(--akzent); }

/* Abzeichen */
.abzeichen { font-size: 11px; letter-spacing: .1em; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--rand-stark); white-space: nowrap; }
.abzeichen.lokal { color: var(--gut); border-color: var(--gut); }
.abzeichen.cloud { color: var(--warn); border-color: var(--warn); }

/* Hinweis-Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; z-index: 100; background: var(--grund-2); border: 1px solid var(--akzent-mittel); box-shadow: var(--schatten); }
.toast.fehler { border-color: var(--gefahr); }

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