/**
 * Unsplash Background System - Required CSS
 * Version: 2.1.0 (Production-Ready)
 * 
 * IMPORTANT: This CSS file must be included manually in your HTML
 * <link rel="stylesheet" href="unsplash-background.css">
 */

/* Container for background images */
.unsplash-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* Individual background images */
.unsplash-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.unsplash-image.active {
    opacity: 1;
}

/* Manual control button */
.unsplash-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.unsplash-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.unsplash-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.unsplash-button:active {
    transform: translateY(0);
}

/* Loading indicator */
.unsplash-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-family: system-ui, -apple-system, sans-serif;
}

.unsplash-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: unsplash-spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes unsplash-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message */
.unsplash-error {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 1000;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    max-width: 400px;
    text-align: center;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .unsplash-image {
        transition: none;
    }
    
    .unsplash-spinner {
        animation: none;
        border-top-color: transparent;
    }
    
    .unsplash-button {
        transition: none;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .unsplash-controls {
        bottom: 15px;
        right: 15px;
    }
    
    .unsplash-button {
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .unsplash-button {
        background: white;
        border: 2px solid black;
        color: black;
    }
    
    .unsplash-loading {
        background: white;
        border: 2px solid black;
        color: black;
    }
}
