/* Modern dashboard theme with enhanced variables */
:root {
  --primary-color: #e74c3c;
  --primary-dark: #c0392b;
  --secondary-color: #3498db;
  --secondary-dark: #2980b9;
  --accent-color: #f39c12;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
  --warning-color: #f1c40f;
  --info-color: #3498db;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --white: #ffffff;
  --black: #000000;
  
  --bg-color: #f5f7fa;
  --card-bg: var(--white);
  --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.12);
  --border-radius-sm: 0.375rem;
  --border-radius: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-pill: 50rem;
  
  --transition-fast: 0.2s ease-in-out;
  --transition-base: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  
  --font-sans: 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-serif: 'Ma Shan Zheng', 'SimSun', serif;
  --font-mono: 'Courier New', monospace;
  
  --header-height: 70px;
  --footer-height: 80px;
}

/* Mobile scroll fix */
html, body {
  overflow-x: hidden;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Base layout styling */
body {
  background-color: var(--bg-color);
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--gray-800);
}

main.container {
    width: 100%;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    margin: 4rem 0 0 0;
    max-width: 100%;
}
/* Dashboard-style cards and sections */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  padding: 1.5rem;
}

/* ExamID input section styling */
#examID-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-base);
  animation: fadeInUp 0.8s ease-out;
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
}




/* =====================================================
   EXAM DASHBOARD - New Enhanced Layout
   ===================================================== */

/* Wrapper container */
#examID-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--border-radius-lg);
  min-height: calc(100vh - var(--header-height) - var(--footer-height) - 4rem);
  animation: fadeInUp 0.6s ease-out;
}

/* Search Bar */
.exam-search-bar {
  background: #ffffff;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8ecf0;
  transition: all var(--transition-base);
}

.exam-search-bar:focus-within {
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.12);
  border-color: #81c784;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-input-group > i {
  color: #a0aec0;
  font-size: 1rem;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--gray-700);
  background: transparent;
  padding: 0.35rem 0;
}

.search-input::placeholder {
  color: #a0aec0;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.search-btn:hover {
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.search-btn:active {
  transform: translateY(0);
}

/* Mobile Tabs - Hidden on desktop */
.mobile-tabs {
  display: none;
  background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
  border-radius: var(--border-radius-lg);
  padding: 0.4rem;
  gap: 0.4rem;
  box-shadow: 0 2px 10px rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.15);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  transition: all var(--transition-base);
}

.tab-btn:hover {
  background: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
}

.tab-btn.active {
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.tab-btn i {
  font-size: 0.95rem;
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 10px rgba(46, 125, 50, 0.06);
  border: 1px solid rgba(76, 175, 80, 0.12);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.12);
  border-color: rgba(76, 175, 80, 0.25);
}

.stat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-icon.total {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1976d2;
}

.stat-icon.passed {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
}

.stat-icon.failed {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
}

.stat-icon.violations {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #ef6c00;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #2d3748;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: #718096;
  font-weight: 500;
}

/* Content Grid - Desktop */
.exam-content-grid {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

/* Panels */
.exam-history-panel,
.exam-sidebar {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #e8ecf0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.exam-history-panel {
  flex: 1.2;
  min-width: 0;
}

.exam-sidebar {
  flex: 0.8;
  min-width: 280px;
  max-width: 400px;
  gap: 1rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #fafbfc 0%, #f5f7fa 100%);
  border-bottom: 1px solid #e8ecf0;
}

.panel-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
}

.panel-header h3 i {
  color: var(--gray-500);
}

.refresh-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #e8ecf0;
  border-radius: var(--border-radius);
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.refresh-btn:hover {
  background: #f5f7fa;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.refresh-btn.loading i {
  animation: spin 1s linear infinite;
}

.autosave-hint {
  font-size: 0.75rem;
  color: var(--gray-400);
  padding: 0.25rem 0.5rem;
  background: #f0f2f5;
  border-radius: 4px;
}

.panel-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  max-height: none;
}

/* Exam List Items */
.exam-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.exam-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fafbfc;
  border-radius: var(--border-radius);
  border: 1px solid #e8ecf0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.exam-item:hover {
  background: #f0f4ff;
  border-color: #c3dafe;
  transform: translateX(4px);
}

