/* --- START OF FILE loading.css --- */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fondo Azul Profundo con viñeta */
    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Press Start 2P', cursive;
    color: white;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

/* Efecto Scanlines Retro (Líneas horizontales sutiles) */
#loading-screen::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    z-index: 0;
    pointer-events: none;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 85%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Título estilo Arcade */
.loader-title {
    font-size: 28px;
    color: #fbbf24; /* Dorado */
    text-transform: uppercase;
    text-shadow: 
        4px 4px 0px #78350f, /* Sombra dura */
        0 0 20px rgba(251, 191, 36, 0.4); /* Resplandor */
    margin-bottom: 40px;
    letter-spacing: 2px;
    animation: floatTitle 3s ease-in-out infinite;
}

/* Contenedor del Icono SVG */
.loader-icon-container {
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
    filter: drop-shadow(4px 4px 0 rgba(0,0,0,0.5));
    animation: bobbing 2s ease-in-out infinite;
}

/* Barra de Progreso Retro */
.progress-container {
    width: 100%;
    height: 28px;
    background: #0f172a;
    border: 4px solid #fff;
    padding: 3px;
    margin-bottom: 15px;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.5); /* Sombra bloque */
    position: relative;
}

/* Relleno con Rayas Animadas */
#progress-fill {
    width: 0%;
    height: 100%;
    background-color: #3b82f6;
    /* Patrón de rayas diagonales */
    background-image: linear-gradient(
        45deg, 
        rgba(255, 255, 255, 0.15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.15) 75%, 
        transparent 75%, 
        transparent
    );
    background-size: 20px 20px;
    animation: moveStripes 1s linear infinite; /* Animación de las rayas */
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Brillo superior en la barra */
#progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: rgba(255,255,255,0.4);
}

.loading-text {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    min-height: 14px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 #000;
}

/* --- ANIMACIONES --- */

@keyframes floatTitle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(-1deg); }
}

@keyframes bobbing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes moveStripes {
    0% { background-position: 40px 0; }
    100% { background-position: 0 0; }
}