/* wwwroot/css/loading.css */

/* Contenedor principal de carga */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.loading-content {
    text-align: center;
    color: white;
}

/* Animación del logo */
.loading-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Spinner moderno */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1.5rem auto;
}

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

/* Barra de progreso */
.loading-progress {
    width: 280px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    margin: 1rem auto;
}

.loading-progress-bar {
    width: 0%;
    height: 4px;
    background-color: white;
    border-radius: 20px;
    animation: progress 2s ease-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* Texto de carga */
.loading-text {
    font-size: 1.2rem;
    margin-top: 1rem;
    opacity: 0.9;
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Para la versión moderna con círculos */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.loader-circles {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.circle {
    position: absolute;
    border-radius: 50%;
    animation: bounce 1.2s ease-in-out infinite;
}

.circle:nth-child(1) {
    width: 40px;
    height: 40px;
    background: #ff6b6b;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.circle:nth-child(2) {
    width: 40px;
    height: 40px;
    background: #4ecdc4;
    bottom: 0;
    left: 0;
    animation-delay: 0.2s;
}

.circle:nth-child(3) {
    width: 40px;
    height: 40px;
    background: #ffe66d;
    bottom: 0;
    right: 0;
    animation-delay: 0.4s;
}

.circle:nth-child(4) {
    width: 40px;
    height: 40px;
    background: #a8e6cf;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    animation-delay: 0.6s;
}

.circle:nth-child(5) {
    width: 40px;
    height: 40px;
    background: #ffd93d;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation-delay: 0.8s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-container {
    width: 300px;
    margin: 2rem auto;
}

.progress-bar-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    overflow: hidden;
    height: 6px;
    position: relative;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #ffe66d);
    border-radius: 30px;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% {
        width: 0%;
        opacity: 0;
    }
    50% {
        width: 70%;
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 0;
    }
}

.loading-message {
    color: white;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-top: 1rem;
}

.progress-percent {
    color: white;
    font-size: 1rem;
    margin-top: 0.5rem;
    font-family: monospace;
}

.animated-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #ffe66d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Versión minimalista */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.neumorphic-loader {
    text-align: center;
}

.loader-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    position: relative;
}

.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: rotate 1.5s ease-in-out infinite;
}

.ring:nth-child(1) {
    border-top-color: #00ff88;
    border-bottom-color: #00ff88;
    animation-delay: 0s;
}

.ring:nth-child(2) {
    border-left-color: #ff3366;
    border-right-color: #ff3366;
    animation-delay: 0.5s;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.brand {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: white;
    margin: 1rem 0;
    opacity: 0.8;
}

.progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 1.5rem auto;
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #ff3366);
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% {
        width: 0%;
        transform: translateX(-100%);
    }
    50% {
        width: 70%;
        transform: translateX(0);
    }
    100% {
        width: 100%;
        transform: translateX(100%);
    }
}

.status {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-family: monospace;
}