/**
 * NextStep Design System
 * Unified design language for Web & iOS
 */

:root {
    /* Primary Colors */
    --primary: #6EA8FF;
    --primary-hover: #5A8FE6;
    --primary-light: rgba(110, 168, 255, 0.1);
    --primary-gradient: linear-gradient(135deg, #6EA8FF 0%, #5A8FE6 100%);
    --primary-color: #6EA8FF;
    
    /* Secondary Colors */
    --secondary: #6EA8FF;
    --secondary-hover: #5A8FE6;
    
    /* Accent Colors */
    --accent-pink: #f093fb;
    --accent-gold: #ffd700;
    --accent-purple: #764ba2;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Text Colors */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    
    /* Background */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F3F2EE;
    --bg-tertiary: #F3F2EE;
    --surface-elevated: #FFFFFF;
    --surface: #F9FAFB;
    
    /* Borders */
    --border-color: #e2e8f0;
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --border-radius-full: 9999px;
    
    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    --text-5xl: 3rem;      /* 48px */
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Utility Classes */

/* Gradients */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent-purple) 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-gold) 100%);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-semibold);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-semibold);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Cards */
.card-elevated {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.card-elevated:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

/* Badges */
.badge-primary {
    background: var(--primary);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--border-radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-premium {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #ffed4e 100%);
    color: #1a202c;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--border-radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-in {
    animation: slideIn 0.3s ease;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   DARK MODE - Complete Implementation
   ======================================== */

[data-theme="dark"] {
    /* Dark Mode Primary Colors - Adjusted for better contrast */
    --primary: #6EA8FF;
    --primary-hover: #7BB3FF;
    --primary-light: rgba(110, 168, 255, 0.2);
    --primary-gradient: linear-gradient(135deg, #6EA8FF 0%, #7BB3FF 100%);
    --primary-color: #6EA8FF;
    
    /* Dark Mode Secondary Colors */
    --secondary: #6EA8FF;
    --secondary-hover: #7BB3FF;
    
    /* Dark Mode Text Colors */
    --text-primary: #f9fafb;       /* Light Gray - Main text */
    --text-secondary: #d1d5db;    /* Medium Light Gray - Secondary */
    --text-tertiary: #9ca3af;     /* Light Gray - Tertiary */
    --surface-elevated: #1e293b;
    --surface: #0f172a;
    
    /* Dark Mode Background Colors */
    --bg-primary: #111827;        /* Dark Background - Page */
    --bg-secondary: #1f2937;      /* Dark Surface - Backgrounds */
    --bg-tertiary: #374151;       /* Elevated Dark - Cards */
    
    /* Dark Mode Borders */
    --border-color: #4b5563;      /* Dark Border */
    
    /* Dark Mode Shadows - More pronounced */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Dark Mode Component Overrides */
[data-theme="dark"] .btn-primary {
    background: var(--primary);
    color: #111827; /* Dark text on light button */
    box-shadow: 0 4px 12px rgba(0, 217, 163, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(0, 217, 163, 0.4);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .card-elevated {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .card-elevated:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

[data-theme="dark"] .badge-primary {
    background: var(--primary);
    color: #111827;
}

[data-theme="dark"] .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dark Mode Form Elements */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    background-color: var(--bg-tertiary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 163, 0.1);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-tertiary);
}

/* Dark Mode Links */
[data-theme="dark"] a {
    color: var(--primary);
}

[data-theme="dark"] a:hover {
    color: var(--primary-hover);
}

/* Dark Mode Code/Pre */
[data-theme="dark"] code,
[data-theme="dark"] pre {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --text-3xl: 1.5rem;
        --text-4xl: 1.875rem;
        --text-5xl: 2.25rem;
    }
    
    [data-theme="dark"] {
        /* Mobile dark mode adjustments if needed */
    }
}













