/* ----- Reset & Grundlagen ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ----- Container ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ----- Header ----- */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #0f172a;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  letter-spacing: -0.5px;
}

/* Navigation */
.nav-list {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-link.active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}

/* Hamburger (mobil) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2.5px;
  background: #1e293b;
  border-radius: 2px;
  transition: 0.2s;
}

/* ----- Main ----- */
.main {
  flex: 1;
  padding: 2rem 0 3rem;
}

/* ----- Pages (Sections) ----- */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Dashboard (Startseite) ----- */
.dashboard-welcome {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.dashboard-welcome h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.subheadline {
  font-size: 1.1rem;
  color: #475569;
  margin: 0.5rem 0 1.5rem;
}

.btn-primary {
  display: inline-block;
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 2rem;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-primary:active {
  transform: scale(0.97);
}

/* Feature-Grid */
.dashboard-description {
  margin: 2.5rem 0;
}

.dashboard-description h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #0f172a;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #ffffff;
  padding: 1.5rem 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef2f6;
  text-align: center;
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: #475569;
}

/* Prüfungsauswahl */
.dashboard-exams {
  margin: 2.5rem 0;
}

.dashboard-exams h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #0f172a;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.exam-card {
  background: #ffffff;
  padding: 1.5rem 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef2f6;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.1s;
  cursor: pointer;
}

.exam-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.exam-icon {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 0.25rem;
}

.exam-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.exam-card p {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.exam-badge {
  display: inline-block;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.8rem;
  border-radius: 1rem;
  letter-spacing: 0.3px;
}

/* ----- Platzhalter für andere Seiten ----- */
.placeholder-text {
  text-align: center;
  color: #64748b;
  margin: 1rem 0 1.5rem;
  font-size: 1.05rem;
}

.placeholder-box {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  color: #94a3b8;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.placeholder-box span {
  font-size: 2.4rem;
}

/* ----- Footer ----- */
.footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
}

/* ----- Prüfungen-Seite: Auswahl & Detail ----- */
.pruefungen-auswahl,
.pruefungen-detail {
  margin-top: 1.5rem;
}

/* Gruppen- & Variantenkarten */
.exam-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.exam-select-card {
  background: #ffffff;
  padding: 1.25rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef2f6;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.1s;
}

.exam-select-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.exam-select-card .exam-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.25rem;
}

.exam-select-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.exam-select-card p {
  font-size: 0.85rem;
  color: #475569;
}

/* Varianten-Liste */
.variant-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.variant-item {
  background: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.variant-item:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.variant-item:active {
  background: #e2e8f0;
}

/* Zurück-Button */
.btn-back {
  display: inline-block;
  background: transparent;
  color: #4f46e5;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 1.5rem;
}

.btn-back:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Detailansicht */
.pruefungen-detail .selected-exam-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  margin-bottom: 0.5rem;
}

.pruefungen-detail .module-hint {
  text-align: center;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.module-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 0.5rem;
  text-align: center;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.module-btn:hover {
  background: #f1f5f9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.module-btn:active {
  transform: scale(0.97);
}

.module-btn .module-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.2rem;
}

.module-btn span {
  display: block;
  font-size: 0.9rem;
}

/* Platzhalter für Modul-Inhalte */
.module-placeholder {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  max-width: 500px;
  margin: 1.5rem auto 0;
}

.module-placeholder .placeholder-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.module-placeholder h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.module-placeholder p {
  color: #475569;
  margin-bottom: 1.5rem;
}

/* TestDaF-Hinweis */
.testdaf-hint {
  text-align: center;
  font-size: 0.95rem;
  color: #4f46e5;
  background: #eef2ff;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  display: inline-block;
  margin: 0 auto 1rem;
}

/* Zurück-Button im Platzhalter */
.btn-back-small {
  background: transparent;
  color: #4f46e5;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 1.2rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.btn-back-small:hover {
  background: #f1f5f9;
}

/* Parts-Grid */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  max-width: 600px;
  margin: 1rem auto;
}

.part-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.part-btn:hover {
  background: #eef2ff;
  border-color: #4f46e5;
}

.part-btn:active {
  transform: scale(0.97);
}

/* Platzhalter für ein Teil (Part) */
.part-placeholder {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  max-width: 500px;
  margin: 1.5rem auto 0;
}

.part-placeholder .placeholder-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.part-placeholder h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.part-placeholder p {
  color: #475569;
  margin-bottom: 1.5rem;
}

