/* Slideshow CSS - Optimized version */
html, body {
    margin: 0;
    padding: 0;
    background: #000;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.slideshow-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
}

.slide {
    position: absolute;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    z-index: 0;
    transform: scale(0.95);
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    pointer-events: none;
}

.slide.show {
    opacity: 1;
    z-index: 1;
    transform: scale(1);
    pointer-events: auto;
}

.slide img,
.slide video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    background: #000;
}

.slide video {
    width: 100%;
    height: 100%;
}

/* Loading states */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    text-align: center;
    z-index: 10;
}

.loading-spinner {
    border: 4px solid #333;
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error handling */
.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff6b6b;
    font-size: 18px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    z-index: 10;
}

/* Status indicator */
.status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4CAF50;
    z-index: 100;
    animation: pulse 2s infinite;
}

.status-indicator.error {
    background: #f44336;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .slide img,
    .slide video {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
    
    .slide-info {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
        font-size: 14px;
    }
    
    .loading {
        font-size: 18px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
}

/* Performance optimizations */
.slide img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
}

.slide video {
    object-fit: contain;
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .slide img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Error message styling */
.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
    width: 90%;
    max-width: 500px;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.error-content p {
    font-size: 1.2rem;
    line-height: 1.5;
    opacity: 0.8;
    margin: 0;
}

@media (max-width: 768px) {
    .error-content h2 {
        font-size: 1.5rem;
    }
    
    .error-content p {
        font-size: 1rem;
    }
}
