*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#pantalla-carga {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 60% 30%, #0d2240 0%, #0a1628 45%, #0d0914 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ecf0f1;
    z-index: 9999;
    transition: opacity 0.6s ease-out;
    overflow: hidden;
}

#pantalla-carga::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(157, 78, 221, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(123, 44, 191, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(157, 78, 221, 0.6);
    border-radius: 50%;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

.contenedor-central {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 1;
}

.logo-carga {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 20px;
    text-shadow:
        0 0 30px rgba(157, 78, 221, 0.5),
        0 0 60px rgba(157, 78, 221, 0.2);
    animation: glow-pulse 2.5s ease-in-out infinite;
}

.logo-carga span {
    color: #9d4edd;
}

@keyframes glow-pulse {
    0%, 100% { text-shadow: 0 0 30px rgba(157, 78, 221, 0.4), 0 0 60px rgba(157, 78, 221, 0.15); }
    50%       { text-shadow: 0 0 50px rgba(157, 78, 221, 0.8), 0 0 100px rgba(157, 78, 221, 0.35); }
}

.logo-imagen-carga {
    width: 110px;
    height: 110px;
    margin-bottom: 28px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(157, 78, 221, 0.2),
        0 0 20px rgba(157, 78, 221, 0.25),
        0 0 50px rgba(123, 44, 191, 0.15);
    animation: logo-glow 2.5s ease-in-out infinite;
}

@keyframes logo-glow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(157, 78, 221,0.2), 0 0 20px rgba(157, 78, 221,0.25), 0 0 50px rgba(123, 44, 191,0.15); }
    50%       { box-shadow: 0 0 0 1px rgba(157, 78, 221,0.5), 0 0 35px rgba(157, 78, 221,0.5),  0 0 80px rgba(123, 44, 191,0.3); }
}

.logo-imagen-carga img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.soundwave-animacion {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 60px;
    margin-bottom: 28px;
}

.bar-audio {
    width: 10px;
    border-radius: 10px;
    animation: bounce 1s ease-in-out infinite;
}

.bar-audio:nth-child(1) { height: 15px; animation-delay: 0.0s; background: #0099cc; }
.bar-audio:nth-child(2) { height: 35px; animation-delay: 0.15s; background: #00b3e6; }
.bar-audio:nth-child(3) { height: 50px; animation-delay: 0.3s;  background: #9d4edd; }
.bar-audio:nth-child(4) { height: 60px; animation-delay: 0.45s; background: #33d4ff; }
.bar-audio:nth-child(5) { height: 50px; animation-delay: 0.6s;  background: #9d4edd; }
.bar-audio:nth-child(6) { height: 35px; animation-delay: 0.75s; background: #00b3e6; }
.bar-audio:nth-child(7) { height: 15px; animation-delay: 0.9s;  background: #0099cc; }

@keyframes bounce {
    0%, 100% { transform: scaleY(1);   opacity: 1; }
    50%       { transform: scaleY(0.3); opacity: 0.6; }
}

.barra-progreso-wrapper {
    width: 220px;
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.barra-progreso {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0066aa, #9d4edd, #66e0ff);
    border-radius: 10px;
    animation: progresar 7s ease-in-out forwards;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.8);
}

@keyframes progresar {
    0%   { width: 0%; }
    60%  { width: 80%; }
    85%  { width: 90%; }
    100% { width: 100%; }
}

.status-carga {
    font-size: 0.9rem;
    color: rgba(230, 230, 230, 0.7);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulso-texto 1.5s infinite;
}

@keyframes pulso-texto {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 1; }
}