/* ----- Aufgabenansicht ----- */
.task-container {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef2f6;
  max-width: 700px;
  margin: 1rem auto;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.task-header .task-progress {
  font-weight: 500;
}

.task-question {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #0f172a;
}

.task-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.task-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.task-option:hover {
  background: #f8fafc;
}

.task-option input[type="radio"] {
  accent-color: #4f46e5;
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.task-option label {
  cursor: pointer;
  flex: 1;
  font-size: 0.95rem;
  color: #1e293b;
}

.task-option.correct {
  background: #dcfce7;
  border-color: #22c55e;
}

.task-option.wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.task-option.disabled {
  cursor: default;
  opacity: 0.8;
}

.task-option.disabled:hover {
  background: transparent;
}

.task-option.disabled.correct {
  background: #dcfce7;
}

.task-option.disabled.wrong {
  background: #fee2e2;
}

.task-option.disabled input[type="radio"] {
  cursor: default;
}

.task-option.disabled label {
  cursor: default;
}

.task-feedback {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  border-left: 4px solid #4f46e5;
}

.task-feedback .result {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.task-feedback .result.correct {
  color: #16a34a;
}

.task-feedback .result.wrong {
  color: #dc2626;
}

.task-feedback .explanation {
  font-size: 0.95rem;
  color: #475569;
}

.task-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.task-actions .btn-primary {
  padding: 0.5rem 1.5rem;
  font-size: 0.95rem;
}

.task-actions .btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.95rem;
}

.task-actions .btn-secondary:hover {
  background: #cbd5e1;
}

/* Zusammenfassung */
.summary-container {
  text-align: center;
  padding: 1.5rem;
}

.summary-container h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.summary-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.summary-stat {
  background: #f8fafc;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  min-width: 80px;
}

.summary-stat .stat-number {
  font-size: 1.5rem;
  font-weight: 600;
  display: block;
  color: #0f172a;
}

.summary-stat .stat-label {
  font-size: 0.85rem;
  color: #475569;
}

.summary-stat.correct .stat-number {
  color: #16a34a;
}

.summary-stat.wrong .stat-number {
  color: #dc2626;
}

.summary-stat.percentage .stat-number {
  color: #4f46e5;
}

.summary-actions {
  margin-top: 1.5rem;
}

/* ----- Task-Kontext (Text, Anweisungen) ----- */
.task-context {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border-left: 4px solid #4f46e5;
}

.task-context-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.instructions {
  font-size: 0.95rem;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.reading-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1e293b;
  white-space: pre-wrap;
}

.task-source {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
}

/* ----- gap-text Eingabefeld ----- */
.task-option input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.15s, background-color 0.15s;
}
.task-option input[type="text"]:focus {
  outline: none;
  border-color: #4f46e5;
}
.task-option input[type="text"].correct {
  border-color: #22c55e;
  background-color: #dcfce7;
}
.task-option input[type="text"].wrong {
  border-color: #ef4444;
  background-color: #fee2e2;
}
.task-option input[type="text"]:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* ----- Matching-Aufgaben ----- */
.matching-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.matching-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: background 0.15s, border-color 0.15s;
}

.matching-left {
  flex: 1;
  font-weight: 500;
}

.matching-select {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.95rem;
}

.matching-item.correct {
  background: #dcfce7;
  border-color: #22c55e;
}

.matching-item.wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.matching-correction {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: #1e293b;
  font-weight: 500;
}

/* ----- Person-Matching (Goethe B2 Lesen Teil 1) ----- */
.person-matching-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.person-matching-texts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.5rem;
}

.person-matching-person {
  padding: 0.5rem;
  border-radius: 0.25rem;
  background: #fff;
}

.person-label {
  margin-bottom: 0.25rem;
  color: #4f46e5;
}

.person-text {
  font-size: 0.9rem;
  line-height: 1.5;
}

.person-matching-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.person-matching-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: background 0.15s, border-color 0.15s;
  flex-wrap: wrap;
}

.person-matching-item .item-text {
  flex: 1;
  font-size: 0.95rem;
}

.person-matching-select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #fff;
  font-size: 0.95rem;
  min-width: 120px;
}

.person-matching-item.correct {
  background: #dcfce7;
  border-color: #22c55e;
}

.person-matching-item.wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.person-matching-correction {
  flex-basis: 100%;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: #1e293b;
}

/* ----- Sentence-Gap (Goethe B2 Lesen Teil 2) ----- */
.sentence-gap-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sentence-gap-instructions {
  font-size: 0.95rem;
  color: #1e293b;
  padding: 0.5rem 0;
}

