/* LOADING SKELETON STYLES */
.loading-skeleton {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #071658 0%, #0a1d7a 50%, #071658 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-skeleton.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    animation: fadeInScale 0.8s ease-out;
}

/* Logo animado */
.loading-logo {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(255, 182, 3, 0.4));
    animation: logoFloat 3s ease-in-out infinite;
}

/* Spinner circular */
.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 182, 3, 0.2);
    border-top-color: #ffb603;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-circle:nth-child(2) {
    border-top-color: transparent;
    border-right-color: #ffb603;
    animation-duration: 1.5s;
    animation-direction: reverse;
}

/* Mensaje de carga */
.loading-message {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
}

.loading-submessage {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 400;
    text-align: center;
    margin-top: 10px;
    animation: fadeInOut 2s ease-in-out infinite;
}

/* Puntos animados */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background-color: #ffb603;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Barra de progreso opcional */
.loading-progress {
    width: 250px;
    height: 4px;
    background-color: rgba(255, 182, 3, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffb603 0%, #f59e0b 50%, #ffb603 100%);
    background-size: 200% 100%;
    animation: progressSlide 1.5s ease-in-out infinite;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 182, 3, 0.5);
}

/* Animaciones */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

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

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes dotBounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    40% {
        transform: translateY(-10px);
        opacity: 0.7;
    }
}

@keyframes progressSlide {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .loading-logo {
        width: 150px;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
    }

    .loading-message {
        font-size: 1rem;
    }

    .loading-submessage {
        font-size: 0.85rem;
    }

    .loading-progress {
        width: 200px;
    }
}