* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.sidebar-link { transition: all 0.15s ease; }
.sidebar-link:hover { background: #eff6ff; color: #1d4ed8; }
.sidebar-link.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.card-hover { transition: all 0.2s ease; }
.card-hover:hover { box-shadow: 0 4px 16px rgba(59,130,246,0.12); border-color: #93c5fd; transform: translateY(-2px); }
.fade-in { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop { background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 2px #bfdbfe; border-color: #3b82f6; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@keyframes pulse-dot { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.loading-step.active .dot { animation: pulse-dot 1s ease-in-out infinite; }
.loading-step.done .dot { background: #22c55e; }
.loading-step.done .step-text { color: #16a34a; }

.badge-ai { background: linear-gradient(135deg, #6366f1, #8b5cf6); }

.content-area h3 { font-size: 1.125rem; font-weight: 600; color: #1e293b; margin: 1.25rem 0 0.5rem; }
.content-area p { margin: 0.5rem 0; line-height: 1.7; color: #334155; }
.content-area ul { margin: 0.5rem 0; padding-left: 1.5rem; }
.content-area li { margin: 0.25rem 0; color: #334155; line-height: 1.6; }
.content-area strong { color: #1e293b; }
.content-area em { color: #6366f1; font-style: normal; font-weight: 500; }

.quiz-block { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.25rem; margin: 1rem 0; }

/* Format modal: same row height, no vertical jump on select */
.format-card-row { min-height: 5.5rem; display: flex; align-items: center; }
.format-card-row > div { flex: 1; min-width: 0; }

.format-card { transition: all 0.2s ease; cursor: pointer; }
.format-card:hover { border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59,130,246,0.15); }
.format-card.selected { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 2px #bfdbfe; }

/* Quiz lesson (JSON → DOM) */
.quiz-lesson-host .quiz-intro { margin-bottom: 1.5rem; }
.quiz-lesson-host .quiz-intro h3 { font-size: 1.125rem; font-weight: 600; color: #1e293b; margin: 1rem 0 0.5rem; }
.quiz-lesson-host .quiz-intro h3:first-child { margin-top: 0; }
.quiz-lesson-host .quiz-intro p { margin: 0.5rem 0; line-height: 1.7; color: #334155; }

.quiz-question-title { font-weight: 600; color: #1e293b; margin: 0 0 1rem; font-size: 0.95rem; line-height: 1.5; }
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-option {
  display: flex; align-items: flex-start; gap: 0.75rem; width: 100%; text-align: left;
  padding: 0.75rem 1rem; border: 1px solid #e2e8f0; border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 0.875rem; color: #334155;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.quiz-option:hover:not(:disabled) { border-color: #93c5fd; background: #f8fafc; }
.quiz-option:disabled { cursor: default; }
.quiz-option-key {
  flex-shrink: 0; width: 1.75rem; height: 1.75rem; border-radius: 8px;
  background: #f1f5f9; font-weight: 600; font-size: 0.75rem; color: #475569;
  display: flex; align-items: center; justify-content: center;
}
.quiz-option.is-correct { border-color: #22c55e; background: #f0fdf4; }
.quiz-option.is-correct .quiz-option-key { background: #dcfce7; color: #15803d; }
.quiz-option.is-wrong { border-color: #f87171; background: #fef2f2; }
.quiz-option.is-wrong .quiz-option-key { background: #fee2e2; color: #b91c1c; }
.quiz-option.is-muted { opacity: 0.55; }

.quiz-explanation {
  margin-top: 1rem; padding: 0.875rem 1rem; border-radius: 10px;
  background: #eff6ff; border: 1px solid #bfdbfe; font-size: 0.875rem; line-height: 1.6; color: #1e3a8a;
}
.quiz-explanation.hidden { display: none; }

.quiz-parse-error { padding: 1rem; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; color: #991b1b; font-size: 0.875rem; }

.plan-step { transition: all 0.2s ease; }
.plan-step:hover { background: #f8fafc; }
.plan-step.completed { background: #f0fdf4; border-color: #bbf7d0; }
.plan-step.current { background: #eff6ff; border-color: #93c5fd; }
