/* AI Crypto Arbitrage Platform - Custom Styles */

:root {
    /* Color Palette - Premium Dark Theme */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    
    /* Background Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-glass: rgba(30, 41, 59, 0.7);
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundPulse 10s ease-in-out infinite;
}

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

/* Light Theme Variables */
body.light-theme {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    
    /* Light Background Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-glass: rgba(255, 255, 255, 0.8);
    
    /* Light Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #334155;
    
    /* Light Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body.light-theme::before {
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
}

/* Light theme specific overrides */
body.light-theme .glass-card,
body.light-theme .stat-card,
body.light-theme .chart-container,
body.light-theme .market-ticker-container,
body.light-theme .ai-recommendation {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-theme .table-dark {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

body.light-theme .table-dark thead th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .table-dark tbody tr {
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .table-dark tbody tr:hover {
    background-color: var(--bg-tertiary);
}

body.light-theme .form-control {
    background-color: var(--bg-secondary);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

body.light-theme .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

body.light-theme .btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

body.light-theme .heatmap-day.level-0 {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .timeline::before {
    background: rgba(99, 102, 241, 0.2);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Glass Morphism Card */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Navigation */
.navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-light);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) 0;
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

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

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

.stat-card {
    text-align: center;
    padding: var(--spacing-lg);
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.pricing-card {
    position: relative;
    padding: var(--spacing-xl);
    text-align: center;
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-amount {
    font-size: 3.5rem;
    font-weight: 700;
    margin: var(--spacing-md) 0;
}

.pricing-profit {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: var(--spacing-md);
}

.pricing-features {
    list-style: none;
    margin: var(--spacing-lg) 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.pricing-features li::before {
    content: '✓';
    color: var(--secondary);
    font-weight: 700;
    margin-right: var(--spacing-sm);
    font-size: 1.25rem;
}

/* Form Styles */
.form-control {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

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

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Testimonials */
.testimonial-card {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.testimonial-rating {
    color: var(--accent);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.testimonial-wallet {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { 
        font-size: 2.5rem; 
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    h2 { 
        font-size: 2rem; 
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    h3 {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    h4 {
        font-size: 1.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero h1 { 
        font-size: 2.5rem; 
        word-wrap: break-word;
    }
    .hero p { 
        font-size: 1rem; 
        word-wrap: break-word;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Ensure all text wraps properly */
    p, span, small, li, a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Container adjustments */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Card padding adjustments */
    .card {
        padding: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* Legal content specific */
    .legal-content h2 {
        font-size: 1.5rem !important;
    }
    
    .legal-content h3 {
        font-size: 1.25rem !important;
    }
    
    .legal-content p,
    .legal-content li {
        font-size: 0.95rem;
    }
    
    /* Alert boxes */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .alert h4,
    .alert h5 {
        font-size: 1.1rem !important;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.35rem; }
    h4 { font-size: 1.15rem; }
    
    .hero h1 { font-size: 2rem; }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    .legal-content h2 {
        font-size: 1.35rem !important;
    }
    
    .legal-content h3 {
        font-size: 1.15rem !important;
    }
    
    .legal-content p,
    .legal-content li {
        font-size: 0.9rem;
    }
}


/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.py-5 { padding: var(--spacing-xl) 0; }