.sentence-gap-text {
  font-size: 0.95rem;
  line-height: 1.8;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.5rem;
}

.sentence-gap-placeholder {
  display: inline-block;
  margin: 0 0.2rem;
  padding: 0.1rem 0.2rem;
  border-radius: 0.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: background 0.15s, border-color 0.15s;
}

.sentence-gap-select {
  padding: 0.2rem 0.4rem;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: #1e293b;
  min-width: 120px;
  cursor: pointer;
}

.sentence-gap-select:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.sentence-gap-select option {
  padding: 0.2rem;
}

.sentence-gap-placeholder.sentence-gap-item-correct {
  background: #dcfce7;
  border-color: #22c55e;
}

.sentence-gap-placeholder.sentence-gap-item-wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.sentence-gap-correction {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #1e293b;
}

.sentence-gap-options {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #f1f5f9;
  border-radius: 0.5rem;
}

.sentence-gap-options-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.sentence-gap-options ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sentence-gap-option {
  padding: 0.2rem 0;
  font-size: 0.9rem;
}

/* ----- Heading-Matching (Goethe B2 Lesen Teil 4 & 5) ----- */
.heading-matching-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.heading-matching-instructions {
  font-size: 0.95rem;
  color: #1e293b;
  padding: 0.5rem 0;
}

.heading-matching-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: background 0.15s, border-color 0.15s;
  flex-wrap: wrap;
}

.heading-matching-text {
  flex: 1;
  font-size: 0.95rem;
}

.heading-matching-select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #fff;
  font-size: 0.95rem;
  min-width: 150px;
}

.heading-matching-item.correct {
  background: #dcfce7;
  border-color: #22c55e;
}

.heading-matching-item.wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.heading-matching-correction {
  flex-basis: 100%;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: #1e293b;
}

/* ----- Ordering-Aufgaben ----- */
.ordering-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.ordering-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
  transition: background 0.15s, border-color 0.15s;
}

.ordering-text {
  flex: 1;
  font-size: 0.95rem;
}

.ordering-buttons {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.75rem;
}

.ordering-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #f8fafc;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, opacity 0.15s;
}

.ordering-btn:hover {
  background: #e2e8f0;
}

.ordering-btn:active {
  background: #cbd5e1;
}

.ordering-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.ordering-container.correct .ordering-item {
  border-color: #22c55e;
  background: #dcfce7;
}

.ordering-container.wrong .ordering-item {
  border-color: #ef4444;
  background: #fee2e2;
}

.ordering-correction {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #f1f5f9;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  color: #1e293b;
}

/* ----- Modus-Tabs (KI-Tutor) ----- */
.mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.mode-tab {
  padding: 0.5rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 2rem;
  background: #ffffff;
  color: #475569;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.mode-tab:hover {
  background: #f1f5f9;
}

.mode-tab.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

/* ----- Erklärungsansicht (KI-Tutor) ----- */
.explanation-container {
  padding: 1rem 0;
}

.explanation-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1e293b;
  margin-bottom: 1rem;
}

.strategy-list,
.tips-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
}

.strategy-list li,
.tips-list li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
}

.strategy-list li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: #4f46e5;
}

.tips-list li::before {
  content: "💡";
  position: absolute;
  left: 0;
}

/* ----- Simulation Placeholder (KI-Tutor) ----- */
.simulation-placeholder {
  text-align: center;
  padding: 3rem 1rem;
}

.simulation-placeholder .placeholder-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ----- KI-Tutor Hauptseite ----- */
.kitutor-container {
  max-width: 900px;
  margin: 0 auto;
}

