/* ================================================================
   PMP 十五至尊图 — 真题练习模块样式
   ================================================================ */

.exam-container {
  max-width: 900px;
  margin: 0 auto;
}

/* ---- Exam Topbar ---- */
.exam-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.exam-topbar h2 { font-size: 1.2rem; }
.exam-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.exam-tab {
  padding: 5px 14px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  cursor: pointer;
  font-size: .8rem;
  transition: var(--transition);
}
.exam-tab:hover { border-color: var(--color-primary); }
.exam-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ---- Progress bar ---- */
.exam-progress {
  margin-bottom: 20px;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width .3s ease;
}

/* ---- Question card ---- */
.question-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px;
  margin-bottom: 20px;
}
.question-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: .75rem;
  flex-wrap: wrap;
}
.q-type-badge {
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: .72rem;
}
.q-type-single { background: #e0f2fe; color: #0369a1; }
.q-type-multi  { background: #fef3c7; color: #92400e; }
.q-difficulty {
  display: flex;
  gap: 2px;
}
.q-difficulty .star { color: #d1d5db; }
.q-difficulty .star.filled { color: #f59e0b; }
.q-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.q-tag {
  padding: 1px 8px;
  background: var(--color-bg);
  border-radius: 12px;
  font-size: .7rem;
  color: var(--color-text-muted);
}

.question-stem {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--color-text);
}

/* ---- Options ---- */
.options-list { list-style: none; }
.option-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: .9rem;
  line-height: 1.5;
}
.option-item:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}
.option-item.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  font-weight: 500;
}
.option-item.correct {
  border-color: var(--color-success);
  background: #f0fdf4;
}
.option-item.wrong {
  border-color: var(--color-danger);
  background: #fef2f2;
}
.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.option-item.selected .option-letter {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.option-item.correct .option-letter {
  border-color: var(--color-success);
  background: var(--color-success);
  color: #fff;
}
.option-item.wrong .option-letter {
  border-color: var(--color-danger);
  background: var(--color-danger);
  color: #fff;
}

/* ---- Analysis / Answer panel ---- */
.answer-panel {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.answer-panel.correct-panel {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.answer-panel.wrong-panel {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.answer-panel-title {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 8px;
}
.correct-panel .answer-panel-title { color: var(--color-success); }
.wrong-panel .answer-panel-title { color: var(--color-danger); }
.answer-explanation {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}
.answer-related {
  display: inline-block;
  margin-top: 10px;
  color: var(--color-primary);
  font-size: .8rem;
  cursor: pointer;
}
.answer-related:hover { text-decoration: underline; }

/* ---- Exam actions ---- */
.exam-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* ---- Stats panel ---- */
.stats-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  text-align: center;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius);
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
}
.stat-label {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ---- Wrong list ---- */
.wrong-list {
  list-style: none;
}
.wrong-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 4px;
  background: var(--color-bg);
  border-radius: 6px;
  font-size: .85rem;
  gap: 10px;
}
.wrong-item-text { flex: 1; }
.wrong-item-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .7rem;
  background: #fef2f2;
  color: var(--color-danger);
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--color-text); }
