/* 1. الخطوط الأساسية */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;700;900&display=swap');

body { 
    font-family: 'Tajawal', sans-serif; 
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

/* 2. تحسين النوافذ المنبثقة (Modals) */
.modal { 
    opacity: 0; 
    pointer-events: none; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex !important; /* نستخدم الفليكس للتوسيط دائماً */
    visibility: hidden;
}

.modal.active { 
    opacity: 1; 
    pointer-events: auto; 
    visibility: visible;
    backdrop-filter: blur(12px);
}

/* تأثير التكبير البسيط عند ظهور النافذة */
.modal > div {
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active > div {
    transform: scale(1) translateY(0);
}

/* 3. تأثير الاختيار في قائمة الحجز (Booking UI) */
.booking-item, .extra-item {
    transition: all 0.3s ease;
}

/* تحريك النقطة الذهبية داخل الراديو */
.radio-dot div {
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.radio-dot div:not(.opacity-0) {
    transform: scale(1);
}

/* 4. تأثير النص اللامع (Shimmer Effect) */
.text-shimmer {
    background: linear-gradient(90deg, #ca8a04 0%, #fff 50%, #ca8a04 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* 5. تخصيص شريط التمرير (Custom Scrollbar) */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #ca8a04;
    border-radius: 10px;
}

/* 6. حركة القائمة الجانبية للموبايل */
.mobile-menu { 
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
    transform: translateX(100%); 
    opacity: 0;
}

.mobile-menu.open { 
    transform: translateX(0); 
    opacity: 1;
}

/* 7. الإشعارات (Toasts) */
#toast-container { 
    position: fixed; 
    top: 20px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000; 
}

.toast-card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(202, 138, 4, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 50px; /* شكل كبسولة فخم */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    backdrop-filter: blur(10px);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 8. تأثيرات عامة للفخامة */
.cinematic-bg {
    filter: brightness(0.5) contrast(1.1);
}

.text-shadow-glow {
    text-shadow: 0 0 20px rgba(202, 138, 4, 0.5);
}

/* منع التحديد العشوائي للنصوص على الأزرار */
button, .cursor-pointer {
    user-select: none;
}
#progress-bar-fill {
    box-shadow: 0 0 20px rgba(202, 138, 4, 0.4);
    position: relative;
}

/* إضافة لمعة متحركة فوق الشريط */
#progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: liquid-shine 2s infinite;
}

@keyframes liquid-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 9. تأثيرات الطابور والعداد */
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* تأثير النبض للعداد */
@keyframes countdown-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

.countdown-alert {
    animation: countdown-pulse 1s ease-in-out infinite;
}

/* تأثير التحذير عند 5 دقائق */
@keyframes warning-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 rgba(202, 138, 4, 0);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(202, 138, 4, 0.6);
    }
}

.warning-active {
    animation: warning-blink 1.5s ease-in-out infinite;
}

/* تأثير شريط التقدم */
.progress-glow {
    box-shadow: 0 0 15px rgba(202, 138, 4, 0.5);
}

/* تحسين اختيار الراديو في modal الخروج */
input[type="radio"]:checked {
    background-color: #dc2626;
    border-color: #dc2626;
}

input[type="radio"]:checked + span {
    color: #fca5a5;
}

/* تأثير الـ fade out للتوست */
.fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}
/* تأثير اللمعان الذهبي المتحرك */
.animate-gold-text {
    background: linear-gradient(
        to right,
        #ca8a04 20%,
        #fef08a 40%,
        #fef08a 60%,
        #ca8a04 80%
    );
    background-size: 200% auto;
    color: #ca8a04;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine-text 3s linear infinite;
}

@keyframes shine-text {
    to {
        background-position: 200% center;
    }
}

