/* ============================================================
   DEUTSCH LERNEN PLUS - STYLES (Modern Educational Design)
   ============================================================ */

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== HEADER ===== */
header {
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), #06d6a0);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(79,109,245,0.3);
}
nav { display: flex; gap: 2px; }
nav button {
  background: transparent;
  border: none;
  color: var(--text2);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
nav button:hover { color: var(--text); background: var(--bg3); }
nav button.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}
.stats-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text2);
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  padding: 6px 12px;
  border-radius: 20px;
}
.stat-num {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ===== HERO ===== */
.hero {
  padding: 72px 24px 56px;
  text-align: center;
  position: relative;
  overflow: visible;
  background: linear-gradient(135deg, #0f172a 0%, #1a2744 50%, #0f2a23 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(79,109,245,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at bottom left, rgba(6,214,160,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
  position: relative;
  color: var(--text);
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary), #06d6a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 580px;
  margin: 0 auto 32px;
  position: relative;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  position: relative;
}
.hero-stat {
  text-align: center;
  background: rgba(30,41,59,0.7);
  backdrop-filter: blur(8px);
  padding: 16px 24px;
  border-radius: 16px;
  border: 1px solid rgba(51,65,85,0.6);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 2px;
  font-weight: 500;
}

/* ===== MAIN CONTAINER ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* ===== SECTION ===== */
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

/* ===== LEVEL TABS ===== */
.level-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.level-tab {
  padding: 10px 22px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text2);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'DM Sans', sans-serif;
}
.level-tab:hover { background: var(--bg3); color: var(--text); border-color: var(--border); }
.level-tab.active {
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
/* Level-specific colors for active tabs */
.level-tab.active[data-level="A1"] { background: var(--level-a1); }
.level-tab.active[data-level="A2"] { background: var(--level-a2); }
.level-tab.active[data-level="B1"] { background: var(--level-b1); }
.level-tab.active[data-level="B2"] { background: var(--level-b2); }
.level-tab.active[data-level="C1"] { background: var(--level-c1); }
.level-tab.active[data-level="C2"] { background: var(--level-c2); }
/* Fallback if no data-level */
.level-tab.active:not([data-level]) {
  background: var(--primary);
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), #06d6a0);
  opacity: 0;
  transition: opacity 0.25s;
}
.card:hover {
  background: var(--card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border);
}
.card:hover::before { opacity: 1; }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.card p {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
}
.card-count {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  background: var(--primary-light);
  border-radius: 20px;
  font-size: 0.76rem;
  color: var(--primary);
  font-weight: 600;
}

