/* Blind Type — Styles. Fokus: sehr großer, kontrastreicher, ruhiger Aufbau. */

:root {
  --bg: #000000;
  --fg: #ffe200;          /* leuchtendes Gelb */
  --fg-soft: #f5d76e;
  --muted: #b8b86a;
  --card: #0c0c0c;
  --border: #333300;
  --accent: #ffe200;
  --accent-ink: #000000;
  --ok: #7CFC00;
  --bad: #ff6b6b;
  --shadow: 0 8px 30px rgba(0,0,0,0.6);
  --radius: 18px;
  --font: "Atkinson Hyperlegible", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

:root[data-theme="light"] {
  --bg: #faf9f4;
  --fg: #111111;
  --fg-soft: #222222;
  --muted: #555555;
  --card: #ffffff;
  --border: #d9d6c8;
  --accent: #1565c0;
  --accent-ink: #ffffff;
  --ok: #2e7d32;
  --bad: #c62828;
  --shadow: 0 8px 30px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.4;
}

.app { min-height: 100%; display: flex; flex-direction: column; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- Layout-Container ---- */
.centered { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }

.card {
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand { font-size: 3.4rem; letter-spacing: 0.06em; margin: 0; text-align: center; font-weight: 800; }
.brand-sm { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.04em; }
.subtitle { color: var(--fg-soft); font-size: 1.25rem; margin: 0; }
.greeting { font-size: 1.6rem; font-weight: 700; margin: 8px 0 4px; }

/* ---- Formularfelder ---- */
.label { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 6px; }
.field, .slider {
  width: 100%;
  font-size: 1.5rem;
  padding: 16px 18px;
  border-radius: 14px;
  border: 3px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
}
.field:focus, .slider:focus, .btn:focus, .lesson:focus, .choice:focus, .key:focus {
  outline: 4px solid var(--accent);
  outline-offset: 3px;
}
.slider { padding: 10px; }
.error { color: var(--bad); font-size: 1.1rem; min-height: 1.2em; margin: 0; }

/* ---- Buttons ---- */
.btn {
  font-family: var(--font);
  font-size: 1.4rem;
  font-weight: 700;
  padding: 16px 22px;
  border-radius: 14px;
  border: 3px solid var(--border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.06s ease;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-big { font-size: 1.8rem; padding: 22px; }
.btn-ghost { background: transparent; }
.btn-link { background: transparent; border: none; color: var(--fg-soft); text-decoration: underline; font-size: 1.1rem; }

/* ---- Topbar / Dashboard ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 3px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.topbar-actions { display: flex; gap: 12px; }
.dash { padding: 24px; max-width: 980px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

.statsbar { display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap; }
.stat { background: var(--card); border: 3px solid var(--border); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 100px; }
.stat-grow { flex: 1; min-width: 220px; justify-content: center; }
.stat-num { font-size: 1.8rem; font-weight: 800; }
.stat-lbl { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.xpbar { height: 16px; background: var(--border); border-radius: 10px; overflow: hidden; }
.xpbar-fill { height: 100%; background: var(--accent); border-radius: 10px; }

.enter-hint { font-size: 1.15rem; color: var(--muted); margin: 2px 0 8px; }

.stage { display: flex; flex-direction: column; gap: 8px; }
.stage-title { font-size: 1.9rem; margin: 8px 0 0; }
.stage-sub { color: var(--muted); margin: 0 0 6px; font-size: 1.05rem; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.lesson {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 3px solid var(--border); border-radius: 14px;
  padding: 18px; font-family: var(--font); color: var(--fg); cursor: pointer; text-align: left;
}
.lesson.done { border-color: var(--accent); }
.lesson-title { font-size: 1.3rem; font-weight: 700; }
.lesson-stars { font-size: 1.4rem; color: var(--accent); }

/* ---- Übung ---- */
.ex-stage { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 16px; gap: 14px; min-height: 100vh; }
.exbar { width: min(900px, 100%); height: 14px; background: var(--border); border-radius: 10px; overflow: hidden; margin-top: 6px; }
.exfill { height: 100%; width: 0%; background: var(--accent); transition: width 0.15s ease; }

.big-letter {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: min(46vh, 60vw);
  line-height: 1;
  user-select: none;
}
.flash-ok { animation: pop-ok 0.25s ease; }
.flash-bad { animation: pop-bad 0.3s ease; }
@keyframes pop-ok { 0% { color: var(--ok); transform: scale(1.06); } 100% { color: var(--fg); transform: scale(1); } }
@keyframes pop-bad { 0% { color: var(--bad); transform: translateX(-6px); } 50% { transform: translateX(6px); } 100% { color: var(--fg); transform: translateX(0); } }

.finger-label { font-size: 1.8rem; color: var(--fg-soft); min-height: 1.4em; text-align: center; }
.ex-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding-bottom: 12px; }

/* ---- Tastatur ---- */
.kbwrap { width: min(900px, 100%); }
.keyboard { display: flex; flex-direction: column; gap: 8px; }
.kb-row { display: flex; gap: 8px; }
.key {
  flex: 1 1 0;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: color-mix(in srgb, var(--zone, #555) 22%, var(--card));
  color: var(--fg);
  padding: 14px 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  position: relative;
  min-width: 0;
}
.key-mod { color: var(--muted); font-size: 0.95rem; background: var(--card); }
.key.is-next {
  background: var(--zone, var(--accent));
  color: #000;
  transform: scale(1.12);
  border-color: var(--fg);
  box-shadow: 0 0 0 4px var(--fg);
  z-index: 2;
}
.key.is-shift { background: var(--accent); color: var(--accent-ink); }
.key.is-wrong { background: var(--bad); color: #fff; }
:root[data-keyboard="off"] .kbwrap { display: none; }

/* ---- Onboarding ---- */
.ob-title { font-size: 2.2rem; margin: 0; }
.ob-text { font-size: 1.4rem; color: var(--fg-soft); }
.choices { display: flex; gap: 18px; flex-wrap: wrap; }
.choice { flex: 1; min-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; border-radius: 16px; border: 3px solid var(--border); background: var(--card); color: var(--fg); cursor: pointer; font-size: 1.3rem; font-weight: 700; }
.choice-demo { width: 100%; height: 160px; display: flex; align-items: center; justify-content: center; font-size: 6rem; font-weight: 800; border-radius: 12px; }
.demo-dark { background: #000; color: #ffe200; }
.demo-light { background: #faf9f4; color: #111; border: 2px solid #ddd; }

/* ---- Ergebnis ---- */
.result-card { align-items: center; text-align: center; }
.result-stars { font-size: 4rem; color: var(--accent); letter-spacing: 0.1em; }
.result-stats { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.rstat { display: flex; flex-direction: column; }
.rnum { font-size: 2.6rem; font-weight: 800; }
.rlbl { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.badge-pop { font-size: 1.5rem; font-weight: 800; padding: 12px 18px; border: 3px solid var(--accent); border-radius: 14px; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .flash-ok, .flash-bad, .key.is-next { animation: none; transition: none; }
}
