/* ===========================================
   🧱 BASIS-STYLING & TYPOGRAFIE
   =========================================== */
body {
  font-family: Arial, sans-serif;
  max-width: 600px;
  margin: 1em auto;
  padding: 1em;
  background-color: white;
  color: #222;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2 {
  text-align: center;
  margin-bottom: 0.3em;
}

h3 {
  text-align: center;
  margin-bottom: 0.1em;
  margin-top: 0.1em;
}

/* ===========================================
   🧱 Feedback Farbeinstellungen nach Antwort prüfen
   =========================================== */
:root {
  /* Wrong-Card Grundfarben */
  --feedback-wrong-bg: #ffecec;
  --feedback-wrong-text: #000000;

  /* Richtige Lösung im Feedback */
  --feedback-correct-font-size: 1.3rem;
  --feedback-correct-color: #1feb81; /* grünlich */

  /* Deine Antwort im Feedback */
  --feedback-user-font-size: 1.3rem;
  --feedback-user-color: #da1111; /* rötlich */

  /* Hervorhebung einzelner falscher Zeichen */
  --feedback-error-char-bg: #ffb3b3;
  --feedback-error-char-color: #000000;
}

/* --- Feedbackfarben (Legacy, falls irgendwo noch genutzt) --- */
.feedback-neutral {
  color: inherit;
}
.feedback-richtig-antwort {
  color: green;
  font-weight: bold;
}
.feedback-falsch-antwort {
  color: red;
  font-weight: bold;
}

/* --- Allgemeine Fehleranzeige --- */
.error {
  color: red;
  font-weight: bold;
  margin-top: 1em;
  text-align: center;
}

footer {
  font-size: 1.0em;
  color: green;
  margin-top: 1em;
  text-align: center;
}

