/* Loader Styles */

/* Prevent flashing content before Alpine loads */
[x-cloak] {
    display: none !important;
}

/* Loader Overlay - Fixed & Centered */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.6);
    /* slate-950/60 */
    backdrop-filter: blur(12px);
    display: flex !important;
    /* Force flex to center content */
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

/* Active state controlled by Alpine :class="{ 'active': showLoader }" and x-show */
.loader-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Loader Content Container */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(1);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Logo Container with Neon Glow */
.loader-logo-container {
    width: 120px;
    height: 120px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    margin-bottom: 20px;
    position: relative;
}

/* Spinning Halo */
.loader-logo-container::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #00f3ff;
    border-right-color: #bc13fe;
    animation: spin 2s linear infinite;
}

/* Pulsing Logo */
.loader-logo-container img {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
    animation: pulse 2s infinite;
}

/* Text Fade In */
.loader-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease forwards 0.2s;
}

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

@keyframes pulse {
    50% {
        opacity: .5;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}