/* =========================================
   German Modal Verbs – Exercise Level Page
   ========================================= */

.level-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.exercise-stage {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.stage-dot {
  flex: 1;
  height: 0.45rem;
  background: #e5e7eb;
  border-radius: 9999px;
}

.stage-dot.completed {
  background: var(--success);
}

.stage-dot.current {
  background: var(--primary);
}

.exercise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.exercise-type-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.exercise-question {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.exercise-question .blank {
  display: inline-block;
  min-width: 5rem;
  border-bottom: 2px dashed var(--primary);
  margin: 0 0.15rem;
  text-align: center;
  font-weight: 600;
}

.exercise-question .highlight {
  color: var(--primary);
  font-weight: 700;
}

/* Options */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.option:hover {
  background: #f9fafb;
  border-color: var(--primary);
}

.option input {
  cursor: pointer;
}

.option.selected {
  border-color: var(--primary);
  background: rgba(13, 115, 119, 0.06);
}

.option.correct {
  border-color: var(--success);
  background: var(--success-light);
}

.option.incorrect {
  border-color: var(--error);
  background: var(--error-light);
}

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

/* Fill blank */
.fillblank-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: 1.25rem;
}

.fillblank-input {
  width: 8rem;
  text-align: center;
}

.fillblank-input.wide {
  width: 12rem;
}

/* Conjugation table */
.conjugation-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.conjugation-table th,
.conjugation-table td {
  border: 1px solid var(--border);
  padding: 0.6rem;
  text-align: left;
}

.conjugation-table th {
  background: #f3f4f6;
  font-weight: 600;
}

.conjugation-table td input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1rem;
}

.conjugation-table td input:focus {
  outline: none;
}

/* Reorder */
.reorder-sentence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  align-items: center;
}

.reorder-word {
  padding: 0.35rem 0.7rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.reorder-word:hover {
  background: #f3f4f6;
}

.reorder-word.selected {
  background: var(--info-light);
  border-color: var(--info);
}

.reorder-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* Match */
.match-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.match-item {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}

.match-item:hover {
  background: #f9fafb;
}

.match-item.selected {
  border-color: var(--info);
  background: var(--info-light);
}

.match-item.matched {
  border-color: var(--success);
  background: var(--success-light);
  cursor: default;
}

/* Translation / Dialogue / Error correction */
.prompt-box {
  background: #f9fafb;
  border-left: 4px solid var(--primary);
  padding: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.textarea-answer {
  min-height: 6rem;
  margin-bottom: 1.25rem;
}

.error-sentence {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
}

.error-sentence mark {
  background: #fef08a;
  padding: 0 0.15rem;
}

/* Feedback */
.feedback {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  display: none;
}

.feedback.visible {
  display: block;
}

.feedback.correct {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid var(--success);
}

.feedback.incorrect {
  background: var(--error-light);
  color: #991b1b;
  border: 1px solid var(--error);
}

.feedback-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Controls */
.exercise-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Special characters bar */
.special-chars-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 1rem;
}

.special-chars-bar .special-char-btn {
  min-width: 2.2rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.conjugation-table td .special-chars-bar {
  margin: 0.4rem 0 0;
}

/* Detailed feedback */
.feedback-explanation {
  margin: 0.75rem 0;
}

.feedback-mistakes {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
}

.feedback-mistakes li {
  margin-bottom: 0.25rem;
}

.feedback-resolve {
  background: rgba(255, 255, 255, 0.45);
  border-left: 3px solid currentColor;
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.feedback-compare {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed currentColor;
}

.feedback-label {
  font-weight: 600;
  opacity: 0.85;
}

.feedback-correct {
  font-weight: 600;
  color: var(--success);
}

.feedback-wrong {
  font-weight: 600;
  color: var(--error);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.feedback-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.feedback-compare-table th,
.feedback-compare-table td {
  border: 1px solid currentColor;
  padding: 0.45rem 0.6rem;
  text-align: left;
  font-size: 0.95rem;
}

.feedback-compare-table th {
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.feedback-points {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Results */
.results-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.results-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.5rem 0;
}

.results-stars {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.results-message {
  color: var(--muted);
  margin-bottom: 1.5rem;
}
