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

@layer base {
  :root {
    /* macOS Settings Light Mode Colors */
    --background: 0 0% 96.1%;
    --foreground: 0 0% 11.4%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 11.4%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 11.4%;
    --primary: 211 100% 50%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 94.1%;
    --secondary-foreground: 0 0% 11.4%;
    --muted: 0 0% 96.9%;
    --muted-foreground: 240 1% 53.3%;
    --accent: 0 0% 96.9%;
    --accent-foreground: 0 0% 11.4%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 6% 82.2%;
    --input: 240 6% 82.2%;
    --ring: 211 100% 50%;
    --radius: 0.5rem;
  }

  .dark {
    /* macOS Settings Dark Mode Colors */
    --background: 0 0% 11.8%;
    --foreground: 0 0% 100%;
    --card: 0 0% 17.3%;
    --card-foreground: 0 0% 100%;
    --popover: 0 0% 17.3%;
    --popover-foreground: 0 0% 100%;
    --primary: 211 100% 50%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 15.3%;
    --secondary-foreground: 0 0% 100%;
    --muted: 0 0% 19.6%;
    --muted-foreground: 240 2% 59.6%;
    --accent: 0 0% 19.6%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 23.5%;
    --input: 0 0% 23.5%;
    --ring: 212.7 26.8% 83.9%;
  }
}

@layer base {
  * {
    border-color: hsl(var(--border));
  }
  body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-feature-settings: 'rlig' 1, 'calt' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Typography Hierarchy */
  h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.1;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.125rem;
  }

  p {
    line-height: 1.6;
  }

  /* Small text improvements */
  .text-xs {
    line-height: 1.4;
  }

  .text-sm {
    line-height: 1.5;
  }
}

@layer utilities {
  @keyframes shimmer {
    0% {
      background-position: -200% 0;
    }
    100% {
      background-position: 200% 0;
    }
  }

  .animate-shimmer {
    background: linear-gradient(
      90deg,
      hsl(var(--muted)) 0%,
      hsl(var(--muted) / 0.6) 50%,
      hsl(var(--muted)) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
  }

  @keyframes fade-in {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .animate-fade-in {
    animation: fade-in 0.3s ease-out;
  }

  @keyframes slide-in-right {
    from {
      opacity: 0;
      transform: translateX(20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .animate-slide-in-right {
    animation: slide-in-right 0.3s ease-out;
  }
}