.exam-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1rem;
  flex-shrink: 0;
}

.exam-item-icon.passed {
  background: #e6ffed;
  color: #38a169;
}

.exam-item-icon.failed {
  background: #fff5f5;
  color: #e53e3e;
}

.exam-item-info {
  flex: 1;
  min-width: 0;
}

.exam-item-title {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exam-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.exam-item-score {
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.exam-item-score.passed {
  background: #e6ffed;
  color: #38a169;
}

.exam-item-score.failed {
  background: #fff5f5;
  color: #e53e3e;
}

/* Autosave List */
.autosave-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.autosave-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #fffaf0 0%, #fff8e7 100%);
  border-radius: var(--border-radius);
  border: 1px solid #fbd38d;
}

.autosave-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.autosave-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.autosave-item-title {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.9rem;
}

.autosave-item-time {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.autosave-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: #fbd38d;
  color: #744210;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.autosave-item-actions {
  display: flex;
  gap: 0.5rem;
}

.autosave-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.autosave-btn.continue {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
}

.autosave-btn.continue:hover {
  background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
}

.autosave-btn.submit {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.autosave-btn.submit:hover {
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.autosave-btn.submit:disabled {
  background: var(--gray-300);
  color: var(--gray-500);
  cursor: not-allowed;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  color: var(--gray-400);
}

.empty-state i {
  font-size: 2rem;
  opacity: 0.5;
}

.empty-state span {
  font-size: 0.875rem;
}

/* Loading Placeholder */
.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--gray-500);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e8ecf0;
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Image Display - Sidebar */
.exam-sidebar .image-display {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: linear-gradient(180deg, #f0f2f5 0%, #e8ecf0 100%);
}

.exam-sidebar .character-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.1);
  width: auto;
  height: 180px;
  border-radius: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 1.2s ease-in-out;
}

.exam-sidebar .character-img.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* =====================================================
   RESPONSIVE - Mobile Layout
   ===================================================== */

@media (max-width: 768px) {
  #examID-wrapper {
    padding: 0.75rem;
    gap: 0.75rem;
    border-radius: 0;
    min-height: calc(100vh - var(--header-height) - var(--footer-height) - 2rem);
  }

  .exam-search-bar {
    padding: 0.75rem 1rem;
    border-radius: 10px;
  }

  .search-input-group {
    gap: 0.5rem;
  }

  .search-input-group > i {
    font-size: 1.1rem;
  }

  .search-input {
    font-size: 0.9rem;
    padding: 0.4rem 0;
  }

  .search-btn {
    padding: 0.65rem 1rem;
  }

  .mobile-tabs {
    display: flex;
    padding: 0.35rem;
    gap: 0.35rem;
    border-radius: 10px;
  }

  .tab-btn {
    padding: 0.55rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.3rem;
  }

  .tab-btn i {
    font-size: 0.9rem;
  }

  .stats-row {
    display: none;
    gap: 0.6rem;
  }

  .stats-row[data-section="overview"].active {
    display: flex;
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1 1 calc(50% - 0.3rem);
    min-width: unset;
    padding: 0.75rem;
    gap: 0.6rem;
    border-radius: 10px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .exam-content-grid {
    flex-direction: column;
    gap: 0.75rem;
  }

  .exam-history-panel,
  .exam-sidebar {
    max-width: 100%;
    display: none;
    border-radius: 10px;
  }

  .exam-history-panel[data-section="history"].active,
  .exam-sidebar[data-section="autosave"].active {
    display: flex;
  }

  .panel-header {
    padding: 0.75rem 1rem;
  }

  .panel-header h3 {
    font-size: 0.9rem;
  }

  .panel-content {
    padding: 0.75rem;
    
  }

  .exam-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .exam-sidebar .image-display {
    display: none;
  }

  .search-btn span {
    display: none;
  }

  .search-btn {
    padding: 0.75rem;
  }

  .tab-btn span {
    display: none;
  }

  .tab-btn i {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .stat-card {
    flex: 1 1 100%;
    flex-direction: row;
    padding: 0.875rem;
  }

  .exam-item {
    padding: 0.875rem;
  }

  .exam-item-meta {
    flex-wrap: wrap;
  }
}

/* =====================================================
   END NEW LAYOUT
   ===================================================== */

/* Theme toggle button styles */
#theme-toggle {
  position: relative;
  transition: all var(--transition-base);
  overflow: hidden;
}

#theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#theme-toggle:active {
  transform: scale(0.95);
}

