:root {
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #16161d;
  color: #e6e6f0;
  padding-bottom: 24px;
}

header.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #1c1c26;
  border-bottom: 1px solid #2c2c3a;
}

header.topbar h1 {
  font-size: 17px;
  margin: 0;
}

.icon-btn {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav.tab-bar {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: #1c1c26;
  border-bottom: 1px solid #2c2c3a;
  overflow-x: auto;
}

nav.tab-bar a {
  color: #9a9ab0;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

nav.tab-bar a.active {
  color: #fff;
  background: #4682dc;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: #1c1c26;
  border-radius: 14px;
  padding: 16px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.unit-note {
  color: #888899;
  font-size: 13px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2c2c3a;
  background: #12121a;
  color: inherit;
  font-size: 15px;
  margin-bottom: 10px;
}

textarea { min-height: 120px; font-family: monospace; font-size: 13px; }

.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

button {
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: #4682dc;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

button.secondary { background: #2c2c3a; }
button.danger-btn { background: #e07f7f; color: #1c1c26; }
button.link-btn { background: none; color: #4682dc; padding: 8px 0; text-align: left; }

.due-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.due-count {
  font-size: 28px;
  font-weight: 700;
}

.error-text { color: #e07f7f; font-size: 14px; min-height: 1.2em; }
.success-text { color: #7fe0a0; font-size: 14px; min-height: 1.2em; }

.hidden { display: none !important; }

/* Übungskarte */
.flashcard {
  text-align: center;
  padding: 32px 16px;
}
.flashcard .prompt {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.flashcard .direction-hint {
  color: #888899;
  font-size: 13px;
  margin-bottom: 16px;
}
.flashcard .example {
  color: #9a9ab0;
  font-style: italic;
  font-size: 14px;
  margin-top: 12px;
}
.flashcard .feedback {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
}
.flashcard .feedback.correct { color: #7fe0a0; }
.flashcard .feedback.incorrect { color: #e07f7f; }
.progress-note { text-align: center; color: #888899; font-size: 13px; }

/* Statistik */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid #2c2c3a; }
th { color: #888899; font-weight: 500; font-size: 12px; }

.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.bar-row .bar-label { width: 42px; color: #888899; flex-shrink: 0; }
.bar-track { flex: 1; display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: #12121a; }
.bar-correct { background: #7fe0a0; }
.bar-incorrect { background: #e07f7f; }

.vocab-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid #2c2c3a; }
.vocab-row .words { display: flex; justify-content: space-between; gap: 12px; }
.vocab-row .meta { color: #888899; font-size: 12px; }
