/**
 * BestFreeAITools.io - Premium Design Tokens
 * FlowSync-inspired dark mode SaaS aesthetic
 * Version: 2.0.0
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================
   BASE DARK MODE (Default)
   ============================================ */
:root {
    /* === BRAND COLORS === */
    --brand-primary: #a855f7;
    --brand-primary-light: #c084fc;
    --brand-primary-dark: #7c3aed;
    --brand-secondary: #3b82f6;
    --brand-secondary-light: #60a5fa;
    --brand-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --brand-gradient-hover: linear-gradient(135deg, #c084fc 0%, #60a5fa 100%);

    /* === BACKGROUND LAYERS === */
    --bg-base: #0a0a0f;
    --bg-gradient: linear-gradient(180deg, #0f0f1a 0%, #0a0a0f 50%, #080810 100%);
    --bg-surface: rgba(17, 17, 27, 0.95);
    --bg-surface-solid: #11111b;
    --bg-surface-hover: rgba(25, 25, 40, 0.95);
    --bg-elevated: rgba(30, 30, 50, 0.8);
    --bg-input: rgba(15, 15, 25, 0.8);

    /* === GLASSMORPHISM === */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --glass-blur: 12px;

    /* === TEXT COLORS === */
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --text-inverse: #0f172a;

    /* === ACCENT COLORS === */
    --accent-success: #10b981;
    --accent-success-light: #34d399;
    --accent-warning: #f59e0b;
    --accent-warning-light: #fbbf24;
    --accent-error: #ef4444;
    --accent-error-light: #f87171;
    --accent-info: #06b6d4;
    --accent-info-light: #22d3ee;

    /* === BADGE COLORS === */
    --badge-free: #10b981;
    --badge-freemium: #3b82f6;
    --badge-paid: #a855f7;
    --badge-featured: #f59e0b;
    --badge-verified: #3b82f6;
    --badge-trending: #ef4444;
    --badge-new: #06b6d4;
    --badge-live: #10b981;

    /* === GLOW EFFECTS === */
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.3);
    --glow-purple-intense: 0 0 30px rgba(168, 85, 247, 0.5);
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
    --glow-green: 0 0 15px rgba(16, 185, 129, 0.25);
    --glow-amber: 0 0 15px rgba(245, 158, 11, 0.25);

    /* === SHADOWS === */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 4px 24px rgba(168, 85, 247, 0.15);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);

    /* === BORDERS === */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    --border-focus: rgba(168, 85, 247, 0.5);

    /* === TYPOGRAPHY === */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --text-display: 3.5rem;
    --text-h1: 2.5rem;
    --text-h2: 2rem;
    --text-h3: 1.5rem;
    --text-h4: 1.25rem;
    --text-body: 1rem;
    --text-sm: 0.875rem;
    --text-xs: 0.75rem;
    --text-2xs: 0.6875rem;

    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;

    --leading-tight: 1.2;
    --leading-snug: 1.35;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;

    /* === SPACING === */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* === LAYOUT === */
    --container-max: 1320px;
    --container-narrow: 960px;
    --container-xs: 640px;
    --container-padding: 24px;
    --sidebar-width: 280px;

    /* === BORDER RADIUS === */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* === TRANSITIONS === */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* === Z-INDEX === */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
    --z-toast: 500;
}

/* ============================================
   LIGHT MODE (Toggle)
   ============================================ */
[data-theme="light"] {
    /* === BACKGROUND LAYERS === */
    --bg-base: #f8fafc;
    --bg-gradient: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    --bg-surface: rgba(255, 255, 255, 0.95);
    --bg-surface-solid: #ffffff;
    --bg-surface-hover: rgba(248, 250, 252, 0.95);
    --bg-elevated: rgba(255, 255, 255, 0.9);
    --bg-input: rgba(255, 255, 255, 0.9);

    /* === GLASSMORPHISM === */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-border-hover: rgba(0, 0, 0, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.5);

    /* === TEXT COLORS === */
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --text-inverse: #f8fafc;

    /* === SHADOWS === */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 4px 24px rgba(168, 85, 247, 0.1);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);

    /* === BORDERS === */
    --border-subtle: rgba(0, 0, 0, 0.04);
    --border-default: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);

    /* === GLOW EFFECTS (Lighter for light mode) === */
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.15);
    --glow-purple-intense: 0 0 30px rgba(168, 85, 247, 0.25);
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
    --glow-green: 0 0 15px rgba(16, 185, 129, 0.15);
    --glow-amber: 0 0 15px rgba(245, 158, 11, 0.15);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Colors */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.text-dim {
    color: var(--text-dim);
}

.text-brand {
    color: var(--brand-primary);
}

.text-success {
    color: var(--accent-success);
}

.text-warning {
    color: var(--accent-warning);
}

.text-error {
    color: var(--accent-error);
}

/* Text Gradient */
.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Background Utilities */
.bg-base {
    background: var(--bg-base);
}

.bg-surface {
    background: var(--bg-surface);
}

.bg-elevated {
    background: var(--bg-elevated);
}

.bg-gradient {
    background: var(--bg-gradient);
}

.bg-brand-gradient {
    background: var(--brand-gradient);
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

/* Glow Effects */
.glow-purple {
    box-shadow: var(--glow-purple);
}

.glow-blue {
    box-shadow: var(--glow-blue);
}

.glow-green {
    box-shadow: var(--glow-green);
}

/* Focus States */
.focus-ring:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--border-focus);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}