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

@layer base {

  html {
    @apply overflow-x-hidden;
    scroll-behavior: smooth;
  }

  body {
    @apply bg-dark text-white font-sans antialiased;
    direction: rtl;
  }

  h1, h2, h3, h4, h5, h6, p {
    @apply m-0;
  }

  h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.3;
    margin: 0;
  }

  h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
  }

  [x-cloak] {
    display: none !important;
  }

  
}

@layer components {
  .gradient-text {
    @apply bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent;
  }

  .btn-primary {
    @apply bg-primary text-dark font-semibold py-3 px-6 rounded-lg shadow-md hover:bg-opacity-90 transition-all;
  }

  .btn-outline {
    @apply border border-gray-light text-gray-light bg-transparent py-3 px-6 rounded-lg hover:border-primary hover:text-primary transition-all;
  }

  .card {
    @apply bg-dark/80 backdrop-blur-md border border-gray-light/20 rounded-2xl shadow-lg;
  }

  .shadow-glow {
    box-shadow: 0 0 30px rgba(128, 192, 66, 0.3);
  }

  .grid-bg {
    background-image:
      linear-gradient(rgba(128, 192, 66, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(128, 192, 66, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
  }

  .bg-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  }
}

@layer utilities {
  .animate-fade-up {
    animation: fadeUp 0.6s ease both;
  }

  .animation-delay-200 {
    animation-delay: 0.2s;
  }

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

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

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

  .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
  }

  @keyframes spin { to { transform: rotate(360deg); } }
}
