/**
 * Johnny Mozart Loading Animation Styles
 * Elegant, classic literature inspired loading screen
 */

#jm-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F5F1E8 0%, #FFFEF0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}

#jm-loading-overlay.jm-loaded {
    opacity: 0;
    pointer-events: none;
}

.jm-loading-content {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}

/* Gallery Image Display */
.jm-gallery-image-container {
    position: relative;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: jm-image-entrance 1s ease-out;
}

.jm-gallery-image {
    max-width: 280px;
    max-height: 280px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 4px solid #D4AF37;
    animation: jm-image-float 3s ease-in-out infinite;
    object-fit: cover;
    background-color: #9B8B76;
    min-width: 200px;
    min-height: 200px;
}

.jm-image-frame {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    pointer-events: none;
    animation: jm-frame-pulse 2s ease-in-out infinite;
}

@keyframes jm-image-entrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes jm-image-float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes jm-frame-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Title */
.jm-loading-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3rem;
    font-weight: 700;
    color: #1A1918;
    margin: 0 0 2rem 0;
    letter-spacing: -0.02em;
    animation: jm-fade-in 1s ease-out;
}

/* Literary Icons */
.jm-literary-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    height: 60px;
}

.jm-icon {
    font-size: 2.5rem;
    animation: jm-icon-float 2s ease-in-out infinite;
    display: inline-block;
    filter: grayscale(30%) sepia(20%);
    opacity: 0.85;
}

.jm-icon:nth-child(1) {
    animation-delay: 0s;
}

.jm-icon:nth-child(2) {
    animation-delay: 0.3s;
}

.jm-icon:nth-child(3) {
    animation-delay: 0.6s;
}

.jm-icon:nth-child(4) {
    animation-delay: 0.9s;
}

.jm-icon:nth-child(5) {
    animation-delay: 1.2s;
}

@keyframes jm-icon-float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-12px) scale(1.1);
        opacity: 1;
    }
}

/* Loading Bar */
.jm-loading-bar {
    width: 100%;
    height: 3px;
    background-color: #9B8B76;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2rem;
    animation: jm-fade-in 1s ease-out 0.4s backwards;
}

.jm-loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #D4AF37, #6B2737, #D4AF37);
    background-size: 200% 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease-out;
    animation: jm-shimmer 2s linear infinite;
}

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

@keyframes jm-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .jm-loading-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .jm-gallery-image {
        max-width: 200px;
        max-height: 200px;
    }
    
    .jm-literary-icons {
        gap: 1rem;
        height: 50px;
    }
    
    .jm-icon {
        font-size: 2rem;
    }
}
