/* ====== Loading Overlay - Ramadan Theme with Logo ====== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #0a0e17 50%, #0c1929 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}


/* شعار المطعم */

.loading-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.4);
    animation: logoFloat 0s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.loading-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: logoShine 3s linear infinite;
}

.loading-logo-text {
    font-size: 28px;
    font-weight: 900;
    color: #0a0e17;
    text-align: center;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.loading-logo-text .brand-name {
    display: block;
    font-size: 20px;
    letter-spacing: 1px;
}

.loading-logo-text .brand-tagline {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
}

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes logoShine {
    0% {
        transform: rotate(0deg) translate(-50%, -50%);
    }
    100% {
        transform: rotate(360deg) translate(-50%, -50%);
    }
}


/* رمضان مبارك */

.ramadan-greeting {
    font-size: 36px;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInScale 0s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 2px;
    line-height: 1.4;
}

@keyframes fadeInScale {
    0% {
        opacity: 0.7;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}


/* حاوية الأيقونات */

.loading-icons {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    flex-direction: row-reverse;
}


/* الهلال */

.loading-moon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: -18px 0 0 5px #ffd700;
    animation: moonGlow 2s ease-in-out infinite alternate;
    position: relative;
}

@keyframes moonGlow {
    0% {
        filter: brightness(1) drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
    }
    100% {
        filter: brightness(1.3) drop-shadow(0 0 20px rgba(255, 215, 0, 1));
    }
}


/* النجمة */

.loading-star {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: starRotate 3s linear infinite;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
}

@keyframes starRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* الفانوس */

.loading-lantern {
    width: 35px;
    height: 50px;
    position: relative;
    animation: lanternSwing 2s ease-in-out infinite;
}

.loading-lantern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 12px;
    background: linear-gradient(180deg, #d4af37, rgba(212, 175, 55, 0.5));
}

.loading-lantern::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 0;
    width: 35px;
    height: 38px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #b8860b 100%);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), inset 0 2px 10px rgba(255, 255, 255, 0.3);
    border: 1px solid #d4af37;
}

@keyframes lanternSwing {
    0%,
    100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}


/* Spinner */

.spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 215, 0, 0.2);
    border-top: 5px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* نجوم الخلفية */

.loading-bg-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.loading-bg-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffd700;
    border-radius: 50%;
    animation: twinkle 2s infinite alternate;
}

.loading-bg-star:nth-child(1) {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.loading-bg-star:nth-child(2) {
    top: 20%;
    left: 80%;
    animation-delay: 0.5s;
}

.loading-bg-star:nth-child(3) {
    top: 30%;
    left: 25%;
    animation-delay: 1s;
}

.loading-bg-star:nth-child(4) {
    top: 40%;
    left: 70%;
    animation-delay: 0.3s;
}

.loading-bg-star:nth-child(5) {
    top: 50%;
    left: 10%;
    animation-delay: 0.8s;
}

.loading-bg-star:nth-child(6) {
    top: 60%;
    left: 90%;
    animation-delay: 0.2s;
}

.loading-bg-star:nth-child(7) {
    top: 70%;
    left: 40%;
    animation-delay: 1.2s;
}

.loading-bg-star:nth-child(8) {
    top: 80%;
    left: 60%;
    animation-delay: 0.6s;
}

.loading-bg-star:nth-child(9) {
    top: 15%;
    left: 50%;
    animation-delay: 0.9s;
}

.loading-bg-star:nth-child(10) {
    top: 85%;
    left: 20%;
    animation-delay: 0.4s;
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.5);
    }
}


/* نص التحميل */

.loading-text {
    color: #ffd700;
    font-size: 16px;
    margin-top: 15px;
    animation: pulse 1.5s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}


/* استجابة للشاشات الصغيرة */

@media (max-width: 768px) {
    .loading-logo {
        width: 100px;
        height: 100px;
    }
    .loading-logo-text {
        font-size: 24px;
    }
    .loading-logo-text .brand-name {
        font-size: 18px;
    }
    .loading-logo-text .brand-tagline {
        font-size: 12px;
    }
    .ramadan-greeting {
        font-size: 28px;
        margin-bottom: 25px;
    }
    .loading-icons {
        gap: 18px;
    }
    .loading-moon {
        width: 42px;
        height: 42px;
        box-shadow: -15px 0 0 4px #ffd700;
    }
    .loading-star {
        width: 35px;
        height: 35px;
    }
    .loading-lantern {
        width: 30px;
        height: 42px;
    }
    .spinner {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        width: 85px;
        height: 85px;
        margin-bottom: 15px;
    }
    .loading-logo-text {
        font-size: 20px;
    }
    .loading-logo-text .brand-name {
        font-size: 16px;
    }
    .loading-logo-text .brand-tagline {
        font-size: 11px;
    }
    .ramadan-greeting {
        font-size: 22px;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }
    .loading-icons {
        gap: 12px;
    }
    .loading-moon {
        width: 35px;
        height: 35px;
        box-shadow: -13px 0 0 3px #ffd700;
    }
    .loading-star {
        width: 28px;
        height: 28px;
    }
    .loading-lantern {
        width: 25px;
        height: 38px;
    }
    .loading-lantern::after {
        width: 25px;
        height: 30px;
    }
    .spinner {
        width: 45px;
        height: 45px;
        border-width: 4px;
    }
    .loading-text {
        font-size: 14px;
    }
}