/* تأثير التنفس البسيط (تكبير وتصغير ناعم جداً) */
.animate-breathe {
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
/* === إصلاح شكل اختيار الخدمات الإضافية === */

/* 1. تلوين المربع عند التحديد */
.extra-checkbox:checked+div .checkbox-indicator {
    background-color: #ca8a04 !important;
    /* لون ذهبي */
    border-color: #ca8a04 !important;
}

/* 2. إظهار علامة الصح */
.extra-checkbox:checked+div .checkbox-indicator i {
    opacity: 1 !important;
}

/* 3. تلوين الإطار الخارجي */
.extra-checkbox:checked~.selection-border {
    border-color: rgba(202, 138, 4, 0.5) !important;
    background-color: rgba(202, 138, 4, 0.05);
}
/* =========================================
   تصميم المتجر المدمج (Compact Store)
   ========================================= */

#store-section {
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.store-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px; /* زوايا أصغر */
    padding: 10px; /* حواف داخلية صغيرة جداً */
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.store-card:active {
    transform: scale(0.98); /* تأثير ضغط بسيط عند اللمس */
    border-color: rgba(202, 138, 4, 0.4);
}

/* تصغير الصورة بشكل كبير */
.store-product-img {
    height: 80px; /* كانت 180px في السابق! */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 5px;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5));
}

/* عنوان المنتج */
.product-title {
    font-size: 0.8rem; /* خط صغير */
    color: #e5e5e5;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* السعر */
.price-tag {
    font-size: 0.9rem;
    color: #fbbf24;
    font-weight: 900;
    margin: 2px 0;
}

/* زر الشراء الصغير */
.btn-buy-mini {
    background: #ca8a04;
    color: black;
    font-size: 0.75rem; /* خط صغير جداً */
    font-weight: bold;
    border-radius: 6px;
    padding: 4px 0;
    width: 100%;
    border: none;
    margin-top: 5px;
}
/* =========================================
   تصميم نافذة تفاصيل المنتج (Product Modal)
   ========================================= */

/* الخلفية السوداء الشفافة */
#product-modal {
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

/* الكارت الكبير داخل النافذة */
.modal-content {
    background: linear-gradient(145deg, #1a1a1a, #000000);
    border: 1px solid rgba(202, 138, 4, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#product-modal.active .modal-content {
    transform: scale(1); /* تأثير التكبير عند الفتح */
}

/* الصورة الكبيرة */
#modal-img {
    filter: drop-shadow(0 20px 20px rgba(0,0,0,0.6));
    max-height: 250px; /* تحديد أقصى ارتفاع */
}
/* =========================================
   تأثيرات بطاقات العضوية الفاخرة
   ========================================= */

/* 1. البطاقة الأساسية (Base Card) */
.member-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 220px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: all 0.5s ease;
    transform-style: preserve-3d;
}

/* لمعة متحركة فوق البطاقة */
.member-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255,255,255,0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: card-shine 6s infinite;
    pointer-events: none;
}

@keyframes card-shine {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

/* 2. خامة العميل العادي (Guest - Dark Luxury) */
.card-guest {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid rgba(202, 138, 4, 0.3);
}

/* 3. خامة الفضة (Silver) */
.card-silver {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
    color: #1a1a1a !important;
    border: 1px solid rgba(255,255,255,0.2);
}
.card-silver .text-gold { color: #2c3e50 !important; } /* تغيير لون النص ليتناسب */

/* 4. خامة الذهب (Gold) */
.card-gold {
    background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    color: #4a3b00 !important;
    border: 1px solid #ffd700;
    box-shadow: 0 0 30px rgba(202, 138, 4, 0.4);
}
.card-gold .text-gold { color: #5c4002 !important; font-weight: 900; }

/* 5. خامة البلاتين (Platinum) */
.card-platinum {
    background: linear-gradient(135deg, #e2e2e2 0%, #9db1cc 50%, #fbfbfb 100%);
    color: #0f172a !important;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

/* نصوص محفورة (Embossed Text) */
.text-emboss {
    text-shadow: 1px 1px 0 rgba(255,255,255,0.2);
}

/* =========================================
   إصلاحات صفحة البروفايل (Profile View)
   ========================================= */

/* التأكد من ظهور صفحة البروفايل */
#profile-view {
    display: none;
    min-height: 100vh;
    background-color: #0a0a0a;
    position: relative;
    z-index: 50;
}

#profile-view:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* التأكد من ظهور حاوية البطاقة */
#membership-card-container {
    display: block;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
}

/* تأثير دخول البطاقة */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#membership-card-container > div {
    animation: cardSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* تحسينات للبطاقات الديناميكية */
.member-card-dynamic {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

.member-card-dynamic:hover {
    transform: translateY(-5px);
}