/* ===== VOCAB LIST ===== */
.vocab-view { display: none; }
.vocab-view.active { display: block; animation: fadeIn 0.3s; }
.vocab-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.back-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.back-btn:hover { background: var(--bg3); border-color: var(--border); }
.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.search-box::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
}
.vocab-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}
.vocab-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}
.vocab-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  background: var(--card);
  vertical-align: top;
}
.vocab-table tr td:first-child { border-radius: 12px 0 0 12px; }
.vocab-table tr td:last-child { border-radius: 0 12px 12px 0; }
.vocab-table tbody tr { cursor: pointer; transition: all 0.15s; }
.vocab-table tbody tr:hover td { background: var(--primary-light); }
.word-de { font-weight: 600; color: var(--text); }
.word-article { color: var(--accent2); font-weight: 700; font-size: 0.82rem; margin-right: 4px; }
.word-id { color: var(--accent); font-weight: 500; }
.word-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.word-type.nomen { background: rgba(59,130,246,0.1); color: #2563eb; }
.word-type.verb { background: rgba(13,148,136,0.1); color: var(--accent); }
.word-type.adjektiv { background: rgba(219,39,119,0.1); color: var(--accent3); }
.word-type.ausdruck { background: rgba(217,119,6,0.1); color: var(--accent2); }
.word-type.zahl { background: rgba(124,58,237,0.1); color: var(--accent4); }
.word-type.adverb { background: rgba(236,72,153,0.1); color: #ec4899; }
.word-type.präposition { background: rgba(245,158,11,0.1); color: #d97706; }
.word-type.konjunktion { background: rgba(34,197,94,0.1); color: #16a34a; }

/* ===== WORD DETAIL MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,42,0.4);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  max-width: 560px;
  width: 100%;
  position: relative;
  animation: modalIn 0.3s ease;
  box-shadow: var(--shadow-lg);
}
@keyframes modalIn { from { opacity:0; transform:scale(0.95) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg3);
  border: none;
  color: var(--text2);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: #475569; color: var(--text); }
.modal-word { font-size: 2rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.modal-trans { font-size: 1.2rem; color: var(--accent); margin-bottom: 20px; font-weight: 600; }
.modal-info { display: grid; gap: 12px; margin-bottom: 24px; }
.modal-info-row { display: flex; gap: 12px; }
.modal-label { font-size: 0.78rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; min-width: 80px; }
.modal-value { font-size: 0.92rem; }
.modal-example {
  background: var(--bg3);
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 8px;
  border-left: 4px solid var(--primary);
}
.modal-example-de { font-size: 1rem; font-weight: 500; margin-bottom: 4px; color: var(--text); }
.modal-example-id { font-size: 0.88rem; color: var(--text2); font-style: italic; }

/* ===== GRAMMAR ===== */
.grammar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.grammar-card:hover { border-color: var(--border); box-shadow: var(--shadow); }
.grammar-header {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text);
}
.grammar-header span:last-child { transition: transform 0.3s; color: var(--text3); }
.grammar-card.open .grammar-header span:last-child { transform: rotate(180deg); }
.grammar-card.open { border-color: var(--primary); border-left: 4px solid var(--primary); }
.grammar-body {
  padding: 0 24px 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s ease;
}
.grammar-card.open .grammar-body { padding: 0 24px 24px; max-height: 2000px; }
.grammar-title-id { font-size: 0.85rem; color: var(--accent); margin-bottom: 12px; font-weight: 500; }
.grammar-text { font-size: 0.9rem; color: var(--text2); margin-bottom: 8px; line-height: 1.7; }
.grammar-examples { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.grammar-ex {
  background: var(--primary-light);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  border-left: 3px solid var(--primary);
  font-weight: 500;
}

/* ===== QUIZ / TEST ===== */
.quiz-container { max-width: 720px; margin: 0 auto; }
.quiz-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.quiz-progress-bar {
  flex: 1;
  height: 10px;
  background: var(--bg3);
  border-radius: 5px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #06d6a0);
  border-radius: 5px;
  transition: width 0.4s ease;
}
.quiz-progress-text { font-size: 0.85rem; color: var(--text2); white-space: nowrap; font-weight: 600; }
.quiz-question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}
.quiz-category {
  display: inline-block;
  padding: 5px 14px;
  background: var(--primary-light);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 20px;
}
.quiz-word { font-size: 2.2rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.quiz-hint { font-size: 0.9rem; color: var(--text3); margin-bottom: 28px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  padding: 16px 20px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-option:hover:not(.disabled) { border-color: var(--primary); background: var(--primary-light); }
.quiz-option.correct { border-color: var(--success); background: rgba(16,185,113,0.08); color: var(--success); }
.quiz-option.wrong { border-color: var(--error); background: rgba(239,68,68,0.06); color: var(--error); }
.quiz-option .opt-letter {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: var(--text2);
}
.quiz-option.correct .opt-letter { background: var(--success); color: white; border-color: var(--success); }
.quiz-option.wrong .opt-letter { background: var(--error); color: white; border-color: var(--error); }
.quiz-explanation {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--bg3);
  border-radius: 14px;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text2);
  display: none;
  border-left: 4px solid var(--primary);
}
.quiz-explanation.show { display: block; animation: fadeIn 0.3s; }
.quiz-next-btn {
  margin-top: 20px;
  padding: 12px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: none;
}
.quiz-next-btn.show { display: inline-block; }
.quiz-next-btn:hover { background: #3b5de7; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,109,245,0.3); }

/* ===== QUIZ RESULT ===== */
.quiz-result { text-align: center; padding: 40px; }
.quiz-result-score {
  font-size: 4rem; font-weight: 800;
  font-family: 'Playfair Display', serif;
  margin-bottom: 8px;
}
.quiz-result-score.good { color: var(--success); }
.quiz-result-score.ok { color: var(--warning); }
.quiz-result-score.bad { color: var(--error); }
.quiz-result-text { font-size: 1.1rem; color: var(--text2); margin-bottom: 32px; }
.quiz-result-details { display: flex; justify-content: center; gap: 32px; margin-bottom: 32px; }
.result-stat { text-align: center; }
.result-stat-num { font-size: 1.8rem; font-weight: 700; }
.result-stat-label { font-size: 0.82rem; color: var(--text3); }

/* ===== EXAM / PRUFUNG ===== */
.exam-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.exam-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.exam-card p { color: var(--text2); font-size: 0.9rem; margin-bottom: 16px; }
.exam-sections { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.exam-section-tag {
  padding: 5px 14px;
  background: var(--primary-light);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 500;
}
.exam-tips { list-style: none; }
.exam-tips li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text2);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.exam-tips li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }
.exam-start-btn {
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(79,109,245,0.2);
}
.exam-start-btn:hover { background: #3b5de7; transform: translateY(-1px); }

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}
.section-desc {
  color: var(--text2);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

/* ===== QUIZ TYPE SELECTOR ===== */
.test-back-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.quiz-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.quiz-type-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.quiz-type-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  background: var(--primary-light);
}
.quiz-type-icon { font-size: 2.5rem; margin-bottom: 12px; }
.quiz-type-card h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--text); }
.quiz-type-card p { font-size: 0.85rem; color: var(--text2); }

/* ===== FILL IN THE BLANK ===== */
.fill-input {
  padding: 14px 18px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  text-align: center;
  width: 100%;
  max-width: 300px;
  outline: none;
  transition: all 0.2s;
  margin: 20px auto;
  display: block;
}
.fill-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.fill-input.correct-input { border-color: var(--success); background: rgba(16,185,113,0.06); }
.fill-input.wrong-input { border-color: var(--error); background: rgba(239,68,68,0.06); }
.check-btn {
  padding: 10px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.check-btn:hover { background: #3b5de7; transform: translateY(-1px); }

/* ===== FLASHCARD ===== */
.flashcard-container {
  perspective: 1200px;
  max-width: 480px;
  margin: 0 auto 24px;
}
.flashcard {
  width: 100%;
  height: 300px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.flashcard-front {
  background: linear-gradient(145deg, #1e293b, #283548);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.flashcard-back {
  background: linear-gradient(145deg, var(--primary), #3b5de7);
  border: 2px solid var(--primary);
  transform: rotateY(180deg);
  color: white;
  box-shadow: 0 8px 32px rgba(79,109,245,0.3);
}
.flashcard-word { font-size: 2rem; font-weight: 700; }
.flashcard-article { font-size: 1rem; color: var(--accent2); margin-bottom: 8px; font-weight: 600; }
.flashcard-back .flashcard-article { color: rgba(255,255,255,0.8); }
.flashcard-trans { font-size: 1.5rem; color: white; font-weight: 600; }
.flashcard-example { font-size: 0.88rem; color: var(--text2); margin-top: 12px; text-align: center; font-style: italic; }
.flashcard-back .flashcard-example { color: rgba(255,255,255,0.8); }
.flashcard-hint { font-size: 0.82rem; color: var(--text3); margin-top: 16px; }
.flashcard-nav { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.flashcard-nav button {
  padding: 10px 20px;
  background: var(--card);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s;
  font-weight: 500;
}
.flashcard-nav button:hover { background: var(--bg3); border-color: var(--border); }
.flashcard-counter { text-align: center; font-size: 0.88rem; color: var(--text3); margin-bottom: 16px; font-weight: 600; }

/* ===== LEARNING PATH ===== */
.lernpfad-roadmap {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  align-items: stretch;
}
.lernpfad-level {
  flex: 1;
  min-width: 140px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}
.lernpfad-level:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lernpfad-level.locked { opacity: 0.5; cursor: default; }
.lernpfad-level.locked:hover { transform: none; box-shadow: none; }
.lernpfad-level.current { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.lernpfad-level-name { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.lernpfad-level-desc { font-size: 0.75rem; color: var(--text3); margin-bottom: 10px; }
.lernpfad-progress-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.lernpfad-progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.lernpfad-pct { font-size: 0.78rem; font-weight: 600; }
.lernpfad-lock-icon { font-size: 1.5rem; margin-bottom: 6px; }

/* Dashboard cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.dashboard-card-icon { font-size: 2rem; margin-bottom: 8px; }
.dashboard-card-num { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.dashboard-card-label { font-size: 0.82rem; color: var(--text3); }
.dashboard-card-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 12px;
}
.dashboard-card-bar-fill { height: 100%; border-radius: 3px; }

/* Streak */
.streak-banner {
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(245,158,11,0.1));
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.streak-icon { font-size: 2.5rem; }
.streak-info { flex: 1; }
.streak-days { font-size: 1.4rem; font-weight: 800; color: #fbbf24; }
.streak-label { font-size: 0.85rem; color: #f59e0b; }

/* Milestones */
.milestone-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.milestone-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.milestone-badge.earned { background: rgba(16,185,113,0.1); color: var(--success); border: 1px solid rgba(16,185,113,0.2); }
.milestone-badge.pending { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }

/* ===== AUDIO BUTTONS ===== */
.audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.audio-btn:hover { background: var(--primary); color: white; transform: scale(1.1); }
.audio-btn:active { transform: scale(0.95); }
.audio-btn-slow { width: 36px; border-radius: 16px; gap: 1px; }
.audio-btn-row { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; }
.vocab-table .audio-btn { width: 28px; height: 28px; }
.vocab-table .audio-btn svg { width: 14px; height: 14px; }
.modal .audio-btn { width: 36px; height: 36px; }
.modal .audio-btn-slow { width: 42px; }
.flashcard .audio-btn { width: 36px; height: 36px; background: rgba(79,109,245,0.15); }
.flashcard-back .audio-btn { background: rgba(255,255,255,0.2); color: white; }
.flashcard-back .audio-btn:hover { background: rgba(255,255,255,0.35); }

/* ===== FOOTER ===== */
footer {
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text3);
  font-size: 0.82rem;
  background: var(--bg2);
}

/* ===== GLOBAL SEARCH ===== */
.global-search-wrapper {
  position: relative;
  max-width: 600px;
  margin: 32px auto 0;
  z-index: 50;
}
.global-search-box {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 0 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.global-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.global-search-icon {
  font-size: 1.2rem;
  margin-right: 10px;
  color: var(--text3);
}
.global-search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 14px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
}
.global-search-box input::placeholder { color: var(--text3); }
.global-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 420px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
}
.global-search-results.active { display: block; }
.search-results-header {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(51,65,85,0.3);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg3); }
.search-result-word {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}
.search-result-trans {
  color: var(--text2);
  font-size: 0.85rem;
}
.search-result-info {
  flex: 1;
  min-width: 0;
}
.search-result-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}
.search-level-badge {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}
.search-type-badge {
  font-size: 0.72rem;
  color: var(--text3);
  font-weight: 500;
}
.search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text3);
}

/* ===== LERNPFAD TIMELINE ===== */

/* Progress card */
.lp-progress-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.lp-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.lp-progress-milestone {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.lp-progress-pct {
  font-size: 1.8rem;
  font-weight: 800;
}
.lp-progress-bar-wrap { margin-bottom: 16px; }
.lp-progress-bar-bg {
  height: 12px;
  background: var(--bg3);
  border-radius: 6px;
  overflow: hidden;
}
.lp-progress-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}
.lp-progress-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.lp-stat {
  text-align: center;
  padding: 10px 8px;
  background: var(--bg3);
  border-radius: 10px;
}
.lp-stat-icon { font-size: 1.1rem; display: block; margin-bottom: 4px; }
.lp-stat-val { font-size: 1.2rem; font-weight: 700; color: var(--text); display: block; }
.lp-stat-total { font-size: 0.8rem; font-weight: 500; color: var(--text3); }
.lp-stat-lbl { font-size: 0.7rem; color: var(--text3); display: block; margin-top: 2px; }

/* Next action */
.lp-next-action {
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.lp-next-action-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.lp-next-action-task {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 8px;
}
.lp-next-action-info {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 4px;
}
.lp-action-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}
.lp-action-btn:hover { opacity: 0.85; }

/* Timeline */
.lernpfad-timeline {
  position: relative;
  padding-left: 40px;
  margin-bottom: 24px;
}
.lernpfad-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border);
  border-radius: 2px;
}
.lernpfad-step {
  position: relative;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.lernpfad-step:hover {
  box-shadow: var(--shadow);
  border-color: var(--text3);
}
.lernpfad-step::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg3);
  border: 3px solid var(--border);
  z-index: 1;
}
.lernpfad-step.completed::before {
  background: var(--success);
  border-color: var(--success);
}
.lernpfad-step.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.lernpfad-step.active::before {
  background: var(--primary);
  border-color: var(--primary);
  animation: pulse 2s infinite;
}
.lernpfad-step.locked { opacity: 0.5; }
.lernpfad-step.locked::before { background: var(--bg3); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(129,140,248,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(129,140,248,0); }
}
.lernpfad-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.lernpfad-step-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
}
.lernpfad-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.lp-step-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg3);
  color: var(--text3);
}
.lp-step-status-badge.completed { background: rgba(52,211,153,0.15); color: var(--success); }
.lp-step-status-badge.active { background: var(--primary-light); color: var(--primary); }
.lp-step-status-badge.locked { background: var(--bg3); color: var(--text3); }

