/* ============================================================
 * full-test.css — Full test screen layout, player bar, bottom nav
 * ============================================================ */

.test-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.test-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  min-height: 68px;
  padding: 8px 24px;
}

.timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border-radius: 20px;
  padding: 7px 10px;
}

.timer-text {
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.header-spacer {
  flex: 1;
}

.audio-control-bar {
  flex: 1;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border-radius: 24px;
  padding: 6px 16px 6px 6px;
  margin: 0 16px;
}

.audio-play-btn {
  flex: none;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.audio-play-btn * {
  pointer-events: none !important;
}

.audio-play-btn:hover {
  filter: brightness(1.1);
}

.audio-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  white-space: nowrap;
}

.audio-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--fill, 0%), #DCE4E6 var(--fill, 0%));
  outline: none;
  cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

.audio-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

.submit-btn {
  border-radius: 10px;
  white-space: nowrap;
}

.test-body-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.test-body-center {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 250px 40px;
  box-sizing: border-box;
}

.test-body-scroll {
  display: flex;
  flex-direction: column;
}

.part-gap {
  height: 24px;
}

.test-bottom-nav {
  flex: none;
  height: 72px;
  background: #fff;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

.bottom-nav-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  overflow-x: auto;
  scrollbar-width: thin;
  width: 100%;
}

.nav-gap {
  width: 8px;
  flex: none;
}

.part-chip {
  flex: none;
  background: #ffffff;
  color: #115264;
  border: 1px solid #d7e1e5;
  border-radius: 24px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.part-chip.active {
  background: var(--teal-light);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.part-chip.answered,
.part-chip.active.answered {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.part-chip:hover {
  background: var(--teal-light);
}

.part-progress {
  flex: none;
  font-size: 14px;
  color: #6b7c83;
  padding: 0 16px 0 8px;
}

.part-progress.answered,
.part-progress.revealed {
  color: #115264;
  font-weight: 700;
}

.question-circles {
  display: flex;
  align-items: center;
  flex: none;
}

.q-circle {
  flex: none;
  width: 32px;
  height: 32px;
  margin: 0 3px;
  background: #ffffff;
  color: var(--accent);
  border: 1px solid #cbd8dd;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.q-circle.answered {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.q-circle.correct,
.q-circle.selected.correct,
.q-circle.answered.correct,
.q-circle.selected.answered.correct {
  background: #15803d !important;
  color: #ffffff !important;
  border-color: #15803d !important;
}

.q-circle.wrong,
.q-circle.selected.wrong,
.q-circle.answered.wrong,
.q-circle.selected.answered.wrong {
  background: #b91c1c !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}

.q-circle.selected {
  background: #ffffff;
  color: var(--text-primary);
  border: 1.5px solid #d1d5db;
  box-shadow: none;
  font-weight: 600;
}

.q-circle.selected.answered {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--text-primary);
}

.q-circle:hover {
  background: #DCEBE9;
}

@media (max-width: 1000px) {
  .test-header {
    padding: 8px 16px;
  }

  .test-body-center {
    padding: 24px 32px 40px;
  }

  .bottom-nav-scroll {
    padding: 12px 16px;
  }
}

@media (max-width: 900px) {
  .test-header {
    flex-wrap: wrap;
  }

  .fs-btn {
    margin-left: auto;
  }

  .audio-control-bar {
    order: 10;
    flex-basis: 100%;
    max-width: none;
    margin: 6px 0 2px;
  }
}

@media (max-width: 560px) {
  .test-header {
    gap: 2px;
    padding: 6px 8px;
  }

  .timer-chip {
    padding: 5px 8px;
  }

  .submit-btn {
    padding: 10px 14px;
  }

  .test-body-center {
    padding: 16px 14px 32px;
  }

  .bottom-nav-scroll {
    padding: 10px 12px;
  }
}
/* Floating Action Button (FAB) for post-submission Result Modal re-review */
.test-results-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px 0 10px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent, #115264) 0%, #1b7a72 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.15px;
  box-shadow: 0 3px 10px rgba(17, 82, 100, 0.32), 0 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease, filter 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: fabPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.test-results-fab.above-nav {
  bottom: 78px;
  right: 18px;
}

.test-results-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(17, 82, 100, 0.4), 0 2px 6px rgba(0, 0, 0, 0.12);
  filter: brightness(1.05);
}

.test-results-fab:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(17, 82, 100, 0.25);
}

.test-results-fab .fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.test-results-fab .fab-icon svg {
  width: 17px;
  height: 17px;
}

.test-results-fab .fab-label {
  display: inline-flex;
  align-items: center;
  pointer-events: none;
  white-space: nowrap;
}

.test-results-fab .fab-band-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 8px;
  margin-left: 2px;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes fabPopIn {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 600px) {
  .test-results-fab {
    right: 12px;
    bottom: 14px;
    height: 32px;
    padding: 0 10px 0 8px;
    font-size: 11.5px;
    gap: 5px;
  }

  .test-results-fab.above-nav {
    bottom: 74px;
    right: 12px;
  }

  .test-results-fab .fab-label-long {
    display: none;
  }

  .test-results-fab .fab-band-badge {
    font-size: 10px;
    padding: 1px 4px;
  }

  .test-screen.revealed .test-body-center {
    padding-bottom: 70px;
  }
}

@media (max-width: 360px) {
  .test-results-fab {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
  }

  .test-results-fab .fab-label,
  .test-results-fab .fab-band-badge {
    display: none;
  }
}

/* Floating Action Button (FAB) for Full Test Weakness Analysis */
.test-weakness-fab {
  position: fixed;
  right: 18px;
  bottom: 60px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px 0 10px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #be123c 0%, #e11d48 50%, #ea580c 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.15px;
  box-shadow: 0 3px 10px rgba(190, 18, 60, 0.32), 0 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease, filter 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: fabPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.test-weakness-fab.above-nav {
  bottom: 120px;
  right: 18px;
}

.test-weakness-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(190, 18, 60, 0.42), 0 2px 6px rgba(0, 0, 0, 0.12);
  filter: brightness(1.06);
}

.test-weakness-fab:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(190, 18, 60, 0.25);
}

.test-weakness-fab .fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.test-weakness-fab .fab-icon svg {
  width: 17px;
  height: 17px;
}

.test-weakness-fab .fab-label {
  display: inline-flex;
  align-items: center;
  pointer-events: none;
  white-space: nowrap;
}

.test-weakness-fab .fab-weak-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 8px;
  margin-left: 2px;
  pointer-events: none;
  white-space: nowrap;
}

