@tailwind base;
@tailwind components;
@tailwind utilities;

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Optimized animations - only for interactive elements */
button, a, .hover\:scale-105, .hover\:shadow-xl, .hover\:-translate-y-1 {
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  will-change: transform;
}

/* Mobile performance optimization */
@media (max-width: 768px) {
  /* Disable expensive animations on mobile */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  /* Keep only essential transitions */
  button, a {
    transition: opacity 0.2s ease !important;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Glass effect enhancement */
.backdrop-blur-lg {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Button hover effects */
button:hover {
  transform: translateY(-2px);
}

/* Input focus effects */
input:focus {
  transform: scale(1.02);
}

/* Custom gradient text */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

/* Custom gradient radial for hero background */
.bg-gradient-radial {
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

/* Ensure root gradient is not affected by transitions */
#root {
  transition: none !important;
}

/* Fix background issues */
body, html {
  background-color: transparent;
}

/* Mobile layout stability */
@media (max-width: 768px) {
  /* Prevent layout shifts */
  img {
    height: auto;
    max-width: 100%;
  }
  
  /* Optimize mobile containers */
  .container {
    contain: layout style paint;
  }
  
  /* Reduce backdrop blur impact on mobile */
  .backdrop-blur-lg,
  .backdrop-blur-sm {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }
  
  /* Simplify mobile shadows */
  .drop-shadow-2xl,
  .shadow-xl,
  .shadow-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
  }
}