/* ====================================================================
   BIONUL EDTECH PLATFORM - TESTS & EXAMS MODULE STYLES
   css/tests.css (Dedicated to tests.html & test.html - Mobile-First Redesign)
   Matched to Reference UI (All 6 Screens)
   ==================================================================== */

/* ====================================================================
   SCREEN 1: TESTS DASHBOARD STYLES
   ==================================================================== */

/* --- Search Bar Wrapper & Input --- */
.search-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 18px;
}

.search-input-field {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-heading);
  font-size: 0.92rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.search-input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(91, 61, 245, 0.12);
  background-color: #FFFFFF;
}

.search-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-light);
  pointer-events: none;
  fill: currentColor;
}

/* --- Top Header & Action Icons --- */
.test-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 14px 2px;
}

.test-header-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.test-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-heading);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.header-action-icon-btn:hover,
.header-action-icon-btn.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.header-action-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex-shrink: 0;
}

/* --- Search Collapsible Panel --- */
.test-search-panel {
  display: none;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  animation: testSlideDown 0.2s ease-out forwards;
}

.test-search-panel.open {
  display: block;
}

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

.test-search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.test-search-input-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.92rem;
  color: var(--text-heading);
  font-family: inherit;
}

.test-search-input-box input:focus {
  outline: none;
}

/* --- Hero Intro --- */
.test-dash-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.25;
  margin-bottom: 4px;
}

.test-dash-hero-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 18px;
}

/* --- 4-Metric Statistics Grid --- */
.test-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.test-stat-box {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.test-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.test-stat-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.test-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
}

.test-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* --- Filter Tabs --- */
.test-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.test-filter-tabs::-webkit-scrollbar {
  display: none;
}

.test-filter-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  background-color: #FFFFFF;
  color: var(--text-body);
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.test-filter-tab:hover {
  color: var(--primary);
  border-color: var(--primary-border);
}

.test-filter-tab.active {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(91, 61, 245, 0.3);
}

/* --- Featured Upcoming Test Hero Card --- */
.featured-test-card {
  background: var(--hero-card-gradient);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  color: #FFFFFF;
  box-shadow: var(--shadow-hero);
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.featured-test-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.featured-test-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  margin-bottom: 4px;
}

.featured-test-class {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  margin-bottom: 12px;
}

.featured-test-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.featured-test-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.featured-test-meta-item svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  opacity: 0.9;
  flex-shrink: 0;
}

.featured-test-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background-color: #FFFFFF;
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-fast);
  width: fit-content;
}

.featured-test-btn:hover {
  transform: translateY(-1px);
}

.featured-test-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.featured-test-artwork {
  width: 95px;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

/* --- Today Section Test Cards --- */
.tests-section-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.test-card-mobile {
  background-color: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  transition: all var(--transition-fast);
}

.test-card-mobile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.test-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-indicator-badge.live {
  color: #DC2626;
}

.status-indicator-badge.upcoming {
  color: var(--primary);
  background-color: var(--pastel-purple);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.status-indicator-badge.completed {
  color: var(--text-muted);
  background-color: var(--surface-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.time-range-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pulse-dot-red {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #EF4444;
  border-radius: 50%;
  animation: liveDotBlink 1.4s infinite;
}

@keyframes liveDotBlink {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}

.test-card-body-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.test-thumb-box {
  width: 110px;
  min-width: 110px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background-color: #0F172A;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.test-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  padding: 6px;
  text-align: center;
}

.test-thumb-fallback svg {
  width: 22px;
  height: 22px;
  fill: #818CF8;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.test-thumb-fallback span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.test-info-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.test-title-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.test-sub-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 3px;
}

.test-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.test-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

/* Action Buttons */
.btn-join-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(91, 61, 245, 0.3);
  transition: all var(--transition-fast);
}

.btn-join-live:hover {
  background-color: var(--primary-dark);
}

.btn-join-live svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn-remind-me {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-md);
  background-color: #FFFFFF;
  color: var(--primary);
  border: 1.5px solid var(--primary-border);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-remind-me:hover,
.btn-remind-me.reminded {
  background-color: var(--primary-light);
  color: var(--primary);
}

.btn-remind-me svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ====================================================================
   SCREEN 2: TEST DETAILS STYLES
   ==================================================================== */

.test-detail-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 14px 2px;
}

.live-back-btn,
.live-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-heading);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
  flex-shrink: 0;
}

.live-back-btn:hover,
.live-menu-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.live-back-btn svg,
.live-menu-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.live-page-title-center {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-heading);
}

.test-top-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto 14px auto;
  box-shadow: 0 4px 14px rgba(91, 61, 245, 0.15);
}

.test-top-icon-wrap svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  flex-shrink: 0;
}

.test-detail-hero {
  text-align: center;
  margin-bottom: 20px;
}

.test-detail-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.test-detail-hero-class {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* 4-Stat Details Bar */
.test-detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 6px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  gap: 6px;
}

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

.detail-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
}

.detail-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Collapsible Instructions Card */
.test-instructions-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.instructions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.instructions-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-heading);
}

.instructions-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.instruction-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.45;
}

.bullet-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-top: 7px;
  flex-shrink: 0;
}

