/* ========== صفحة التحميل الأولية (Splash Screen) ========== */

/* الخلفية الشفافة */
.splash-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

/* حاوية صفحة التحميل */
.splash-screen-container {
    text-align: center;
    color: white;
    animation: slideUp 0.5s ease-out;
}

/* تأثير الظهور */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* تأثير الانزلاق لأعلى */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* الشعار */
.splash-logo {
    margin-bottom: 30px;
    animation: scaleIn 0.6s ease-out;
}

/* تأثير التكبير */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* أيقونة الشعار */
.logo-icon {
    width: 100px;
    height: 100px;
    color: white;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
}

/* الدائرة الدوارة */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating-circle {
    animation: rotate 2s linear infinite;
    transform-origin: 50px 50px;
}

/* نص الشعار */
.logo-text {
    animation: pulse 1.5s ease-in-out infinite;
}

/* تأثير النبض */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* عنوان التطبيق */
.splash-title {
    font-size: 32px;
    font-weight: 700;
    margin: 20px 0 10px 0;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 1px;
    animation: fadeInDown 0.7s ease-out 0.2s both;
}

/* تأثير الظهور من الأعلى */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* رسالة التحميل */
.splash-message {
    font-size: 18px;
    margin: 15px 0;
    opacity: 0.95;
    font-family: 'Cairo', sans-serif;
    animation: fadeInUp 0.7s ease-out 0.3s both;
}

/* تأثير الظهور من الأسفل */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* حاوية شريط التقدم */
.progress-bar-container {
    width: 250px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 30px auto;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.7s ease-out 0.4s both;
}

/* شريط التقدم */
.progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
    background-size: 200% 100%;
    animation: progressAnimation 1.5s ease-in-out infinite;
}

/* تأثير حركة شريط التقدم */
@keyframes progressAnimation {
    0% {
        background-position: 200% 0;
    }
    50% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ملء شريط التقدم */
.progress-fill {
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    animation: fillProgress 3s ease-in-out infinite;
}

/* تأثير ملء شريط التقدم */
@keyframes fillProgress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* النص الإضافي */
.splash-subtitle {
    font-size: 14px;
    margin: 15px 0 0 0;
    opacity: 0.85;
    font-family: 'Cairo', sans-serif;
    animation: fadeInUp 0.7s ease-out 0.5s both;
}

/* مؤشر النقاط المتحركة */
.loading-dots {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
    animation: fadeInUp 0.7s ease-out 0.6s both;
}

/* النقطة الواحدة */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: bounce 1.4s infinite;
}

/* تأثير الارتداد */
@keyframes bounce {
    0%, 80%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* تأخير الحركة لكل نقطة */
.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* تأثير الاختفاء */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* الاستجابة للأجهزة الصغيرة */
@media (max-width: 599px) {
    .splash-screen-container {
        padding: 20px;
    }

    .splash-title {
        font-size: 24px;
    }

    .splash-message {
        font-size: 16px;
    }

    .splash-subtitle {
        font-size: 12px;
    }

    .logo-icon {
        width: 80px;
        height: 80px;
    }

    .progress-bar-container {
        width: 200px;
    }
}

/* الاستجابة للأجهزة المتوسطة */
@media (min-width: 600px) and (max-width: 1023px) {
    .splash-title {
        font-size: 28px;
    }

    .splash-message {
        font-size: 17px;
    }

    .logo-icon {
        width: 90px;
        height: 90px;
    }

    .progress-bar-container {
        width: 230px;
    }
}

/* الاستجابة للأجهزة الكبيرة */
@media (min-width: 1024px) {
    .splash-title {
        font-size: 36px;
    }

    .splash-message {
        font-size: 19px;
    }

    .logo-icon {
        width: 110px;
        height: 110px;
    }

    .progress-bar-container {
        width: 280px;
    }
}

/* دعم الوضع الداكن */
@media (prefers-color-scheme: dark) {
    .splash-screen-overlay {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
}

/* دعم RTL (اللغة العربية) */
[dir="rtl"] .splash-screen-container {
    direction: rtl;
}

