body {
    margin: 0;
}

.loader-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-height: 100vh;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
}

.loader {
    position: relative;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Logo wrapper */
.logo-wrapper {
    position: relative;
    width: 68px;
    height: 86px;
}

/* Main logo */
.sitrep-logo {
    color: #3b82f6;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
    overflow: visible;
}

/* Individual logo pieces */
.logo-piece {
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

/* Piece 1: Bottom-left tip - flies from bottom-left */
.piece-1 {
    animation: flyFromBottomLeft 3s ease-out infinite;
}

/* Piece 2: Bottom-left middle - flies from left */
.piece-2 {
    animation: flyFromLeft 3s ease-out infinite;
    animation-delay: 0.1s;
}

/* Piece 3: Top-right tip - flies from top-right */
.piece-3 {
    animation: flyFromTopRight 3s ease-out infinite;
    animation-delay: 0.05s;
}

/* Piece 4: Top-right middle - flies from right */
.piece-4 {
    animation: flyFromRight 3s ease-out infinite;
    animation-delay: 0.15s;
}

/* Piece 5: Top-left L-connector - flies from top */
.piece-5 {
    animation: flyFromTop 3s ease-out infinite;
    animation-delay: 0.2s;
}

/* Piece 6: Bottom-right L-connector - flies from bottom */
.piece-6 {
    animation: flyFromBottom 3s ease-out infinite;
    animation-delay: 0.25s;
}

/* Flight animations - clean merge, no overshoot */
@keyframes flyFromBottomLeft {
    0% {
        transform: translate(-60px, 60px) scale(0.3) rotate(-45deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    35%, 70% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    85% {
        transform: translate(-30px, 30px) scale(0.5) rotate(-25deg);
        opacity: 0.4;
    }
    100% {
        transform: translate(-60px, 60px) scale(0.3) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes flyFromLeft {
    0% {
        transform: translate(-80px, 0) scale(0.3) rotate(-30deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    35%, 70% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    85% {
        transform: translate(-40px, 0) scale(0.5) rotate(-15deg);
        opacity: 0.4;
    }
    100% {
        transform: translate(-80px, 0) scale(0.3) rotate(-30deg);
        opacity: 0;
    }
}

@keyframes flyFromTopRight {
    0% {
        transform: translate(60px, -60px) scale(0.3) rotate(45deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    35%, 70% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    85% {
        transform: translate(30px, -30px) scale(0.5) rotate(25deg);
        opacity: 0.4;
    }
    100% {
        transform: translate(60px, -60px) scale(0.3) rotate(45deg);
        opacity: 0;
    }
}

@keyframes flyFromRight {
    0% {
        transform: translate(80px, 0) scale(0.3) rotate(30deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    35%, 70% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    85% {
        transform: translate(40px, 0) scale(0.5) rotate(15deg);
        opacity: 0.4;
    }
    100% {
        transform: translate(80px, 0) scale(0.3) rotate(30deg);
        opacity: 0;
    }
}

@keyframes flyFromTop {
    0% {
        transform: translate(0, -70px) scale(0.3) rotate(20deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    35%, 70% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    85% {
        transform: translate(0, -35px) scale(0.5) rotate(10deg);
        opacity: 0.4;
    }
    100% {
        transform: translate(0, -70px) scale(0.3) rotate(20deg);
        opacity: 0;
    }
}

@keyframes flyFromBottom {
    0% {
        transform: translate(0, 70px) scale(0.3) rotate(-20deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    35%, 70% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    85% {
        transform: translate(0, 35px) scale(0.5) rotate(-10deg);
        opacity: 0.4;
    }
    100% {
        transform: translate(0, 70px) scale(0.3) rotate(-20deg);
        opacity: 0;
    }
}

/* Glow effect behind logo */
.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 10% {
        transform: scale(0.3);
        opacity: 0;
    }
    40%, 70% {
        transform: scale(1.3);
        opacity: 1;
    }
    90%, 100% {
        transform: scale(0.3);
        opacity: 0;
    }
}

/* Assembled state pulse */
.sitrep-logo {
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 30% {
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
    }
    50%, 60% {
        filter: drop-shadow(0 0 35px rgba(59, 130, 246, 0.7)) drop-shadow(0 0 60px rgba(59, 130, 246, 0.3));
    }
    80%, 100% {
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
    }
}

/* Loading text */
.loading-text {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #3b82f6;
    animation: textFade 3s ease-in-out infinite;
}

@keyframes textFade {
    0%, 20% {
        opacity: 0;
        transform: translateY(10px);
    }
    40%, 70% {
        opacity: 1;
        transform: translateY(0);
    }
    90%, 100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Add subtle motion blur effect during flight */
@supports (filter: blur(1px)) {
    .piece-1, .piece-2, .piece-3, .piece-4, .piece-5, .piece-6 {
        will-change: transform, opacity;
    }
}
