/* Custom styles for enhanced visual effects */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Inter:wght@400;500;600;700;800&display=swap');

body {
  font-family: 'Inter', sans-serif;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

/* Enhanced Glass morphism effect */
.backdrop-blur {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.custom-scrollbar::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border-radius: 4px;
  border: 1px solid #334155;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

/* Default scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 3px;
}

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

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

/* Smooth animations with better performance */
* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced glow effects */
.shadow-cyan-400\/50 {
  box-shadow: 
    0 0 20px rgba(6, 182, 212, 0.5),
    0 0 40px rgba(6, 182, 212, 0.2),
    0 0 80px rgba(6, 182, 212, 0.1);
}

.shadow-cyan-600\/30 {
  box-shadow: 
    0 4px 20px rgba(8, 145, 178, 0.3),
    0 0 40px rgba(8, 145, 178, 0.1);
}

.shadow-green-400\/50 {
  box-shadow: 
    0 0 20px rgba(34, 197, 94, 0.5),
    0 0 40px rgba(34, 197, 94, 0.2);
}

.shadow-yellow-400\/30 {
  box-shadow: 
    0 0 15px rgba(251, 191, 36, 0.3),
    0 0 30px rgba(251, 191, 36, 0.1);
}

.shadow-pink-400\/50 {
  box-shadow: 
    0 0 20px rgba(244, 114, 182, 0.5),
    0 0 40px rgba(244, 114, 182, 0.2);
}

.shadow-indigo-400\/50 {
  box-shadow: 
    0 0 20px rgba(129, 140, 248, 0.5),
    0 0 40px rgba(129, 140, 248, 0.2);
}

/* Enhanced hover effects */
button:hover {
  transform: translateY(-2px) scale(1.02);
}

button:active {
  transform: translateY(0) scale(1);
}

/* Animated grid pattern background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: -2;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

/* Floating particles animation */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(6, 182, 212, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 30% 60%, rgba(59, 130, 246, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 70% 30%, rgba(168, 85, 247, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.1) 1px, transparent 1px);
  background-size: 400px 400px, 350px 350px, 450px 450px, 300px 300px;
  pointer-events: none;
  z-index: -1;
  animation: particleFloat 30s linear infinite;
}

@keyframes particleFloat {
  0% { transform: rotate(0deg) translateX(0) translateY(0); }
  25% { transform: rotate(90deg) translateX(10px) translateY(-10px); }
  50% { transform: rotate(180deg) translateX(0) translateY(0); }
  75% { transform: rotate(270deg) translateX(-10px) translateY(10px); }
  100% { transform: rotate(360deg) translateX(0) translateY(0); }
}

/* Enhanced animation keyframes */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(6, 182, 212, 0.5); }
  50% { box-shadow: 0 0 20px rgba(6, 182, 212, 1), 0 0 30px rgba(6, 182, 212, 0.5); }
}

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

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

/* Utility animation classes */
.animate-pulse { animation: pulse 1s ease-in-out infinite; }
.animate-shake { animation: shake 0.5s ease-in-out; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-slideInUp { animation: slideInUp 0.5s ease-out; }
.animate-fadeIn { animation: fadeIn 0.5s ease-out; }

/* Enhanced range slider styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-track {
  background: linear-gradient(135deg, #475569, #334155);
  height: 6px;
  border-radius: 3px;
  border: 1px solid #64748b;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  height: 20px;
  width: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.5);
}

input[type="range"]::-moz-range-track {
  background: linear-gradient(135deg, #475569, #334155);
  height: 6px;
  border-radius: 3px;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  height: 18px;
  width: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

/* Input field enhancements */
input[type="text"], input[type="number"], select {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:focus, input[type="number"]:focus, select:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
  transform: translateY(-1px);
}

/* Card hover effects */
.bg-slate-800\/50:hover {
  background-color: rgba(30, 41, 59, 0.7);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
}

/* Loading spinner for future use */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

/* Responsive improvements */
@media (max-width: 768px) {
  body::before {
    background-size: 20px 20px;
  }
  
  body::after {
    background-size: 200px 200px, 175px 175px, 225px 225px, 150px 150px;
  }
}

/* Dark mode text selection */
::selection {
  background-color: rgba(6, 182, 212, 0.3);
  color: white;
}

::-moz-selection {
  background-color: rgba(6, 182, 212, 0.3);
  color: white;
}

/* Focus visible for accessibility */
button:focus-visible, input:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}