/* ============================================================
   MAIN.CSS  -  Komponenten der FISI Lernplattform
   ============================================================ */

/* ---------- Layout-Container ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.screen { display: none; }
.screen.active { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   TOPBAR  (XP-Bar, Level, Streak)  -  Dopamin-Leiste
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,8,13,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-deep), var(--blue-deep));
  box-shadow: 0 0 18px var(--red-glow), inset 0 0 10px rgba(255,255,255,0.15);
  font-family: var(--f-pixel); font-size: 13px; color: #fff;
}
.brand-name { font-family: var(--f-pixel); font-size: 12px; color: var(--txt); }
.brand-name b { color: var(--red); }

.topbar-spacer { flex: 1; }

/* Level-Badge */
.lvl-badge {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-panel); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px;
}
.lvl-ring {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--f-pixel); font-size: 10px; color: #fff;
  background: conic-gradient(var(--blue) var(--ringPct,30%), #20202e 0);
  position: relative;
}
.lvl-ring span {
  position: absolute; inset: 3px; border-radius: 50%;
  background: var(--bg-deep); display: grid; place-items: center;
}
.lvl-meta { line-height: 1.1; }
.lvl-meta .k { font-size: 10px; color: var(--txt-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.lvl-meta .v { font-size: 13px; font-weight: 700; }

/* XP-Bar */
.xp-wrap { width: 210px; }
.xp-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--txt-dim); margin-bottom: 4px; }
.xp-top b { color: var(--xp); font-family: var(--f-mono); }
.xp-track { height: 10px; background: #14141f; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.xp-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--red));
  box-shadow: 0 0 12px var(--blue-glow);
  border-radius: 999px; transition: width 0.6s cubic-bezier(.2,.8,.2,1);
}

/* Streak */
.streak {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-panel); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 14px;
}
.streak .fire { filter: drop-shadow(0 0 6px var(--amber)); }
.streak .n { color: var(--amber); font-family: var(--f-mono); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  background: var(--bg-panel); border: 1px solid var(--line); color: var(--txt-dim);
  cursor: pointer; display: grid; place-items: center; font-size: 15px;
  transition: 0.15s;
}
.icon-btn:hover { border-color: var(--red); color: var(--red); }

/* ============================================================
   AP-TABS (AP1 / AP2 / WISO)
   ============================================================ */
.ap-tabs { display: flex; gap: 10px; margin: 26px 0 8px; flex-wrap: wrap; }
.ap-tab {
  font-family: var(--f-pixel); font-size: 11px;
  padding: 14px 20px; border-radius: var(--r-md); cursor: pointer;
  background: var(--bg-panel); border: 1px solid var(--line); color: var(--txt-dim);
  display: flex; align-items: center; gap: 10px; transition: 0.18s;
}
.ap-tab small { font-family: var(--f-body); font-size: 11px; opacity: 0.7; letter-spacing: 0; }
.ap-tab:hover { border-color: #2c2c44; color: var(--txt); transform: translateY(-2px); }
.ap-tab.on-red { border-color: var(--red); color: var(--red); box-shadow: 0 0 18px var(--red-glow); background: rgba(255,59,92,0.06); }
.ap-tab.on-blue { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 18px var(--blue-glow); background: rgba(61,169,255,0.06); }
.ap-tab.on-green { border-color: var(--green); color: var(--green); box-shadow: 0 0 18px var(--green-glow); background: rgba(61,220,132,0.06); }

/* ============================================================
   HERO / Bereichs-Kopf
   ============================================================ */
.hero { padding: 30px 0 10px; }
.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 12px;
}
.eyebrow.red { color: var(--red); }
.eyebrow.green { color: var(--green); }
.hero h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.12; max-width: 760px; }
.hero p { color: var(--txt-dim); margin-top: 12px; max-width: 640px; font-size: 15px; }

/* ============================================================
   BEREICHS-KARTEN (Prüfungsbereiche / Module)
   ============================================================ */
.area-grid {
  display: grid; gap: 16px; margin: 24px 0 60px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.area-card {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-deep));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; cursor: pointer; position: relative; overflow: hidden;
  transition: 0.2s; box-shadow: var(--shadow-card);
}
.area-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--blue), var(--red)); opacity: 0.8;
}
.area-card:hover { transform: translateY(-4px); border-color: #2e2e48; }
.area-card.locked { opacity: 0.55; cursor: not-allowed; }
.area-num { font-family: var(--f-pixel); font-size: 12px; color: var(--txt-faint); }
.area-card h3 { font-size: 19px; margin: 8px 0 6px; }
.area-card p { font-size: 13.5px; color: var(--txt-dim); min-height: 40px; }
.area-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.area-prog { flex: 1; margin-right: 12px; }
.area-prog .bar { height: 7px; background: #15151f; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.area-prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--red)); border-radius: 999px; }
.area-prog .t { font-size: 11px; color: var(--txt-faint); margin-top: 5px; font-family: var(--f-mono); }
.pill {
  font-size: 11px; padding: 4px 10px; border-radius: 999px; font-weight: 700;
  background: var(--bg-panel-2); border: 1px solid var(--line); color: var(--txt-dim);
}
.pill.xp { color: var(--xp); border-color: rgba(255,210,63,0.3); }
.pill.bonus { color: var(--amber); border-color: rgba(255,179,71,0.3); }
.pill.done { color: var(--green); border-color: rgba(61,220,132,0.3); }

/* Lock-Icon */
.lockico { position: absolute; top: 16px; right: 16px; font-size: 16px; color: var(--txt-faint); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--f-body); font-weight: 700; font-size: 14px;
  padding: 12px 22px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-panel); color: var(--txt);
  transition: 0.16s; display: inline-flex; align-items: center; gap: 9px;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-red {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-color: transparent; color: #fff; box-shadow: 0 0 18px var(--red-glow);
}
.btn-blue {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  border-color: transparent; color: #fff; box-shadow: 0 0 18px var(--blue-glow);
}
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ============================================================
   LEKTION / TASKS  (TryHackMe-Stil)
   ============================================================ */
.lesson-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.lesson-head .back { margin-top: 4px; }
.lesson-head h1 { font-size: 26px; }
.lesson-head .sub { color: var(--txt-dim); font-size: 14px; margin-top: 6px; }

.task-rail { display: flex; flex-direction: column; gap: 18px; padding-bottom: 80px; }

.task {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-deep));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.task.locked { opacity: 0.5; }
.task.solved { border-color: rgba(61,220,132,0.35); }

