.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #003d7a 0%, #0066cc 50%, #00a8e8 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.6s ease;
    overflow: hidden;
}

.loading-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse-bg 3s ease-in-out infinite;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.water-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 40px;
    position: relative;
    animation: waterDrop 2s ease-in-out infinite;
}

.water-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50% 50% 50% 0;
    transform: translateX(-50%) rotate(-45deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.water-icon::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: ripple 2s ease-out infinite;
}

.loading-spinner-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 35px;
}

.loading-spinner {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    font-family: 'Vazirmatn', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.loading-subtext {
    font-size: 1.1rem;
    opacity: 0.95;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.loading-dots {
    display: inline-block;
    margin-right: 5px;
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    margin: 0 3px;
    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 spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes waterDrop {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes ripple {
    0% {
        width: 30px;
        height: 30px;
        opacity: 0.8;
    }
    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

@keyframes pulse-bg {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    40% {
        transform: translateY(-10px);
        opacity: 1;
    }
}


.water-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") repeat-x;
    animation: wave 10s linear infinite;
    opacity: 0.3;
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1440px;
    }
}