#theme-toggle.switching {
  animation: themeToggleSwitch 0.3s ease-in-out;
}

@keyframes themeToggleSwitch {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg); }
}

/* Theme-specific button styles */
[data-theme="light"] #theme-toggle {
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  color: #333;
  border: 2px solid #ffeb3b;
}

[data-theme="light"] #theme-toggle:hover {
  background: linear-gradient(135deg, #ffeb3b 0%, #ffd700 100%);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

[data-theme="dark"] #theme-toggle {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: #e2e8f0;
  border: 2px solid #718096;
}

[data-theme="dark"] #theme-toggle:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  box-shadow: 0 4px 12px rgba(113, 128, 150, 0.4);
}

/* Icon rotation animation */
#theme-toggle svg {
  transition: transform var(--transition-base);
}

[data-theme="light"] #theme-toggle svg {
  transform: rotate(0deg);
}

[data-theme="dark"] #theme-toggle svg {
  transform: rotate(180deg);
}

/* Character image animations - Original styles for standalone display */
.image-display:not(.exam-sidebar .image-display) {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.character-img:not(.exam-sidebar .character-img) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 1.2s ease-in-out;
  transform: scale(1.1);
}

.character-img.visible:not(.exam-sidebar .character-img) {
  opacity: 1;
  transform: scale(1);
}

/* Result wrapper styling */
/* Old result-wrapper and sidebar styles removed for full-screen overlay refactor */

/* Overlay Backdrop */
.question-detail-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.question-detail-overlay-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Close Button */
.panel-close-btn {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  color: #555;
  font-weight: 600;
  transition: background 0.2s;
}

.panel-close-btn:hover {
  background: #f9f9f9;
  color: #333;
}

.panel-close-btn .close-icon {
  font-size: 1.2rem;
  font-weight: bold;
}

.detail-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #fff;
}

.question-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: #333;
}

.question-type-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  background: #f0f4ff;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #dbeafe;
}

.type-code {
  background: #3b82f6;
  color: white;
  padding: 0.25rem 0.5rem;
  font-weight: 700;
}

.type-name {
  color: #1e40af;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.status-badge.incorrect {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
}

.status-badge.correct {
  background: #f0fdf4;
  color: #22c55e;
  border: 1px solid #bbf7d0;
}

.detail-body {
  padding: 1.5rem;
  flex: 1;
}

.answer-section {
  margin-bottom: 2rem;
}

.answer-box {
  padding: 1rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.answer-box label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.answer-box.user-answer.incorrect {
  background: #fff5f5;
  border-color: #fed7d7;
}

.answer-box.user-answer.incorrect label {
  color: #e53e3e;
}

.answer-text {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 1.1rem;
  color: #334155;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Removed conflicting .question-detail-panel media query */

  .detail-header {
    padding: 1rem;
  }
  
  .detail-body {
    padding: 1rem;
  }
}

/* Result container structure */
.result-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  width: 100%;
}

@media (min-width: 1200px) {
  .result-container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.result-left-column,
.result-right-column {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Section headers */
.section-header {
  margin-bottom: 1.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  color: var(--secondary-color);
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 50px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: var(--border-radius-pill);
}

/* Card styles */
.info-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--secondary-color);
  animation: slideInLeft 0.5s ease-out;
}

.ai-feedback-card {
  background: var(--gray-100);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--info-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  transition: all var(--transition-base);
}

.ai-feedback-card:hover {
  background: var(--white);
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  transform: translateX(5px);
}

/* Chart containers */
.data-visualization-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
}

.chart-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-base);
  overflow: hidden;
  position: relative;
}

.animated-chart {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animated-chart.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.chart-canvas-container {
  position: relative;
  width: 100%;
  min-height: 300px;
  overflow: hidden;
}

.chart-animate {
  animation: chartPulse 1s ease-out;
}
.hidden {
  display: none;
}
@keyframes chartPulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.02); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

