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

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: #0a0a0f;
  color: #e2e8f0;
  height: 100vh;
  overflow: hidden;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

.glass {
  background: rgba(17, 17, 24, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
}

.glass-hover:hover {
  background: rgba(26, 26, 36, 0.9);
  border-color: rgba(255,255,255,0.1);
}

.glow-blue { box-shadow: 0 0 20px rgba(59,130,246,0.15), 0 0 60px rgba(59,130,246,0.05); }
.glow-purple { box-shadow: 0 0 20px rgba(139,92,246,0.15), 0 0 60px rgba(139,92,246,0.05); }
.glow-cyan { box-shadow: 0 0 20px rgba(6,182,212,0.15); }
.glow-amber { box-shadow: 0 0 20px rgba(245,158,11,0.15); }
.glow-green { box-shadow: 0 0 20px rgba(16,185,129,0.15); }

.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}
.gradient-border:hover::before,
.gradient-border.active::before {
  opacity: 1;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes flow-dots {
  0% { stroke-dashoffset: 20; }
  100% { stroke-dashoffset: 0; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nodeAppear {
  from { opacity: 0; transform: scale(0.5) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

@keyframes matrixRain {
  0% { transform: translateY(-100%); opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.3s ease-out forwards; }
.animate-slide-left { animation: slideInLeft 0.3s ease-out forwards; }
.animate-slide-right { animation: slideInRight 0.3s ease-out forwards; }
.animate-node-appear { animation: nodeAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

.dot-grid {
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

.shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.btn-press {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-press:active {
  transform: scale(0.97);
}

.connection-line {
  stroke-dasharray: 8 4;
  animation: flow-dots 0.8s linear infinite;
}

.node-running {
  animation: pulse-glow 1.5s ease-in-out infinite;
}

.upgrade-gradient {
  background: linear-gradient(90deg, rgba(139,92,246,0.15), rgba(59,130,246,0.15), rgba(6,182,212,0.1));
}

.sidebar-item {
  transition: all 0.2s ease;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.04);
  padding-left: 20px;
}
.sidebar-item.active {
  background: rgba(139,92,246,0.1);
  border-left: 2px solid #8b5cf6;
}

.input-glow:focus-within {
  box-shadow: 0 0 0 1px rgba(139,92,246,0.3), 0 0 30px rgba(139,92,246,0.08);
}

.project-card {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(139,92,246,0.08);
  border-color: rgba(139,92,246,0.3);
}

.canvas-node {
  transition: box-shadow 0.2s ease;
  cursor: grab;
}
.canvas-node:active {
  cursor: grabbing;
}
.canvas-node.selected {
  box-shadow: 0 0 0 2px #8b5cf6, 0 0 30px rgba(139,92,246,0.2);
}

.port {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #3b82f6;
  background: #111118;
  transition: all 0.2s;
  cursor: crosshair;
}
.port:hover {
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59,130,246,0.5);
  transform: scale(1.3);
}

.toast-enter {
  animation: slideInRight 0.3s ease-out forwards;
}

.command-palette-overlay {
  animation: fadeIn 0.15s ease-out;
}
.command-palette-box {
  animation: scaleIn 0.2s ease-out;
}