/* Modern Splash Screen Styles */

body fuse-splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 50%, #1e1b4b 100%);
    color: #F9FAFB;
    z-index: 999999;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Background animations container */
body fuse-splash-screen .splash-bg-animations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Floating geometric shapes */
body fuse-splash-screen .splash-shape {
    position: absolute;
    border-radius: 12px;
    opacity: 0.15;
    animation: splash-float 8s ease-in-out infinite;
}

body fuse-splash-screen .shape-1 {
    width: 120px;
    height: 120px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    top: 10%;
    left: 15%;
    animation-duration: 10s;
}

body fuse-splash-screen .shape-2 {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    top: 60%;
    left: 8%;
    border-radius: 50%;
    animation-duration: 7s;
    animation-delay: -2s;
}

body fuse-splash-screen .shape-3 {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    top: 70%;
    right: 15%;
    animation-duration: 9s;
    animation-delay: -1s;
}

body fuse-splash-screen .shape-4 {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.12);
    top: 20%;
    right: 12%;
    animation-duration: 6s;
    animation-delay: -3s;
}

body fuse-splash-screen .shape-5 {
    width: 90px;
    height: 90px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    top: 40%;
    right: 8%;
    border-radius: 50%;
    animation-duration: 8s;
    animation-delay: -4s;
}

body fuse-splash-screen .shape-6 {
    width: 70px;
    height: 70px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    top: 80%;
    left: 30%;
    animation-duration: 7s;
    animation-delay: -1.5s;
}

/* Grid overlay */
body fuse-splash-screen .splash-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: splash-grid-move 25s linear infinite;
}

/* Logo container */
body fuse-splash-screen .splash-logo-container {
    position: relative;
    z-index: 10;
    animation: splash-logo-appear 0.8s ease-out forwards;
}

body fuse-splash-screen .splash-logo-container img {
    width: 280px;
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    animation: splash-logo-pulse 3s ease-in-out infinite;
}

/* Modern loader */
body fuse-splash-screen .splash-loader {
    position: relative;
    z-index: 10;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: splash-loader-appear 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

body fuse-splash-screen .loader-track {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

body fuse-splash-screen .loader-fill {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #818cf8, #c7d2fe, #818cf8);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: splash-loader-slide 1.5s ease-in-out infinite;
}

body fuse-splash-screen .splash-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    margin: 0;
    animation: splash-text-pulse 2s ease-in-out infinite;
}

/* Keyframe animations */
@keyframes splash-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.15;
    }
    25% {
        transform: translateY(-30px) rotate(5deg) scale(1.05);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-50px) rotate(-3deg) scale(1.1);
        opacity: 0.25;
    }
    75% {
        transform: translateY(-20px) rotate(4deg) scale(1.02);
        opacity: 0.18;
    }
}

@keyframes splash-grid-move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

@keyframes splash-logo-appear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes splash-logo-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.4));
    }
}

@keyframes splash-loader-appear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splash-loader-slide {
    0% {
        transform: translateX(-100%);
        background-position: 200% 0;
    }
    50% {
        background-position: 0% 0;
    }
    100% {
        transform: translateX(400%);
        background-position: 200% 0;
    }
}

@keyframes splash-text-pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Hide overflow when splash screen is visible */
body:not(.fuse-splash-screen-hidden) {
    overflow: hidden;
}

/* Hide splash screen */
body.fuse-splash-screen-hidden fuse-splash-screen {
    visibility: hidden;
    opacity: 0;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    body fuse-splash-screen .splash-logo-container img {
        width: 200px;
        max-width: 200px;
    }

    body fuse-splash-screen .loader-track {
        width: 160px;
    }

    body fuse-splash-screen .splash-shape {
        transform: scale(0.7);
    }
}