/* Test Information Rows Card */
.test-info-table-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.test-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.test-info-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.test-info-row-left svg {
  width: 16px;
  height: 16px;
  fill: var(--primary);
  flex-shrink: 0;
}

.test-info-row-right {
  font-weight: 700;
  color: var(--text-heading);
  text-align: right;
}

/* ====================================================================
   SCREEN 3: TEST TAKING INTERFACE STYLES
   ==================================================================== */

.test-taking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 14px 2px;
  gap: 10px;
}

.test-taking-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timer-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: var(--pastel-purple);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 800;
  border: 1px solid var(--primary-border);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.timer-pill-badge.warning {
  background-color: #FEE2E2;
  color: #DC2626;
  border-color: #FCA5A5;
}

.question-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.question-counter-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.question-bookmark-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.question-bookmark-btn.active {
  color: var(--primary);
}

.question-bookmark-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.question-progress-track {
  width: 100%;
  height: 6px;
  background-color: var(--surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 20px;
}

.question-progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Question Text Card */
.question-text-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.question-prompt {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.5;
}

/* Options Grid */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.option-choice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}

.option-choice-item:hover {
  border-color: var(--primary-border);
  background-color: var(--primary-light);
}

.option-choice-item.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.option-letter-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--surface-subtle);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.option-choice-item.selected .option-letter-circle {
  background-color: var(--primary);
  color: #FFFFFF;
}

.option-text-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.35;
}

/* Mark for Review Checkbox */
.mark-review-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  cursor: pointer;
  user-select: none;
}

.mark-review-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--pastel-yellow-icon);
  cursor: pointer;
}

.mark-review-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.question-nav-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.question-nav-actions .btn {
  flex: 1;
}

/* Collapsible Question Palette Navigator */
.question-navigator-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.navigator-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  cursor: pointer;
}

.navigator-header-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-heading);
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.palette-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background-color: var(--surface-subtle);
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-heading);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.palette-btn.current {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(91, 61, 245, 0.3);
}

.palette-btn.answered {
  background-color: #DCFCE7;
  color: #15803D;
  border-color: #86EFAC;
}

.palette-btn.marked {
  background-color: #FEF3C7;
  color: #B45309;
  border-color: #FCD34D;
}

.palette-btn.marked-answered {
  background-color: #D1FAE5;
  color: #047857;
  border-color: #F59E0B;
}

.palette-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.legend-square {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-square.ans { background-color: #22C55E; }
.legend-square.not-ans { background-color: #E2E8F0; }
.legend-square.marked { background-color: #F59E0B; }
.legend-square.curr { background-color: var(--primary); }

/* ====================================================================
   SCREEN 4: TEST RESULT STYLES
   ==================================================================== */

.result-card-celebration {
  background-color: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 28px 20px 22px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.trophy-badge-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

.trophy-badge-wrap svg {
  width: 44px;
  height: 44px;
  fill: currentColor;
  flex-shrink: 0;
}

.result-congrats-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.result-congrats-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.result-score-large {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.result-pct-large {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}

.result-stats-4grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: var(--surface-subtle);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  gap: 4px;
  text-align: center;
}

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

.res-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.res-stat-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.performance-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.performance-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.performance-layout {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
}

.donut-chart-container {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.donut-chart-container svg {
  transform: rotate(-90deg);
}

.donut-center-pct {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-heading);
}

.chart-legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.chart-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.chart-legend-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-heading);
  font-weight: 700;
}

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-legend-val {
  color: var(--text-muted);
  font-weight: 600;
}

.result-actions-row {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.result-actions-row .btn {
  flex: 1;
}

/* ====================================================================
   SCREEN 5: REVIEW ANSWERS STYLES
   ==================================================================== */

.review-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.review-filter-pills::-webkit-scrollbar {
  display: none;
}

.review-pill-btn {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid var(--border-color);
  background-color: #FFFFFF;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.review-pill-btn.active {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.review-question-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.review-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.review-q-number {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-heading);
}

.review-status-tag {
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.review-status-tag.correct { background-color: #DCFCE7; color: #15803D; }
.review-status-tag.incorrect { background-color: #FEE2E2; color: #DC2626; }
.review-status-tag.unanswered { background-color: #F1F5F9; color: #64748B; }

.review-choice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.review-choice-item.correct-ans {
  background-color: #DCFCE7;
  border-color: #86EFAC;
  color: #14532D;
}

.review-choice-item.wrong-ans {
  background-color: #FEE2E2;
  border-color: #FCA5A5;
  color: #991B1B;
}

.solution-box {
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #166534;
}

.solution-box-title {
  font-weight: 800;
  margin-bottom: 4px;
}

/* ====================================================================
   SCREEN 6: MY TEST HISTORY STYLES
   ==================================================================== */

.history-card-item {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition-fast);
}

.history-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.history-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.history-card-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #1E1B4B;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-card-score {
  text-align: right;
  flex-shrink: 0;
}

.history-pct-badge {
  font-size: 1.1rem;
  font-weight: 800;
  color: #10B981;
}

.history-marks-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

@media (max-width: 360px) {
  .test-stats-grid,
  .test-detail-stats-grid,
  .result-stats-4grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .featured-test-card {
    grid-template-columns: 1fr;
  }
  .featured-test-artwork {
    display: none;
  }
}