/* Weakness Analysis Modal */
.modal-card.weakness-modal {
  max-width: 580px;
  width: min(580px, 100%);
  height: min(720px, 90vh);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff !important;
  opacity: 1 !important;
  animation: none !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
}

.weakness-dialog {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.weakness-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.weakness-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weakness-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #be123c, #e11d48);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(190, 18, 60, 0.3);
  flex: none;
}

.weakness-title {
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
}

.weakness-subtitle {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
}

.weakness-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
}

.weakness-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
}

.summary-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
}

.summary-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-stat-divider {
  width: 1px;
  height: 32px;
  background: #e2e8f0;
}

.stat-number {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.summary-calc-note {
  font-size: 12px;
  color: #475569;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  line-height: 1.45;
}

.weak-section-group {
  display: flex;
  flex-direction: column;
}

.weak-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.weak-badge-pill {
  font-size: 10.5px;
  font-weight: 700;
  background: #fee2e2;
  color: #b91c1c;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: auto;
}

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

.weak-card {
  background: #ffffff;
  border: 1.5px solid #fecaca;
  border-radius: 12px;
  padding: 13px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.weak-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.weak-card-rank {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.weak-card-info {
  flex: 1;
  min-width: 0;
}

.weak-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.weak-card-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
}

.weak-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  flex: none;
}

.weak-status-badge.status-critical {
  background: #fee2e2;
  color: #dc2626;
}

.weak-status-badge.status-moderate {
  background: #fef3c7;
  color: #d97706;
}

.weak-status-badge.status-good {
  background: #dcfce7;
  color: #15803d;
}

.weak-progress-wrap {
  margin-bottom: 6px;
}

.weak-progress-bar {
  height: 7px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.weak-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.weak-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #475569;
}

.weak-progress-label .pct-val {
  font-weight: 700;
}

.weak-card-actions {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}

.weak-practice-btn,
.weak-section-practice-btn {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.weak-practice-btn:hover,
.weak-section-practice-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.weak-tips-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 13px 15px;
}

.weak-tips-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #92400e;
}

.weak-tips-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #78350f;
  line-height: 1.5;
}

.weak-tips-list li {
  margin-bottom: 6px;
}

.weakness-footer {
  flex: none;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #fafafa;
}

/* Navbar item pulsing highlight when targeted practice is triggered */
@keyframes navWeakPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: none;
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(225, 29, 72, 0.6);
    background: rgba(225, 29, 72, 0.12);
    color: #be123c;
  }
}

.nav-item.nav-weak-highlight {
  animation: navWeakPulse 0.8s ease 3;
}

.test-screen.revealed .test-body-center {
  padding-bottom: 150px;
}

@media (max-width: 600px) {
  .test-weakness-fab {
    right: 12px;
    bottom: 50px;
    height: 32px;
    padding: 0 10px 0 8px;
    font-size: 11.5px;
    gap: 5px;
  }

  .test-weakness-fab.above-nav {
    bottom: 112px;
    right: 12px;
  }

  .test-weakness-fab .fab-label-long {
    display: none;
  }

  .test-weakness-fab .fab-weak-badge {
    font-size: 10px;
    padding: 1px 4px;
  }

  .modal-card.weakness-modal {
    width: 100%;
    height: min(92vh, 680px);
    max-height: 92vh;
    border-radius: 16px;
  }

  .weakness-header {
    padding: 14px 16px;
  }

  .weakness-body {
    padding: 14px 16px;
  }

  .weakness-footer {
    padding: 12px 16px;
  }

  .test-screen.revealed .test-body-center {
    padding-bottom: 150px;
  }
}

@media (max-width: 360px) {
  .test-weakness-fab {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
  }

  .test-weakness-fab .fab-label,
  .test-weakness-fab .fab-weak-badge {
    display: none;
  }
}

.modal-overlay {
  opacity: 1 !important;
}