.task-bar {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  cursor: pointer; user-select: none;
}
.task-no {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-family: var(--f-pixel); font-size: 11px;
  background: var(--bg-inset); border: 1px solid var(--line); color: var(--txt-dim);
}
.task.solved .task-no { background: rgba(61,220,132,0.15); border-color: var(--green); color: var(--green); }
.task-bar h3 { font-size: 17px; flex: 1; }
.task-bar .chev { color: var(--txt-faint); transition: 0.2s; }
.task.open .task-bar .chev { transform: rotate(90deg); }
.task-xp { font-family: var(--f-mono); font-size: 12px; color: var(--xp); }

.task-body { display: none; padding: 0 20px 22px; }
.task.open .task-body { display: block; animation: fadeUp 0.25s ease; }

/* Theorie-Text */
.theory { color: var(--txt); font-size: 15px; line-height: 1.75; }
.theory p { margin: 12px 0; }
.theory h4 { margin: 20px 0 8px; font-size: 15px; color: var(--blue); font-weight: 700; }
.theory ul, .theory ol { margin: 10px 0 10px 22px; }
.theory li { margin: 5px 0; }
.theory strong { color: #fff; }
.theory code {
  background: var(--bg-inset); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px; font-size: 13px; color: var(--blue);
}

/* Beispiel-Box */
.callout {
  border-radius: var(--r-md); padding: 14px 16px; margin: 16px 0;
  border: 1px solid var(--line); background: var(--bg-panel-2);
  font-size: 14px;
}
.callout .lab { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.callout.example { border-left: 3px solid var(--blue); }
.callout.example .lab { color: var(--blue); }
.callout.merke { border-left: 3px solid var(--red); }
.callout.merke .lab { color: var(--red); }
.callout.weg2 { border-left: 3px solid var(--amber); background: rgba(255,179,71,0.05); }
.callout.weg2 .lab { color: var(--amber); }

/* Grafik-Rahmen */
.figure { margin: 18px 0; padding: 18px; background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--r-md); text-align: center; }
.figure svg { max-width: 100%; height: auto; }
.figure figcaption { font-size: 12px; color: var(--txt-faint); margin-top: 10px; font-family: var(--f-mono); }

/* Verstanden-Check */
.check-block { margin: 20px 0; padding: 16px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--bg-inset); }
.check-block .q { font-weight: 600; margin-bottom: 12px; }
.check-row { display: flex; gap: 10px; }

/* Frage + Antwortfeld */
.answer-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.answer-block .q { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.answer-block .q::before { content: "❯ "; color: var(--red); font-family: var(--f-mono); }
.answer-input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.answer-input {
  flex: 1; min-width: 220px;
  background: var(--bg-inset); border: 1px solid var(--line); color: var(--txt);
  padding: 12px 14px; border-radius: var(--r-md); font-family: var(--f-mono); font-size: 14px;
}
.answer-input:focus { border-color: var(--blue); }
.answer-input.ok { border-color: var(--green); box-shadow: 0 0 14px var(--green-glow); }
.answer-input.no { border-color: var(--red); }
.feedback { margin-top: 10px; font-size: 13.5px; min-height: 20px; }
.feedback.ok { color: var(--green); }
.feedback.no { color: var(--red); }
.feedback.hint { color: var(--amber); }

/* Papier-Aufgaben + Reveal */
.paper {
  margin: 18px 0; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-panel-2); overflow: hidden;
}
.paper-head { padding: 12px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.paper-head .ico { color: var(--amber); }
.paper-head b { font-size: 13px; }
.paper-item { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.paper-item:last-child { border-bottom: none; }
.paper-item .pq { font-size: 14px; margin-bottom: 10px; }
.paper-item .pq .num { font-family: var(--f-mono); color: var(--blue); margin-right: 6px; }
.reveal-btn {
  font-size: 12px; padding: 7px 13px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--bg-inset); border: 1px solid var(--line); color: var(--amber); font-weight: 600;
}
.reveal-btn:hover { border-color: var(--amber); }
.reveal-sol { display: none; margin-top: 12px; padding: 12px 14px; background: var(--bg-inset); border-radius: var(--r-sm); border-left: 3px solid var(--green); font-size: 13.5px; }
.reveal-sol.show { display: block; animation: fadeUp 0.2s ease; }
.reveal-sol .lab { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--green); text-transform: uppercase; margin-bottom: 6px; }

