/* ============================================
   AI StudyHub - CSS Variables & Theme System
   ============================================ */

:root {
    /* Primary Colors */
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;

    /* Accent Colors */
    --accent: #06b6d4;
    --accent-light: #67e8f9;
    --accent-dark: #0891b2;

    /* Status Colors */
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    --info: #3b82f6;
    --info-light: #60a5fa;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4f46e5, #7c3aed);
    --gradient-secondary: linear-gradient(135deg, #06b6d4, #3b82f6);
    --gradient-success: linear-gradient(135deg, #10b981, #34d399);
    --gradient-warning: linear-gradient(135deg, #f59e0b, #fb923c);
    --gradient-danger: linear-gradient(135deg, #ef4444, #f97316);
    --gradient-info: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
    --topnav-height: 56px;
    --bottom-toolbar-height: 36px;
    --ai-panel-width: 380px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Z-index */
    --z-sidebar: 100;
    --z-topnav: 200;
    --z-modal: 500;
    --z-context-menu: 600;
    --z-ai-panel: 400;
    --z-toast: 700;
}

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #e2e8f0;
    --bg-active: #dbeafe;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-heavy: rgba(255, 255, 255, 0.9);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --divider: #e5e7eb;

    --scrollbar-bg: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-hover: #94a3b8;

    --card-bg: #ffffff;
    --input-bg: #f8fafc;
    --input-border: #d1d5db;
    --input-focus: var(--primary);

    --code-bg: #f1f5f9;
}

/* ============ DARK THEME ============ */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #334155;
    --bg-active: #1e3a5f;
    --bg-glass: rgba(30, 41, 59, 0.85);
    --bg-glass-heavy: rgba(15, 23, 42, 0.95);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #0f172a;

    --border-color: #334155;
    --border-light: #1e293b;
    --divider: #334155;

    --scrollbar-bg: #1e293b;
    --scrollbar-thumb: #475569;
    --scrollbar-hover: #64748b;

    --card-bg: #1e293b;
    --input-bg: #1e293b;
    --input-border: #475569;
    --input-focus: var(--primary-light);

    --code-bg: #1e293b;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.4);
}