/* Chart specific styles */
.pie-chart {
  transition-delay: 0.2s;
}

.bar-chart {
  transition-delay: 0.4s;
}

.comparison-chart-container {
  transition-delay: 0.6s;
}

/* Bar chart hover effects */
.bar-canvas:hover {
  animation: barGlow 1.5s infinite alternate;
}

@keyframes barGlow {
  from { box-shadow: 0 0 5px rgba(52, 152, 219, 0.3); }
  to { box-shadow: 0 0 15px rgba(52, 152, 219, 0.6); }
}

/* Pie chart hover effects */
.pie-canvas:hover {
  animation: pieGlow 1.5s infinite alternate;
}

@keyframes pieGlow {
  from { box-shadow: 0 0 5px rgba(46, 204, 113, 0.3); }
  to { box-shadow: 0 0 15px rgba(46, 204, 113, 0.6); }
}

/* Responsive chart sizing */
@media (max-width: 992px) {
  .data-visualization-section {
    grid-template-columns: 1fr;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
  }
  
  .chart-card {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
  }
  
  .chart-wrapper {
    min-width: 100%;
  }
  
  .chart-canvas-container {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .chart-card {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  canvas.chart-canvas.pie-canvas, 
  .chart-canvas.bar-canvas,
  #scoreChart {
    padding: 0.5rem;
    height: 260px !important;
  }
  
  .pie-chart, .bar-chart {
    width: 100%;
    min-height: 260px;
  }
}

@media (max-width: 480px) {
  .chart-card {
    padding: 0.75rem;
  }
  
  canvas.chart-canvas.pie-canvas, 
  .chart-canvas.bar-canvas,
  #scoreChart {
    height: 220px !important;
  }
  
  .pie-chart, .bar-chart {
    min-height: 220px;
  }
}

/* Buttons */
.action-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--success-color) 0%, #27ae60 100%);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
}

.action-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(46, 204, 113, 0.3);
}

/* Popup and modals */
.modal-popup {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 2rem;
  animation: zoomIn 0.3s ease-out;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--danger-color);
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 0.75rem;
}

.question-item {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  color: var(--white);
  transition: all var(--transition-base);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.question-item.correct {
  background-color: var(--success-color);
}

.question-item.incorrect {
  background-color: var(--danger-color);
}

.question-item:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Candidate info section */
.candidate-info {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--secondary-color);
  animation: slideInLeft 0.5s ease-out;
}

.candidate-info h3 {
  color: var(--secondary-color);
  font-size: 1.2rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
}

.candidate-info h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 50px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: var(--border-radius-pill);
}

.candidate-info p {
  margin: 0.75rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--gray-200);
}

.candidate-info p:last-child {
  border-bottom: none;
}

.candidate-info p strong {
  color: var(--gray-700);
  font-weight: 600;
}

/* Exam title */
h2 {
  color: var(--primary-color);
  font-family: var(--font-serif);
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
  line-height: 1.3;
  animation: fadeInDown 0.5s ease-out;
}

h2 span {
  display: block;
  color: var(--gray-600);
  font-size: 1.25rem;
  font-family: var(--font-sans);
  font-weight: 400;
  margin-top: 0.5rem;
}

/* Score table styling */
.score-table, table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin: 1.5rem 0;
  animation: fadeIn 0.5s ease-out;
}

.score-table caption, table caption {
  caption-side: top;
  padding: 1rem;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--gray-800);
  text-align: center;
  background: var(--gray-100);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.score-table th, .score-table td,
table th, table td {
  padding: 1rem;
  text-align: center;
  border: none;
  border-bottom: 1px solid var(--gray-200);
}

.score-table th, table th {
  background: linear-gradient(to bottom, var(--gray-100) 0%, var(--gray-200) 100%);
  color: var(--gray-800);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.score-table tr:last-child td,
table tr:last-child td {
  border-bottom: none;
}

.score-table tr:last-child,
table tr:last-child {
  background-color: rgba(52, 152, 219, 0.1);
  font-weight: 600;
}

/* Result summary boxes */
.result-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  animation: fadeInUp 0.7s ease-out;
}