.kitutor-current-topic {
  margin-bottom: 2rem;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.topic-card {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topic-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.topic-card.current {
  border-color: #4f46e5;
  background: #eef2ff;
}

.topic-card.completed {
  border-color: #22c55e;
  background: #dcfce7;
}

.topic-status {
  font-size: 1.2rem;
}

.topic-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

.topic-level {
  font-size: 0.8rem;
  color: #64748b;
}

.topic-progress {
  margin-top: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #4f46e5;
  border-radius: 3px;
  transition: width 0.5s;
}

/* Daily Plan */
.plan-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.plan-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.plan-icon {
  font-size: 1.2rem;
  margin-right: 0.75rem;
}
.plan-title {
  flex: 1;
}
.plan-duration {
  font-weight: 500;
  color: #4f46e5;
}

/* Level-Anzeige */
.level-display {
  text-align: center;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.level-current {
  font-size: 2rem;
  font-weight: 700;
  color: #4f46e5;
}

.level-progression {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.level-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
}

.level-fill {
  height: 100%;
  background: #4f46e5;
  border-radius: 3px;
  transition: width 0.5s;
}

/* Tutor-Start-Bereich */
.tutor-start-area {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  text-align: center;
}

.tutor-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

/* Tutor-Interaktion */
.tutor-interaction {
  max-width: 800px;
  margin: 0 auto;
}

.tutor-header {
  margin-bottom: 1rem;
}

.tutor-chat {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.tutor-message {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  background: #ffffff;
  border-left: 3px solid #4f46e5;
}

.tutor-message.user {
  background: #eef2ff;
  border-left-color: #8b5cf6;
}

.tutor-message.feedback {
  background: #f1f5f9;
  border-left-color: #64748b;
}

.tutor-message.completion {
  background: #dcfce7;
  border-left-color: #22c55e;
}

.tutor-input-area {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tutor-input-area textarea {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  resize: vertical;
}

.tutor-input-area button {
  padding: 0.6rem 1.5rem;
  height: fit-content;
}

.tutor-progress {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #475569;
}

.mock-hinweis {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .header-container {
    height: 3.75rem;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 3.75rem;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 1.5rem 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  }

  .nav-list.open {
    display: flex;
  }

  .nav-link {
    padding: 0.6rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 1rem;
  }

  .hamburger {
    display: flex;
  }

  .dashboard-welcome h1 {
    font-size: 1.8rem;
  }

  .subheadline {
    font-size: 1rem;
  }

  .feature-grid,
  .exam-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard-description h2,
  .dashboard-exams h2 {
    font-size: 1.5rem;
  }

  .exam-select-grid {
    grid-template-columns: 1fr 1fr;
  }
  .variant-list {
    max-width: 100%;
  }
  .module-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .dashboard-welcome {
    padding: 1rem 0 0.5rem;
  }

  .dashboard-welcome h1 {
    font-size: 1.5rem;
  }

  .btn-primary {
    padding: 0.6rem 1.6rem;
    font-size: 0.95rem;
  }

  .feature-card,
  .exam-card {
    padding: 1.25rem 1rem;
  }

  .placeholder-box {
    padding: 2rem 1rem;
    font-size: 1rem;
  }

  .exam-select-grid {
    grid-template-columns: 1fr;
  }
  .module-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .module-btn {
    padding: 0.75rem 0.25rem;
  }
  .module-btn .module-icon {
    font-size: 1.5rem;
  }
  .module-placeholder {
    padding: 2rem 1rem;
  }

  .parts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .part-btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.25rem;
  }

  /* Matching */
  .matching-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .matching-left {
    flex: 1 1 100%;
  }
  .matching-select {
    flex: 1 1 100%;
  }

  /* Person-Matching */
  .person-matching-texts {
    grid-template-columns: 1fr;
  }
  .person-matching-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .person-matching-select {
    width: 100%;
  }

  /* Sentence-Gap */
  .sentence-gap-select {
    min-width: 100px;
    font-size: 0.9rem;
  }
  .sentence-gap-placeholder {
    display: block;
    margin: 0.2rem 0;
  }

  /* Heading-Matching */
  .heading-matching-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .heading-matching-select {
    width: 100%;
    min-width: unset;
  }

  /* Ordering */
  .ordering-btn {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.4rem;
  }
  .ordering-item {
    padding: 0.5rem 0.75rem;
  }

  /* Task */
  .task-container {
    padding: 1rem;
  }
  .task-header {
    font-size: 0.85rem;
  }
  .task-question {
    font-size: 1rem;
  }
  .task-option {
    padding: 0.5rem 0.75rem;
  }
  .task-option label {
    font-size: 0.9rem;
  }
  .summary-stats {
    gap: 0.75rem;
  }
  .summary-stat {
    padding: 0.5rem 1rem;
    min-width: 60px;
  }

  /* Task-Context */
  .task-context {
    padding: 0.75rem;
  }
  .reading-text {
    font-size: 0.9rem;
  }

  /* KI-Tutor */
  .topics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tutor-input-area {
    flex-direction: column;
  }
  .tutor-input-area textarea {
    width: 100%;
  }
  .tutor-actions {
    flex-direction: column;
    align-items: center;
  }

  /* Tutor-Start */
  .tutor-actions {
    flex-direction: column;
    align-items: stretch;
  }
}