/**
 * AIDEX Global Styles - Modern Tech UI
 * Design System: Inspired by Vercel, Linear, Stripe
 * Color Scheme: Cyber Tech Blue/Purple
 */

/* ==================== CSS RESET & BASE ==================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Tech Color Palette - Cyber Blue/Purple Theme */
    --color-bg-primary: #0A0E27;
    --color-bg-secondary: #0F1629;
    --color-bg-tertiary: #1A1F3A;
    --color-bg-elevated: #1E2542;
    
    /* Gradient Backgrounds */
    --color-bg-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --color-bg-gradient-2: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    --color-bg-gradient-3: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    
    /* Primary Colors - Electric Blue */
    --color-primary-50: #E6F0FF;
    --color-primary-100: #CCE1FF;
    --color-primary-200: #99C3FF;
    --color-primary-300: #66A5FF;
    --color-primary-400: #3387FF;
    --color-primary-500: #0069FF;
    --color-primary-600: #0054CC;
    --color-primary-700: #003F99;
    --color-primary-800: #002A66;
    --color-primary-900: #001533;
    
    /* Secondary Colors - Cyber Purple */
    --color-secondary-50: #F3E8FF;
    --color-secondary-100: #E7D1FF;
    --color-secondary-200: #CFA3FF;
    --color-secondary-300: #B775FF;
    --color-secondary-400: #9F47FF;
    --color-secondary-500: #8719FF;
    --color-secondary-600: #6C14CC;
    --color-secondary-700: #510F99;
    --color-secondary-800: #360A66;
    --color-secondary-900: #1B0533;
    
    /* Accent Colors - Neon Cyan */
    --color-accent-50: #E0FCFF;
    --color-accent-100: #C1F9FF;
    --color-accent-200: #83F3FF;
    --color-accent-300: #45EDFF;
    --color-accent-400: #07E7FF;
    --color-accent-500: #00D4E8;
    --color-accent-600: #00AAB8;
    --color-accent-700: #007F8A;
    --color-accent-800: #00555C;
    --color-accent-900: #002A2E;
    
    /* Text Colors */
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #A0AEC0;
    --color-text-tertiary: #718096;
    --color-text-muted: #4A5568;
    
    /* Border Colors */
    --color-border-primary: rgba(255, 255, 255, 0.1);
    --color-border-secondary: rgba(255, 255, 255, 0.05);
    --color-border-accent: rgba(0, 105, 255, 0.3);
    
    /* Status Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #3B82F6;
    
    /* Spacing Scale - 4px 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 */
    --space-20: 5rem;    /* 80px */
    --space-24: 6rem;    /* 96px */
    --space-32: 8rem;    /* 128px */
    
    /* Typography Scale */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --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 */
    --text-6xl: 3.75rem;     /* 60px */
    --text-7xl: 4.5rem;      /* 72px */
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
    
    /* Border Radius */
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.375rem;   /* 6px */
    --radius-lg: 0.5rem;     /* 8px */
    --radius-xl: 0.75rem;    /* 12px */
    --radius-2xl: 1rem;      /* 16px */
    --radius-3xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;
    
    /* 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);
    --shadow-glow: 0 0 20px rgba(0, 105, 255, 0.3);
    --shadow-glow-lg: 0 0 40px rgba(0, 105, 255, 0.4);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 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;
}

/* ==================== GLOBAL STYLES ==================== */

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
}

/* Background Grid Pattern */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 105, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 105, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Selection */
::selection {
    background: var(--color-primary-500);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-600);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-500);
}

/* ==================== TYPOGRAPHY ==================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-bold);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-primary-400);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-300);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-secondary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-cyan {
    background: linear-gradient(135deg, var(--color-accent-400), var(--color-primary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== LAYOUT ==================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-sm { max-width: 640px; }
.container-md { max-width: 768px; }
.container-lg { max-width: 1024px; }
.container-xl { max-width: 1280px; }
.container-2xl { max-width: 1536px; }

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Spacing Utilities */
.section-padding { padding: var(--space-24) 0; }
.section-padding-sm { padding: var(--space-16) 0; }
.section-padding-lg { padding: var(--space-32) 0; }

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: 1;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn:hover::before {
    opacity: 1;
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
    box-shadow: 0 4px 14px rgba(0, 105, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 105, 255, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-secondary-500), var(--color-secondary-600));
    color: white;
    box-shadow: 0 4px 14px rgba(135, 25, 255, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 25, 255, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent-500), var(--color-accent-600));
    color: white;
    box-shadow: 0 4px 14px rgba(0, 212, 232, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--color-border-accent);
    color: var(--color-primary-400);
}

.btn-outline:hover {
    background: rgba(0, 105, 255, 0.1);
    border-color: var(--color-primary-400);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-xl);
}

/* ==================== CARDS ==================== */

.card {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--color-border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-secondary-500));
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
    filter: blur(20px);
}

.card-glow:hover::before {
    opacity: 0.3;
}

/* ==================== BADGES ==================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(0, 105, 255, 0.1);
    color: var(--color-primary-400);
    border: 1px solid rgba(0, 105, 255, 0.2);
}

.badge-secondary {
    background: rgba(135, 25, 255, 0.1);
    color: var(--color-secondary-400);
    border: 1px solid rgba(135, 25, 255, 0.2);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Animation Classes */
.animate-fadeIn { animation: fadeIn 0.6s ease; }
.animate-fadeInUp { animation: fadeInUp 0.8s ease; }
.animate-fadeInDown { animation: fadeInDown 0.8s ease; }
.animate-slideInLeft { animation: slideInLeft 0.8s ease; }
.animate-slideInRight { animation: slideInRight 0.8s ease; }
.animate-scaleIn { animation: scaleIn 0.6s ease; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
        --text-7xl: 3.5rem;
    }
    
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2rem;
        --text-6xl: 2.5rem;
    }
    
    .container {
        padding: 0 var(--space-4);
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .section-padding { padding: var(--space-16) 0; }
    .section-padding-lg { padding: var(--space-20) 0; }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm { padding: var(--space-2) var(--space-3); }
    .btn-lg { padding: var(--space-3) var(--space-6); }
}

/* ==================== UTILITIES ==================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    border-radius: inherit;
}

/* Hidden */
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