.info-box {
  background: #f5faff;
  border-left: 4px solid #0078d7;
  padding: 1em 1.2em;
  border-radius: 6px;
  margin-bottom: 1.2em;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

body.dark-mode .info-box {
  background: #1e1e1e;
  border-left-color: #4a90e2;
  color: #ddd;
}


/* ===========================================
   🔘 Registration 
   =========================================== */
.field-wrapper {
  margin-bottom: 18px;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
  width: 100%;
  padding: 0.5em;
  font-size: 1.2rem;
  margin-top: 0.3em;
  border: 2px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  background-color: #fff;          /* für Select wichtig */
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Fokus-Styling auch auf select anwenden */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-position: right 0.7em center;
  background-repeat: no-repeat;
}


.input-with-helper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-helper input,
.input-with-helper textarea,
.input-with-helper select {
  flex: 1;
}

/* Eingabe + Fragezeichen nebeneinander */
.email-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.email-input-row input {
  flex: 1;
  width: auto; /* überschreibt das globale 100%-width */
}

/* Plus-Button unterhalb, zentriert */
.email-add-row {
  width: 100%;
  display: flex;
  justify-content: flex-start; /* oder center */
  margin-top: 6px;
}

.helper {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75em;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  cursor: help;
  line-height: 1;
}


/* ===========================================
   🔘 BUTTONS & FORMULARELEMENTE
   =========================================== */
button,
input[type="submit"],
.register-btn {
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5em 1em;
  margin: 0.3em 0.5em 0.3em 0;
  border-radius: 5px;
  background-color: white;
  border: 2px solid #0078d7;
  color: #0078d7;
  transition: background-color 0.2s ease, color 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
.register-btn:hover {
  background-color: #0078d7;
  color: white;
}


/* ===========================================
   🧭 LAYOUT-ELEMENTE & BUTTON-GRUPPEN
   =========================================== */
.top-bar-container {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-bottom: 0em;
  flex-wrap: wrap;
}

/* Linke Seite der Top-Bar */
.top-bar-left {
  display: flex;
  width: 60%;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
}

/* Rechte Seite der Top-Bar */
.top-bar-right {
  display: flex;
  width: 38%;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
}

/* Anpassung der Button-Gruppe */
.btn-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

/* Logout-Button */
.logout-btn button {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Settings-Bereich komplett rechtsbündig & vertikal */
.settings-menu {
  display: flex;
  flex-direction: column;   /* untereinander */
  align-items: flex-end;    /* rechtsbündig */
  gap: 8px;
}

/* Darkmode + Settings nebeneinander */
.settings-top-row {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  width: 100%;
}

/* Private-Mode Switch Container */
.switch-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Spezieller Action-Button */
.top-bar-btn {
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.5em 1em;
  margin: 0;
  border-radius: 5px;
  background-color: white;
  border: 2px solid #0078d7;
  color: #0078d7;
  transition: background-color 0.2s ease, color 0.2s ease;
}
/* Spezieller Action-Button */
.top-bar-btn-small {
  cursor: pointer;
  font-size: 0.6rem;
  padding: 0.5em 1em;
  margin: 0;
  border-radius: 5px;
  background-color: white;
  border: 2px solid #0078d7;
  color: #0078d7;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.top-bar-btn:hover {
  background-color: #0078d7;
  color: white;
}

.top-bar--btn:active {
  background-color: #005fa3;
  border-color: #005fa3;
}


/* ===========================================
   🧩 Table-BEREICH mit Schiebereglern
   =========================================== */
.table-title {
  margin-bottom: 1em;
  padding-top: 0.5em;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color, #222);
  text-align: center;
  background-color: var(--table-bg, #fff);
  padding-left: 1em;
  border-radius: 6px 6px 0 0;
}

.top-table-area {
  width: 100%;
  overflow: auto;
  background: var(--table-bg, #fff);
  padding: 0;
  border-radius: 6px;
}

.top-table-area table {
  width: 100%;
  border-collapse: collapse;
  background: var(--table-bg, #fff);
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
  font-size: clamp(0.6rem, 1.2vh, 0.85rem);
  color: var(--text-color, #222);
}

.top-table-area th,
.top-table-area td {
  padding: 2px 6px;
  border-bottom: 1px solid var(--table-border, #ddd);
}

.top-table-area th {
  text-align: left;
  font-weight: 500;
}

.top-table-area td {
  text-align: right;
  font-weight: 600;
}

.btn-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1em;
}

.btn-group {
  display: flex;
  gap: 0.5em;
  margin-bottom: 5px;
}

.btn-group button {
  flex: 1;
  padding: 0.5em 1em;
  font-size: 1rem;
  border-radius: 5px;
  border: 2px solid #888;
  background-color: white;
  color: #555;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.btn-group button:hover,
.btn-group button:focus {
  background-color: #888;
  color: white;
}

/* Darkmode-Button */
form button#darkModeToggle {
  font-size: 1.3rem;
  padding: 0.3em 0.8em;
  background-color: transparent;
  border-radius: 5px;
  border: 2px solid #888;
  transition: background-color 0.3s, color 0.3s;
}

form button#darkModeToggle:hover {
  background-color: #888;
  color: white;
}


/* ===========================================
   📊 CHART-CONTAINER
   =========================================== */
#chartsContainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-width: 600px;
  width: 100%;
}

#historyChartContainer,
#polarChartContainer {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

#historyChart,
#polarChart {
  width: 100%;
  height: 100%;
}


/* ===========================================
   📈 FORTSCHRITTSBALKEN für <progress>
   =========================================== */
#progressContainer {
  width: 100%;
  margin: 1em 0;
}

/* Grundlayout: Progress nimmt die volle Breite */
#progressBar {
  width: 100%;
  height: 20px;
}

/* WebKit-Browser (Chrome, Edge, Safari) */
#progressBar::-webkit-progress-bar {
  background-color: #eee;
  border-radius: 10px;
}

#progressBar::-webkit-progress-value {
  background-color: #0078d7;   /* dein Blau */
  border-radius: 10px;
}

/* Firefox */
#progressBar::-moz-progress-bar {
  background-color: #0078d7;
  border-radius: 10px;
}


/* ===========================================
   🧾 FEEDBACK UND FEHLERLISTEN (modern)
   =========================================== */
#feedback,
#summary {
  margin-bottom: 1em;
}

/* Summary-UL ohne Standard-Einrückung */
#summary ul {
  padding-left: 0;
}

/* Fehlerliste: Liste von Cards, keine Tabelle */
#fehlerList {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}


/* ===========================================
   📋 STATISTIK-TABELLEN (UNIT-VIEW)
   =========================================== */
