/* Clean typography and RTL adjustments */
@layer base {
  body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Question option card custom states */
.option-btn {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.option-btn:active:not(:disabled) {
  transform: scale(0.99);
}

.option-btn.selected {
  border-color: #047857;
  background-color: #ECFDF5;
}

.option-btn.correct {
  border-color: #10B981;
  background-color: #D1FAE5;
  color: #065F46;
}

.option-btn.incorrect {
  border-color: #EF4444;
  background-color: #FEE2E2;
  color: #991B1B;
}

/* Pulse animation for active countdown when low */
@keyframes timerWarningPulse {
  0%, 100% { background-color: #FEF3C7; color: #B45309; border-color: #FCD34D; }
  50% { background-color: #FFFBEB; color: #92400E; border-color: #FDE68A; }
}

@keyframes timerUrgentPulse {
  0%, 100% { background-color: #FEE2E2; color: #DC2626; border-color: #FCA5A5; transform: scale(1.02); }
  50% { background-color: #FEF2F2; color: #991B1B; border-color: #FECACA; transform: scale(1); }
}

.timer-warning {
  animation: timerWarningPulse 1.2s infinite ease-in-out;
}

.timer-urgent {
  animation: timerUrgentPulse 0.8s infinite ease-in-out;
}

/* Radio Card Selection States */
.timer-option-card:has(input:checked) {
  border-color: #1B4D3E;
  background-color: #F0FDF4;
}

/* Backdrop blur helper */
.backdrop-blur-xs {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}