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

/* Definition of the design system. All colors, gradients, fonts, etc should be defined here. 
All colors MUST be HSL.
*/

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: 264 83% 57%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 264 83% 57%;

    --radius: 0.5rem;

    /* Modern gradient colors */
    --gradient-primary: 264 83% 57%;
    --gradient-secondary: 280 100% 70%;
    --gradient-dark-start: 222.2 84% 4.9%;
    --gradient-dark-end: 264 83% 25%;

    --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 {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;

    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;

    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;

    --primary: 264 83% 57%;
    --primary-foreground: 210 40% 98%;

    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;

    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;

    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;

    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 264 83% 57%;

    /* Dark mode gradient colors */
    --gradient-primary: 264 83% 57%;
    --gradient-secondary: 280 100% 70%;
    --gradient-dark-start: 222.2 84% 4.9%;
    --gradient-dark-end: 264 83% 25%;

    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 264 83% 57%;
    --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: 264 83% 57%;
  }

}

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

  body {
    @apply bg-background text-foreground;
  }
}

@layer utilities {
  .bg-gradient-dark {
    background: linear-gradient(
      135deg,
      hsl(var(--gradient-dark-start)) 0%,
      hsl(222.2, 84%, 8%) 25%,
      hsl(264, 83%, 15%) 50%,
      hsl(280, 70%, 20%) 75%,
      hsl(264, 83%, 25%) 100%
    );
  }

  .bg-gradient-primary {
    background: linear-gradient(
      135deg,
      hsl(var(--gradient-primary)) 0%,
      hsl(var(--gradient-secondary)) 100%
    );
  }

  .bg-gradient-mesh {
    background: 
      radial-gradient(at 0% 0%, hsl(264, 83%, 30%) 0px, transparent 50%),
      radial-gradient(at 100% 0%, hsl(280, 100%, 35%) 0px, transparent 50%),
      radial-gradient(at 100% 100%, hsl(264, 83%, 30%) 0px, transparent 50%),
      radial-gradient(at 0% 100%, hsl(240, 100%, 35%) 0px, transparent 50%);
  }

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

  .animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
  }

  .animate-scale-in {
    animation: scaleIn 0.8s ease-out forwards;
  }

  /* Hide scrollbar for horizontal scroll containers */
  .scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
  
  .scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
  }

  @keyframes glow {
    from {
      filter: drop-shadow(0 0 10px hsl(var(--primary)));
    }
    to {
      filter: drop-shadow(0 0 20px hsl(var(--gradient-secondary)));
    }
  }

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

  @keyframes scaleIn {
    from {
      opacity: 0;
      transform: scale(0.9);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  .glass-card {
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    position: relative;
  }

  .glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent
    );
  }
}