.result-box {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-base);
  border-top: 4px solid var(--gray-400);
}

.result-box:nth-child(1) {
  border-top-color: var(--info-color);
}

.result-box:nth-child(2) {
  border-top-color: var(--warning-color);
}

.result-box:nth-child(3) {
  border-top-color: var(--success-color);
}

.result-box:nth-child(4) {
  border-top-color: var(--accent-color);
}

.result-box:nth-child(5) {
  border-top-color: var(--secondary-color);
}

.result-box:nth-child(6) {
  border-top-color: var(--primary-color);
}

.result-box:hover {
  transform: translateY(-7px);
  box-shadow: var(--card-shadow-hover);
}

.result-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-content {
  font-size: 1.5rem;
  color: var(--gray-800);
  font-weight: 600;
  line-height: 1.2;
}

.result-status {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  color: var(--white);
  margin-top: 0.75rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: all var(--transition-base);
}

.result-status.pass {
  background: linear-gradient(135deg, var(--success-color) 0%, #27ae60 100%);
}

.result-status.fail {
  background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
}

.result-status:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

/* AI Review section */
#ai-section {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  animation: slideInRight 0.5s ease-out;
}

#ai-section h3 {
  color: var(--dark-color);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
}

#ai-section h3 img {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
  object-fit: contain;
}

.comment-item {
  background: var(--gray-100);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--info-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  transition: all var(--transition-base);
}

.comment-item:hover {
  background: var(--white);
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  transform: translateX(5px);
}

.comment-item p {
  margin: 0 0 0.75rem 0;
  color: var(--gray-700);
}

.comment-item div {
  margin: 0.3rem 0;
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.5;
}

.comment-item div:nth-child(2) {
  color: var(--gray-800);
  font-weight: 500;
}

/* Chart styling */
.charts-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
}

.chart-wrapper {
  width: 100%;
  min-width: 300px;
  min-height: 350px;
  position: relative;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  min-height: 300px;
}

canvas.chart-canvas.pie-canvas, 
.chart-canvas.bar-canvas,
#scoreChart {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-base);
  animation: fadeIn 0.8s ease-out;
}

canvas.chart-canvas:hover {
  box-shadow: var(--card-shadow-hover);
  transform: scale(1.02);
}

/* PDF Button */
#pdf {
  /* Removed fixed position - button now flows in page */
  margin: 2rem auto;
  max-width: 300px;
  z-index: 10;
  background: linear-gradient(135deg, var(--success-color) 0%, #27ae60 100%);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#pdf:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

#pdf i {
  font-size: 1.2rem;
}

/* Answer detail popup */
#answerDetailPopup {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 2rem;
  animation: zoomIn 0.3s ease-out;
}

#answerDetailPopup h3 {
  color: var(--gray-800);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

#answerDetailPopup button {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: color var(--transition-fast);
}

#answerDetailPopup button:hover {
  color: var(--danger-color);
}

#answerDetailPopup > div {
  display: grid;
  gap: 0.75rem;
}

#answerDetailPopup > div > div {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#answerDetailPopup > div > div:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Answer detail view styling */
.answer-detail-view {
  background: var(--gray-100);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
  border-left: 4px solid var(--info-color);
  animation: fadeIn 0.3s ease-out;
}

.answer-detail-view h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-300);
}

.answer-grid-container {
  margin-bottom: 2rem;
}

.answer-description {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.close-detail-button {
  background: var(--gray-600) !important;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.close-detail-button:hover {
  background: var(--gray-700) !important;
}

@media (max-width: 768px) {
  .answer-grid {
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
  }
}

@media (max-width: 480px) {
  .answer-grid {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  }
  
  .answer-detail-view {
    padding: 1rem;
  }
}

/* Countdown overlay */
#countdown-overlay {
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  color: var(--white);
  font-weight: 700;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

/* Sign */
span.sign {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-left: 0.5rem;
  white-space: nowrap;
  animation: pulse 2s infinite;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95) translate(-50%, -50%); }
  to { opacity: 1; transform: scale(1) translate(-50%, -50%); }
}

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

