/* Giao diện phân hệ Ôn thi (Giữa kì, Cuối kì, Vượt cấp) */
.exam-page{padding-bottom:34px}
.exam-mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px}
.exam-mode-card{display:flex;flex-direction:column;background:#fff;border:2px solid #e6daf5;border-bottom:6px solid #d5c5eb;border-radius:20px;padding:20px;transition:transform .18s,box-shadow .18s}
.exam-mode-card:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(45,28,98,.08)}
.exam-mode-card.midterm{background:linear-gradient(160deg,#fff,#f5f2ff)}
.exam-mode-card.final{background:linear-gradient(160deg,#fff,#fff9ed);border-color:#f0dfbc;border-bottom-color:#e2c68b}
.exam-mode-card.levelup{background:linear-gradient(160deg,#fff,#eef9f4);border-color:#cdebd9;border-bottom-color:#a5d8bc}
.exam-mode-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.exam-mode-icon{font-size:32px;line-height:1}
.exam-mode-badge{font-size:10px;font-weight:1000;letter-spacing:1.3px;padding:5px 10px;border-radius:99px;background:#efe6fc;color:#5e3b9d}
.exam-mode-card.final .exam-mode-badge{background:#fff0cc;color:#9c6514}
.exam-mode-card.levelup .exam-mode-badge{background:#daf5e6;color:#1b7a4b}
.exam-mode-card h2{font-family:'Baloo 2';font-size:23px;line-height:1.2;color:#2c1d59;margin:12px 0 6px}
.exam-mode-desc{margin:0;color:#6f648d;font-size:13px;line-height:1.45}
.exam-mode-meta{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 10px}
.exam-mode-meta span{font-size:12px;font-weight:900;color:#4f3c86;background:#f4eeff;padding:5px 10px;border-radius:10px}
.exam-mode-scope{margin:0 0 16px;font-size:12px;color:#7c7097;line-height:1.45}
.exam-mode-foot{margin-top:auto;padding-top:12px;border-top:1px dashed #e7dcf6;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.exam-best{font-size:12px;color:#7e719c;font-weight:800}
.exam-best b{color:#5e3b9d}

.exam-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:26px 0 12px}
.exam-section-head h2{font-family:'Baloo 2';font-size:22px;color:#2b1d57;margin:0}
.exam-section-head span{font-size:12px;color:#8579a3;font-weight:800}
.exam-history-list{display:grid;gap:10px}
.exam-history-row{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#fff;border:2px solid #e8ddf6;border-radius:15px;padding:13px 16px}
.exam-history-row strong{display:block;font-size:14px;color:#332361}
.exam-history-row small{display:block;font-size:12px;color:#83779f;margin-top:2px}
.exam-history-score{flex:none;font-family:'Baloo 2';font-size:20px;font-weight:800;color:#5e3b9d;background:#f3ecff;padding:6px 12px;border-radius:12px}

.exam-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#fff;border:2px solid #e6daf5;border-bottom:5px solid #d5c5eb;border-radius:20px;padding:16px 20px;margin-bottom:18px}
.exam-topbar h1{font-family:'Baloo 2';font-size:26px;line-height:1.15;color:#2a1b57;margin:4px 0 0}
.exam-topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.exam-clock{font-family:'Baloo 2';font-size:19px;font-weight:800;color:#4f348d;background:#f3ebff;border:2px solid #dfd0f5;border-radius:12px;padding:6px 13px;min-width:104px;text-align:center}
.exam-clock.warning{color:#b91c1c;background:#fee2e2;border-color:#fca5a5;animation:examPulse 1s ease-in-out infinite}
@keyframes examPulse{50%{transform:scale(1.04)}}
@media(prefers-reduced-motion:reduce){.exam-clock.warning{animation:none}}
.exam-progress-pill{font-size:12px;font-weight:900;color:#624d96;background:#f7f4ff;border-radius:10px;padding:8px 12px}

.exam-workspace{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(230px,.75fr);gap:16px;align-items:start}
.exam-question-card,.exam-navigator{background:#fff;border:2px solid #e6daf5;border-bottom:5px solid #d5c5eb;border-radius:20px;padding:22px}
.exam-question-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;font-weight:1000;letter-spacing:1.1px;color:#7350ba}
.exam-topic-tag{background:#f2ebff;color:#5b3d9d;padding:5px 10px;border-radius:99px;letter-spacing:0}
.exam-question-card h2{font-family:'Baloo 2';font-size:25px;line-height:1.3;color:#2f1f5c;margin:14px 0 18px}
.exam-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.exam-option{display:flex;align-items:center;gap:12px;border:2px solid #e5d8f3;border-bottom:4px solid #ccb6e8;border-radius:14px;background:#fbf8ff;min-height:58px;padding:10px 14px;text-align:left;font-size:15px;font-weight:800;color:#403066;transition:transform .14s,border-color .14s,background .14s}
.exam-option:hover{transform:translateY(-2px);background:#f1e8ff;border-color:#a884da}
.exam-option.selected{background:#5e3b9d;color:#fff;border-color:#4c2d86;border-bottom-color:#341c64}
.exam-letter{width:28px;height:28px;flex:none;border-radius:8px;display:grid;place-items:center;font-size:12px;font-weight:1000;background:#eadbfc;color:#6845ac}
.exam-option.selected .exam-letter{background:#ffcb68;color:#311c5e}
.exam-nav-buttons{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:20px}
.exam-nav-buttons button:disabled{opacity:.45;cursor:not-allowed}
.exam-shortcut-hint{display:block;margin-top:12px;font-size:11px;color:#9488ad;font-weight:700}

.exam-nav-title{font-size:11px;font-weight:1000;letter-spacing:1.3px;color:#7053b2;margin-bottom:12px}
.exam-number-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.exam-num-btn{min-height:44px;border:2px solid #e4d8f4;border-bottom:4px solid #cdbbe8;border-radius:11px;background:#faf7ff;color:#5a468c;font-weight:900;font-size:13px}
.exam-num-btn.done{background:#e7f9ee;border-color:#a3dfb9;border-bottom-color:#74c795;color:#1d7c47}
.exam-num-btn.current{background:#5e3b9d;border-color:#4b2d84;border-bottom-color:#321b60;color:#fff}
.exam-legend{display:flex;flex-wrap:wrap;gap:10px 14px;margin-top:14px;font-size:11px;color:#7b6f99;font-weight:800}
.exam-legend span{display:flex;align-items:center;gap:6px}
.exam-legend .dot{width:11px;height:11px;border-radius:4px;background:#faf7ff;border:2px solid #cdbbe8;display:inline-block}
.exam-legend .dot.done{background:#e7f9ee;border-color:#74c795}
.exam-legend .dot.current{background:#5e3b9d;border-color:#321b60}

.exam-result-hero{display:flex;align-items:center;gap:22px;flex-wrap:wrap;background:#fff;border:2px solid #e5d8f4;border-bottom:6px solid #d2c1eb;border-radius:22px;padding:24px}
.exam-result-scorebox{min-width:146px;padding:18px 20px;border-radius:18px;background:linear-gradient(155deg,#4f318c,#734bc0);color:#fff;text-align:center}
.exam-result-emoji{display:block;font-size:34px;line-height:1}
.exam-result-scorebox strong{display:block;font-family:'Baloo 2';font-size:44px;line-height:1.05;margin:6px 0 2px;color:#ffda7b}
.exam-result-scorebox small{font-size:10px;font-weight:900;letter-spacing:1.2px;opacity:.88}
.exam-result-copy{flex:1;min-width:220px}
.exam-result-copy h1{font-family:'Baloo 2';font-size:28px;color:#2b1c57;margin:4px 0 6px}
.exam-result-copy p{margin:0 0 10px;color:#6e638c;font-size:14px}
.exam-rewards{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.exam-rewards span{font-size:13px;font-weight:900;background:#fff4d4;color:#8c5b10;padding:5px 11px;border-radius:99px}
.exam-result-actions{display:flex;gap:10px;flex-wrap:wrap}

.exam-breakdown-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.exam-topic-stat{background:#fff;border:2px solid #e6dbf5;border-radius:16px;padding:14px 16px}
.exam-topic-stat.weak{border-color:#f3c8cf;background:#fffafb}
.exam-topic-stat-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline;font-size:13px;color:#342362}
.exam-topic-stat-top small{color:#867aa2;font-weight:700}
.exam-topic-stat-top span{font-weight:1000;color:#5e3b9d;white-space:nowrap}
.exam-topic-bar{height:9px;background:#efe8fb;border-radius:99px;overflow:hidden;margin:10px 0}
.exam-topic-bar span{display:block;height:100%;background:linear-gradient(90deg,#7c54d1,#3ec17c);border-radius:99px}
.exam-topic-stat.weak .exam-topic-bar span{background:linear-gradient(90deg,#f59e0b,#ef4444)}
.exam-practice-link{border:0;background:#efe7fd;color:#5a379c;padding:7px 12px;border-radius:10px;font-size:12px;font-weight:900;min-height:36px}
.exam-practice-link:hover{background:#e1d1fb}
.exam-topic-ok{color:#1f8650;font-size:12px;font-weight:800}

.exam-filter-tabs{display:flex;gap:8px;flex-wrap:wrap}
.exam-filter-tabs button{border:2px solid #e4d8f4;background:#fff;color:#624c94;border-radius:12px;padding:7px 13px;font-size:12px;font-weight:900;min-height:40px}
.exam-filter-tabs button.active{background:#5e3b9d;border-color:#5e3b9d;color:#fff}
.exam-review-list{display:grid;gap:12px}
.exam-review-item{background:#fff;border:2px solid #e6dbf5;border-left:6px solid #3ec17c;border-radius:16px;padding:15px 18px}
.exam-review-item.wrong{border-left-color:#e55373;background:#fffafc}
.exam-review-head{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#66578c;margin-bottom:6px}
.exam-review-item.ok .exam-review-head span{color:#1d874e;font-weight:1000}
.exam-review-item.wrong .exam-review-head span{color:#c93355;font-weight:1000}
.exam-review-question{font-size:15px;font-weight:800;color:#2b1c57;margin:0 0 8px}
.exam-review-answers{display:flex;gap:16px;flex-wrap:wrap;font-size:13px;color:#695e87;margin-bottom:6px}
.exam-review-answers b.right{color:#1c854d}
.exam-review-explain{margin:0;font-size:13px;color:#5f527d;line-height:1.45}
.exam-empty-review{background:#effcf4;border:2px solid #b6e7c9;color:#1d7b48;padding:18px;border-radius:16px;font-weight:900;text-align:center}

@media(max-width:980px){
  .exam-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:800px){
  .exam-workspace{grid-template-columns:1fr}
  .exam-breakdown-grid{grid-template-columns:1fr}
}
@media(max-width:600px){
  .exam-mode-grid{grid-template-columns:1fr}
  .exam-options{grid-template-columns:1fr}
  .exam-topbar{padding:14px}
  .exam-topbar h1{font-size:21px}
  .exam-question-card,.exam-navigator{padding:16px}
  .exam-question-card h2{font-size:21px}
  .exam-result-hero{padding:16px}
  .exam-result-scorebox{width:100%}
}
