/* Modal de Carga - Internet Lento - Estilo Compatible */
.loading-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(9, 255, 0, 0.2);
    text-align: center;
    max-width: 520px;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(9, 255, 0, 0.15);
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dino-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    perspective: 1000px;
}

.dino-icon {
    width: 140px;
    height: 90px;
    animation: dino-jump 0.6s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(9, 255, 0, 0.2));
}

/* Alias para pesa (mismo estilo) */
.pesa-icon {
    width: 100px;
    height: 70px;
    animation: dino-jump 0.6s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(9, 255, 0, 0.2));
}

@keyframes dino-jump {
    0%, 100% {
        transform: translateY(0) scaleX(1);
    }
    25% {
        transform: translateY(-15px) scaleX(1);
    }
    50% {
        transform: translateY(-20px) scaleX(1.05);
    }
    75% {
        transform: translateY(-10px) scaleX(0.95);
    }
}

.loading-spinner {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top: 5px solid #09ff00;
    border-right: 5px solid #00cc00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(9, 255, 0, 0.3);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-modal h2 {
    color: #000;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #09ff00, #00cc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-modal p {
    color: #333;
    font-size: 15px;
    margin: 8px 0;
    line-height: 1.6;
    font-weight: 700;
}

.loading-modal .message {
    color: #000;
    font-weight: 800;
    font-size: 16px;
    margin-top: 18px;
    padding: 12px 16px;
    background: rgba(9, 255, 0, 0.08);
    border-left: 4px solid #09ff00;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animación de pulso para el mensaje */
.pulse-text {
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* Variante compacta para formularios pequeños */
.loading-modal.compact {
    padding: 35px 30px;
    max-width: 420px;
}

.loading-modal.compact h2 {
    font-size: 20px;
    margin: 0 0 10px 0;
}

.loading-modal.compact p {
    font-size: 13px;
}

.loading-modal.compact .message {
    font-size: 14px;
    padding: 10px 12px;
    margin-top: 12px;
}

.loading-spinner.small {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #09ff00;
    border-right: 3px solid #00cc00;
    margin-bottom: 15px;
}

/* Responsive para móviles */
@media (max-width: 600px) {
    .loading-modal {
        padding: 35px 25px;
        max-width: 90vw;
    }

    .dino-icon {
        width: 110px;
        height: 70px;
    }

    .loading-modal h2 {
        font-size: 18px;
        letter-spacing: 1px;
        margin-bottom: 10px;
    }

    .loading-modal p {
        font-size: 13px;
    }

    .loading-spinner {
        width: 55px;
        height: 55px;
        border: 4px solid rgba(0, 0, 0, 0.1);
        border-top: 4px solid #09ff00;
        border-right: 4px solid #00cc00;
    }

    .loading-modal .message {
        font-size: 13px;
        margin-top: 15px;
        padding: 10px 12px;
    }
}

/* Variante oscura si el fondo es claro */
.loading-modal-overlay.dark-mode {
    background: rgba(0, 0, 0, 0.85);
}

.loading-modal-overlay.dark-mode .loading-modal {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid rgba(9, 255, 0, 0.3);
}

.loading-modal-overlay.dark-mode .loading-modal h2 {
    color: #fff;
}

.loading-modal-overlay.dark-mode .loading-modal p {
    color: #e0e0e0;
}

.loading-modal-overlay.dark-mode .dino-icon {
    filter: drop-shadow(0 4px 12px rgba(9, 255, 0, 0.35));
}
