﻿/* motivation.css - Motivation Boosters Styling */

/* ========================================
   MOTIVATIONAL QUOTE MODAL
   ======================================== */

.motivation-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.motivation-modal {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalFloat 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalFloat {
  from {
    transform: translateY(50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.quote-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: iconBounce 1s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.quote-text {
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.6;
  margin: 2rem 0;
  font-weight: 500;
}

.continue-btn {
  background: white;
  color: #667eea;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.continue-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================
   PERFORMANCE INSIGHT CARDS
   ======================================== */

.insight-card {
  background: white;
  border-left: 4px solid #10b981;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 1rem 0;
  animation: slideUp 0.4s ease-out;
}

.dark .insight-card {
  background: #1f2937;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.insight-icon {
  font-size: 2.5rem;
}

.insight-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #111827;
  margin: 0;
}

.dark .insight-title {
  color: white;
}

.insight-message {
  font-size: 1rem;
  color: #374151;
  margin: 0;
  line-height: 1.5;
}

.dark .insight-message {
  color: #d1d5db;
}

/* ========================================
   STREAK HIGHLIGHTS
   ======================================== */

.streak-highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f97316 0%, #f472b6 100%);
  border-radius: 16px;
  color: white;
  text-align: center;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}

.streak-highlight::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.flame-animation {
  font-size: 5rem;
  animation: flameFlicker 1s infinite;
  position: relative;
  z-index: 1;
}

@keyframes flameFlicker {
  0%, 100% {
    transform: scale(1) rotate(-2deg);
    filter: brightness(1);
  }
  25% {
    transform: scale(1.05) rotate(2deg);
    filter: brightness(1.1);
  }
  50% {
    transform: scale(1.1) rotate(-1deg);
    filter: brightness(1.2);
  }
  75% {
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.1);
  }
}

.streak-number {
  font-size: 3rem;
  font-weight: bold;
  margin: 0.5rem 0;
  position: relative;
  z-index: 1;
}

.streak-message {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ========================================
   SPEED ROUND TIMER
   ======================================== */

.speed-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

.speed-timer {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 1rem auto;
}

.timer-circle {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-background {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 8;
  r: 40;
  cx: 50;
  cy: 50;
}

.dark .timer-background {
  stroke: #374151;
}

.timer-progress {
  fill: none;
  stroke: #6366f1;
  stroke-width: 8;
  stroke-linecap: round;
  r: 40;
  cx: 50;
  cy: 50;
  stroke-dasharray: 251.2; /* 2 * Ï€ * 40 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer-progress.warning {
  stroke: #f59e0b;
  animation: timerPulse 0.5s infinite;
}

.timer-progress.danger {
  stroke: #ef4444;
  animation: timerPulse 0.3s infinite;
}

@keyframes timerPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  color: #111827;
}

.dark .timer-text {
  color: white;
}

.timer-text.warning {
  color: #f59e0b;
}

.timer-text.danger {
  color: #ef4444;
  animation: numberShake 0.5s infinite;
}

@keyframes numberShake {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  25% {
    transform: translate(-50%, -50%) rotate(-3deg);
  }
  75% {
    transform: translate(-50%, -50%) rotate(3deg);
  }
}

/* Speed bonus indicator */
.speed-bonus {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: #10b981;
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.5rem;
  animation: bounce 0.5s ease;
}

/* ========================================
   MILESTONE CELEBRATION
   ======================================== */

.milestone-celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  color: white;
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  z-index: 10000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: celebrationPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes celebrationPop {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.milestone-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: iconSpin 1s ease-out;
}

@keyframes iconSpin {
  from {
    transform: rotate(-180deg) scale(0);
  }
  to {
    transform: rotate(0) scale(1);
  }
}

.milestone-title {
  font-size: 2rem;
  font-weight: bold;
  margin: 1rem 0;
}

.milestone-message {
  font-size: 1.25rem;
  margin: 0;
}
/* personalization.css - Personalization UI Styles */

/* Avatar Upload Widget */
.avatar-upload-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px dashed #d1d5db;
  transition: all 0.3s ease;
}

.dark .avatar-upload-widget {
  background: #111827;
  border-color: #374151;
}

.avatar-upload-widget:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
}

.avatar-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #e5e7eb;
  background: #f3f4f6;
}

.dark .avatar-preview {
  border-color: #374151;
  background: #1f2937;
}

.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #8b5cf6;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.avatar-upload-btn:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}

.avatar-upload-input {
  display: none;
}

/* Theme Picker */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dark .theme-option {
  background: #1f2937;
  border-color: #374151;
}

.theme-option:hover {
  border-color: #8b5cf6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.theme-option.active {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

.theme-color-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
}

.dark .theme-name {
  color: #d1d5db;
}

/* Study Reminder Settings */
.reminder-settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.dark .reminder-settings {
  background: #1f2937;
  border-color: #374151;
}

.reminder-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.time-picker-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.time-input {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  color: #111827;
}

.dark .time-input {
  background: #111827;
  border-color: #374151;
  color: white;
}

.test-notification-btn {
  padding: 0.5rem 1rem;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.test-notification-btn:hover {
  background: #059669;
}

.permission-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #92400e;
}

.permission-status.granted {
  background: #d1fae5;
  color: #065f46;
}

.permission-status.denied {
  background: #fee2e2;
  color: #991b1b;
}

/* Favorite Topics */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.favorite-card {
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.favorite-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.favorite-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.favorite-card:hover::before {
  opacity: 1;
}

.favorite-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.favorite-card h3 {
  font-size: 1rem;
  font-weight: bold;
  margin: 0 0 0.25rem 0;
}

.favorite-card p {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0 0 1rem 0;
}

.quick-start {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.9;
}

.remove-favorite-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
}

.favorite-card:hover .remove-favorite-btn {
  opacity: 1;
}

.remove-favorite-btn:hover {
  background: rgba(239, 68, 68, 0.9);
  transform: scale(1.1);
}

.add-favorite-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: white;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dark .add-favorite-btn {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
}

.add-favorite-btn:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
}

.add-favorite-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Enhanced Animations */
.fade-slide-in {
  animation: fadeSlideIn 0.4s ease-out;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skeleton Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.dark .skeleton {
  background: linear-gradient(90deg, #1f2937 25%, #111827 50%, #1f2937 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Interactive Button Enhancements */
.interactive-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.interactive-btn:active {
  transform: scale(0.98);
}

.interactive-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.interactive-btn:active::after {
  width: 300px;
  height: 300px;
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ux-enhancements.css - Enhanced UX Styling */

/* ========================================
   KEYBOARD SHORTCUTS MODAL
   ======================================== */

.shortcuts-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.shortcuts-modal {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dark .shortcuts-modal {
  background: #1f2937;
  color: white;
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.dark .shortcut-row {
  background: #111827;
}

.shortcut-row:hover {
  background: #f3f4f6;
}

.dark .shortcut-row:hover {
  background: #1f2937;
}

kbd {
  background: #fff;
  border: 2px solid #d1d5db;
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 3rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark kbd {
  background: #374151;
  border-color: #4b5563;
  color: white;
}

/* ========================================
   RESUME QUIZ MODAL
   ======================================== */

.resume-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.resume-modal {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dark .resume-modal {
  background: #1f2937;
  color: white;
}

.resume-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 1s ease-in-out;
}

.dark .resume-info {
  background: #111827 !important;
  color: #d1d5db;
}

.resume-btn:hover {
  background: #4f46e5 !important;
  transform: translateY(-1px);
}

.start-new-btn:hover {
  background: #d1d5db !important;
}

/* ========================================
   AUTO-SAVE INDICATOR
   ======================================== */

.autosave-status {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  animation: slideInRight 0.3s ease-out;
}

.dark .autosave-status {
  background: #1f2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.saving {
  color: #f59e0b;
  display: none;
}

.saved {
  color: #10b981;
  display: none;
}

/* ========================================
   BOOKMARK BUTTON
   ======================================== */

.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid #f59e0b;
  color: #f59e0b;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bookmark-btn:hover {
  background: rgba(245, 158, 11, 0.1);
  transform: translateY(-1px);
}

.bookmark-btn.active {
  background: #f59e0b;
  color: white;
}

.bookmark-icon {
  font-size: 1.25rem;
}

/* ========================================
   VIDEO EXPLANATION
   ======================================== */

.explanation-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 2rem;
}

.explanation-content {
  background: white;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}

.dark .explanation-content {
  background: #1f2937;
}

.explanation-video {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.explanation-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.explanation-text {
  color: #374151;
  line-height: 1.6;
  font-size: 1rem;
}

.dark .explanation-text {
  color: #d1d5db;
}

.show-explanation-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.show-explanation-btn:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

/* ========================================
   SHORTCUT HINTS
   ======================================== */

.shortcut-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 1rem;
}

.dark .shortcut-hint {
  background: #1e293b;
  color: #94a3b8;
}

.shortcut-hint kbd {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  min-width: auto;
}
/* visual-enhancements.css - Premium Visual Polish */

/* ========================================
   MICRO-ANIMATIONS
   ======================================== */

/* Card Hover Lift Effect */
.card-interactive {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.dark .card-interactive:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Button Press Effect */
.btn, button, .retro-button, .retro-option-btn {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:active, button:active, .retro-button:active {
  transform: scale(0.98);
}

/* Ripple Effect on Click */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Modal Scale-In */
.modal-scale-in {
  animation: modalScaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Smooth Fade In */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide Up Animation */
.slide-up {
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Input Focus Glow */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
  transition: box-shadow 0.2s ease;
}

.dark input:focus, .dark select:focus, .dark textarea:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.4);
}

/* Success Pulse Animation */
.success-pulse {
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Success Checkmark Animation */
.checkmark-animation {
  animation: checkmarkDraw 0.5s ease-out;
}

@keyframes checkmarkDraw {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ========================================
   ENHANCED LOADING ANIMATIONS
   ======================================== */

/* Brain Pulse Loader (for quiz generation) */
.brain-loader {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  animation: brainPulse 1.5s ease-in-out infinite;
}

@keyframes brainPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Dots Bouncing */
.dots-loader {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6366f1;
  animation: dotBounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
  animation-delay: -0.32s;
}

.dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Circular Progress Loader */
.circular-progress {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton Screen */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: 4px;
}

.dark .skeleton {
  background: linear-gradient(90deg, #1f2937 25%, #111827 50%, #1f2937 75%);
  background-size: 200% 100%;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  to {
    left: 100%;
  }
}

/* Book Stack Loader */
.book-stack-loader {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.book {
  width: 10px;
  height: 40px;
  background: #6366f1;
  animation: bookStack 1.2s ease-in-out infinite;
}

.book:nth-child(1) {
  animation-delay: 0s;
}

.book:nth-child(2) {
  animation-delay: 0.2s;
}

.book:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bookStack {
  0%, 100% {
    height: 20px;
  }
  50% {
    height: 50px;
  }
}

/* ========================================
   QUIZ PROGRESS INDICATORS
   ======================================== */

/* Progress Container */
.quiz-progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 12px;
}

.dark .quiz-progress-container {
  background: rgba(139, 92, 246, 0.1);
}

/* Question Counter */
.question-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.dark .question-counter {
  color: #d1d5db;
}

.question-number {
  color: #6366f1;
  font-size: 1rem;
}

/* Progress Track */
.progress-track {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.dark .progress-track {
  background: #374151;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Question Steps */
.question-steps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e5e7eb;
  color: #6b7280;
  transition: all 0.3s ease;
}

.dark .step {
  background: #374151;
  color: #9ca3af;
}

.step.completed {
  background: #10b981;
  color: white;
  transform: scale(1.1);
}

.step.active {
  background: #6366f1;
  color: white;
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Time Elapsed Indicator */
.time-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.dark .time-indicator {
  color: #9ca3af;
}

.time-icon {
  font-size: 1rem;
}

/* ========================================
   PAGE TRANSITIONS
   ======================================== */

.page-transition-enter {
  animation: pageEnter 0.4s ease-out;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-transition-exit {
  animation: pageExit 0.3s ease-in;
}

@keyframes pageExit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* ========================================
   UTILITY ANIMATIONS
   ======================================== */

/* Bounce */
.bounce {
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Rotate */
.rotate-in {
  animation: rotateIn 0.5s ease-out;
}

@keyframes rotateIn {
  from {
    transform: rotate(-180deg) scale(0);
    opacity: 0;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

/* Pulse */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
