/* Preloader Container */
#preloader-moderno {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: #070b19;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#preloader-moderno.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Fondo Animado - Estilo Login */
.preloader-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, #00f2fe 0%, transparent 40%),
                radial-gradient(circle at 80% 80%, #7c3aed 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, #1e1b4b 0%, #070b19 100%);
    background-size: 150% 150%;
    animation: animateBg 12s linear infinite alternate;
}

@keyframes animateBg {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.preloader-shapes {
    position: absolute;
    inset: -100px;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.preloader-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.65;
}

.preloader-blob-1 {
    width: 480px; height: 480px;
    left: -100px; top: -100px;
    background: radial-gradient(circle, #00f2fe, #4facfe);
    animation: floatBlob1 14s ease-in-out infinite;
}

.preloader-blob-2 {
    width: 520px; height: 520px;
    right: -120px; bottom: -120px;
    background: radial-gradient(circle, #8b5cf6, #3b82f6);
    animation: floatBlob2 16s ease-in-out infinite;
}

.preloader-blob-3 {
    width: 320px; height: 320px;
    left: 15%; top: 50%;
    background: radial-gradient(circle, #06b6d4, #6366f1);
    animation: floatBlob3 12s ease-in-out infinite;
}

.preloader-blob-4 {
    width: 280px; height: 280px;
    right: 20%; top: 10%;
    background: radial-gradient(circle, #a855f7, #38bdf8);
    animation: floatBlob4 18s ease-in-out infinite;
}

.preloader-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.25;
    animation: moveGrid 15s linear infinite;
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, -30px) scale(0.9); }
    66% { transform: translate(30px, 50px) scale(1.05); }
}

@keyframes floatBlob3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -40px) scale(1.1); }
}

@keyframes floatBlob4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, 40px) scale(1.15); }
}

@keyframes moveGrid {
    0% { transform: translateY(0); }
    100% { transform: translateY(48px); }
}

/* Spinner Elegante */
.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #00f2fe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Texto de Carga */
.preloader-text {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffffff, #7dd3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseText 1.5s ease-in-out infinite alternate;
}

@keyframes pulseText {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}
