/**
 * CSS Variables - Design System
 */

:root {
    /* Colors - Primary */
    --color-primary: #4ecdc4;
    --color-primary-light: #7eddd6;
    --color-primary-dark: #3db9b1;
    --color-primary-rgb: 78, 205, 196;

    /* Colors - Secondary */
    --color-secondary: #ff6b6b;
    --color-secondary-light: #ff9999;
    --color-secondary-dark: #e55555;

    /* Colors - Accent */
    --color-accent: #feca57;
    --color-accent-light: #fed87f;
    --color-accent-dark: #f5b83d;

    /* Colors - Success/Warning/Error */
    --color-success: #26de81;
    --color-success-light: #5ae6a0;
    --color-warning: #fed330;
    --color-warning-light: #fedc5c;
    --color-warning-border: #f59e0b;
    --color-error: #fc5c65;
    --color-error-light: #fd8a90;
    --color-danger: #dc2626;
    --color-danger-light: #f87171;
    --color-danger-border: #b91c1c;

    /* Colors - Neutrals */
    --color-white: #ffffff;
    --color-gray-50: #f8f9fa;
    --color-gray-100: #f1f3f5;
    --color-gray-200: #e9ecef;
    --color-gray-300: #dee2e6;
    --color-gray-400: #ced4da;
    --color-gray-500: #adb5bd;
    --color-gray-600: #868e96;
    --color-gray-700: #495057;
    --color-gray-800: #343a40;
    --color-gray-900: #212529;
    --color-black: #000000;

    /* Colors - Background */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(0, 0, 0, 0.3);
    --bg-overlay: rgba(0, 0, 0, 0.7);

    /* Colors - Text */
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-tertiary: #a0a0a0;
    --text-muted: #6c757d;
    --text-inverse: #1a1a2e;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-family-mono: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;

    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Spacing */
    --spacing-0: 0;
    --spacing-1: 0.25rem;   /* 4px */
    --spacing-2: 0.5rem;    /* 8px */
    --spacing-3: 0.75rem;   /* 12px */
    --spacing-4: 1rem;      /* 16px */
    --spacing-5: 1.25rem;   /* 20px */
    --spacing-6: 1.5rem;    /* 24px */
    --spacing-8: 2rem;      /* 32px */
    --spacing-10: 2.5rem;   /* 40px */
    --spacing-12: 3rem;     /* 48px */
    --spacing-16: 4rem;     /* 64px */

    /* Border Radius */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(78, 205, 196, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 500ms ease;

    /* Z-index layers */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;

    /* Layout */
    --navbar-height: 60px;
    --sidebar-width: 280px;
    --max-content-width: 1200px;
    --bottom-nav-height: 70px;

    /* Safe areas for mobile */
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

/* Dark mode is default, light mode override if needed */
@media (prefers-color-scheme: light) {
    :root.auto-theme {
        --bg-primary: #f8f9fa;
        --bg-secondary: #ffffff;
        --bg-tertiary: #e9ecef;
        --bg-card: rgba(0, 0, 0, 0.03);
        --bg-card-hover: rgba(0, 0, 0, 0.05);
        --bg-input: rgba(0, 0, 0, 0.05);
        --text-primary: #212529;
        --text-secondary: #495057;
        --text-tertiary: #6c757d;
    }
}