/* Recap-Block */
.recap {
  margin: 30px 0; padding: 22px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(255,59,92,0.06), rgba(61,169,255,0.06));
  border: 1px solid var(--line);
}
.recap h3 { font-family: var(--f-pixel); font-size: 13px; color: var(--amber); margin-bottom: 16px; }
.recap-card { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.recap-card .rq { font-weight: 600; font-size: 14px; }
.recap-card .ra { display: none; margin-top: 10px; color: var(--green); font-size: 13.5px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.recap-card.flip .ra { display: block; }
.recap-card .tap { font-size: 11px; color: var(--txt-faint); margin-top: 8px; font-family: var(--f-mono); }

/* Lektion abgeschlossen Banner */
.done-banner {
  margin: 24px 0; padding: 26px; text-align: center; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(61,220,132,0.1), rgba(61,169,255,0.08));
  border: 1px solid rgba(61,220,132,0.3);
}
.done-banner .big { font-family: var(--f-pixel); font-size: 18px; color: var(--green); margin-bottom: 10px; }

/* ============================================================
   SQL-TERMINAL
   ============================================================ */
.term {
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: var(--bg-inset); margin: 18px 0;
}
.term-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg-panel); border-bottom: 1px solid var(--line); }
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.r { background: #ff5f57; } .term-dot.y { background: #febc2e; } .term-dot.g { background: #28c840; }
.term-title { font-family: var(--f-mono); font-size: 12px; color: var(--txt-dim); margin-left: 8px; }
.term-area { width: 100%; min-height: 90px; resize: vertical; background: transparent; border: none; color: var(--blue); font-family: var(--f-mono); font-size: 14px; padding: 14px; }
.term-area:focus { outline: none; }
.term-foot { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.term-out { padding: 0 14px 14px; font-family: var(--f-mono); font-size: 13px; }
.term-out table { border-collapse: collapse; width: 100%; margin-top: 8px; }
.term-out th, .term-out td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.term-out th { background: var(--bg-panel); color: var(--blue); }
.term-err { color: var(--red); }
.term-ok { color: var(--green); }

/* ============================================================
   PRÜFUNGSSIMULATION
   ============================================================ */
.exam-hud {
  position: sticky; top: 60px; z-index: 40;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: rgba(8,8,13,0.9); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 18px; margin: 18px 0;
}
.exam-timer { font-family: var(--f-pixel); font-size: 16px; color: var(--blue); }
.exam-timer.warn { color: var(--amber); }
.exam-timer.danger { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.exam-progress { flex: 1; min-width: 160px; }
.exam-q { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; }
.exam-q .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--txt-faint); font-family: var(--f-mono); margin-bottom: 12px; }
.exam-q .qtext { font-size: 16px; margin-bottom: 16px; line-height: 1.6; }
.mc-opt { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 8px; cursor: pointer; transition: 0.15s; }
.mc-opt:hover { border-color: #2e2e48; }
.mc-opt.sel { border-color: var(--blue); background: rgba(61,169,255,0.08); }
.mc-opt .k { font-family: var(--f-mono); color: var(--blue); font-weight: 700; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 400px; padding: 36px 30px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-deep));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card), 0 0 60px rgba(255,59,92,0.08);
}
.login-card .logo {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 20px;
  display: grid; place-items: center; font-family: var(--f-pixel); font-size: 16px; color: #fff;
  background: linear-gradient(135deg, var(--red-deep), var(--blue-deep));
  box-shadow: 0 0 26px var(--red-glow);
}
.login-card h1 { font-family: var(--f-pixel); font-size: 15px; text-align: center; margin-bottom: 6px; }
.login-card .tag { text-align: center; color: var(--txt-dim); font-size: 13px; margin-bottom: 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--txt-dim); margin-bottom: 6px; font-family: var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bg-inset); border: 1px solid var(--line); color: var(--txt); font-size: 14px;
}
.field input:focus { border-color: var(--blue); }
.login-err { color: var(--red); font-size: 13px; margin: 4px 0 12px; min-height: 18px; }
.login-note { text-align: center; font-size: 12px; color: var(--txt-faint); margin-top: 18px; }

/* ============================================================
   TOAST / XP-POPUP
   ============================================================ */
.toast-host { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg-panel-2); border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: var(--r-md); padding: 13px 18px; min-width: 220px;
  box-shadow: var(--shadow-card); animation: slideIn 0.3s ease;
}
.toast.xp { border-left-color: var(--xp); }
.toast b { color: var(--xp); font-family: var(--f-mono); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .xp-wrap { width: 100%; order: 10; }
  .brand-name { display: none; }
  .hero h1 { font-size: 26px; }
}
@media (max-width: 520px) {
  .lvl-meta, .streak .lab { display: none; }
  .ap-tab { flex: 1; justify-content: center; }
}

/* ============================================================
   CHARAKTER-KARTE (Pixel-Avatar, Rang, Level-Aufstieg)
   ============================================================ */
.char-card {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(255,59,92,0.07), rgba(61,169,255,0.07));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px; margin: 8px 0 26px; box-shadow: var(--shadow-card);
}
.char-avatar {
  flex: none; position: relative;
  filter: drop-shadow(0 0 14px rgba(61,169,255,0.25));
  animation: charBob 3.2s ease-in-out infinite;
}
@keyframes charBob { 50% { transform: translateY(-4px); } }
.char-avatar svg { display: block; image-rendering: pixelated; }

