/* ===== PANTALLA DE CARGA - JYS COMPUTER ===== */

/* Contenedor principal de carga */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Logo de carga con animación de flotación */
.loading-logo {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #FFD700 0%, #FFC000 100%);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    animation: float 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Icono dentro del logo */
.loading-logo::before {
    content: '';
    width: 60px;
    height: 60px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23000"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>') no-repeat center;
    background-size: contain;
    animation: pulse 2s ease-in-out infinite;
}

/* Animación de flotación */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
        box-shadow: 0 12px 40px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: translateY(-5px) rotate(0deg);
        box-shadow: 0 10px 36px rgba(255, 215, 0, 0.35);
    }
    75% {
        transform: translateY(-15px) rotate(-2deg);
        box-shadow: 0 14px 44px rgba(255, 215, 0, 0.45);
    }
}

/* Animación de pulso para el icono */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Texto de carga */
.loading-text {
    margin-top: 30px;
    color: #FFD700;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    animation: fadeInOut 2s ease-in-out infinite;
}

/* Animación de aparición/desaparición del texto */
@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.7;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Puntos de carga */
.loading-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0s;
}

/* Animación de rebote para los puntos */
@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Barra de progreso */
.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFC000);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.loading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Efecto shimmer en la barra de progreso */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Mensaje de estado */
.loading-status {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
    min-height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .loading-logo {
        width: 100px;
        height: 100px;
    }
    
    .loading-logo::before {
        width: 50px;
        height: 50px;
    }
    
    .loading-text {
        font-size: 1rem;
    }
    
    .loading-progress {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        width: 80px;
        height: 80px;
    }
    
    .loading-logo::before {
        width: 40px;
        height: 40px;
    }
    
    .loading-text {
        font-size: 0.9rem;
    }
    
    .loading-progress {
        width: 120px;
    }
}

/* Variantes de animación */
.loading-screen.variant-2 .loading-logo {
    animation: float 4s ease-in-out infinite, glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    }
    to {
        box-shadow: 0 8px 32px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.4);
    }
}

/* Animación de entrada */
.loading-screen.entering {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación de salida */
.loading-screen.exiting {
    animation: slideOut 0.5s ease-in;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}
