/* ============================================================
   CSS riêng cho Hóa học 10 - Chương 5 (Năng lượng hóa học).
   Chỉ chứa các lớp KHÔNG có sẵn trong assets/css/tool-common.css
   (topbar/brand/tabs/panel/form-row/step-panel/detail-panel/
   essay-card... đã dùng chung với Chương 1-2, không lặp lại ở đây).
   ============================================================ */

/* --- Danh sách phản ứng (tab phân loại) --- */
.reaction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.reaction-card {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  background: var(--card);
  transition: transform 0.1s, border-color 0.12s;
  position: relative;
}
.reaction-card:hover { transform: translateY(-2px); border-color: var(--blue); }
.reaction-card.selected { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(52,84,209,0.15); }
.reaction-eq { font-family: "IBM Plex Mono", monospace; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.reaction-dh { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.reaction-type-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.3px;
}
.reaction-type-badge.toa_nhiet { background: #fdecea; color: #c0392b; }
.reaction-type-badge.thu_nhiet { background: #e8f0fe; color: #1a56c4; }

.detail-badge {
  width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 0.5px; flex-shrink: 0;
}
.detail-badge.toa_nhiet { background: #c0392b; }
.detail-badge.thu_nhiet { background: #1a56c4; }

/* --- Mô phỏng nhiệt kế (thí nghiệm trung hoà) --- */
.thermo-wrap {
  display: flex; align-items: flex-end; gap: 10px; height: 220px; margin: 22px 0;
}
.thermo-tube {
  position: relative;
  width: 34px; height: 200px;
  border: 2px solid var(--line);
  border-radius: 17px;
  background: #f4f5fb;
  overflow: visible;
}
.thermo-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #ff8a65, #e53935);
  border-radius: 0 0 15px 15px;
  transition: height 0.4s ease;
}
.thermo-bulb {
  width: 46px; height: 46px; border-radius: 50%;
  background: #e53935; margin-left: -6px; border: 2px solid var(--line);
}
.thermo-mark {
  position: absolute; left: 42px; white-space: nowrap; font-size: 12px;
  font-family: "IBM Plex Mono", monospace; color: var(--ink-soft);
  transform: translateY(50%);
}
.thermo-mark-max { color: #c0392b; font-weight: 700; }

/* --- Form inputs (thí nghiệm / định lượng) --- */
.form-row input[type="number"] {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  font-family: "IBM Plex Mono", monospace; font-size: 13.5px; width: 110px;
}

/* ============================================================
   TAB TRẮC NGHIỆM (200 câu) — port cấu trúc từ Chương 3
   (assets/css/bond-lab.css), lặp lại có chủ ý các class filter/chip/
   cta-btn nhỏ để Chương 5 độc lập hoàn toàn, sửa ở đây không ảnh hưởng
   Chương 3 và ngược lại.
   ĐÃ FIX SẴN lỗi hiển thị của Chương 3 gốc (chữ trùng màu nền, không
   đọc được đáp án): mọi trạng thái nút .quiz-option đều khai báo rõ
   `color` — không để trình duyệt tự suy ra màu chữ mặc định.
   ============================================================ */
.pt-filters { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-bottom: 14px; }
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; cursor: pointer; color: var(--ink-soft);
  min-height: 38px; transition: all 0.12s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: white; }

.lab-cta-btn {
  display: block; width: 100%; padding: 15px; font-size: 16px; font-weight: 700; color: white;
  background: var(--blue); border: none; border-radius: 12px; cursor: pointer; margin-top: 8px;
  min-height: 50px;
}
.lab-cta-btn:disabled { background: #b8bfe0; cursor: not-allowed; color: white; }
.lab-cta-btn:hover:not(:disabled) { background: var(--blue-dark); }

.practice-count { font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 16px; font-weight: 600; }
.practice-progress-track { height: 8px; background: #eef0fa; border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.practice-progress-fill { height: 100%; background: var(--blue); border-radius: 999px; transition: width 0.2s; }
.practice-progress-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; margin-bottom: 18px; }

.quiz-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; }
.quiz-topic { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px; }
.quiz-question { font-size: 16.5px; font-weight: 600; line-height: 1.5; margin-bottom: 18px; color: var(--ink); }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
/* Khai báo `color` TƯỜNG MINH ở mọi trạng thái — đây chính là chỗ bản gốc
   Chương 3 bị thiếu, khiến 1 số theme/trình duyệt hiển thị chữ trùng màu
   nền (trắng trên trắng) và không đọc được đáp án. */
.quiz-option {
  text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 400; line-height: 1.45;
  cursor: pointer; min-height: 48px; transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.quiz-option:hover:not(.disabled) { border-color: var(--blue); background: #f5f7ff; color: var(--ink); }
.quiz-option.disabled { cursor: default; }
.quiz-option.correct { border-color: #2f9e6f; background: #e9f8f1; color: #14532d; font-weight: 700; }
.quiz-option.wrong { border-color: #e05263; background: #fdedef; color: #7f1d2b; }
.quiz-explain { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #f5f6fb; }
.quiz-explain.hidden { display: none; }
.explain-verdict { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.explain-text { font-size: 14px; line-height: 1.6; color: var(--ink); }

.score-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 12px 0 24px; }
.score-ring {
  --pct: 0;
  position: relative;
  width: 130px; height: 130px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--blue) calc(var(--pct) * 1%), #eef0fa 0);
  font-size: 22px; font-weight: 700; font-family: "IBM Plex Mono", monospace; color: var(--ink);
}
.score-ring::before {
  content: ""; position: absolute; width: 104px; height: 104px; border-radius: 50%; background: white;
}
.score-ring span { position: relative; z-index: 1; }
.score-text { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.review-title { font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.review-item { border-left: 3px solid #e05263; background: #fdedef; border-radius: 0 10px 10px 0; padding: 12px 14px; margin-bottom: 10px; }
.review-q { font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.review-a { font-size: 13.5px; margin-bottom: 3px; }
.review-a.wrong-a { color: #c0392b; }
.review-a.correct-a { color: #1e7e4f; font-weight: 600; }
.review-explain { font-size: 13px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }

@media (max-width: 480px) {
  .quiz-question { font-size: 15.5px; }
  .score-ring { width: 110px; height: 110px; font-size: 19px; }
  .score-ring::before { width: 86px; height: 86px; }
}
