/* PSM-I Practice Exam - Custom Styles */

* { box-sizing: border-box; }

body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* Answer option hover/selected states */
.option-btn {
  transition: all 0.15s ease;
  border: 2px solid #e2e8f0;
  cursor: pointer;
}
.option-btn:hover:not(.disabled) {
  border-color: #4263eb;
  background-color: #f0f4ff;
}
.option-btn.selected {
  border-color: #4263eb;
  background-color: #dbe4ff;
}
.option-btn.correct {
  border-color: #16a34a;
  background-color: #dcfce7;
}
.option-btn.incorrect {
  border-color: #dc2626;
  background-color: #fee2e2;
}
.option-btn.correct-missed {
  border-color: #16a34a;
  background-color: #dcfce7;
  opacity: 0.7;
}
.option-btn.disabled {
  cursor: default;
}

/* Progress bar */
.progress-bar-fill {
  transition: width 0.3s ease;
}

/* Timer warning pulse */
@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.timer-warning {
  animation: pulse-red 1s infinite;
  color: #dc2626;
}

/* Question navigator grid */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 4px;
}
.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.1s ease;
}
.nav-btn:hover { transform: scale(1.1); }
.nav-btn.unanswered { background: #e2e8f0; color: #64748b; }
.nav-btn.answered  { background: #4263eb; color: #fff; }
.nav-btn.flagged   { background: #f59e0b; color: #fff; }
.nav-btn.current   { outline: 2px solid #1e3a8a; outline-offset: 1px; }

/* Category badge */
.category-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Fade-in animation for screens */
.fade-in {
  animation: fadeIn 0.25s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* Source logo tiny */
.source-tag {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .exam-layout { flex-direction: column; }
  .nav-sidebar { width: 100% !important; }
}
