/* PrepMaster - Human-crafted, High-performance Stylesheet (Light Theme) */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Color System */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-sidebar: #f8fafc;
  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-900: #312e81;

  --success: #059669;
  --success-bg: #ecfdf5;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;

  --shadow-subtle: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-elevated: 0 12px 24px -4px rgba(15, 23, 42, 0.07), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar - sleek, unobtrusive */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Sidebar Custom Styling (ChatGPT style, light refined edition) */
.chatgpt-sidebar {
  width: 290px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 40;
}

.history-item {
  position: relative;
  transition: all 0.15s ease-in-out;
  border-radius: 0.5rem;
}
.history-item:hover {
  background-color: #f1f5f9;
}
.history-item.active {
  background-color: var(--primary-50);
  color: var(--primary-700);
  font-weight: 500;
}

/* Question Hall Styling */
.exam-hall-mode {
  background-color: #f8fafc;
  user-select: none;
  -webkit-user-select: none;
}
.exam-hall-mode .allow-select {
  user-select: text;
  -webkit-user-select: text;
}

/* Smooth pulse for timer when critical */
@keyframes timerPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
  }
}
.timer-critical {
  animation: timerPulse 1.8s infinite;
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* Radio button customized option cards */
.option-card {
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.option-card:hover {
  border-color: #a5b4fc;
  background-color: #faf5ff;
}
.option-card.selected {
  border-color: var(--primary-600);
  background-color: var(--primary-50);
  box-shadow: 0 0 0 1px var(--primary-600);
}

/* Palette Question Button States */
.palette-btn {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.825rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  color: var(--text-muted);
}
.palette-btn:hover {
  border-color: #94a3b8;
  color: var(--text-main);
}
.palette-btn.current {
  border-color: var(--primary-600);
  background-color: var(--primary-600);
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}
.palette-btn.answered {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.palette-btn.flagged {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
  position: relative;
}
.palette-btn.flagged::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background-color: #d97706;
}

/* Examination Watermark to reinforce official feel */
.exam-watermark {
  background-image: radial-gradient(#e2e8f0 0.75px, transparent 0.75px);
  background-size: 16px 16px;
}

/* Badge System */
.badge-wassce {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-bece {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Print styling for certificates and reports */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background-color: #ffffff !important;
  }
  .print-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
}
