/* Performance Optimizations - Matrix Theme */

/* Loading Animation */
.image-loading {
    position: relative;
    background: linear-gradient(90deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    animation: loading-sweep 2s infinite;
}

.image-loading::after {
    content: 'LOADING...';
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    text-shadow: 0 0 10px #00ff41;
    letter-spacing: 3px;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes loading-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes loading-pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Image fade-in animation */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Blur-up placeholder effect */
.image-placeholder {
    filter: blur(10px);
    transform: scale(1.1);
    transition: filter 0.3s, transform 0.3s;
}

.image-placeholder.loaded {
    filter: blur(0);
    transform: scale(1);
}

/* Low quality image placeholder */
.lqip {
    filter: blur(5px);
    transition: filter 0.3s;
}

.lqip.loaded {
    filter: blur(0);
}

/* Image container */
.image-container {
    position: relative;
    overflow: hidden;
    background-color: #0a0a0a;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Skeleton loader for cards */
.skeleton-loader {
    background: linear-gradient(90deg, #0a0a0a 25%, #1a1a1a 50%, #0a0a0a 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Page loading overlay */
.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.page-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.page-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 65, 0.2);
    border-top-color: #00ff41;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.page-loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 50px));
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    text-shadow: 0 0 10px #00ff41;
    letter-spacing: 2px;
}

/* Optimize image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: opacity;
}

/* Responsive images */
.responsive-image {
    max-width: 100%;
    height: auto;
}

/* Intersection Observer fallback */
.no-js img[loading="lazy"] {
    opacity: 1;
}



