/* Custom styles and PWA tweaks */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0284c7;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg-dark: #0f172a;
  --surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  background-color: #f8fafc;
  color: var(--text-main);
}

/* Safe area insets for iOS notches */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
.safe-top {
  padding-top: env(safe-area-inset-top, 16px);
}

/* Hide scrollbars but keep scrolling */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Active tab indicator */
.nav-tab.active {
  color: var(--primary);
  font-weight: 700;
}
.nav-tab.active svg {
  stroke: var(--primary);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Question Option States */
.option-btn {
  transition: all 0.15s ease;
}
.option-btn:active {
  transform: scale(0.99);
}
.option-btn.selected {
  border-color: #3b82f6;
  background-color: #eff6ff;
}
.option-btn.correct {
  border-color: #10b981 !important;
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
}
.option-btn.incorrect {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  color: #991b1b !important;
}

/* Zoom Container for Mindmaps */
.zoom-container {
  overflow: auto;
  touch-action: pan-x pan-y pinch-zoom;
}

/* Badge glow */
.badge-urgent {
  animation: pulseGlow 2s infinite;
}

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