.lp-step-progress-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.lp-step-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.lernpfad-step-desc {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 12px;
}

/* Checklist grid */
.lp-checklist-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.lp-checklist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg3);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.lp-checklist-row:hover { background: var(--primary-light); transform: translateX(4px); }
.lp-checklist-row.done { background: rgba(52,211,153,0.1); }
.lp-checklist-icon { font-size: 1rem; flex-shrink: 0; }
.lp-checklist-info { flex: 1; min-width: 0; }
.lp-checklist-name { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.lp-checklist-bar-wrap { display: flex; align-items: center; gap: 8px; }
.lp-checklist-bar {
  flex: 1;
  height: 5px;
  background: rgba(100,116,139,0.3);
  border-radius: 3px;
  overflow: hidden;
}
.lp-checklist-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.lp-checklist-count { font-size: 0.72rem; color: var(--text3); font-weight: 600; white-space: nowrap; }
.lp-checklist-status { font-size: 0.72rem; color: var(--text3); }
.lp-checklist-row.done .lp-checklist-name { color: var(--success); }
.lp-checklist-row.done .lp-checklist-status { color: var(--success); }

.lernpfad-milestone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(52,211,153,0.12);
  color: var(--success);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 10px;
}
.lernpfad-milestone.pending {
  background: var(--bg3);
  color: var(--text3);
}

