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

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

:root {
  /* Updated color tokens to match course marketplace design brief */
  --background: oklch(1 0 0); /* #ffffff - Clean white background */
  --foreground: oklch(0.35 0.08 200); /* #164e63 - Professional cyan-800 for text */
  --card: oklch(0.98 0.02 200); /* #ecfeff - Soft cyan background for cards */
  --card-foreground: oklch(0.45 0.02 220); /* #475569 - Slate gray for card text */
  --popover: oklch(1 0 0); /* #ffffff - White popover background */
  --popover-foreground: oklch(0.45 0.02 220); /* #475569 - Slate gray for popover text */
  --primary: oklch(0.35 0.08 200); /* #164e63 - Primary cyan-800 for buttons */
  --primary-foreground: oklch(1 0 0); /* #ffffff - White text on primary */
  --secondary: oklch(0.65 0.15 270); /* #8b5cf6 - Violet accent color */
  --secondary-foreground: oklch(1 0 0); /* #ffffff - White text on secondary */
  --muted: oklch(0.96 0.01 220); /* #f1f5f9 - Light slate background */
  --muted-foreground: oklch(0.55 0.02 220); /* #6b7280 - Gray text for muted */
  --accent: oklch(0.65 0.15 270); /* #8b5cf6 - Violet accent */
  --accent-foreground: oklch(1 0 0); /* #ffffff - White text on accent */
  --destructive: oklch(0.55 0.22 35); /* #ea580c - Orange for destructive actions */
  --destructive-foreground: oklch(1 0 0); /* #ffffff - White text on destructive */
  --border: oklch(0.85 0.01 220); /* #d1d5db - Light gray borders */
  --input: oklch(0.98 0.005 220); /* #f9fafb - Very light input background */
  --ring: oklch(0.35 0.08 200 / 0.5); /* Primary color with transparency for focus */
  --chart-1: oklch(0.35 0.08 200); /* Primary cyan */
  --chart-2: oklch(0.65 0.15 270); /* Violet accent */
  --chart-3: oklch(0.55 0.22 35); /* Orange */
  --chart-4: oklch(0.95 0.05 60); /* Light yellow */
  --chart-5: oklch(0.98 0.02 200); /* Light cyan */
  --radius: 0.5rem; /* 8px border radius */
  --sidebar: oklch(1 0 0); /* White sidebar */
  --sidebar-foreground: oklch(0.45 0.02 220); /* Slate text in sidebar */
  --sidebar-primary: oklch(0.35 0.08 200); /* Primary cyan for sidebar */
  --sidebar-primary-foreground: oklch(1 0 0); /* White text on sidebar primary */
  --sidebar-accent: oklch(0.65 0.15 270); /* Violet accent in sidebar */
  --sidebar-accent-foreground: oklch(1 0 0); /* White text on sidebar accent */
  --sidebar-border: oklch(0.85 0.01 220); /* Light border in sidebar */
  --sidebar-ring: oklch(0.35 0.08 200 / 0.2); /* Subtle focus ring in sidebar */
}

.dark {
  /* Updated dark mode tokens to maintain professional appearance */
  --background: oklch(0.15 0.02 220); /* Dark slate background */
  --foreground: oklch(0.95 0.01 200); /* Light cyan text */
  --card: oklch(0.18 0.02 220); /* Slightly lighter dark cards */
  --card-foreground: oklch(0.9 0.01 200); /* Light text on dark cards */
  --popover: oklch(0.15 0.02 220); /* Dark popover */
  --popover-foreground: oklch(0.9 0.01 200); /* Light popover text */
  --primary: oklch(0.95 0.01 200); /* Light primary in dark mode */
  --primary-foreground: oklch(0.15 0.02 220); /* Dark text on light primary */
  --secondary: oklch(0.25 0.02 220); /* Dark secondary */
  --secondary-foreground: oklch(0.95 0.01 200); /* Light text on dark secondary */
  --muted: oklch(0.25 0.02 220); /* Dark muted background */
  --muted-foreground: oklch(0.7 0.01 220); /* Medium gray muted text */
  --accent: oklch(0.25 0.02 220); /* Dark accent */
  --accent-foreground: oklch(0.95 0.01 200); /* Light accent text */
  --destructive: oklch(0.4 0.15 25); /* Darker destructive color */
  --destructive-foreground: oklch(0.65 0.25 25); /* Lighter destructive text */
  --border: oklch(0.25 0.02 220); /* Dark borders */
  --input: oklch(0.25 0.02 220); /* Dark input background */
  --ring: oklch(0.45 0.02 220); /* Medium focus ring */
  --chart-1: oklch(0.5 0.25 270); /* Bright violet for charts */
  --chart-2: oklch(0.7 0.18 160); /* Bright teal */
  --chart-3: oklch(0.75 0.2 70); /* Bright yellow-green */
  --chart-4: oklch(0.65 0.27 300); /* Bright magenta */
  --chart-5: oklch(0.65 0.25 15); /* Bright orange */
  --sidebar: oklch(0.12 0.02 220); /* Darker sidebar */
  --sidebar-foreground: oklch(0.95 0.01 200); /* Light sidebar text */
  --sidebar-primary: oklch(0.5 0.25 270); /* Bright primary in sidebar */
  --sidebar-primary-foreground: oklch(0.95 0.01 200); /* Light text on sidebar primary */
  --sidebar-accent: oklch(0.25 0.02 220); /* Dark sidebar accent */
  --sidebar-accent-foreground: oklch(0.95 0.01 200); /* Light sidebar accent text */
  --sidebar-border: oklch(0.25 0.02 220); /* Dark sidebar border */
  --sidebar-ring: oklch(0.45 0.02 220); /* Medium sidebar focus ring */
}

@theme inline {
  --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 custom styles for course marketplace */
.hero-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.course-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.trust-badge {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.category-chip {
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.category-chip:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.btn-secondary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