.table-overall-stats {
  width: 100%;
  border-collapse: collapse;
  background: var(--table-bg, #ffffff);
  color: var(--text-color, #222);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  table-layout: auto;
}

.table-overall-stats h3 {
  text-align: center;
  font-weight: 500;
  font-size: 0.6rem !important;
  margin-bottom: 4px;
  line-height: 1.2;
  color: var(--text-color, #222);
}

.table-overall-stats caption {
  text-align: center;
  font-weight: 500;
  font-size: 0.6rem !important;
  margin-bottom: 4px;
  color: var(--text-color, #222);
}

.table-overall-stats th,
.table-overall-stats td {
  border-bottom: 1px solid var(--table-border, #ddd);
  padding: 4px 8px;
  vertical-align: middle;
}

.table-overall-stats tr {
  text-align: center;
}

.table-overall-stats th {
  text-align: left;
  white-space: nowrap;
  font-weight: 300;
  width: 1%;
}

.table-overall-stats td {
  text-align: right;
  font-weight: 100;
}

.table-overall-stats tr:first-child {
  background: var(--header-bg, #eef3f7);
  border-bottom: 2px solid var(--table-border, #bbb);
}

.table-overall-stats tr:first-child th,
.table-overall-stats tr:first-child td {
  text-align: center !important;
  font-weight: 700;
}


/* ===========================================
   🌙 DARKMODE
   =========================================== */
.dark-mode {
  --panel-bg: #121212;
  --text-color: #e5e5e5;
  --table-bg: #2a2a2a;
  --table-border: #444;
  --btn-bg: #444;
  --btn-hover: #666;
  --btn-text: #fff;
  background-color: #121212;
  color: #e0e0e0;
}

/* Eingabefelder & Buttons im Darkmode */
body.dark-mode input[type="text"],
body.dark-mode input[type="password"],
body.dark-mode input[type="email"],
body.dark-mode select {
  background-color: #222;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-mode button {
  background-color: #333;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-mode select:focus {
  border-color: #4a90e2;
}

body.dark-mode button:hover,
body.dark-mode button:focus {
  background-color: #4a90e2;
  color: white;
}

/* Tabellen im Darkmode */
.dark-mode .table-overall-stats {
  background: var(--table-bg);
  color: var(--text-color);
}

.dark-mode .table-overall-stats th,
.dark-mode .table-overall-stats td {
  border-color: var(--table-border);
}


/* ===========================================
   📱 AmpelColor (Repeat-Buttons)
   =========================================== */
.repeat-buttons-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.column {
  flex: 1;
  padding: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

button.yellow {
  background-color: yellow;
  color: black;
}
body.dark-mode button.yellow {
  color: black;
}

button.yellow:hover {
  background-color: #f1c40f;
  color: black;
}
body.dark-mode button.yellow:hover {
  color: black;
}

.repeat-button {
  display: flex;
  justify-content: center;
}

.repeat-start-btn {
  width: 100%;
  padding: 2px;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
}


/* ===========================================
   Frage (größer, mit Marker)
   =========================================== */
#frage {
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.4;
}

#frage .question-prefix {
  margin-right: 6px;
}

#frage .question-word {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(
    120deg,
    rgba(109, 95, 16, 0.9),
    rgba(150, 127, 29, 0.9)
  );
}

/* Hinweis als Card mit Icon */
#hinweis {
  font-size: 1.2rem;
  color: #444;
  margin: 3px 0 3px;
  display: none;
  align-items: center;
  gap: 4px;
  background: #a0a09e;
  border-left: 10px solid #978d28;
  border-radius: 8px;
  padding: 2px 0px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.hint-icon {
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.hint-text {
  flex: 1;
  line-height: 1.3;
}


/* ===========================================
   Fade-in Animation (für Frage, Hinweis, Feedback)
   =========================================== */
.fade-in {
  animation: fadeInUp 0.25s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===========================================
   Feedback-Cards (nach Antwort)
   =========================================== */
#feedback {
  margin-top: 12px;
}

.feedback-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.95rem;
  line-height: 1.4;
}

.feedback-card--correct {
  background: #e8f8f0;
  border-color: #39b27f;
}

.feedback-card--wrong {
  background: var(--feedback-wrong-bg);
  border-color: #e55353;
  color: var(--feedback-wrong-text);
}

.feedback-card--wrong .feedback-card__title,
.feedback-card--wrong .feedback-card__line {
  color: var(--feedback-wrong-text);
}

.feedback-card--error {
  background: #fff3cd;
  border-color: #ffcc00;
}

.feedback-card__icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-top: 2px;
}

.feedback-card__content {
  flex: 1;
}

.feedback-card__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.feedback-card__subtitle {
  font-size: 0.9rem;
  color: #555;
}

.feedback-card__line {
  margin-top: 2px;
  font-size: 0.9rem;
}

.feedback-card__correct {
  font-size: var(--feedback-correct-font-size);
  font-weight: 700;
  color: var(--feedback-correct-color);
}

.feedback-card__user {
  font-size: var(--feedback-user-font-size);
  font-weight: 700;
  color: var(--feedback-user-color);
}

.fehler-char {
  background: var(--feedback-error-char-bg);
  color: var(--feedback-error-char-color);
  border-radius: 2px;
  padding: 0 1px;
}

/* 🌙 Darkmode Styling für Feedback Cards */
@media (prefers-color-scheme: dark) {
  .feedback-card {
    background: #2d2d2d !important;
    color: #f0f0f0 !important;
    border-color: #555 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  }

  .feedback-card--correct {
    background: #234b39 !important;
    border-color: #4fc18e !important;
  }

  .feedback-card--wrong {
    background: #4b2323 !important;
    border-color: #ff6b6b !important;
    color: #bcb7b7 !important;
  }

  .feedback-card--error {
    background: #4a3e1a !important;
    border-color: #d9b551 !important;
  }

  .feedback-card__title,
  .feedback-card__content,
  .feedback-card__line {
    color: #bcb7b7 !important;
  }

  .feedback-card__correct {
    color: var(--feedback-correct-color) !important;
  }

  .feedback-card__user {
    color: var(--feedback-user-color) !important;
  }

  .fehler-char {
    background: #ff6b6b !important;
    color: #fff !important;
  }
}


/* ===========================================
   📊 Zweispaltiges Statistik-Layout (Summary)
   =========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 6px;
  margin: 0 0;
}

.stat-item {
  background: #f5f5f5;
  padding: 2px 14px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.stat-item.full {
  grid-column: span 2;
}

.stat-item .label {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 4px;
}

.stat-item .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
}

.stat-item .value.green {
  color: #0b8043;
}
.stat-item .value.red {
  color: #b00020;
}
.stat-item .value.bold {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0056b3;
}

/* Darkmode für Statistik */
body.dark-mode .stat-item {
  background: #2d2d2d;
  color: #ddd;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode .stat-item .label {
  color: #aaa;
}
body.dark-mode .stat-item .value {
  color: #fff;
}
body.dark-mode .value.green {
  color: #6ee7b7;
}
body.dark-mode .value.red {
  color: #ff6b6b;
}
body.dark-mode .value.bold {
  color: #4dabf7;
}

/* Set-Name im Fehler-Titel */
.set-name {
  font-weight: 700;
  color: #0056b3;
}
body.dark-mode .set-name {
  color: #4dabf7;
}


/* ===========================================
   📊 Fehler-Kacheln (Frage / deine Antwort / korrekt)
   =========================================== */
.summary-error-card {
  margin-bottom: 1px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.summary-error-header {
  background: #f0f0f0;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 1px;
}

.summary-error-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0px;
}
.summary-error-header .header-cell {
  text-align: center;
  font-size: 0.9rem;
  color: #ecdede;
}

.summary-error-card__header .badge {
  background: #e55353;
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.75rem;
}

.summary-error-card__header .lang {
  font-size: 0.8rem;
  color: #555;
}

/* 3 Kacheln: Frage, Deine Antwort, Korrekt */
.summary-error-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  column-gap: 12px;  /* horizontal jetzt enger */
}

.summary-error-tile {
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.summary-error-tile .title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
}

.summary-error-tile .text {
  font-size: 0.9rem;
  word-break: break-word;
}

/* Spezielle Farben pro Kachel */
.summary-error-tile--question .title { color: #555;}
.summary-error-tile.user { color: #b00020; font-weight: 600; }
.summary-error-tile.correct { color: #0b8043; font-weight: 600; }
.summary-error-tile--user .text {
  color: #b00020;
  font-weight: 600;
}

.summary-error-tile--correct .title {
  color: #0b8043;
}
.summary-error-tile--correct .text {
  color: #0b8043;
  font-weight: 600;
}

/* 🌙 Darkmode */
body.dark-mode .summary-error-header {
  background: #333;
  color: #ddd;
}

body.dark-mode .summary-error-tile {
  background: rgba(30,30,30,0.9);
}

body.dark-mode .summary-error-tile.correct { color: #6ee7b7; }
body.dark-mode .summary-error-tile.user { color: #ff8a80; }

/* Darkmode für Fehler-Kacheln */
body.dark-mode .summary-error-card__header .lang {
  color: #ccc;
}

body.dark-mode .summary-error-tile {
  background: rgba(20, 20, 20, 0.7);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .summary-error-tile .title {
  color: #e0e0e0;
}

body.dark-mode .summary-error-tile--user .text {
  color: #ff8a80;
}

body.dark-mode .summary-error-tile--correct .text {
  color: #6ee7b7;
}


/* ===========================================
   Teacher: Zeilenfärbung nach Aktiv-Status
   =========================================== */
.table-comparison tr.row-active td {
  background-color: #e8f9e8 !important;  /* zartes Grün */
}

.table-comparison tr.row-inactive td {
  background-color: #fdeaea !important;  /* zartes Rot */
  color: #555;                           /* leicht „entschärft“ */
}

/* optional für Darkmode etwas anpassen */
body.dark-mode .table-comparison tr.row-active td {
  background-color: #224422 !important;
  color: #e5ffe5;
}

body.dark-mode .table-comparison tr.row-inactive td {
  background-color: #552222 !important;
  color: #f5cccc;
}


/* ===========================================
   Teacher: Toggle-Button (Aktivieren/Inaktivieren)
   =========================================== */
.btn-toggle-status {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #888;
  background-color: #ffffff;
  color: #0078d7;
  transition: all 0.2s ease;
}

.btn-toggle-status:hover {
  background-color: #0078d7;
  color: #ffffff;
}

.row-inactive .btn-toggle-status {
  background-color: #f5dada;
  color: #a94442;
}

.row-inactive .btn-toggle-status:hover {
  background-color: #a94442;
  color: white;
}


/* ===== Switches für Teacher-Tabellen & Private Mode ===== */
.table-comparison th.center,
.table-comparison td.center {
  text-align: center;
}

/* Schalter-Container (z.B. Private Mode) */
.switch-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Label, das den eigentlichen Switch enthält */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;   /* Länge des Switches */
  height: 24px;  /* Höhe des Switches */
}

/* Das echte Checkbox-Element unsichtbar machen */
.switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

/* Die „Schiene“ des Switches */
.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-color: #ccc;
  transition: background-color 0.3s ease;
  border-radius: 24px;
}

/* Der runde Punkt */
.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

/* ✅ Zustand: angehakt */
.switch input[type="checkbox"]:checked + .slider {
  background-color: #4CAF50;
}

.switch input[type="checkbox"]:checked + .slider:before {
  transform: translateX(26px);  /* Punkt fährt ganz nach rechts */
}

/* ✅ Zustand: disabled */
.switch input[type="checkbox"]:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Kleine Inline-Formulare */
.inline-form {
  display: inline-block;
  margin: 0;
}


/* ===========================================
   Vokabel-Upload Tabs
   =========================================== */
.vocab-upload-tabs {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.vocab-tab-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.vocab-tab {
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 0.9rem;
}

.vocab-tab.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.vocab-tab-hint {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: #555;
}

/* Verstecke das ursprüngliche File-Input */
#vocabFileInput {
  display: none;
}

/* Stil für den benutzerdefinierten Datei-Auswahlbutton */
.btn-custom {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

/* Hover-Effekt für den Button */
.btn-custom:hover {
  background-color: #45a049;
}

/* Stil für den Dateinamen */
.file-name {
  display: inline-block;
  margin-left: 10px;
  font-style: italic;
  color: #666;
}

/* Stil für die Datei-Auswahl-Legende */
.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}


/* ===========================================
   💡 LOGIN-SEITE / HERO / INFO-POPUP
   =========================================== */

/* Body speziell für Login-Seite */
body.login-page {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background-color: #f3f4f6;
  box-shadow: none;
}

/* Login Box */
.login-container {
  max-width: 600px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hero Block */
.login-hero {
  position: relative;
  padding-bottom: 3rem;
  text-align: center;
}

.hero-logo {
  display: block;
  margin: 0 auto 0.8rem;
  max-height: 80px;
}

.hero-title {
  font-size: 2rem;
  margin: 0.2rem 0;
}

.hero-subtitle {
  font-size: 1rem;
  color: #555;
  margin-bottom: 0.8rem;
}

.hero-features {
  list-style: none;
  padding: 0;
  font-size: 0.95rem;
  color: #444;
}

.hero-features li {
  margin-bottom: 0.2rem;
}

/* Info Button unten rechts */
.info-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
.info-btn:hover { background: #1d4ed8; }

/* Modal Overlay – Standard UNSICHTBAR */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;            /* WICHTIG! */
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-box {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

.modal-content p {
  color: #222;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Responsive Login-Hero */
@media (max-width: 600px) {
  .login-container { margin: 1rem; padding: 1rem; }
  .hero-title { font-size: 1.6rem; }
  .info-btn { bottom: 10px; right: 10px; font-size: 0.8rem; }
}


/* Flexbox Container für die Organisation, Kurs und Gruppe */
.flex-container {
  display: flex;
  justify-content: space-between;
  gap: 15px; /* Abstand zwischen den Feldern */
}

.form-item {
  flex: 1; /* Jedes Feld nimmt den gleichen Raum ein */
  min-width: 200px; /* Minimum Breite für jedes Feld */
}

/* Private Mode Label & Icon */
.private-label {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
}

.lock-icon {
  font-size: 1.5rem;      /* größer -> über beide Zeilen */
  margin-right: 4px;
  display: flex;
  align-items: center;
}

.private-text {
  display: inline-block;
  text-align: left;
  font-size: 0.7rem;
  line-height: 1.1;
  white-space: nowrap;    /* kein automatischer Zeilenbruch */
}
.form-group textarea {
  width: 100%;
  box-sizing: border-box;
  display: block;
}
/* ===========================================
   📱 RESPONSIVE DESIGN (inkl. Top-Bar)
   =========================================== */
@media (max-width: 600px) {
  body {
    margin: 1em;
    padding: 1em;
  }

  button,
  input[type="submit"],
  .register-btn {
    width: 100%;
    margin-top: 0.7em;
  }

  #antwort {
    font-size: 1.5rem;
  }

  .top-bar-container {
    flex-direction: column;
    align-items: stretch;
  }

  .top-bar-left {
    width: 100%;
    text-align: left;
    margin-bottom: 0.5em;
  }

  .top-bar-left h1 {
    font-size: 1.2rem;
  }

  .top-bar-right {
    position: static;
    width: 100%;
    display: flex;
    flex-direction: row;      /* 👉 alles in einer Zeile */
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;             /* kleiner Abstand zwischen Switch/Logout und Settings */
    margin-bottom: 0.5rem;
  }

  .settings-menu {
    width: auto;              /* nicht mehr volle Breite */
    align-items: center;      /* Buttons mittig ausrichten */
  }

  .settings-top-row {
    justify-content: flex-start;
    width: auto;              /* nur so breit wie nötig */
    gap: 0.25rem;             /* auch hier enger */
  }

  .switch-container {
    gap: 0.25rem;             /* Schloss, Switch, Logout enger zusammen */
  }

  .top-bar-right .top-bar-btn {
    font-size: 0.9rem;
    padding: 0.3em 0.6em;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));  /* zwei gleich breite Spalten */
  }

  .stat-item.full {
    grid-column: 1 / -1;  /* Full-Items weiterhin über beide Spalten */
  }
}

/* Teacher: Titel als klickbarer Button für Vorschau */
/* Buttons in der Vokabelset-Tabelle */
.vocab-table-button {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    color: #333;
    cursor: pointer;
    white-space: nowrap;          /* Titel bleibt in einer Zeile */
}

.vocab-table-button:hover {
    background-color: #e0e0e0;
}

.vocab-table-button:active {
    background-color: #d0d0d0;
}