/* Category progress bar */
.cat-progress-bar {
  height: 5px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 6px;
}
.cat-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

/* Vocab header progress */
.vocab-header-progress {
  display: inline-block;
  padding: 2px 10px;
  background: var(--bg3);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text3);
  margin-left: 8px;
  vertical-align: middle;
}
.vocab-header-progress.done {
  background: rgba(52,211,153,0.15);
  color: var(--success);
}

/* Learned word indicator */
tr.word-learned { background: rgba(52,211,153,0.05); }
.word-learned-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  margin-right: 6px;
  flex-shrink: 0;
}

/* Progress toast */
.progress-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--success);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  white-space: pre-line;
  max-width: 320px;
}
.progress-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PRÜFUNGEN ENHANCED ===== */
.exam-overview {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.exam-overview h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.exam-overview-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.exam-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg3);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--text2);
}
.exam-module-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.exam-module-tab {
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-weight: 500;
}
.exam-module-tab:hover { background: var(--bg3); color: var(--text); }
.exam-module-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.exam-module-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.exam-parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.exam-part-card {
  padding: 14px;
  background: var(--bg3);
  border-radius: 12px;
  border-left: 3px solid var(--primary);
}
.exam-part-card h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.exam-part-card p {
  font-size: 0.8rem;
  color: var(--text2);
}
.exam-part-meta {
  font-size: 0.75rem;
  color: var(--text3);
  margin-top: 6px;
}
.exam-material-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.exam-material-header {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.exam-material-header:hover { background: var(--bg3); }
.exam-material-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.7;
}
.exam-material-card.open .exam-material-body { display: block; }
.exam-key-phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.exam-key-phrase {
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
}
.exam-sample-q {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.exam-sample-q-num {
  font-size: 0.78rem;
  color: var(--text3);
  font-weight: 600;
  margin-bottom: 8px;
}
.exam-sample-q-text {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text);
}
.exam-sample-q-audio {
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text2);
  font-style: italic;
  margin-bottom: 12px;
}
.exam-sample-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.exam-sample-opt {
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.15s;
  color: var(--text);
}
.exam-sample-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.exam-sample-opt.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }
.exam-sample-opt.correct { border-color: var(--success); background: rgba(52,211,153,0.12); color: var(--success); }
.exam-sample-opt.wrong { border-color: var(--error); background: rgba(248,113,113,0.12); color: var(--error); }
.exam-answer-reveal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s;
}
.exam-answer-reveal:hover { background: var(--primary); color: white; }
.exam-explanation {
  display: none;
  padding: 12px 14px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: 10px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
}
.exam-explanation.show { display: block; }
.exam-writing-prompt {
  padding: 14px;
  background: var(--bg3);
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.exam-model-answer {
  padding: 14px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text2);
}
.exam-scoring-list {
  list-style: none;
  padding: 0;
}
.exam-scoring-list li {
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--text2);
  border-bottom: 1px solid rgba(51,65,85,0.3);
}
.exam-scoring-list li:last-child { border-bottom: none; }
.exam-tips-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.exam-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--text2);
}
.exam-tip-icon { flex-shrink: 0; }

