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

@layer base {
  :root {
    /* Cybersecurity themed colors */
    --background: 240 10% 98%;
    --foreground: 240 15% 9%;

    --card: 0 0% 100%;
    --card-foreground: 240 15% 9%;

    --popover: 0 0% 100%;
    --popover-foreground: 240 15% 9%;

    /* Orange as primary (security/warning color) */
    --primary: 25 95% 53%;
    --primary-foreground: 0 0% 100%;
    
    /* Cybersecurity accent colors */
    --cyber-orange: 25 95% 53%;
    --cyber-orange-light: 25 95% 63%;
    --cyber-blue: 217 91% 60%;
    --cyber-green: 142 76% 36%;
    --cyber-red: 0 84% 60%;
    
    /* Neutral grays for cybersecurity theme */
    --secondary: 240 5% 96%;
    --secondary-foreground: 240 6% 10%;

    --muted: 240 5% 96%;
    --muted-foreground: 240 4% 46%;

    --accent: 240 5% 96%;
    --accent-foreground: 240 6% 10%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;

    --border: 240 6% 90%;
    --input: 240 6% 90%;
    --ring: 25 95% 53%;

    --radius: 0.75rem;
    
    /* Custom gradients */
    --gradient-primary: linear-gradient(135deg, hsl(var(--cyber-orange)), hsl(var(--cyber-orange-light)));
    --gradient-cyber: linear-gradient(135deg, hsl(var(--cyber-blue)), hsl(var(--cyber-orange)));
    --gradient-subtle: linear-gradient(180deg, hsl(var(--background)), hsl(var(--muted)));
    
    /* Shadows */
    --shadow-glow: 0 0 40px hsl(var(--cyber-orange) / 0.3);
    --shadow-card: 0 4px 20px hsl(240 6% 10% / 0.1);
    
    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --sidebar-background: 0 0% 98%;

    --sidebar-foreground: 240 5.3% 26.1%;

    --sidebar-primary: 240 5.9% 10%;

    --sidebar-primary-foreground: 0 0% 98%;

    --sidebar-accent: 240 4.8% 95.9%;

    --sidebar-accent-foreground: 240 5.9% 10%;

    --sidebar-border: 220 13% 91%;

    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    /* Dark theme cybersecurity colors */
    --background: 240 15% 6%;
    --foreground: 240 5% 95%;

    --card: 240 10% 8%;
    --card-foreground: 240 5% 95%;

    --popover: 240 10% 8%;
    --popover-foreground: 240 5% 95%;

    --primary: 25 95% 53%;
    --primary-foreground: 240 15% 6%;
    
    /* Dark theme cyber colors */
    --cyber-orange: 25 95% 53%;
    --cyber-orange-light: 25 95% 63%;
    --cyber-blue: 217 91% 70%;
    --cyber-green: 142 76% 46%;
    --cyber-red: 0 84% 70%;

    --secondary: 240 10% 15%;
    --secondary-foreground: 240 5% 95%;

    --muted: 240 10% 15%;
    --muted-foreground: 240 5% 75%;

    --accent: 240 10% 15%;
    --accent-foreground: 240 5% 95%;

    --destructive: 0 84% 65%;
    --destructive-foreground: 240 5% 95%;

    --border: 240 10% 18%;
    --input: 240 10% 18%;
    --ring: 25 95% 53%;
    
    /* Dark mode gradients */
    --gradient-primary: linear-gradient(135deg, hsl(var(--cyber-orange)), hsl(var(--cyber-orange-light)));
    --gradient-cyber: linear-gradient(135deg, hsl(var(--cyber-blue)), hsl(var(--cyber-orange)));
    --gradient-subtle: linear-gradient(180deg, hsl(var(--background)), hsl(var(--muted)));
    
    /* Dark mode shadows */
    --shadow-glow: 0 0 40px hsl(var(--cyber-orange) / 0.4);
    --shadow-card: 0 4px 20px hsl(0 0% 0% / 0.3);
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground font-sans antialiased;
  }
  
  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }
  
  /* Focus styles */
  :focus-visible {
    @apply ring-2 ring-ring ring-offset-2 ring-offset-background outline-none;
  }
  
  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 6px;
  }
  
  ::-webkit-scrollbar-track {
    @apply bg-muted;
  }
  
  ::-webkit-scrollbar-thumb {
    @apply bg-border rounded-full;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    @apply bg-muted-foreground/50;
  }
}

/* Starfield landing page animations */
@layer utilities {
  /* Glow animation for shield icon */
  @keyframes glow {
    0%, 100% {
      filter: drop-shadow(0 0 8px hsl(var(--primary) / 0.6));
      opacity: 1;
    }
    50% {
      filter: drop-shadow(0 0 20px hsl(var(--primary) / 0.8));
      opacity: 0.9;
    }
  }

  .animate-glow {
    animation: glow 3s ease-in-out infinite;
  }

  /* Hide scrollbar utility for category links */
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }

  /* Static space background fallback for reduced motion */
  .static-space-bg {
    background: linear-gradient(
      180deg,
      hsl(240 15% 4%) 0%,
      hsl(240 15% 8%) 50%,
      hsl(240 15% 6%) 100%
    );
  }
}