@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

:root {
  /* Updated to vibrant green color palette inspired by mycelial networks, forest growth, and living ecosystems */
  --background: oklch(0.98 0.01 145);
  --foreground: oklch(0.08 0.02 155);
  --card: oklch(0.99 0.005 145);
  --card-foreground: oklch(0.08 0.02 155);
  --popover: oklch(0.99 0.005 145);
  --popover-foreground: oklch(0.08 0.02 155);
  /* Primary: Vibrant emerald green (living mycelium) */
  --primary: oklch(0.55 0.18 155);
  --primary-foreground: oklch(0.99 0.005 145);
  /* Secondary: Deep forest green (mature growth) */
  --secondary: oklch(0.45 0.12 145);
  --secondary-foreground: oklch(0.99 0.005 145);
  --muted: oklch(0.92 0.02 145);
  --muted-foreground: oklch(0.35 0.04 155);
  /* Accent: Bright lime green (new growth) */
  --accent: oklch(0.72 0.2 135);
  --accent-foreground: oklch(0.08 0.02 155);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.99 0.005 145);
  --border: oklch(0.85 0.03 145);
  --input: oklch(0.85 0.03 145);
  --ring: oklch(0.55 0.18 155);
  --chart-1: oklch(0.55 0.18 155);
  --chart-2: oklch(0.72 0.2 135);
  --chart-3: oklch(0.45 0.12 145);
  --chart-4: oklch(0.65 0.16 165);
  --chart-5: oklch(0.6 0.14 140);
  --radius: 0.625rem;
  --sidebar: oklch(0.98 0.01 145);
  --sidebar-foreground: oklch(0.08 0.02 155);
  --sidebar-primary: oklch(0.55 0.18 155);
  --sidebar-primary-foreground: oklch(0.99 0.005 145);
  --sidebar-accent: oklch(0.92 0.02 145);
  --sidebar-accent-foreground: oklch(0.08 0.02 155);
  --sidebar-border: oklch(0.85 0.03 145);
  --sidebar-ring: oklch(0.55 0.18 155);
}

.dark {
  /* Dark mode with deep forest and bioluminescent green tones */
  --background: oklch(0.15 0.03 155);
  --foreground: oklch(0.95 0.01 145);
  --card: oklch(0.18 0.03 155);
  --card-foreground: oklch(0.95 0.01 145);
  --popover: oklch(0.18 0.03 155);
  --popover-foreground: oklch(0.95 0.01 145);
  --primary: oklch(0.65 0.2 145);
  --primary-foreground: oklch(0.15 0.03 155);
  --secondary: oklch(0.55 0.15 155);
  --secondary-foreground: oklch(0.95 0.01 145);
  --muted: oklch(0.25 0.03 155);
  --muted-foreground: oklch(0.65 0.02 145);
  --accent: oklch(0.75 0.22 135);
  --accent-foreground: oklch(0.15 0.03 155);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.95 0.01 145);
  --border: oklch(0.25 0.03 155);
  --input: oklch(0.25 0.03 155);
  --ring: oklch(0.65 0.2 145);
  --chart-1: oklch(0.65 0.2 145);
  --chart-2: oklch(0.75 0.22 135);
  --chart-3: oklch(0.55 0.15 155);
  --chart-4: oklch(0.7 0.18 165);
  --chart-5: oklch(0.6 0.16 140);
  --sidebar: oklch(0.18 0.03 155);
  --sidebar-foreground: oklch(0.95 0.01 145);
  --sidebar-primary: oklch(0.65 0.2 145);
  --sidebar-primary-foreground: oklch(0.15 0.03 155);
  --sidebar-accent: oklch(0.25 0.03 155);
  --sidebar-accent-foreground: oklch(0.95 0.01 145);
  --sidebar-border: oklch(0.25 0.03 155);
  --sidebar-ring: oklch(0.65 0.2 145);
}

@theme inline {
  /* optional: --font-sans, --font-serif, --font-mono if they are applied in the layout.tsx */
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
  /* Added smooth scroll behavior for anchor links */
  html {
    scroll-behavior: smooth;
  }
}

/* Punk zine styling utilities */
.punk-border {
  border: 3px solid black;
  box-shadow: 4px 4px 0 black;
}

.punk-text {
  font-family: 'Courier New', Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Loading animation for generation */
@keyframes pulse-punk {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse-punk {
  animation: pulse-punk 1.5s ease-in-out infinite;
}

/* Xerox texture overlay */
.xerox-texture {
  position: relative;
}

.xerox-texture::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  mix-blend-mode: multiply;
}
