/* Magoods Ultimate - Cyber Loader Styles (Ported from React Frontend) */

/* Overlay Container */
#fullpage-overlay {
    background: #000912 !important;
    /* Cyber dark background */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
    z-index: 9999;
}

#fullpage-overlay.w-hidden {
    display: none !important;
    /* Keep WHMCS hidden class functionality */
}

/* Background Layers */
.loader-bg {
    position: absolute;
    inset: 0;
    background: #000912 !important;
    z-index: 0;
}

.loader-topography {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' fill='none'/%3E%3Cg fill='%2300a8e8' fill-opacity='0.08'%3E%3Cpath d='M0 99h100v1H0zM0 49h100v1H0zM49 0v100h1V0zM99 0v100h1V0z'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
    z-index: 1;
}

.loader-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(0, 168, 232, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 168, 232, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

.loader-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00a8e8, transparent);
    box-shadow: 0 0 10px #00a8e8;
    animation: scan-down 4s ease-in-out infinite;
    z-index: 2;
}

@keyframes scan-down {

    0%,
    100% {
        top: 0;
        opacity: 0;
    }

    10%,
    90% {
        opacity: 1;
    }

    50% {
        top: 100%;
    }
}

/* Wrapper Styles */
#fullpage-overlay .outer-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 10;
    /* Above background */
}

#fullpage-overlay .inner-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    background: transparent !important;
    /* Remove any default white bg */
    box-shadow: none !important;
    padding: 0;
}

/* Logo Animation Styles */
.lazy-loader-logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
}

.lazy-loader-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.4), transparent 70%);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
    pointer-events: none;
}

.lazy-loader-logo-img {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0, 168, 232, 0.6));
    animation: pulse 2s infinite;
}

.lazy-loader-logo-frame::before,
.lazy-loader-logo-frame::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid #00a8e8;
    border-radius: 50%;
    animation: ring-rotate 8s linear infinite;
    pointer-events: none;
}

.lazy-loader-logo-frame::before {
    border-top-color: transparent;
    border-right-color: transparent;
}

.lazy-loader-logo-frame::after {
    border-bottom-color: transparent;
    border-left-color: transparent;
    animation-direction: reverse;
}

@keyframes ring-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.lazy-loader-logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border: 1px solid rgba(0, 168, 232, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
    pointer-events: none;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.05);
    }
}

@keyframes pulse-ring {

    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

/* Text Styles */
#fullpage-overlay .msg {
    color: #e6f6ff;
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 168, 232, 0.5);
    margin-top: 2rem;
    display: block;
}

.glow-text {
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(0, 168, 232, 0.5);
    }

    50% {
        text-shadow: 0 0 20px rgba(0, 168, 232, 0.8), 0 0 10px rgba(0, 168, 232, 0.5);
    }
}