@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');
@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";

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

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: var(--font-geist-mono);
  --font-heading: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --font-arabic: 'Noto Naskh Arabic', serif;

  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);
  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);
  --radius-3xl: calc(var(--radius) * 2.2);
  --radius-4xl: calc(var(--radius) * 2.6);
}

:root {
  /* Primary Teal-Emerald */
  --primary: oklch(0.48 0.15 165);
  --primary-foreground: oklch(0.99 0 0);

  /* Secondary Gold */
  --secondary: oklch(0.78 0.1 85);
  --secondary-foreground: oklch(0.2 0.05 85);

  /* Background */
  --background: oklch(0.98 0.006 165);
  --foreground: oklch(0.15 0.01 165);

  /* Cards */
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.15 0.01 165);

  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.15 0.01 165);

  /* Muted */
  --muted: oklch(0.96 0.009 165);
  --muted-foreground: oklch(0.5 0.02 165);

  /* Accent */
  --accent: oklch(0.94 0.025 165);
  --accent-foreground: oklch(0.25 0.09 165);

  /* Destructive */
  --destructive: oklch(0.577 0.245 27.325);

  /* Success */
  --success: oklch(0.62 0.16 148);
  --success-foreground: oklch(0.99 0 0);

  /* Warning */
  --warning: oklch(0.75 0.15 65);
  --warning-foreground: oklch(0.2 0.05 65);

  /* Borders */
  --border: oklch(0.92 0.006 165);
  --input: oklch(0.92 0.006 165);
  --ring: oklch(0.48 0.15 165);

  /* Charts */
  --chart-1: oklch(0.48 0.15 165);
  --chart-2: oklch(0.78 0.1 85);
  --chart-3: oklch(0.62 0.16 148);
  --chart-4: oklch(0.75 0.15 65);
  --chart-5: oklch(0.577 0.245 27.325);

  --radius: 0.9rem;

  /* Sidebar */
  --sidebar: oklch(0.99 0.004 165);
  --sidebar-foreground: oklch(0.15 0.01 165);
  --sidebar-primary: oklch(0.48 0.15 165);
  --sidebar-primary-foreground: oklch(0.99 0 0);
  --sidebar-accent: oklch(0.94 0.025 165);
  --sidebar-accent-foreground: oklch(0.25 0.09 165);
  --sidebar-border: oklch(0.92 0.006 165);
  --sidebar-ring: oklch(0.48 0.15 165);
}

.dark {
  --primary: oklch(0.68 0.16 165);
  --primary-foreground: oklch(0.1 0.02 165);

  --secondary: oklch(0.7 0.1 85);
  --secondary-foreground: oklch(0.98 0.01 85);

  --background: oklch(0.13 0.012 165);
  --foreground: oklch(0.95 0.006 165);

  --card: oklch(0.18 0.012 165);
  --card-foreground: oklch(0.95 0.006 165);

  --popover: oklch(0.18 0.012 165);
  --popover-foreground: oklch(0.95 0.006 165);

  --muted: oklch(0.22 0.012 165);
  --muted-foreground: oklch(0.65 0.02 165);

  --accent: oklch(0.22 0.025 165);
  --accent-foreground: oklch(0.9 0.012 165);

  --destructive: oklch(0.704 0.191 22.216);

  --success: oklch(0.68 0.16 148);
  --success-foreground: oklch(0.1 0.02 148);

  --warning: oklch(0.7 0.15 65);
  --warning-foreground: oklch(0.15 0.05 65);

  --border: oklch(0.25 0.012 165);
  --input: oklch(0.25 0.012 165);
  --ring: oklch(0.68 0.16 165);

  --chart-1: oklch(0.68 0.16 165);
  --chart-2: oklch(0.7 0.1 85);
  --chart-3: oklch(0.6 0.14 148);
  --chart-4: oklch(0.7 0.15 65);
  --chart-5: oklch(0.704 0.191 22.216);

  --sidebar: oklch(0.16 0.012 165);
  --sidebar-foreground: oklch(0.95 0.006 165);
  --sidebar-primary: oklch(0.68 0.16 165);
  --sidebar-primary-foreground: oklch(0.1 0.02 165);
  --sidebar-accent: oklch(0.22 0.025 165);
  --sidebar-accent-foreground: oklch(0.9 0.012 165);
  --sidebar-border: oklch(0.25 0.012 165);
  --sidebar-ring: oklch(0.68 0.16 165);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground font-sans;
  }
  html {
    @apply font-sans scroll-smooth;
  }
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
  }
}

/* Arabic text styling */
.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: center;
  line-height: 2.2;
  letter-spacing: 0.02em;
}

/* Custom scrollbar */
@layer utilities {
  .scrollbar-thin {
    scrollbar-width: thin;
  }
  .scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  .scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
  }
  .scrollbar-thin::-webkit-scrollbar-thumb {
    background: oklch(0.8 0.01 145);
    border-radius: 3px;
  }
  .scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: oklch(0.7 0.01 145);
  }
}

/* Pulse animation for recording */
@keyframes recording-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}

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

/* Gradient backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, oklch(0.4 0.1 195), oklch(0.6 0.18 145));
}

.gradient-gold {
  background: linear-gradient(135deg, oklch(0.78 0.1 85), oklch(0.72 0.12 75));
}

.gradient-success {
  background: linear-gradient(135deg, oklch(0.58 0.15 155), oklch(0.65 0.17 145));
}

/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .glass {
  background: rgba(30, 30, 30, 0.7);
}