body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  display: flex;
  justify-content: center;
  padding: 24px 12px;
  margin: 0;
}

.card {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 580px;
}

h2 {
  margin-top: 0;
  color: #1e293b;
  font-size: 22px;
}

/* Thanh điều khiển gói câu hỏi */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.filter-bar select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: white;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
}

.btn-restart {
  background: #e2e8f0;
  color: #334155;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-restart:hover {
  background: #cbd5e1;
}

.status-box {
  font-size: 13px;
  margin-bottom: 15px;
  color: #64748b;
}

.action-row {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.btn {
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-audio {
  background: #2563eb;
  color: white;
}

.btn-audio:hover {
  background: #1d4ed8;
}

.btn-mic {
  background: #059669;
  color: white;
}

.btn-mic.listening {
  background: #dc2626;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.transcript-box {
  font-size: 14px;
  color: #475569;
  margin-bottom: 12px;
  min-height: 20px;
  font-style: italic;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt-btn {
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.opt-btn:hover {
  background: #f8fafc;
}

.opt-btn.correct {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
  font-weight: bold;
}

.opt-btn.wrong {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.note-box {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  font-size: 14px;
  color: #1e3a8a;
  display: none;
}

.footer-bar {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.next-btn {
  background: #0f172a;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.next-btn:hover {
  background: #334155;
}

/* Badge mã câu hỏi */
.id-badge {
  display: inline-block;
  font-family: monospace;
  font-weight: 700;
  font-size: 11px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.level-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 11px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.btn-report {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-report:hover {
  background: #fef3c7;
}

/* Modal báo lỗi câu hỏi */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}

.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
}

.modal-body {
  padding: 16px 18px;
}

.modal-footer {
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Score & Streak Badges */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.score-badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.streak-badge.active {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.streak-badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.streak-badge-mini.active {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

/* Combo Visual Alert Banner */
.combo-banner {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
