@tailwind base;
@tailwind components;
@tailwind utilities;

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: #0a0a0f;
  overflow-x: hidden;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

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

::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

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

/* ReactFlow customization */
.react-flow__node {
  font-family: 'Space Grotesk', sans-serif;
}

.react-flow__edge-path {
  stroke-width: 2;
}

.react-flow__controls {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(51, 65, 85, 0.5) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.react-flow__controls-button {
  background: transparent !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5) !important;
  color: #94a3b8 !important;
  transition: all 0.2s !important;
}

.react-flow__controls-button:hover {
  background: rgba(139, 92, 246, 0.2) !important;
  color: #fff !important;
}

.react-flow__controls-button:last-child {
  border-bottom: none !important;
}

.react-flow__controls-button svg {
  fill: currentColor !important;
}

.react-flow__minimap {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(51, 65, 85, 0.5) !important;
  border-radius: 12px !important;
}

.react-flow__background {
  background: #0a0a0f !important;
}

/* Animations */
@keyframes spin-reverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

.animate-spin-reverse {
  animation: spin-reverse 1.5s linear infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass morphism effect */
.glass {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

/* Glow effects */
.glow-violet {
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

.glow-cyan {
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.3);
}

.glow-pink {
  box-shadow: 0 0 40px rgba(236, 72, 153, 0.3);
}

/* Node hover effect */
.react-flow__node:hover {
  z-index: 10 !important;
}

/* Edge animation */
.react-flow__edge.animated path {
  stroke-dasharray: 5;
  animation: dashdraw 0.5s linear infinite;
}

@keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .react-flow__controls {
    transform: scale(0.9);
    transform-origin: bottom left;
  }
}