.char-info { flex: 1; min-width: 220px; }
.char-rankrow { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.char-rank {
  font-family: var(--f-pixel); font-size: 13px; color: var(--txt);
}
.char-lvlpill {
  font-family: var(--f-pixel); font-size: 10px; color: #fff;
  padding: 5px 9px; border-radius: 6px;
  background: linear-gradient(135deg, var(--blue-deep), var(--red-deep));
  box-shadow: 0 0 12px var(--blue-glow);
}
.char-sub { font-size: 13px; color: var(--txt-dim); margin-bottom: 14px; }
.char-sub b { color: var(--xp); font-family: var(--f-mono); }

.char-next { font-size: 12px; color: var(--txt-faint); font-family: var(--f-mono); margin-bottom: 6px; }
.char-next b { color: var(--blue); }
.char-xpbar { height: 12px; background: #14141f; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.char-xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--red)); box-shadow: 0 0 12px var(--blue-glow); border-radius: 999px; transition: width 0.6s cubic-bezier(.2,.8,.2,1); }

/* Rang-Leiste (alle Stufen als Mini-Anzeige) */
.rank-track { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.rank-dot {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.04em;
  padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line);
  color: var(--txt-faint); background: var(--bg-deep);
}
.rank-dot.reached { color: var(--green); border-color: rgba(61,220,132,0.35); }
.rank-dot.current { color: #fff; border-color: var(--blue); box-shadow: 0 0 12px var(--blue-glow); background: rgba(61,169,255,0.08); }

/* Level-Up-Overlay */
.levelup-host { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; background: rgba(4,4,8,0.7); backdrop-filter: blur(4px); }
.levelup-host.show { display: grid; animation: fadeUp 0.3s ease; }
.levelup-card {
  text-align: center; padding: 34px 40px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-deep));
  border: 1px solid var(--blue); box-shadow: 0 0 50px var(--blue-glow);
}
.levelup-card .lu-title { font-family: var(--f-pixel); font-size: 16px; color: var(--blue); margin: 16px 0 8px; animation: pulse 1.2s infinite; }
.levelup-card .lu-rank { font-family: var(--f-pixel); font-size: 12px; color: var(--xp); margin-bottom: 18px; }
.levelup-card .lu-avatar svg { image-rendering: pixelated; }

/* Topbar-Mini-Avatar */
.tb-avatar { flex: none; margin-right: 2px; }
.tb-avatar svg { display: block; image-rendering: pixelated; border-radius: 8px; }

@media (max-width: 520px) {
  .char-card { gap: 14px; padding: 16px; }
  .tb-avatar { display: none; }
}

/* ===== Charakter-Auswahl ===== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}
@media (max-width: 560px) { .char-grid { grid-template-columns: repeat(2, 1fr); } }
.char-card {
  background: #0f0f18;
  border: 2px solid #1f1f2e;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.char-card:hover { border-color: #3a3a55; transform: translateY(-2px); }
.char-card.selected {
  border-color: #ff3b5c;
  box-shadow: 0 0 0 2px rgba(255,59,92,0.25), 0 0 18px rgba(255,59,92,0.35);
}
.char-av { display: flex; justify-content: center; }
.char-av svg { image-rendering: pixelated; }
.char-name { color: #e8e8f0; font-size: 12.5px; font-weight: 700; margin-top: 8px; }
.char-desc { color: #a0a0b4; font-size: 10.5px; margin-top: 4px; line-height: 1.35; }
.char-playername { color: #ffd23f; font-size: 15px; font-weight: 800; margin-bottom: 4px; letter-spacing: .5px; }
.char-edit-btn {
  margin-top: 10px; background: transparent; border: 1px solid #2a2a3d;
  color: #a0a0b4; border-radius: 8px; padding: 5px 10px; font-size: 11px; cursor: pointer;
}
.char-edit-btn:hover { border-color: #ff3b5c; color: #ff3b5c; }

/* ===== Schreibtischtest (DeskTest) ===== */
.desk-box { margin: 10px 0 4px; }
.desk-code {
  background: #0a0a0f; border: 1px solid #1f1f2e; border-radius: 10px;
  padding: 10px 12px; overflow-x: auto;
}
.desk-code pre {
  margin: 0; color: #d6e2ff; font-family: monospace; font-size: 12.5px; line-height: 1.55;
  white-space: pre; counter-reset: none;
}
.desk-note { color: #a0a0b4; font-size: 11.5px; margin: 8px 2px; }
.desk-table {
  border-collapse: collapse; width: 100%; margin-top: 10px; font-family: monospace;
}
.desk-table th, .desk-table td {
  border: 1px solid #1f1f2e; padding: 4px 6px; text-align: center;
}
.desk-table th { background: #12121c; color: #8fd0ff; font-size: 11.5px; }
.desk-step { color: #62626f; width: 54px; font-size: 11px; }
.desk-input {
  width: 100%; min-width: 54px; box-sizing: border-box; background: #0f0f18;
  border: 1px solid #2a2a3d; border-radius: 6px; color: #e8e8f0;
  font-family: monospace; font-size: 12.5px; padding: 4px 6px; text-align: center;
}
.desk-input:focus { outline: none; border-color: #3da9ff; }
.desk-input.right { border-color: #3ddc84; background: rgba(61,220,132,0.08); }
.desk-input.wrong { border-color: #ff3b5c; background: rgba(255,59,92,0.08); }
.desk-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.desk-msg { margin-top: 8px; font-size: 12px; color: #a0a0b4; }
.desk-msg.ok { color: #3ddc84; }
.desk-msg.err { color: #ff8fa3; }
.desk-given { background: #12121c; color: #8fd0ff; font-family: monospace; font-size: 12.5px; font-weight: 700; }
.desk-code pre b { color: #ffd23f; }

/* ===== Willkommens-Overlay (8-Bit-Sprechblase) ===== */
#welcomeOverlay {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(6, 6, 12, 0.82);
  padding: 20px;
}
#welcomeOverlay.show { display: flex; animation: fadeUp 0.35s ease; }
.welcome-box {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  max-width: 420px; width: 100%;
}
.welcome-bubble {
  position: relative;
  background: #12121c;
  border: 3px solid #3da9ff;
  box-shadow: 0 0 0 3px #0c0c14, 4px 4px 0 3px rgba(61, 169, 255, 0.25);
  border-radius: 4px;
  padding: 18px 20px;
  font-family: "Press Start 2P", monospace;
  font-size: 12px; line-height: 1.7;
  color: #e8e8f0; text-align: center;
  image-rendering: pixelated;
}
.welcome-bubble b { color: #ffd23f; }
/* 8-Bit-Zacke unten (zwei Bloecke, treppenfoermig) */
.welcome-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -14px;
  width: 16px; height: 16px; margin-left: -8px;
  background: #12121c;
  border-right: 3px solid #3da9ff; border-bottom: 3px solid #3da9ff;
  transform: rotate(45deg);
}
.welcome-avatar {
  width: 112px; height: 112px;
  background: #0c0c14; border: 3px solid #2a2a40; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  animation: charBob 1.4s ease-in-out infinite;
}
.welcome-avatar svg { width: 96px; height: 96px; image-rendering: pixelated; }
.welcome-btn {
  margin-top: 4px;
  font-family: "Press Start 2P", monospace; font-size: 11px;
  color: #0c0c14; background: #3ddc84;
  border: none; border-radius: 4px; padding: 12px 22px;
  cursor: pointer; box-shadow: 3px 3px 0 #1a8a52;
  transition: transform 0.1s;
}
.welcome-btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #1a8a52; }
.welcome-btn:active { transform: translate(3px, 3px); box-shadow: none; }
@media (max-width: 480px) {
  .welcome-bubble { font-size: 10px; padding: 14px 16px; }
  .welcome-avatar { width: 92px; height: 92px; }
  .welcome-avatar svg { width: 78px; height: 78px; }
}

/* ===== Lernkarten (Flashcards) - mobile-first ===== */
#flashScreen { padding: 0; }
.flash-wrap {
  display: flex; flex-direction: column;
  max-width: 560px; margin: 0 auto; padding: 12px 14px;
  box-sizing: border-box;
}
.flash-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-shrink: 0;
}
.flash-top .back {
  font-family: "Press Start 2P", monospace; font-size: 10px;
  background: #12121c; color: #a0a0b4; border: 2px solid #2a2a40;
  border-radius: 4px; padding: 9px 12px; cursor: pointer; white-space: nowrap;
}
.flash-top .back:active { transform: translateY(1px); }
.flash-prog {
  flex: 1; display: flex; flex-direction: column; gap: 5px;
}
.flash-prog .bar { height: 8px; background: #12121c; border: 1px solid #2a2a40; border-radius: 4px; overflow: hidden; }
.flash-prog .bar i { display: block; height: 100%; background: linear-gradient(90deg,#3da9ff,#3ddc84); transition: width 0.25s; }
.flash-prog .t { font-family: "Press Start 2P", monospace; font-size: 9px; color: #8890a0; text-align: right; }

.flash-scene { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; perspective: 1200px; padding: 4px 0; }
.flash-card {
  position: relative; width: 100%; max-width: 460px;
  height: 46vh; min-height: 280px; max-height: 440px;
  transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(.4,.2,.2,1);
  cursor: pointer;
}
.flash-card.flipped { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 10px; border: 3px solid #2a2a40;
  background: #12121c; box-shadow: 0 0 0 3px #0c0c14, 6px 6px 0 3px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; padding: 18px; box-sizing: border-box;
  overflow: auto;
}
.flash-face .tag {
  font-family: "Press Start 2P", monospace; font-size: 8px; letter-spacing: 0.5px;
  color: #62626f; text-transform: uppercase; margin-bottom: 12px; line-height: 1.5; flex-shrink: 0;
}
.flash-face .label {
  font-family: "Press Start 2P", monospace; font-size: 9px; margin-bottom: 14px; flex-shrink: 0;
}
.flash-front .label { color: #3da9ff; }
.flash-back .label { color: #3ddc84; }
.flash-face .content {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 16px; line-height: 1.5; color: #e8e8f0; font-weight: 600;
}
.flash-back { transform: rotateY(180deg); }
.flash-back .content { color: #9ff0c8; }
.flash-face .hint {
  font-family: "Press Start 2P", monospace; font-size: 8px; color: #4a4a5a;
  text-align: center; margin-top: 12px; line-height: 1.6; flex-shrink: 0;
}
.flash-tip { margin-top: 10px; font-size: 12px; color: #8890a0; text-align: center; font-style: italic; flex-shrink: 0; }

.flash-actions { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.flash-reveal {
  width: 100%; font-family: "Press Start 2P", monospace; font-size: 12px;
  color: #0c0c14; background: #3da9ff; border: none; border-radius: 6px;
  padding: 15px; cursor: pointer; box-shadow: 4px 4px 0 #1c6aa8;
}
.flash-reveal:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 #1c6aa8; }
.flash-grade { display: flex; gap: 10px; }
.flash-grade button {
  flex: 1; font-family: "Press Start 2P", monospace; font-size: 11px;
  border: none; border-radius: 6px; padding: 15px 8px; cursor: pointer; color: #0c0c14;
}
.flash-again { background: #ff8fa3; box-shadow: 4px 4px 0 #b84a5e; }
.flash-good { background: #3ddc84; box-shadow: 4px 4px 0 #1a8a52; }
.flash-grade button:active { transform: translate(2px,2px); }
.flash-again:active { box-shadow: 2px 2px 0 #b84a5e; }
.flash-good:active { box-shadow: 2px 2px 0 #1a8a52; }

.flash-done { text-align: center; padding: 40px 16px; }
.flash-done .big { font-family: "Press Start 2P", monospace; font-size: 20px; color: #ffd23f; margin-bottom: 16px; line-height: 1.5; }
.flash-done .sub { font-size: 14px; color: #a0a0b4; margin-bottom: 24px; line-height: 1.6; }
.flash-done .stat { font-family: "Press Start 2P", monospace; font-size: 11px; color: #3ddc84; margin-bottom: 8px; }

.flash-setup { padding: 8px 2px; }
.flash-setup h1 { font-family: "Press Start 2P", monospace; font-size: 16px; color: #e8e8f0; margin: 6px 0 6px; }
.flash-setup .lead { font-size: 13.5px; color: #a0a0b4; line-height: 1.6; margin-bottom: 18px; }
.flash-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #12121c; border: 2px solid #2a2a40; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
}
.flash-opt.on { border-color: #3da9ff; background: rgba(61,169,255,0.08); }
.flash-opt .nm { font-size: 14px; color: #e8e8f0; font-weight: 600; }
.flash-opt .ct { font-family: "Press Start 2P", monospace; font-size: 9px; color: #8890a0; }
.flash-opt .box { width: 22px; height: 22px; border: 2px solid #3a3a55; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #3ddc84; font-size: 14px; }
.flash-opt.on .box { border-color: #3ddc84; }
.flash-start {
  width: 100%; margin-top: 12px; font-family: "Press Start 2P", monospace; font-size: 13px;
  color: #0c0c14; background: #ffd23f; border: none; border-radius: 6px;
  padding: 18px; cursor: pointer; box-shadow: 4px 4px 0 #b8912a;
}
.flash-start:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 #b8912a; }
.flash-start:disabled { opacity: 0.4; cursor: default; }
.flash-reset {
  width: 100%; margin-top: 10px; font-family: "Press Start 2P", monospace; font-size: 9px;
  color: #8890a0; background: transparent; border: 2px solid #2a2a40; border-radius: 6px;
  padding: 13px; cursor: pointer;
}
.flash-reset:active { transform: translateY(1px); }
.flash-reset.confirm { color: #ff8fa3; border-color: #ff8fa3; }
.flash-reset:disabled { opacity: 0.35; cursor: default; }

/* Home-Einstiegskarte */
.flash-entry {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(61,169,255,0.1), rgba(61,220,132,0.06));
  border: 2px solid #2a3a50; border-radius: 12px; padding: 18px; margin: 4px 0 18px;
  cursor: pointer; transition: transform 0.1s, border-color 0.15s;
}
.flash-entry:hover { border-color: #3da9ff; transform: translateY(-2px); }
.flash-entry:active { transform: translateY(0); }
.flash-entry .ico { font-size: 30px; line-height: 1; }
.flash-entry .tx { flex: 1; }
.flash-entry .tx b { display: block; font-size: 15px; color: #e8e8f0; margin-bottom: 3px; }
.flash-entry .tx span { font-size: 12.5px; color: #9098ac; }
.flash-entry .go { font-family: "Press Start 2P", monospace; font-size: 9px; color: #3da9ff; }

@media (min-width: 620px) {
  .flash-scene { min-height: 380px; }
  .flash-card { max-height: 480px; }
}

/* ===== Pruefungsauswahl (WISO-Sets) ===== */
.exam-choice { max-width: 640px; margin: 0 auto; padding: 16px 14px 40px; }
.exam-back {
  font-family: "Press Start 2P", monospace; font-size: 10px;
  background: #12121c; color: #a0a0b4; border: 2px solid #2a2a40;
  border-radius: 4px; padding: 9px 12px; cursor: pointer; margin-bottom: 14px;
}
.exam-back:active { transform: translateY(1px); }
.exam-choice-title { font-family: var(--f-head); font-size: 22px; color: #e8e8f0; margin: 4px 0 6px; }
.exam-choice-lead { font-size: 13.5px; color: #a0a0b4; line-height: 1.6; margin-bottom: 20px; }
.exam-set-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: #12121c; border: 2px solid #2a2a40; border-radius: 10px;
  padding: 16px 18px; margin-bottom: 12px;
}
.exam-set-t { font-family: var(--f-head); font-size: 17px; color: #8fd0ff; }
.exam-set-i { font-size: 12.5px; color: #8890a0; flex: 1 1 auto; }
.exam-set-go {
  font-family: "Press Start 2P", monospace; font-size: 11px;
  color: #0c0c14; background: #3ddc84; border: none; border-radius: 6px;
  padding: 12px 20px; cursor: pointer; box-shadow: 3px 3px 0 #1a8a52;
  margin-top: auto; align-self: stretch; text-align: center;
}
.exam-set-go:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #1a8a52; }
.exam-set-card:last-child .exam-set-go { background: #ffd23f; box-shadow: 3px 3px 0 #b8912a; }

/* ===== Prüfungs-Diagramme & neue Aufgabentypen ===== */
.exam-figure {
  margin: 12px 0; padding: 12px; background: #0c0c14;
  border: 2px solid #2a2a40; border-radius: 8px; text-align: center;
}
.exam-figure svg { max-width: 100%; height: auto; }
.field-row {
  display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap;
}
.field-lab {
  font-family: var(--f-body); font-size: 14px; color: #a0a0b4;
  min-width: 160px; flex: 0 0 auto;
}
.field-in { flex: 1 1 180px; min-width: 140px; }
textarea.answer-input { font-family: var(--f-body); font-size: 14px; line-height: 1.5; resize: vertical; }

/* ===== Prüfungsauswahl: 2 Spalten nebeneinander ===== */
.exam-set-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px;
  align-items: stretch;
}
.exam-set-grid .exam-set-card { margin-bottom: 0; height: 100%; }
@media (max-width: 560px) {
  .exam-set-grid { grid-template-columns: 1fr; }
}

/* ===== Subnetting-Trainer ===== */
.sn-entry .ico { background: linear-gradient(135deg, #1c6fd6, #3ddc84); }
.sn-wrap { max-width: 680px; margin: 0 auto; padding: 14px 14px 48px; }
.sn-title { font-family: var(--f-head); font-size: 26px; color: #e8e8f0; margin: 8px 0 4px;
  background: linear-gradient(90deg, #3da9ff, #3ddc84); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sn-lead { font-size: 13.5px; color: #a0a0b4; line-height: 1.6; margin-bottom: 18px; }

.sn-target {
  background: radial-gradient(circle at 30% 0%, rgba(61,169,255,0.14), transparent 70%), #0c0c14;
  border: 2px solid #2a3a55; border-radius: 14px; padding: 18px 20px; margin-bottom: 20px;
  text-align: center; box-shadow: 0 0 26px rgba(61,169,255,0.18);
}
.sn-tlabel { font-family: "Press Start 2P", monospace; font-size: 9px; color: #6d7794; letter-spacing: 1px; }
.sn-ip { margin: 10px 0 6px; }
.sn-ip b { font-family: var(--f-mono, monospace); font-size: 30px; color: #8fd0ff; letter-spacing: 1px; }
.sn-cidr { font-family: var(--f-mono, monospace); font-size: 30px; color: #3ddc84; margin-left: 6px; }
.sn-maskinfo { font-size: 12px; color: #8890a0; }

.sn-table { display: flex; flex-direction: column; gap: 10px; }
.sn-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #12121c; border: 1px solid #232338; border-radius: 10px; padding: 12px 14px;
}
.sn-rowlab { flex: 0 0 130px; display: flex; flex-direction: column; }
.sn-rowlab b { font-family: var(--f-head); font-size: 15px; color: #e8e8f0; }
.sn-rowhint { font-size: 10.5px; color: #6d7794; }
.sn-octets { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.sn-in {
  width: 52px; text-align: center; padding: 9px 4px; border-radius: 7px;
  background: #0a0a12; border: 2px solid #2a2a40; color: #e8e8f0;
  font-family: var(--f-mono, monospace); font-size: 16px; transition: all .12s;
}
.sn-in:focus { outline: none; border-color: #3da9ff; box-shadow: 0 0 8px rgba(61,169,255,0.4); }
.sn-in.pre { background: #14141f; color: #6d7794; border-color: #22223a; }
.sn-in.ok { border-color: #3ddc84; color: #3ddc84; box-shadow: 0 0 8px rgba(61,220,132,0.35); }
.sn-in.bad { border-color: #ff3b5c; color: #ff8fa3; box-shadow: 0 0 8px rgba(255,59,92,0.35); }
.sn-in.reveal { border-color: #ffb347; color: #ffd23f; }
.sn-dot { color: #4a4a64; font-weight: bold; }
.sn-badge { flex: 0 0 24px; text-align: center; font-size: 18px; font-weight: bold; }
.sn-badge.ok { color: #3ddc84; }
.sn-badge.bad { color: #ff3b5c; }

.sn-btns { display: flex; gap: 10px; margin: 20px 0 8px; flex-wrap: wrap; }
.sn-btn {
  flex: 1 1 auto; font-family: "Press Start 2P", monospace; font-size: 11px;
  padding: 13px 10px; border: none; border-radius: 8px; cursor: pointer; color: #0c0c14;
}
.sn-btn.primary { background: #3da9ff; box-shadow: 3px 3px 0 #1c6fd6; }
.sn-btn.accent { background: #3ddc84; box-shadow: 3px 3px 0 #1a8a52; }
.sn-btn.ghost { background: #2a2a40; color: #c8c8d8; box-shadow: 3px 3px 0 #16161f; }
.sn-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #16161f; }

.sn-result { text-align: center; font-family: "Press Start 2P", monospace; font-size: 11px; min-height: 18px; margin: 8px 0; }
.sn-result.all { color: #3ddc84; }
.sn-result.some { color: #ffb347; }
.sn-opt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #a0a0b4; margin: 14px 0; cursor: pointer; }
.sn-opt input { width: 16px; height: 16px; accent-color: #3da9ff; }

.sn-own { margin-top: 24px; padding-top: 18px; border-top: 1px solid #232338; }
.sn-ownlab { font-family: var(--f-head); font-size: 14px; color: #c8c8d8; margin-bottom: 10px; }
.sn-ownrow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sn-slash { color: #3ddc84; font-size: 20px; font-weight: bold; margin: 0 2px; }
.sn-in.pfx { width: 44px; }
.sn-own .sn-btn { flex: 0 0 auto; margin-left: 8px; font-size: 10px; }
@media (max-width: 480px) {
  .sn-rowlab { flex: 1 1 100%; }
  .sn-in { width: 44px; font-size: 15px; }
}

/* Diagramm mitten in der Theorie */
.theory-figure {
  margin: 16px 0; padding: 14px; background: #0c0c14;
  border: 1px solid #232338; border-radius: 10px; text-align: center;
}
.theory-figure svg { max-width: 100%; height: auto; }

/* Editierbare Ziel-IP im Subnetting-Trainer */
.sn-ipedit { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; margin: 10px 0 6px; }
.sn-in.tgt { width: 60px; font-size: 22px; padding: 8px 4px; color: #8fd0ff; border-color: #2a3a55; }
.sn-in.tgt:focus { border-color: #3da9ff; }
.sn-dot.big { font-size: 22px; color: #4a4a64; }
.sn-target .sn-slash { font-size: 24px; }
.sn-apply {
  display: inline-block; margin: 4px auto 0; font-size: 18px; cursor: pointer;
  background: #3ddc84; color: #0c0c14; border: none; border-radius: 8px;
  width: 40px; height: 34px; box-shadow: 2px 2px 0 #1a8a52;
}
.sn-apply:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 #1a8a52; }

/* ===== Login: Byline + Copyright-Checkbox ===== */
.byline {
  font-family: "Press Start 2P", monospace; font-size: 9px;
  color: #ffb347; margin: -4px 0 18px; letter-spacing: 0.5px;
  text-align: center;
}
.login-check {
  display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 14px;
  font-size: 12px; line-height: 1.5; color: #a0a0b4; cursor: pointer; text-align: left;
}
.login-check input { margin-top: 2px; width: 17px; height: 17px; flex: 0 0 auto; accent-color: #3ddc84; cursor: pointer; }
.login-check span { flex: 1 1 auto; }

/* ===== Onboarding-Tour (Spotlight) ===== */
.tour-overlay {
  position: fixed; inset: 0; z-index: 10000;
  pointer-events: none;
  animation: fadeUp 0.3s ease;
}
/* hervorgehobenes Element bleibt hell; der grosse box-shadow dunkelt
   den kompletten Rest ab (Spotlight-Loch genau um das Element). */
.tour-spot {
  box-shadow: 0 0 0 4px #3ddc84, 0 0 0 9999px rgba(6, 6, 12, 0.88),
              0 0 26px 6px rgba(61, 220, 132, 0.55) !important;
  animation: tourPulse 1.6s ease-in-out infinite;
}
@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 4px #3ddc84, 0 0 0 9999px rgba(6,6,12,0.88), 0 0 22px 4px rgba(61,220,132,0.45); }
  50%      { box-shadow: 0 0 0 4px #3ddc84, 0 0 0 9999px rgba(6,6,12,0.88), 0 0 30px 9px rgba(61,220,132,0.7); }
}
/* freistehende Figur (ohne Rahmen) + Sprechblase, nah am Element,
   liegt UEBER dem hervorgehobenen Element */
.tour-figure {
  position: fixed; z-index: 10060;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: auto;
}
.tour-avatar {
  width: 84px; height: 84px;
  display: flex; align-items: center; justify-content: center;
  animation: charBob 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(61, 220, 132, 0.35));
}
.tour-avatar svg { width: 72px; height: 72px; image-rendering: pixelated; }
.tour-bubble {
  position: relative;
  background: #12121c;
  border: 3px solid #3ddc84;
  box-shadow: 0 0 0 3px #0c0c14, 4px 4px 0 3px rgba(61, 220, 132, 0.25);
  border-radius: 4px;
  padding: 16px 18px;
  width: 100%;
}
.tour-bubble::before {
  content: ""; position: absolute; left: 50%; top: -13px;
  width: 14px; height: 14px; margin-left: -7px;
  background: #12121c;
  border-left: 3px solid #3ddc84; border-top: 3px solid #3ddc84;
  transform: rotate(45deg);
}
.tour-text {
  font-family: "Press Start 2P", monospace;
  font-size: 11px; line-height: 1.7;
  color: #e8e8f0; text-align: center;
}
.tour-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 16px;
}
.tour-skip {
  font-family: "Press Start 2P", monospace; font-size: 9px;
  color: var(--txt-dim, #8a8aa0); background: transparent;
  border: none; cursor: pointer; padding: 8px 4px;
  text-decoration: underline;
}
.tour-skip:hover { color: #e8e8f0; }
.tour-next {
  font-family: "Press Start 2P", monospace; font-size: 10px;
  color: #0c0c14; background: #3ddc84;
  border: none; border-radius: 4px; padding: 11px 18px;
  cursor: pointer; box-shadow: 3px 3px 0 #1a8a52;
  transition: transform 0.1s;
}
.tour-next:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #1a8a52; }
.tour-next:active { transform: translate(3px, 3px); box-shadow: none; }
@media (max-width: 480px) {
  .tour-text { font-size: 10px; }
  .tour-avatar { width: 74px; height: 74px; }
  .tour-avatar svg { width: 64px; height: 64px; }
}
