/**
 * Crime Partner — Animation Suite
 * Branded Splash Loader & Micro-interactions
 */

/* Branded Splash Screen Overlay */
.splash-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0b0f19;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(2, 132, 199, 0.15) 0%, rgba(11, 15, 25, 0.95) 70%),
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 32px 32px, 32px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.splash-loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.splash-emblem-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.splash-ring-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed rgba(56, 189, 248, 0.35);
    animation: rotateClockwise 12s linear infinite;
}

.splash-ring-inner {
    position: absolute;
    width: 82%;
    height: 82%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #38bdf8;
    border-bottom-color: #0284c7;
    animation: rotateCounterClockwise 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.splash-core-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.8));
    animation: pulseCore 2s ease-in-out infinite alternate;
}

.splash-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 6px;
}

.splash-title span {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.splash-subtitle {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 24px;
}

.splash-bar-wrap {
    width: 220px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.splash-bar-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    border-radius: 2px;
    animation: sweepProgress 1.6s ease-in-out infinite;
}

/* Keyframes */
@keyframes rotateClockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateCounterClockwise {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes pulseCore {
    from { transform: scale(0.92); opacity: 0.85; }
    to { transform: scale(1.08); opacity: 1; }
}

@keyframes sweepProgress {
    0% { left: -40%; width: 40%; }
    50% { width: 60%; }
    100% { left: 100%; width: 40%; }
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: rotateClockwise 0.8s linear infinite;
    display: inline-block;
}

/* Skeleton Shimmer */
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

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