/* ==========================================
   Splash Screen Styles
========================================== */

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--body-bg);
    /* استفاده از متغیر پس‌زمینه سایت */
    z-index: 9999;
    /* بالاترین اولویت */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

/* کلاس برای محو کردن لودر */
#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.splash-logo {
    background: var(--accent);
    display: flex;
    border-radius: 30px;
}

.splash-logo-box {
    display: flex;
    padding: 20px;
}

/* استایل لوگو */
.splash-logo img {
    width: 240px;
    /* سایز لوگو */
    height: 240px;
    animation: pulse-logo 2s infinite ease-in-out;
}

/* استایل نام برند */
.splash-brand-name {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--accent);
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(215, 179, 106, 0.3);
}

/* کانتینر نوار پیشرفت */
.splash-progress-container {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
    position: relative;
}

/* نوار پیشرفت متحرک */
.progress-bar {
    height: 100%;
    /* width: 0%; */
    width: 40%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 10px;
    /* انیمیشن پر شدن تدریجی */
    box-shadow: 0 0 10px var(--accent);
    /* animation: fill-progress 2.5s ease-in-out forwards; */
    /* animation: shimmer 1.5s infinite ease-in-out; */
    animation: goAndBack 2.5s infinite ease-in-out;
}

.splash-desc-container {
    display: flex;
    flex-direction: column;
}
.splash-loading-text{
    color: var(--accent);
    animation: pulse-logo 2s infinite ease-in-out;
}

.splash-wait-text{
    font-size: small;
    color: var(--muted);
    animation: pulse-logo 2s infinite ease-in-out;
}


/* انیمیشن رفت و برگشتی (goAndBack) */
@keyframes goAndBack {
    0% {
        transform: translateX(-150%);
        /* opacity: 0; */
    }

    50% {
        transform: translateX(0%);
        /* opacity: 1; */
    }

    100% {
        transform: translateX(-150%);
        /* حرکت به سمت چپ (چون RTL است) یا راست */
        /* opacity: 0; */
    }
}

/* انیمیشن رفت یک طرفه (Shimmer) */

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(250%);
        /* حرکت به سمت چپ (چون RTL است) یا راست */
        opacity: 0;
    }
}

/* انیمیشن نبض زدن لوگو */
@keyframes pulse-logo {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* انیمیشن پر شدن نوار */
@keyframes fill-progress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* ریسپانسیو برای موبایل */
@media (max-width: 560px) {
    .splash-logo img {
        width: 100%;
    }

    .splash-brand-name {
        font-size: 2rem;
    }

    .splash-progress-container {
        width: 150px;
    }
}