/* ===== ANIMATIONS ===== */
@keyframes bounceIn {
  0% { transform: scale(0.95); opacity: 0; }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 24px 16px 40px; }
  .lernpfad-roadmap { gap: 8px; }
  .lernpfad-level { min-width: 120px; padding: 16px 12px; }
}

@media (max-width: 768px) {
  nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(15,23,42,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  nav.open { display: flex; }
  .hamburger { display: block; }
  .stats-bar { display: none; }
  .hero { padding: 48px 24px 36px; }
  .hero-stats { gap: 12px; flex-wrap: wrap; }
  .hero-stat { padding: 12px 16px; }
  .hero-stat-num { font-size: 1.4rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .quiz-types { grid-template-columns: 1fr; }
  .quiz-question-card { padding: 24px; }
  .quiz-word { font-size: 1.6rem; }
  .modal { padding: 24px; margin: 16px; border-radius: 20px; }
  .vocab-table th:nth-child(3), .vocab-table td:nth-child(3) { display: none; }
  .lernpfad-roadmap { flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .lp-progress-stats { grid-template-columns: repeat(2, 1fr); }
  .lernpfad-step-header { flex-wrap: wrap; }
  .progress-toast { left: 16px; right: 16px; max-width: none; bottom: 16px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0; }
  .logo { font-size: 1.1rem; }
  .level-tabs { gap: 4px; }
  .level-tab { padding: 8px 14px; font-size: 0.82rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .hero-stat { padding: 10px 14px; }
  .lp-progress-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ===== PWA FOOTER INSTALL ===== */
.pwa-footer-install {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.pwa-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pwa-footer-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text3);
  font-size: 0.85rem;
}
.pwa-footer-info svg {
  color: var(--text3);
  flex-shrink: 0;
  opacity: 0.7;
}
.pwa-footer-btn {
  padding: 8px 22px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.pwa-footer-btn:hover {
  background: var(--card);
  color: var(--text);
  border-color: var(--text3);
}
