[hidden] { display: none !important; }
/* CSS für Lernpfad HTML, CSS und JavaScript - Mein Lebenslauf */
:root {
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --card-bg: #ffffff;
  --border-color: #dee2e6;
  --primary: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary: #6c757d;
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --focus-ring: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; color: var(--text-color); background: var(--bg-color); padding-bottom: 2rem; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 0.5rem 1rem; z-index: 9999; }
.skip:focus { left: 0; }

header { background: #1e293b; color: #fff; padding: 1rem 1.5rem 0.5rem; }
.header-content h1 { font-size: 1.5rem; font-weight: 700; }
.header-content p { font-size: 0.9rem; color: #94a3b8; margin-bottom: 0.75rem; }

/* Top Navigation Bar */
#topNav { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-bottom: 0.5rem; border-top: 1px solid #334155; padding-top: 0.5rem; }
#topNav button { background: #334155; color: #f8fafc; border: none; border-radius: 4px; padding: 0.4rem 0.8rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
#topNav button:hover { background: #475569; }
#topNav button[aria-current="page"] { background: var(--primary); color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* Layout Grid */
.layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; max-width: 1400px; margin: 1.5rem auto; padding: 0 1rem; }
@media (max-width: 992px) { .layout { grid-template-columns: 1fr; } }

main { min-width: 0; }

/* Right Side Panel */
#sideNavPanel { display: flex; flex-direction: column; gap: 1.25rem; }
.user-box, .sub-nav-box { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.user-box label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; }
.user-box input { width: 100%; padding: 0.4rem 0.6rem; border: 1px solid var(--border-color); border-radius: 4px; font-size: 0.95rem; }

.sub-nav-box h3 { font-size: 1.05rem; margin-bottom: 0.75rem; color: #334155; border-bottom: 2px solid var(--border-color); padding-bottom: 0.4rem; }
#subNav { display: flex; flex-direction: column; gap: 0.4rem; }
#subNav button { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: #f1f5f9; border: 1px solid var(--border-color); border-radius: 6px; padding: 0.6rem 0.8rem; font-weight: 600; font-size: 0.88rem; color: #334155; cursor: pointer; }
#subNav button:hover { background: #e2e8f0; }
#subNav button[aria-current="step"] { background: #e0e7ff; border-color: var(--primary); color: var(--primary); }
#subNav button .done-mark { color: var(--success); font-weight: bold; }

/* Dashboard Styling */
#dashboardSec { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 1.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.dash-header h2 { font-size: 1.5rem; color: #0f172a; margin-bottom: 0.25rem; }
.dash-intro { color: #64748b; margin-bottom: 1.5rem; }

.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 992px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }
.mod-card { background: #ffffff; border: 1fr solid var(--border-color); border-left: 5px solid var(--primary); border-radius: 8px; padding: 1rem; box-shadow: 0 2px 6px rgba(0,0,0,0.06); display: flex; flex-direction: column; justify-content: space-between; }
.mod-card h3 { font-size: 1.1rem; color: #1e293b; margin-bottom: 0.6rem; }

.dash-checklist { list-style: none; margin: 0.5rem 0 1rem; font-size: 0.88rem; display: flex; flex-direction: column; gap: 0.35rem; }
.dash-checklist li { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; padding: 0.35rem 0.6rem; border-radius: 4px; border: 1px solid #e2e8f0; }
.dash-checklist .status-badge { font-weight: bold; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.8rem; }
.dash-checklist .status-done { background: #d1e7dd; color: #0f5132; }
.dash-checklist .status-open { background: #e2e8f0; color: #475569; }

.btn-open-mod { background: var(--primary); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; width: 100%; text-align: center; margin-top: 0.5rem; }
.btn-open-mod:hover { background: var(--primary-hover); }

/* Module View Styling */
.mod-header { margin-bottom: 1rem; }
.mod-header .mod { font-size: 0.9rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.mod-header h2 { font-size: 1.4rem; color: #0f172a; margin-top: 0.2rem; }

.badge { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 700; margin-top: 0.3rem; }
.badge.M { background: #e0f2fe; color: #0369a1; }
.badge.R { background: #fef3c7; color: #b45309; }
.badge.E { background: #fce7f3; color: #be185d; }
.badge.T1, .badge.T2, .badge.T { background: #dcfce7; color: #15803d; }
.badge.X { background: #f3e8ff; color: #6b21a8; }

.card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.card.task { border-left: 4px solid var(--warning); background: #fffbeb; }

/* Editor & Preview Workspace */
.work { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 768px) { .work { grid-template-columns: 1fr; } }

.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.file-tabs { display: flex; gap: 0.25rem; }
.tab-btn { background: #e2e8f0; border: none; padding: 0.25rem 0.6rem; border-radius: 4px 4px 0 0; font-size: 0.8rem; font-weight: 600; cursor: pointer; color: #475569; }
.tab-btn.active { background: #1e293b; color: #fff; }

/* Code Editor Overlay & Syntax Highlighting */
/* Code Editor Overlay & Syntax Highlighting */
.ed { position: relative; height: 350px; border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; background: #ffffff; }
.ed pre, .ed textarea {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 0.75rem;
  font-family: Consolas, Monaco, "Courier New", Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  letter-spacing: 0px;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-all;
  box-sizing: border-box;
  tab-size: 2;
  -moz-tab-size: 2;
}
.ed pre {
  pointer-events: none;
  z-index: 1;
  color: #334155;
  background: transparent;
  overflow: hidden;
}
.ed pre code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: inherit;
}
.ed textarea {
  z-index: 2;
  background: transparent;
  color: transparent;
  caret-color: #0f172a;
  border: none;
  resize: none;
  width: 100%;
  height: 100%;
  outline: none;
  overflow-y: auto;
}

/* Syntax Highlighting Tokens */
.hl-tag { color: #0284c7; font-weight: 600; }
.hl-attr { color: #9333ea; }
.hl-str { color: #16a34a; }
.hl-cmt { color: #94a3b8; font-style: italic; }
.hl-kw { color: #d97706; font-weight: 600; }
.hl-num { color: #dc2626; }

.ed pre code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: inherit;
}
.ed textarea {
  z-index: 2;
  background: transparent;
  color: transparent;
  caret-color: #0f172a;
  border: none;
  resize: none;
  width: 100%;
  height: 100%;
  outline: none;
  overflow-y: auto;
}

/* Syntax Highlighting Tokens */
.hl-tag { color: #0284c7; font-weight: 600; }
.hl-attr { color: #9333ea; }
.hl-str { color: #16a34a; }
.hl-cmt { color: #94a3b8; font-style: italic; }
.hl-kw { color: #d97706; font-weight: 600; }
.hl-num { color: #dc2626; }


#vorschau { width: 100%; height: 350px; border: 1px solid var(--border-color); border-radius: 6px; background: #fff; }

.console { margin-top: 0.75rem; background: #0f172a; color: #f8fafc; font-family: monospace; font-size: 0.85rem; padding: 0.75rem; border-radius: 6px; }
.console-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #334155; padding-bottom: 0.4rem; margin-bottom: 0.5rem; }
.console-header button { background: #334155; color: #fff; border: none; padding: 0.2rem 0.5rem; border-radius: 3px; cursor: pointer; font-size: 0.75rem; }

/* Test & Reflexion Section */
#testFragen { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.frage-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 1rem; }
.frage-box p { font-weight: 600; margin-bottom: 0.5rem; color: #1e293b; }
.option-label { display: block; margin: 0.3rem 0; cursor: pointer; font-size: 0.92rem; }
.option-label input { margin-right: 0.4rem; }

.refl-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.refl-table th, .refl-table td { border: 1px solid var(--border-color); padding: 0.6rem 0.8rem; text-align: left; }
.refl-table th { background: #f1f5f9; color: #334155; }
.refl-table td input[type="radio"] { margin-right: 0.3rem; }

/* Control Bar (Bottom) */
.control-bar { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; box-shadow: 0 -2px 6px rgba(0,0,0,0.03); }
.step-nav { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.folien-knöpfe { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.folien-knöpfe button { background: #e2e8f0; border: 1px solid var(--border-color); border-radius: 4px; width: 32px; height: 32px; font-weight: 600; cursor: pointer; }
.folien-knöpfe button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.action-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; }
button.btn-primary { background: var(--primary); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; }
button.btn-primary:hover { background: var(--primary-hover); }
button.btn-secondary { background: var(--secondary); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; }
button.btn-action { background: var(--success); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; }
button.btn-danger { background: var(--danger); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; }
.control-bar button:disabled { opacity: 0.5; cursor: not-allowed; }

footer { text-align: center; margin-top: 2rem; color: #64748b; font-size: 0.85rem; }




/* ==========================================================================
   Chapter Theming & Colors (Teil 1: HTML, Teil 2: CSS, Teil 3: JS, Teil 4: Wahlprojekte)
   ========================================================================== */
:root {
  --ch-html: #e34f26;
  --ch-html-subtle: #fff7ed;
  --ch-html-border: #fed7aa;
  --ch-html-hover: #c2410c;

  --ch-css: #0284c7;
  --ch-css-subtle: #f0f9ff;
  --ch-css-border: #bae6fd;
  --ch-css-hover: #0369a1;

  --ch-js: #eab308;
  --ch-js-subtle: #fefce8;
  --ch-js-border: #fef08a;
  --ch-js-hover: #ca8a04;

  --ch-expert: #9333ea;
  --ch-expert-subtle: #faf5ff;
  --ch-expert-border: #e9d5ff;
  --ch-expert-hover: #7e22ce;

  /* Default Module Theme variables */
  --ch-color: #0d6efd;
  --ch-bg-subtle: #eff6ff;
  --ch-border: #bfdbfe;
  --ch-hover: #1d4ed8;
}

/* Chapter Attribute Theme Overrides on Body */
body[data-chapter="html"] {
  --ch-color: var(--ch-html);
  --ch-bg-subtle: var(--ch-html-subtle);
  --ch-border: var(--ch-html-border);
  --ch-hover: var(--ch-html-hover);
}

body[data-chapter="css"] {
  --ch-color: var(--ch-css);
  --ch-bg-subtle: var(--ch-css-subtle);
  --ch-border: var(--ch-css-border);
  --ch-hover: var(--ch-css-hover);
}

body[data-chapter="js"] {
  --ch-color: var(--ch-js);
  --ch-bg-subtle: var(--ch-js-subtle);
  --ch-border: var(--ch-js-border);
  --ch-hover: var(--ch-js-hover);
}

body[data-chapter="expert"] {
  --ch-color: var(--ch-expert);
  --ch-bg-subtle: var(--ch-expert-subtle);
  --ch-border: var(--ch-expert-border);
  --ch-hover: var(--ch-expert-hover);
}

/* Top Navigation Buttons Theming */
#topNav button { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; border-bottom: 3px solid transparent; transition: all 0.2s ease; }
#topNav button .ch-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; transition: transform 0.2s ease; }

#topNav button.nav-ch-html .ch-dot { background: var(--ch-html); box-shadow: 0 0 4px rgba(227, 79, 38, 0.6); }
#topNav button.nav-ch-css .ch-dot { background: var(--ch-css); box-shadow: 0 0 4px rgba(2, 132, 199, 0.6); }
#topNav button.nav-ch-js .ch-dot { background: var(--ch-js); box-shadow: 0 0 4px rgba(217, 119, 6, 0.6); }
#topNav button.nav-ch-expert .ch-dot { background: var(--ch-expert); box-shadow: 0 0 4px rgba(147, 51, 234, 0.6); }

#topNav button.nav-ch-html:hover { border-bottom-color: var(--ch-html); color: #fff; background: #3b4c66; }
#topNav button.nav-ch-css:hover { border-bottom-color: var(--ch-css); color: #fff; background: #3b4c66; }
#topNav button.nav-ch-js:hover { border-bottom-color: var(--ch-js); color: #fff; background: #3b4c66; }
#topNav button.nav-ch-expert:hover { border-bottom-color: var(--ch-expert); color: #fff; background: #3b4c66; }

#topNav button.nav-ch-html[aria-current="page"] { background: var(--ch-html); color: #fff; border-bottom-color: #ffffff; }
#topNav button.nav-ch-css[aria-current="page"] { background: var(--ch-css); color: #fff; border-bottom-color: #ffffff; }
#topNav button.nav-ch-js[aria-current="page"] { background: var(--ch-js); color: #fff; border-bottom-color: #ffffff; }
#topNav button.nav-ch-expert[aria-current="page"] { background: var(--ch-expert); color: #fff; border-bottom-color: #ffffff; }

/* Dashboard Chapter Sections */
.dash-chapter-section { margin-bottom: 2.25rem; background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border-color); padding: 1.5rem; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.dash-chapter-section[data-ch="html"] { border-top: 5px solid var(--ch-html); }
.dash-chapter-section[data-ch="css"] { border-top: 5px solid var(--ch-css); }
.dash-chapter-section[data-ch="js"] { border-top: 5px solid var(--ch-js); }
.dash-chapter-section[data-ch="expert"] { border-top: 5px solid var(--ch-expert); }

.dash-chapter-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--border-color); }
.dash-chapter-tag { display: inline-block; padding: 0.35rem 0.85rem; border-radius: 6px; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }

.dash-ch-html .dash-chapter-tag { background: var(--ch-html-subtle); color: var(--ch-html); border: 1px solid var(--ch-html-border); }
.dash-ch-css .dash-chapter-tag { background: var(--ch-css-subtle); color: var(--ch-css); border: 1px solid var(--ch-css-border); }
.dash-ch-js .dash-chapter-tag { background: var(--ch-js-subtle); color: var(--ch-js); border: 1px solid var(--ch-js-border); }
.dash-ch-expert .dash-chapter-tag { background: var(--ch-expert-subtle); color: var(--ch-expert); border: 1px solid var(--ch-expert-border); }

.dash-chapter-title-group h3 { font-size: 1.3rem; font-weight: 700; color: #1e293b; margin-bottom: 0.2rem; }
.dash-chapter-desc { font-size: 0.92rem; color: #64748b; line-height: 1.4; }

/* Dashboard Module Cards */
.mod-card { background: #ffffff; border: 1px solid var(--border-color); border-radius: 8px; padding: 1.1rem; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.mod-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }

.mod-card-html { border-left: 4px solid var(--ch-html); }
.mod-card-css { border-left: 4px solid var(--ch-css); }
.mod-card-js { border-left: 4px solid var(--ch-js); }
.mod-card-expert { border-left: 4px solid var(--ch-expert); }

.mod-card-header-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: #64748b; margin-bottom: 0.35rem; }
.mod-card h3 { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: 0.75rem; }

.mod-card .btn-open-mod { margin-top: 1rem; width: 100%; border: none; padding: 0.55rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; color: #ffffff; transition: background 0.2s ease; font-size: 0.9rem; }
.mod-card-html .btn-open-mod { background: var(--ch-html); }
.mod-card-html .btn-open-mod:hover { background: var(--ch-html-hover); }

.mod-card-css .btn-open-mod { background: var(--ch-css); }
.mod-card-css .btn-open-mod:hover { background: var(--ch-css-hover); }

.mod-card-js .btn-open-mod { background: var(--ch-js); }
.mod-card-js .btn-open-mod:hover { background: var(--ch-js-hover); }

.mod-card-expert .btn-open-mod { background: var(--ch-expert); }
.mod-card-expert .btn-open-mod:hover { background: var(--ch-expert-hover); }

/* Module Page Elements Theme Integration */
#modulSec .mod-header { background: var(--ch-bg-subtle); border-left: 6px solid var(--ch-color); border-radius: 8px; padding: 1.1rem 1.3rem; margin-bottom: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,0.04); transition: background 0.3s ease, border-color 0.3s ease; }
#modulSec .mod-header .mod { font-size: 0.9rem; font-weight: 700; color: var(--ch-color); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem; }
#modulSec .mod-header #stepTitle { font-size: 1.35rem; font-weight: 700; color: #0f172a; margin-top: 0.2rem; }

.card.task { border-left: 4px solid var(--ch-color); }

#subNav button[aria-current="step"] { background: var(--ch-color); color: #ffffff; font-weight: 700; border-color: var(--ch-color); }
#subNav button:hover:not([aria-current="step"]) { border-left: 4px solid var(--ch-color); }

.folien-knöpfe button.active { background: var(--ch-color); color: #ffffff; border-color: var(--ch-color); }

.btn-action, #pruefen { background: var(--ch-color); color: #ffffff; font-weight: 600; }
.btn-action:hover, #pruefen:hover { background: var(--ch-hover); }

.file-tabs .tab-btn.active { border-bottom: 3px solid var(--ch-color); color: var(--ch-color); font-weight: 700; }

/* Dashboard Full-Width & Header User Box */
.layout.dash-view { grid-template-columns: 1fr; max-width: 1400px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; background: var(--card-bg); padding: 1.25rem 1.5rem; border-radius: 10px; border: 1px solid var(--border-color); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.dash-header-text h2 { font-size: 1.4rem; color: #0f172a; margin-bottom: 0.2rem; }
.dash-header-text .dash-intro { margin-bottom: 0; }
.user-box-dash { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 6px; padding: 0.6rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.user-box-dash label { font-size: 0.85rem; color: #334155; }
.user-box-dash input { border: 1px solid #cbd5e1; border-radius: 4px; padding: 0.4rem 0.6rem; font-size: 0.9rem; }

/* JS Yellow High-Contrast Rule Overrides */
.mod-card-js .btn-open-mod { background: var(--ch-js); color: #0f172a; font-weight: 700; }
.mod-card-js .btn-open-mod:hover { background: var(--ch-js-hover); color: #ffffff; }
#topNav button.nav-ch-js[aria-current="page"] { background: var(--ch-js); color: #0f172a; font-weight: 700; }
.dash-ch-js .dash-chapter-tag { background: #fefce8; color: #854d0e; border: 1px solid #fef08a; }

body[data-chapter="js"] #modulSec .mod-header { background: #fefce8; border-left: 6px solid #eab308; }
body[data-chapter="js"] .mod-header .mod { color: #a16207; }
body[data-chapter="js"] #subNav button[aria-current="step"] { background: #eab308; color: #0f172a; font-weight: 700; border-color: #eab308; }
body[data-chapter="js"] .folien-knöpfe button.active { background: #eab308; color: #0f172a; font-weight: 700; border-color: #eab308; }
body[data-chapter="js"] .btn-action,
body[data-chapter="js"] #pruefen { background: #eab308; color: #0f172a; font-weight: 700; }
body[data-chapter="js"] .btn-action:hover,
body[data-chapter="js"] #pruefen:hover { background: #ca8a04; color: #ffffff; }
body[data-chapter="js"] .file-tabs .tab-btn.active { border-bottom: 3px solid #eab308; color: #a16207; font-weight: 700; }


/* Dashboard Chapter Flow (Vertical Stack of Full-Width Chapters) */
.dash-chapters-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}


/* Control Bar, Height-aligned Step Buttons & Language Success ("Richtig") State */
.control-bar { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 0.85rem 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; box-shadow: 0 -2px 6px rgba(0,0,0,0.03); }
.step-nav { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

#prevStep, #nextStep, .folien-knöpfe button { height: 38px; line-height: 1; box-sizing: border-box; font-size: 0.88rem; font-weight: 600; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
#prevStep, #nextStep { padding: 0 0.9rem; background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; cursor: pointer; }
#prevStep:hover:not(:disabled), #nextStep:hover:not(:disabled) { background: #e2e8f0; color: #0f172a; border-color: #94a3b8; }
#prevStep:disabled, #nextStep:disabled { opacity: 0.45; cursor: not-allowed; }

.folien-knöpfe { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.folien-knöpfe button { min-width: 38px; padding: 0 0.5rem; background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; cursor: pointer; position: relative; }
.folien-knöpfe button .chk-icon { font-size: 0.75rem; font-weight: 800; margin-left: 2px; color: #16a34a; }
.folien-knöpfe button:hover:not(.active) { background: #e2e8f0; color: #0f172a; }

.folien-knöpfe button.active { background: var(--ch-color); color: #ffffff; border-color: var(--ch-color); box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.folien-knöpfe button.done { background: #dcfce7; color: #15803d; border: 2px solid #16a34a; font-weight: 700; }
.folien-knöpfe button.done .chk-icon { color: #15803d; }

body[data-chapter="html"] .folien-knöpfe button.done { background: #ffedd5; color: #9a3412; border: 2px solid #22c55e; }
body[data-chapter="html"] .folien-knöpfe button.done .chk-icon { color: #16a34a; }
body[data-chapter="html"] .folien-knöpfe button.done.active { background: #15803d; color: #ffffff; border: 2px solid #e34f26; }
body[data-chapter="html"] .folien-knöpfe button.done.active .chk-icon { color: #fef08a; }

body[data-chapter="css"] .folien-knöpfe button.done { background: #e0f2fe; color: #0369a1; border: 2px solid #22c55e; }
body[data-chapter="css"] .folien-knöpfe button.done .chk-icon { color: #16a34a; }
body[data-chapter="css"] .folien-knöpfe button.done.active { background: #15803d; color: #ffffff; border: 2px solid #0284c7; }
body[data-chapter="css"] .folien-knöpfe button.done.active .chk-icon { color: #fef08a; }

body[data-chapter="js"] .folien-knöpfe button.done { background: #fef9c3; color: #854d0e; border: 2px solid #22c55e; }
body[data-chapter="js"] .folien-knöpfe button.done .chk-icon { color: #15803d; }
body[data-chapter="js"] .folien-knöpfe button.done.active { background: #15803d; color: #ffffff; border: 2px solid #eab308; }
body[data-chapter="js"] .folien-knöpfe button.done.active .chk-icon { color: #fef08a; }

body[data-chapter="expert"] .folien-knöpfe button.done { background: #f3e8ff; color: #6b21a8; border: 2px solid #22c55e; }
body[data-chapter="expert"] .folien-knöpfe button.done .chk-icon { color: #16a34a; }
body[data-chapter="expert"] .folien-knöpfe button.done.active { background: #15803d; color: #ffffff; border: 2px solid #9333ea; }
body[data-chapter="expert"] .folien-knöpfe button.done.active .chk-icon { color: #fef08a; }

/* Hilfeseite & Wissensspeicher Styling */
.hilfe-toggle-container { margin-bottom: 0.8rem; }
.btn-toggle-hilfe {
  width: 100%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-toggle-hilfe:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}
.hilfe-card {
  background: #f8fafc;
  border-left: 5px solid var(--ch-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}
.hilfe-card h4 {
  font-size: 1.05rem;
  color: #1e293b;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hilfe-card p { font-size: 0.92rem; color: #334155; line-height: 1.5; margin-bottom: 0.6rem; }
.hilfe-card table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.88rem; }
.hilfe-card th, .hilfe-card td { border: 1px solid #cbd5e1; padding: 0.5rem 0.75rem; text-align: left; }
.hilfe-card th { background: #e2e8f0; color: #0f172a; font-weight: 700; }
.hilfe-card td { background: #ffffff; }
.hilfe-card pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  overflow-x: auto;
  margin: 0.6rem 0;
}
.hilfe-card .tip-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  padding: 0.61rem 0.85rem;
  border-radius: 6px;
  margin: 0.6rem 0;
  font-size: 0.88rem;
}
.hilfe-card .error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  padding: 0.61rem 0.85rem;
  border-radius: 6px;
  margin: 0.6rem 0;
  font-size: 0.88rem;
}
.btn-side-hilfe {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}
.btn-side-hilfe:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}


/* Modal Styles for Full Cheat Sheet */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay[hidden] { display: none !important; }

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  background: #0f172a;
  color: #ffffff;
}
.modal-title-group h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.2rem; color: #ffffff; }
.modal-title-group p { font-size: 0.85rem; color: #94a3b8; margin: 0; }

.btn-close-modal {
  background: #334155;
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.btn-close-modal:hover { background: #ef4444; }

.modal-search-bar {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.modal-search-bar input {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
}
.modal-search-bar input:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15); }

.modal-ch-filter { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.modal-ch-btn {
  background: #e2e8f0;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
}
.modal-ch-btn.active { background: #0284c7; color: #ffffff; }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.btn-side-hilfe, .btn-side-all-hilfe {
  width: 100%;
  border: none;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.5rem;
  text-align: left;
  transition: background 0.2s, transform 0.1s;
}
.btn-side-hilfe { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.btn-side-hilfe:hover { background: #bae6fd; }

.btn-side-all-hilfe { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.btn-side-all-hilfe:hover { background: #fde68a; }

.btn-all-hilfe-inline {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 1rem;
}
.btn-all-hilfe-inline:hover { background: #e2e8f0; }

/* SEC-01 & SEC-03 Styles */
.preview-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.btn-run-code { font-size: 0.88rem; padding: 0.35rem 0.85rem; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.crash-banner { background: #fef2f2; border-left: 4px solid #ef4444; color: #991b1b; padding: 0.85rem; margin-bottom: 0.75rem; font-size: 0.9rem; border-radius: 6px; }
.btn-danger-subtle { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; padding: 0.4rem 0.7rem; border-radius: 6px; font-weight: 600; font-size: 0.82rem; cursor: pointer; width: 100%; text-align: center; transition: background 0.2s, color 0.2s; }
.btn-danger-subtle:hover { background: #dc2626; color: #ffffff; }

/* Paste Protection Warning Banner */
.paste-warning-banner {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
  border-left: 4px solid #f43f5e;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.paste-warning-banner[hidden] { display: none !important; }

/* Copy-Paste Status Badges */
.unlocked-paste-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.unlocked-paste-badge[hidden] { display: none !important; }
.sidebar-unlocked-badge[hidden] { display: none !important; }

.paste-toggle-box input[type=checkbox] {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin-top: 0.2rem;
  cursor: pointer;
  flex-shrink: 0;
}
