/* ================================================================
   ONE PIECE — Loading Screen
   ================================================================ */

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #142240 0%, #080e1a 70%);
    transition: transform .8s cubic-bezier(.76, 0, .24, 1),
        opacity .8s cubic-bezier(.76, 0, .24, 1);
}

/* ---- Radial glow behind logo ---- */
.loading-screen::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 155, 217, .14) 0%, transparent 70%);
    animation: pulse-glow 2.5s ease-in-out infinite;
}

/* ---- Logo Image ---- */
.loading-logo {
    position: relative;
    animation: logo-entrance 1.2s cubic-bezier(.16, 1, .3, 1) forwards;
}

.loading-logo img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 4px 28px rgba(74, 155, 217, .3)) drop-shadow(0 0 60px rgba(74, 155, 217, .08));
    animation: logo-pulse 2.5s ease-in-out infinite;
}

/* ---- Tagline ---- */
.loading-tagline {
    font-family: 'Inter', sans-serif;
    font-size: .85rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #5e7a9a;
    margin-top: 1.4rem;
    opacity: 0;
    animation: fade-up .8s .6s ease forwards;
}

/* ---- Animated bar ---- */
.loading-bar {
    width: 100px;
    height: 2px;
    margin-top: 2rem;
    background: rgba(15, 26, 46, .5);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    animation: fade-up .6s .9s ease forwards;
}

.loading-bar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #2e6ea3, #6db8f0, #2e6ea3);
    animation: bar-slide 1.8s ease-in-out infinite;
}

/* ---- Exit ---- */
.loading-screen.hide {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* ================================================================
   Keyframes
   ================================================================ */

@keyframes logo-entrance {
    0% {
        opacity: 0;
        transform: scale(.7) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes logo-pulse {

    0%,
    100% {
        filter: drop-shadow(0 4px 28px rgba(74, 155, 217, .3)) drop-shadow(0 0 60px rgba(74, 155, 217, .08));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 8px 40px rgba(74, 155, 217, .45)) drop-shadow(0 0 80px rgba(74, 155, 217, .12));
        transform: scale(1.04);
    }
}

@keyframes fade-up {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: .5;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes bar-slide {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .loading-logo img {
        height: 85px;
    }
}

@media (max-width: 480px) {
    .loading-logo img {
        height: 65px;
    }

    .loading-tagline {
        font-size: .72rem;
        letter-spacing: 3px;
    }
}