/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Loading Container */
.loading-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Pulse Circle with Ripple Waves */
.loading-pulse {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Pulse Circle */
.pulse-circle {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    animation: pulse-bounce 1.2s ease-in-out infinite;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Logo in Pulse Circle */
.pulse-circle .loading-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px;
}

/* Text Logo Fallback */
.pulse-circle .loading-logo-text {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

/* Ripple Waves */
.pulse-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(102, 126, 234, 0.8);
    animation: ripple-wave 1.2s ease-out infinite;
}

.pulse-ripple:nth-child(2) {
    animation-delay: 0.3s;
}

.pulse-ripple:nth-child(3) {
    animation-delay: 0.6s;
}

.pulse-ripple:nth-child(4) {
    animation-delay: 0.9s;
}

/* Pulse Bounce Animation */
@keyframes pulse-bounce {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Ripple Wave Animation */
@keyframes ripple-wave {
    0% {
        width: 60px;
        height: 60px;
        opacity: 1;
        border-width: 3px;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
        border-width: 1px;
    }
}

/* Loading Text */
.loading-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    animation: text-fade 1.5s ease-in-out infinite;
}

@keyframes text-fade {
    0%, 100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Loading Dots Animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: dot-bounce 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;
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pulse-circle {
        width: 50px;
        height: 50px;
    }

    .pulse-ripple {
        width: 50px;
        height: 50px;
    }

    @keyframes ripple-wave {
        0% {
            width: 50px;
            height: 50px;
            opacity: 1;
        }

        100% {
            width: 100px;
            height: 100px;
            opacity: 0;
        }
    }

    .loading-text {
        font-size: 14px;
    }
}