/* Performance Optimization CSS */

/* Critical CSS for above-the-fold content */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 300px;
}

/* Lazy loading placeholder */
.lazy-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* Reduce layout shifts */
.table-responsive {
    min-height: 400px;
}

.card {
    min-height: 200px;
}

/* Smooth animations */
* {
    transition: all 0.2s ease-in-out;
}

/* Optimize fonts */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hero-section {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    }
    
    .card {
        background-color: #1a1a1a;
        border-color: #333;
    }
    
    .table {
        color: #fff;
    }
    
    .table-light {
        background-color: #2d2d2d;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-section {
        min-height: 200px;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* Print styles */
@media print {
    .hero-section,
    .btn-group,
    .search-input {
        display: none;
    }
    
    .table {
        font-size: 12px;
    }
    
    .card {
        border: 1px solid #000;
        break-inside: avoid;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .text-muted {
        color: #000 !important;
    }
    
    .btn-outline-primary {
        border-color: #000;
        color: #000;
    }
    
    .table-light {
        background-color: #f8f9fa;
    }
}

/* Focus indicators */
.btn:focus,
.form-control:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.loading-skeleton.text {
    height: 1em;
    margin: 0.5em 0;
}

.loading-skeleton.title {
    height: 1.5em;
    width: 60%;
    margin: 1em 0;
}

.loading-skeleton.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Error states */
.error-state {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.error-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Success states */
.success-state {
    text-align: center;
    padding: 2rem;
    color: #198754;
}

.success-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

