@import "tailwindcss";

@layer base {
  html {
    scroll-behavior: smooth;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  }

  body {
    background-color: #f8fafc;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  }
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #020617;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

/* Custom Animations */
@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes floatSmooth {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-spin-slow {
  animation: spinSlow 12s linear infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

.animate-float {
  animation: floatSmooth 4s ease-in-out infinite;
}

/* Glassmorphism & UI Utilities */
.glass-panel-dark {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-panel-light {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Accessibility Focus Ring */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
/* Mobile Container Width Fixes */
@media (max-width: 640px) {
    /* Ensure full-width containers */
    .max-w-7xl,
    .max-w-4xl,
    .max-w-3xl,
    .max-w-5xl {
        max-width: 100%;
        width: 100%;
    }
    
    /* Adjust padding for mobile */
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .sm\:px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .lg\:px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Fix section spacing */
    .space-y-20 {
        row-gap: 3rem;
    }
    
    .py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Fix grid gaps on mobile */
    .gap-8 {
        gap: 1.5rem;
    }
    
    .gap-12 {
        gap: 2rem;
    }
    
    /* Ensure text doesn't overflow */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix card padding on mobile */
    .p-8 {
        padding: 1.5rem;
    }
    
    .p-6 {
        padding: 1.25rem;
    }
}

/* Prevent horizontal scroll */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Ensure all containers respect viewport */
* {
    box-sizing: border-box;
}
