/* ============================================
   LESSON MULTI-STEP FLOW STYLES
   ============================================ */

/* ── Hide stepper when there is only one step ── */
.lesson-stepper:has(.step-node:only-child) { display: none; }

/* ── Lesson Step Navigator (top) ── */
.lesson-stepper {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0 0;
  margin-bottom: 36px;
  overflow-x: visible;
  padding-bottom: 4px;
  row-gap: 18px;
}

.step-node {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}
.step-circle:hover { border-color: var(--gold); color: var(--gold); }
.step-node.active .step-circle {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
  box-shadow: 0 0 0 4px rgba(201,168,76,0.2);
}
.step-node.done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.step-node.done .step-circle::after {
  content: '✓';
  position: absolute;
  font-size: 0.85rem;
}

.step-connector {
  height: 2px;
  width: 48px;
  background: var(--border);
  flex-shrink: 0;
  transition: background var(--transition);
}
.step-node.done + .step-node .step-connector,
.step-connector.done { background: var(--success); }

.step-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.3;
}
.step-label-main {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.step-label-sub {
  font-size: 0.82rem;
  opacity: 0.85;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
}
.step-node.active .step-label { color: var(--gold); font-weight: 600; }
.step-node.done .step-label { color: var(--success); }

.step-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Lesson Card ── */
.lesson-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.lesson-card-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.lesson-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.lesson-card-body { padding: 28px; }

/* ── Navigation Footer ── */
.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  gap: 12px;
}

.lesson-nav-center {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Answer Options ── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
@media (max-width: 600px) { .options-grid { grid-template-columns: 1fr; } }

.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-card-2);
  font-size: 0.9rem;
}
.option-item:hover { border-color: var(--gold); background: rgba(201,168,76,0.05); }
.option-item.selected { border-color: var(--gold); background: rgba(201,168,76,0.1); color: var(--gold); }
.option-item.correct { border-color: var(--success); background: rgba(0,212,170,0.1); color: var(--success); }
.option-item.wrong { border-color: var(--error); background: rgba(255,107,107,0.1); color: var(--error); }

.option-letter {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.option-item.selected .option-letter { background: var(--gold); color: #000; }
.option-item.correct .option-letter { background: var(--success); color: #fff; }
.option-item.wrong .option-letter { background: var(--error); color: #fff; }

/* ── Fill-in-the-Blank ── */
.blank-input {
  display: inline-block;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--gold);
  padding: 2px 8px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  min-width: 120px;
  text-align: center;
  transition: border-color var(--transition);
}
.blank-input:focus { border-bottom-color: var(--gold-light); }
.blank-input.correct { border-bottom-color: var(--success); color: var(--success); }
.blank-input.wrong { border-bottom-color: var(--error); color: var(--error); }

/* ── Audio Player ── */
.audio-player {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
}

.audio-player-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.audio-play-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  color: #000;
  transition: all var(--transition);
  flex-shrink: 0;
}
.audio-play-btn:hover { background: var(--accent-hover); transform: scale(1.05); box-shadow: 0 4px 16px rgba(201,168,76,0.4); }

.audio-info { flex: 1; }
.audio-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.audio-meta { font-size: 0.8rem; color: var(--text-muted); }

.audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-timeline {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  cursor: pointer;
  position: relative;
}
.audio-timeline-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 99px;
  transition: width 0.1s linear;
}
.audio-timeline-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  position: absolute;
  top: 50%; transform: translateY(-50%);
  cursor: grab;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.3);
  transition: left 0.1s linear;
}

.audio-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.audio-speed {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.audio-speed:hover { border-color: var(--accent); color: var(--accent); }

/* ── Feedback Box ── */
.feedback-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: fadeInUp 0.3s ease;
}
.feedback-box.correct { background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.3); }
.feedback-box.wrong { background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.3); }
.feedback-icon { font-size: 1.2rem; flex-shrink: 0; }
.feedback-text { font-size: 0.9rem; line-height: 1.5; }
.feedback-text strong { display: block; margin-bottom: 4px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Lesson Score Banner ── */
.score-banner {
  text-align: center;
  padding: 48px 28px;
  animation: fadeInUp 0.4s ease;
}
.score-circle {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) 0%, var(--gold-light) var(--pct, 75%), var(--border) var(--pct, 75%) 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  position: relative;
}
.score-inner {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
}