/* Responsive styles */
@media (max-width: 992px) {
  /* Removed conflicting #result-wrapper selector */
  .containp {
    grid-template-columns: 1fr;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
  }
  
  .result-summary {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .result-container {
    grid-template-columns: 1fr;
  }
  
  .data-visualization-section {
    grid-template-columns: 1fr;
  }
  
  .result-left-column,
  .result-right-column {
    width: 100%;
  }
}

@media (max-width: 768px) {
  #examID-wrapper {
    flex-direction: column;
    padding: 1.5rem;
    overflow: auto;
  }
  
  .image-display {
    width: 200px;
    height: 200px;
    margin-top: 1.5rem;
  }
  
  input#examID-input {
    width: 100%;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .result-box {
    padding: 1rem 0.75rem;
  }
  
  #pdf {
    /* Mobile: full width, smaller padding */
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin: 1.5rem 0;
  }
  
  #answerDetailPopup {
    width: 90% !important;
    padding: 1.5rem;
  }
  
  .candidate-info p {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .candidate-info p strong {
    margin-bottom: 0.25rem;
  }
  
  canvas.chart-canvas.pie-canvas, 
  .chart-canvas.bar-canvas,
  #scoreChart {
    padding: 1rem;
    height: 300px !important;
  }

  .chart-card {
    padding: 1rem;
  }
  
  .score-dashboard {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  .result-summary {
    grid-template-columns: 1fr 1fr;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .score-table th, .score-table td,
  table th, table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .candidate-info{width:100%}

  #countdown-overlay {
    font-size: 5rem;
  }
  
  .comment-item {
    padding: 0.75rem;
  }

  .question-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }
  
  .score-dashboard {
    grid-template-columns: 1fr 1fr;
  }
  
  .action-button {
    width: 100%;
  }
}

canvas.chart-canvas.pie-canvas, .chart-canvas.bar-canvas, #scoreChart {
  padding: 1rem;
  height: 300px !important;

}

#hintActivator {z-index:9990!important}


.result-status.pass {
  position: relative;
  z-index: 1;
}

.result-status.pass.animate-pass::after {
  content: '🎉 Pass';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background-color: rgba(46, 204, 113, 0.9);
  color: white;
  padding: 1rem 2rem;
  font-size: 3rem;
  font-weight: bold;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(46, 204, 113, 0.8);
  animation: fullscreenPassZoom 0.5s ease-out forwards;
  z-index: 9999;
}

@keyframes fullscreenPassZoom {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}
/* ==========================================================================
   FIXED: FULL SCREEN OVERLAY & LAYOUT CLEANUP (2025-01-28)
   ========================================================================== */

/* 1. Reset Wrapper - Ensure full width usage */
#result-wrapper {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}

/* 2. Sidebar - Force full width */
.questions-sidebar {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  display: flex;
  flex-direction: column;
}

/* 3. Question Detail Panel - FULL SCREEN OVERLAY */
.question-detail-panel {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 2000; /* High z-index to sit on top of everything */
  display: flex;
  flex-direction: column;
  
  /* Transition Effects */
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden; /* Hide completely when closed */
}

.question-detail-panel.active {
  transform: translateX(0);
  visibility: visible;
}

/* 4. Panel Header & Close Button */
.question-detail-panel .panel-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: none;
  cursor: pointer;
  position: absolute; /* Changed to absolute for corner placement */
  top: 1rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 2010;
  transition: all 0.2s ease;
  padding: 0;
  color: #e74c3c;
  left: auto; /* Reset left from previous styles */
}

.question-detail-panel .panel-close-btn:hover {
  background-color: #e74c3c;
  color: white;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
}

.question-detail-panel .close-text {
  display: none; /* Hide text as requested "red, round button" */
}

.question-detail-panel .close-icon {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: bold;
}

/* 5. Panel Content Scrollable Area */
.question-detail-panel .detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  max-width: 1000px; /* Readability max-width for content only */
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.question-detail-panel .detail-header {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

/* 6. Mobile Responsiveness */
@media (max-width: 768px) {
  .question-detail-panel .detail-body {
    padding: 1rem;
  }
}
