* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
  background-color: #020617;
  color: #f8fafc;
}

body.light {
  background-color: #f8fafc;
  color: #0f172a;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

body.dark ::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 3px;
}

body.light ::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Loading bar animation */
@keyframes loading-bar {
  0% {
    width: 0%;
    margin-left: 0%;
  }
  50% {
    width: 70%;
    margin-left: 15%;
  }
  100% {
    width: 0%;
    margin-left: 100%;
  }
}

.animate-loading-bar {
  animation: loading-bar 2.5s ease-in-out infinite;
}

/* Brain float animation */
@keyframes brain-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.brain-float {
  animation: brain-float 2s ease-in-out infinite;
}

/* Node pulse animation */
@keyframes node-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(139, 92, 246, 0);
  }
}

.node-pulse {
  animation: node-pulse 2.5s ease-in-out infinite;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth transitions */
button, a, input {
  transition: all 0.2s ease;
}

/* Focus styles */
input:focus {
  outline: none;
}

/* Backdrop blur fallback */
@supports not (backdrop-filter: blur(10px)) {
  .backdrop-blur-sm {
    background-color: rgba(15, 23, 42, 0.98);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .text-5xl {
    font-size: 1.75rem;
  }
  
  .text-3xl {
    font-size: 1.4rem;
  }
}

/* Animation for nodes appearing */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-up 0.6s ease forwards;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 40%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass morphism effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover scale effect */
.hover-scale:hover {
  transform: scale(1.03);
}

/* Custom focus ring */
.focus-ring:focus {
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.35);
}

/* Sparkle animation for button */
@keyframes sparkle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Subtle glow for completed items */
.completed-glow {
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}