/* =========================================================================
   المتغيرات الأساسية والإعدادات العامة
   ========================================================================= */
:root { 
    --bg-color: #0a0a0a; 
    --text-main: #ffffff; 
    --text-muted: #888888; 
    --brand-red: #e50914; 
    --gold-color: #f7b731; 
}

* { box-sizing: border-box; }

html, body { 
    margin: 0; 
    padding: 0; 
    background-color: var(--bg-color); 
    color: var(--text-main); 
    font-family: 'Tajawal', sans-serif; 
    touch-action: manipulation; 
    -webkit-user-select: none; 
    user-select: none; 
    -webkit-tap-highlight-color: transparent; 
    overflow-x: hidden; 
    scrollbar-width: none; 
}
::-webkit-scrollbar { display: none; }

/* =========================================================================
   الرأس (Header)
   ========================================================================= */
header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    /* 🌟 التعديل هنا: إضافة مساحة الأمان العلوية للآيفون */
    padding: calc(15px + env(safe-area-inset-top, 0px)) 20px 15px 20px; 
    background: rgba(10, 10, 10, 0.85); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    z-index: 100; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}
.header-icons { display: flex; gap: 20px; font-size: 22px; cursor: pointer;}
.modern-logo { 
    font-size: 38px; 
    font-weight: 900; 
    background: linear-gradient(45deg, #e50914, #ff4b2b); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    font-family: 'Arial Black', sans-serif; 
    letter-spacing: 2px; 
    text-shadow: 0px 4px 15px rgba(229, 9, 20, 0.5); 
    cursor: pointer; 
    line-height: 1;
}

/* =========================================================================
   الحاويات والصفحات (Views)
   ========================================================================= */
/* 🌟 التعديل هنا: زيادة الهامش العلوي ليناسب الهيدر بعد نزوله */
.app-container { padding-top: calc(70px + env(safe-area-inset-top, 0px)); padding-bottom: 110px; }
.view { display: none; }
.view.active { display: block; animation: iosFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }
@keyframes iosFadeIn { 
    0% { opacity: 0; transform: translateY(20px) scale(0.98); } 
    100% { opacity: 1; transform: translateY(0) scale(1); } 
}

/* =========================================================================
   البنر الرئيسي والسلايدر
   ========================================================================= */
.banner-wrapper { width: 100%; position: relative; }
.banner-scroll { 
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 0 15px; gap: 15px; 
    /* 🌟 التعديل هنا: إصلاح التمرير في الآيفون */
    -webkit-overflow-scrolling: touch; transform: translateZ(0); will-change: transform;
}
.banner-slide { 
    flex: 0 0 100%; 
    height: 220px; 
    border-radius: 16px; 
    background-size: cover; 
    background-position: center; 
    scroll-snap-align: center; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    overflow: hidden; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.5); 
    cursor: pointer; 
    /* 🌟 التعديل هنا: منع ضغط الصورة في الآيفون */
    flex-shrink: 0; 
}
.banner-slide::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.2) 60%, transparent 100%); 
    z-index: 1; 
}
.banner-content { position: relative; z-index: 2; padding: 15px; }
.banner-badge { background-color: var(--brand-red); color: white; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; }
.banner-title { font-size: 22px; font-weight: 800; margin: 0 0 5px 0; font-family: sans-serif; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.dots-container { display: flex; justify-content: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; padding: 0 10px;}
.dot { width: 6px; height: 6px; border-radius: 50%; background-color: #444; transition: 0.3s; }
.dot.active { background-color: var(--brand-red); width: 18px; border-radius: 4px; }

/* =========================================================================
   قسم الاستوديوهات (تم إصلاح اختفاء المنصات)
   ========================================================================= */
.studios-section { 
    padding: 15px 0 5px 0; width: 100%; overflow: hidden; position: relative; direction: ltr; 
    /* 🌟 التعديل هنا: تفعيل كرت الشاشة لمنع اختفاء القسم */
    transform: translateZ(0); will-change: transform;
}
.studios-track { display: flex; width: max-content; animation: scrollStudios 40s linear infinite; }
@keyframes scrollStudios { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.studio-card { 
    flex: 0 0 110px; 
    height: 55px; 
    background: linear-gradient(145deg, #1f1f1f, #121212); 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 1px solid rgba(255,255,255,0.05); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    margin: 0 7.5px; 
    /* 🌟 التعديل هنا: منع الآيفون من عصر البطاقة واختفائها */
    flex-shrink: 0; transform: translateZ(0); -webkit-transform: translateZ(0);
}
.studio-card img { max-width: 70%; max-height: 45%; object-fit: contain; opacity: 0.85; }

/* =========================================================================
   الأقسام والقوائم الأفقية
   ========================================================================= */
.section { padding: 25px 15px 0 15px; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 15px; }
.scroller { 
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; 
    /* 🌟 التعديل هنا: إصلاح التمرير الأفقي في الآيفون */
    -webkit-overflow-scrolling: touch; transform: translateZ(0); will-change: transform;
}
.card-soon, .card-poster { 
    cursor: pointer; 
    flex: 0 0 135px; 
    height: 200px; 
    border-radius: 12px; 
    background-color: #222; 
    background-size: cover; 
    background-position: center; 
    scroll-snap-align: start; 
    position: relative; 
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    /* 🌟 التعديل هنا: منع تصغير البطاقات */
    flex-shrink: 0; transform: translateZ(0); -webkit-transform: translateZ(0);
}
.card-soon { display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 10px 8px; }
.card-soon::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); z-index: 1; }
.date-badge { position: relative; z-index: 2; border: 1px solid var(--gold-color); color: var(--gold-color); background: rgba(0,0,0,0.7); padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; font-family: sans-serif; }
.soon-title { position: relative; z-index: 2; color: white; font-weight: 800; font-size: 13px; text-align: center; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.card-poster::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); }
.poster-title { position: absolute; bottom: 10px; left: 8px; right: 8px; color: white; font-weight: 700; font-size: 13px; text-align: center; z-index: 2; }

/* =========================================================================
   التنبيهات (Toasts)
   ========================================================================= */
.toast-notification { 
    position: fixed; top: -100px; left: 50%; transform: translateX(-50%); 
    background: rgba(18, 18, 18, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); 
    color: #fff; padding: 14px 24px; border-radius: 30px; font-size: 15px; font-weight: 700; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); 
    z-index: 1000000; transition: top 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); 
    display: flex; align-items: center; gap: 12px; white-space: nowrap; 
}
.toast-notification.show { top: calc(40px + env(safe-area-inset-top, 0px)); }
.toast-icon { font-size: 20px; }

/* =========================================================================
   النوافذ المنبثقة (Modals & Overlays)
   ========================================================================= */
.premium-modal-overlay { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); 
    z-index: 9999; opacity: 0; transition: opacity 0.3s ease; 
}
.premium-modal-overlay.active { display: flex; align-items: center; justify-content: center; opacity: 1; }
.premium-close-btn { 
    position: absolute; 
    top: calc(20px + env(safe-area-inset-top, 0px)); 
    left: 20px; width: 35px; height: 35px; 
    border-radius: 50%; background: rgba(255,255,255,0.08); border: none; color: #fff; 
    font-size: 16px; display: flex; align-items: center; justify-content: center; 
    cursor: pointer; transition: 0.3s; z-index: 10;
}
.premium-close-btn:hover { background: rgba(229,9,20,0.8); transform: rotate(90deg); }

/* الملف الشخصي */
.premium-profile-box { 
    width: 90%; max-width: 360px; background: rgba(18, 18, 18, 0.75); border-radius: 28px; 
    padding: 35px 25px; border: 1px solid rgba(255,255,255,0.08); 
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1); 
    transform: scale(0.85) translateY(20px); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); 
    position: relative; text-align: center; 
}
.premium-modal-overlay.active .premium-profile-box { transform: scale(1) translateY(0); }
.avatar-ring { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 15px auto; background: linear-gradient(45deg, var(--brand-red), #ff7b00); padding: 3px; box-shadow: 0 10px 25px rgba(229, 9, 20, 0.3); }
.profile-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #111; }
.premium-profile-header h3 { margin: 0 0 8px 0; font-size: 24px; color: #fff; font-weight: 800; }
.vip-badge { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(45deg, #f7b731, #f39c12); color: #000; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 800; box-shadow: 0 4px 15px rgba(247, 183, 49, 0.3); }
.premium-profile-links { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; text-align: right; }
.premium-profile-links a { display: flex; align-items: center; gap: 15px; padding: 14px 18px; border-radius: 16px; background: rgba(255,255,255,0.04); color: #e0e0e0; text-decoration: none; font-size: 16px; font-weight: 500; transition: all 0.3s ease; border: 1px solid transparent; }
.premium-profile-links a:hover { background: rgba(255,255,255,0.08); transform: translateX(-5px); border-color: rgba(255,255,255,0.05); }
.link-icon { width: 35px; height: 35px; border-radius: 10px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; color: var(--gold-color); font-size: 16px; }
.logout-link { color: #ff4b2b !important; }
.logout-link .link-icon { color: #ff4b2b; background: rgba(229, 9, 20, 0.1); }

/* تسجيل الدخول والإنشاء */
.auth-box { 
    width: 90%; max-width: 360px; background: rgba(18, 18, 18, 0.85); border-radius: 28px; 
    padding: 40px 25px; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 30px 60px rgba(0,0,0,0.6); 
    transform: scale(0.85) translateY(20px); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); 
    position: relative; text-align: center; 
}
.premium-modal-overlay.active .auth-box { transform: scale(1) translateY(0); }
.auth-title { font-size: 26px; font-weight: 800; color: #fff; margin-bottom: 25px; margin-top: 10px;}
.auth-input-group { position: relative; margin-bottom: 15px; }
.auth-input-group i { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: #888; font-size: 18px; }
.auth-input-group input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 16px 45px 16px 16px; color: #fff; font-family: 'Tajawal'; font-size: 16px; outline: none; transition: 0.3s; }
.auth-input-group input:focus { border-color: var(--brand-red); background: rgba(255,255,255,0.1); }
.auth-submit-btn { width: 100%; background: var(--brand-red); color: #fff; border: none; padding: 16px; border-radius: 16px; font-weight: 800; font-family: 'Tajawal'; font-size: 18px; cursor: pointer; margin-top: 10px; transition: 0.3s; box-shadow: 0 5px 20px rgba(229,9,20,0.4); }
.auth-submit-btn:hover { background: #b80710; transform: translateY(-2px); }
.auth-switch { margin-top: 25px; color: #aaa; font-size: 14px; }
.auth-switch span { color: var(--brand-red); font-weight: 700; cursor: pointer; text-decoration: underline; margin-right: 5px; }

/* البحث (Search Overlay) */
.premium-search-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); 
    z-index: 10000; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; 
}
.premium-search-overlay.active { opacity: 1; pointer-events: auto; }
.search-header { display: flex; align-items: center; padding: 20px; padding-top: calc(40px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid rgba(255,255,255,0.05); background: transparent; transform: translateY(-20px); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s; }
.premium-search-overlay.active .search-header { transform: translateY(0); }
.search-header i { font-size: 24px; color: #fff; cursor: pointer; padding-left: 20px; transition: 0.3s;}
.search-header i:hover { color: var(--brand-red); transform: translateX(5px); }
.search-header input { flex: 1; background: transparent; border: none; color: #fff; font-size: 24px; font-family: 'Tajawal'; font-weight: 700; outline: none; }
.search-header input::placeholder { color: #555; }
.trending-section { padding: 30px 20px; opacity: 0; transform: translateY(20px); transition: all 0.5s ease 0.2s; }
.premium-search-overlay.active .trending-section { opacity: 1; transform: translateY(0); }
.trending-title { font-size: 18px; color: #aaa; margin-bottom: 20px; font-weight: 700; }
.trending-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.trend-tag { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 10px 18px; border-radius: 30px; font-size: 15px; color: #eee; font-weight: 500; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.trend-tag:hover { background: rgba(229, 9, 20, 0.15); border-color: var(--brand-red); color: #fff; transform: scale(1.05); }
.search-results { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.search-empty { text-align: center; color: #666; font-size: 18px; margin-top: 50px; font-weight: 500; }
.search-card { display: flex; gap: 15px; background: rgba(255,255,255,0.03); padding: 12px; border-radius: 16px; align-items: center; cursor: pointer; border: 1px solid transparent; transition: 0.3s; }
.search-card:hover { border-color: rgba(229,9,20,0.5); background: rgba(229,9,20,0.05); transform: translateX(-5px); }
.search-card img { width: 70px; height: 100px; object-fit: cover; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.search-card-info h4 { margin: 0 0 8px 0; color: #fff; font-size: 18px; font-weight: 700; }
.search-card-info p { margin: 0; color: var(--gold-color); font-size: 13px; font-weight: 500; }

/* =========================================================================
   النافذة الخاصة بالفيلم (Movie Modal) - تم إصلاح الشاشة السوداء!
   ========================================================================= */
.movie-modal { 
    position: fixed; top: 0; left: 0; width: 100%; 
    height: 100%; 
    /* 🌟 التعديل هنا: إصلاح مشكلة حساب الارتفاع الخاطئ في الآيفون */
    height: -webkit-fill-available; 
    background-color: var(--bg-color); z-index: 1000; 
    transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); 
    overflow-y: auto; overflow-x: hidden; 
    /* 🌟 التعديل هنا: إصلاح السكرول والتمرير الوهمي */
    -webkit-overflow-scrolling: touch !important;
}
.movie-modal.active { transform: translateY(0); }
.modal-close { position: absolute; top: calc(20px + env(safe-area-inset-top, 0px)); right: 20px; width: 35px; height: 35px; background: rgba(0,0,0,0.5); backdrop-filter: blur(10px); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; z-index: 1001; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); }
.modal-hero { width: 100%; height: 45vh; background-size: cover; background-position: top center; position: relative; }
.modal-hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80%; background: linear-gradient(to top, var(--bg-color) 0%, rgba(10,10,10,0.8) 40%, transparent 100%); }
.modal-content { 
    padding: 0 20px 40px 20px; position: relative; margin-top: -60px; z-index: 2; 
    /* 🌟 التعديل هنا: إجبار محرك الآيفون على رسم المحتوى ومنع الشاشة السوداء */
    transform: translateZ(0); -webkit-transform: translateZ(0);
}
.modal-title { font-size: 32px; font-weight: 800; font-family: sans-serif; margin: 0 0 10px 0; line-height: 1.1; }
.modal-meta { display: flex; gap: 12px; font-size: 13px; color: #a3a3a3; align-items: center; margin-bottom: 20px; font-family: sans-serif; font-weight: 500;}
.meta-item.match { color: #46d369; font-weight: 700; }
.meta-item.age { background: #333; padding: 2px 6px; border-radius: 4px; color: white; }
.meta-item.hd { border: 1px solid #a3a3a3; padding: 1px 4px; border-radius: 4px; font-size: 10px; }
.action-row { display: flex; justify-content: space-around; margin-bottom: 25px; }
.action-item { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-main); font-size: 12px; font-weight: 500; cursor: pointer;}
.action-item i { font-size: 24px; color: white; background: rgba(255,255,255,0.08); width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.05);}
.modal-story { font-size: 14px; color: #d2d2d2; line-height: 1.6; margin-bottom: 25px; }
.cast-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.cast-scroll { display: flex; gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.cast-card { flex: 0 0 70px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cast-img { width: 65px; height: 65px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.1); }
.cast-name { font-size: 11px; color: #aaa; }

/* =========================================================================
   شريط التنقل السفلي العائم
   ========================================================================= */
.bottom-nav-floating { 
    position: fixed; 
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)); 
    left: 4%; right: 4%; width: 92%; 
    background: rgba(30, 30, 30, 0.65); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); 
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 40px; 
    display: flex; justify-content: space-around; align-items: center; 
    padding: 12px 5px; z-index: 90; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(229, 9, 20, 0.1); 
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); font-size: 10px; font-weight: 700; transition: all 0.3s; cursor: pointer; flex: 1; }
.nav-item i { font-size: 18px; transition: all 0.3s; }
.nav-item.active { color: white; transform: translateY(-5px); }
.nav-item.active i { color: var(--brand-red); filter: drop-shadow(0 0 12px rgba(229, 9, 20, 0.9)); transform: scale(1.15); }

.page-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; text-align: center; color: var(--text-muted); }
.page-placeholder i { font-size: 60px; color: #333; margin-bottom: 20px; }
.page-placeholder h2 { font-size: 24px; color: white; margin-bottom: 10px; }

/* =========================================================================
   إضافات مشغل الفيديو والواجهات الزجاجية الحديثة
   ========================================================================= */

/* تعديلات البنر والشفافية */
#main-header { border-bottom: none !important; background: linear-gradient(to bottom, rgba(10,10,10,1) 20%, rgba(10,10,10,0) 100%) !important; }
.banner-slide { border-radius: 20px !important; overflow: hidden !important; background-position: center center !important; background-size: cover !important; background-repeat: no-repeat !important; image-rendering: -webkit-optimize-contrast; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important; border: none !important; outline: none !important; transform: translateZ(0); }
.banner-badge { position: absolute !important; top: 15px !important; right: 15px !important; background: rgba(15, 15, 15, 0.5) !important; backdrop-filter: blur(15px) !important; -webkit-backdrop-filter: blur(15px) !important; color: #fff !important; padding: 6px 16px !important; border-radius: 12px !important; font-family: 'Tajawal', sans-serif !important; font-size: 13px !important; font-weight: 900 !important; z-index: 5 !important; overflow: hidden; border: 1.5px solid rgba(255, 255, 255, 0.5) !important; animation: pulseGlow 2.5s infinite alternate ease-in-out; }
.banner-badge::after { content: ''; position: absolute; top: -100%; left: -100%; width: 300%; height: 300%; background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.8) 50%, transparent 60%); transform: rotate(45deg); animation: shimmerEffect 4s infinite linear; pointer-events: none; }
@keyframes pulseGlow { 0% { box-shadow: 0 0 5px rgba(255,255,255,0.1), inset 0 0 5px rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); } 100% { box-shadow: 0 0 15px rgba(255,255,255,0.8), inset 0 0 10px rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.9); } }
@keyframes shimmerEffect { 0% { transform: translateX(-150%) translateY(-150%) rotate(45deg); } 20% { transform: translateX(150%) translateY(150%) rotate(45deg); } 100% { transform: translateX(150%) translateY(150%) rotate(45deg); } }
.banner-content { position: absolute !important; bottom: 20px !important; left: 15px !important; right: 15px !important; z-index: 5 !important; text-align: center !important; padding: 0 !important; background: none !important; border: none !important; }
.banner-title { font-size: 26px !important; font-weight: 900 !important; color: #fff !important; text-shadow: 0 4px 15px rgba(0,0,0,1), 0 2px 5px rgba(0,0,0,1), 0 0 25px rgba(0,0,0,0.8) !important; margin: 0 !important; line-height: 1.3; }

/* أزرار الأسهم في القوائم الأفقية والبنر */
.slider-arrow { position: absolute !important; top: 50% !important; transform: translateY(-50%) !important; width: 45px !important; height: 45px !important; background: rgba(0, 0, 0, 0.6) !important; backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; color: #fff !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; font-weight: bold !important; cursor: pointer !important; z-index: 9999 !important; opacity: 0; pointer-events: none; transition: all 0.3s ease !important; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important; }
.slider-arrow.visible { opacity: 1 !important; pointer-events: auto !important; }
.slider-arrow:hover, .slider-arrow:focus { background: #e50914 !important; border-color: #e50914 !important; transform: translateY(-50%) scale(1.1) !important; }
.slider-arrow.right { right: 15px !important; } 
.slider-arrow.left { left: 15px !important; }

.scroller-wrapper { position: relative; width: 100%; display: block; }
.scroller-arrow { position: absolute !important; top: 50% !important; transform: translateY(-50%) !important; width: 40px !important; height: 40px !important; background: rgba(0, 0, 0, 0.7) !important; backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; color: #fff !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 16px !important; font-weight: bold !important; cursor: pointer !important; z-index: 20 !important; opacity: 0; pointer-events: none; transition: all 0.3s ease !important; box-shadow: 0 4px 10px rgba(0,0,0,0.5) !important; }
.scroller-arrow.visible { opacity: 1 !important; pointer-events: auto !important; }
.scroller-arrow:hover { background: #e50914 !important; border-color: #e50914 !important; transform: translateY(-50%) scale(1.1) !important; }
.scroller-arrow.right { right: 5px !important; } 
.scroller-arrow.left { left: 5px !important; }

@media (max-width: 1024px) { 
    .slider-arrow, .scroller-arrow { display: none !important; } 
}

/* زر التشغيل الرئيسي (للفيلم/المسلسل) */
.play-movie-btn { background: #e50914; color: #fff; border: none; padding: 14px 20px; border-radius: 16px; font-weight: 800; font-family: 'Tajawal', sans-serif; font-size: 18px; cursor: pointer; width: 100%; margin: 15px 0 25px 0; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 8px 25px rgba(229,9,20,0.5); } 
.play-movie-btn:hover { background: #b80710; transform: scale(1.02); } 

/* =========================================================================
   تصميم مشغل الفيديو الداخلي (Player)
   ========================================================================= */
.video-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 99999; display: none; } 
.video-overlay.active { display: block; } 
.player-container { position: relative; width: 100%; height: 100%; background: #000; font-family: 'Tajawal', sans-serif; user-select: none; -webkit-tap-highlight-color: transparent; overflow: hidden; transition: transform 0.2s ease; display: flex; align-items: center; justify-content: center; } 
.force-landscape { position: fixed !important; top: 50% !important; left: 50% !important; width: 100dvh !important; height: 100vw !important; transform: translate(-50%, -50%) rotate(90deg) !important; z-index: 9999999 !important; background: #000 !important; margin: 0; padding: 0; } 
.video-wrapper { position: relative; display: inline-block; max-width: 100%; max-height: 100%; line-height: 0; } 
.main-video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; outline: none; background: transparent; transition: filter 0.1s; position: relative; z-index: 1;} 

/* الترجمة (Subtitles) داخل المشغل */
.custom-subtitle-overlay { position: absolute; bottom: 8%; left: 0; width: 100%; text-align: center; pointer-events: none; z-index: 8; display: none; line-height: normal; } 
.sub-text-span { display: inline-block; background: rgba(0, 0, 0, 0.6); color: #ffffff; font-family: 'Tajawal', sans-serif; font-size: 24px; font-weight: 700; line-height: 1.4; padding: 4px 10px; border-radius: 6px; text-shadow: 0 2px 4px rgba(0,0,0,0.9); direction: rtl; } 
@media (max-width: 768px) { .sub-text-span { font-size: 14px; padding: 3px 8px; } .custom-subtitle-overlay { bottom: 10%; } } 
video::-webkit-media-text-track-container { transform: translateY(-5%); } 
::cue { background-color: rgba(0,0,0,0.8); color: #fff; text-shadow: 2px 2px 3px #000,-2px -2px 3px #000,2px -2px 3px #000,-2px 2px 3px #000; font-family: 'Tajawal', sans-serif; font-size: 24px; font-weight: 800; padding: 5px; } 

/* واجهة تحكم المشغل */
.touch-shield { position: absolute; inset: 0; z-index: 5; } 
.controls-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; flex-direction: column; justify-content: space-between; transition: opacity 0.15s ease-out; z-index: 10; pointer-events: none;} 
.controls-overlay.active { pointer-events: auto; } 
.controls-overlay.hidden { opacity: 0; pointer-events: none; } 
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; padding-top: calc(20px + env(safe-area-inset-top, 0px)); pointer-events: auto;} 
.close-btn { width: 45px; height: 45px; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #fff; font-size: 22px; cursor: pointer; text-decoration: none; border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 4px 15px rgba(0,0,0,0.5); transition: 0.2s;} 
.close-btn:hover { background: #e50914; border-color: #e50914; transform: scale(1.1); } 
.movie-title-player { color: #fff; font-size: 16px; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.8); text-align: center; flex: 1; margin: 0 20px; } 
.logo-m { color: #e50914; font-size: 32px; font-weight: 900; font-style: italic; font-family: sans-serif; text-shadow: 0 2px 4px rgba(0,0,0,0.8); } 
.center-controls { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 70px; direction: ltr; pointer-events: auto;} 
.center-btn { color: #fff; cursor: pointer; transition: transform 0.1s; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; text-shadow: 0 4px 10px rgba(0,0,0,0.5); } 
.center-btn:active { transform: scale(0.9); } 
.play-icon-btn { font-size: 75px; } 
.skip-btn { font-size: 45px; opacity: 0.9; } 
.skip-btn::after { content: '10'; position: absolute; font-size: 13px; font-weight: bold; font-family: sans-serif; top: 52%; left: 50%; transform: translate(-50%, -50%); } 
.bottom-bar { display: flex; flex-direction: column; gap: 15px; padding: 0 30px 30px 30px; padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); direction: ltr; width: 100%; box-sizing: border-box; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); pointer-events: auto;} 
.progress-row { display: flex; align-items: center; gap: 15px; width: 100%; } 
.time-text { color: #fff; font-size: 13px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-weight: 600; letter-spacing: 0.5px; opacity: 0.9; text-shadow: 0 1px 2px rgba(0,0,0,0.8); min-width: 45px; text-align: center;} 
.progress-container { flex: 1; height: 30px; cursor: pointer; position: relative; display: flex; align-items: center; touch-action: none;} 
.progress-track { width: 100%; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; position: relative; pointer-events: none;} 
.progress-bar { height: 100%; background: #e50914; border-radius: 2px; width: 0%; position: absolute; top:0; left:0; pointer-events: none; transition: width 0.1s linear; } 
.progress-dot { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; background: #e50914; border-radius: 50%; box-shadow: 0 0 5px rgba(0,0,0,0.8); transition: transform 0.1s; } 
.progress-container:active .progress-dot { transform: translateY(-50%) scale(1.4); } 
.tools-row { display: flex; justify-content: flex-end; align-items: center; gap: 20px; width: 100%; padding-right: 5px; } 
.rotate-btn, .cc-btn, .family-btn { color: #fff; font-size: 22px; cursor: pointer; transition: 0.2s; text-shadow: 0 1px 2px rgba(0,0,0,0.8); } 
.rotate-btn:hover, .cc-btn:hover { color: #e50914; } 
.family-btn.active { color: #46d369; text-shadow: 0 0 10px rgba(70, 211, 105, 0.5); } 
.brightness-wrapper { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 15; transition: opacity 0.15s; pointer-events: auto;} 
.brightness-wrapper.hidden { opacity: 0; pointer-events: none; } 
.slider-tube-container { width: 40px; height: 140px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; touch-action: none;} 
.slider-tube { position: relative; width: 8px; height: 130px; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 5px rgba(0,0,0,0.5); backdrop-filter: blur(2px); pointer-events: none; } 
.slider-fill { position: absolute; bottom: 0; left: 0; width: 100%; height: 60%; background: #fff; border-radius: 4px; pointer-events: none; transition: height 0.05s; } 
.b-icon { color: #fff; font-size: 18px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); pointer-events: none;} 
.tap-indicator { position: absolute; top: 50%; background: rgba(0,0,0,0.6); color: #fff; padding: 15px 25px; border-radius: 30px; font-weight: bold; font-family: sans-serif; display: flex; align-items: center; gap: 10px; z-index: 20; animation: fadeOutTap 0.5s forwards; pointer-events: none; backdrop-filter: blur(5px); box-shadow: 0 4px 15px rgba(0,0,0,0.4); } 
@keyframes fadeOutTap { 0% { opacity: 1; transform: translateY(-50%) scale(0.9); } 100% { opacity: 0; transform: translateY(-50%) scale(1.1); } } 
.loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 4px solid rgba(255,255,255,0.1); border-top: 4px solid #e50914; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; display: none; z-index: 5; } 
@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } } 
.continue-card:hover .play-overlay-icon { transform: translate(-50%, -50%) scale(1.2); color: #e50914; opacity: 1; } 
.action-active { color: #e50914 !important; transition: 0.3s; } 

.sub-sync-btn { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid #444; border-radius: 6px; padding: 4px 10px; font-size: 12px; font-family: sans-serif; cursor: pointer; transition: 0.2s; text-shadow: 0 1px 2px rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; gap: 5px; } 
.sub-sync-btn:hover { background: rgba(229,9,20,0.2); border-color: #e50914; color: #fff; } 
.sub-sync-btn:active { transform: scale(0.9); } 
.sub-sync-container { display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,0.5); padding: 4px 8px; border-radius: 8px; border: 1px solid #333; margin-right: auto;}
.skip-intro-wrapper { position: absolute; bottom: 110px; right: 30px; pointer-events: auto; z-index: 50; transition: all 0.3s ease; } 
.skip-intro-btn { background: rgba(0, 0, 0, 0.5); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); padding: 10px 24px; border-radius: 50px; font-family: 'Tajawal', sans-serif; font-size: 15px; font-weight: 800; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); box-shadow: 0 8px 20px rgba(0,0,0,0.6); display: flex; align-items: center; gap: 8px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); letter-spacing: 0.5px; } 
.skip-intro-btn:hover { background: rgba(229, 9, 20, 0.85); border-color: #e50914; box-shadow: 0 0 20px rgba(229, 9, 20, 0.6); transform: scale(1.05); } 
.skip-intro-btn:active { transform: scale(0.95); } 
@media (max-width: 768px) { .skip-intro-wrapper { bottom: 130px; right: 20px; } .skip-intro-btn { font-size: 13px; padding: 8px 18px; } .skip-intro-btn i { font-size: 15px; } }
.speed-btn { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid #444; border-radius: 6px; padding: 4px 10px; font-size: 13px; font-weight: bold; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; user-select: none; font-family: sans-serif; } 
.speed-btn:hover { background: rgba(229,9,20,0.2); border-color: #e50914;} 
.speed-btn:active { transform: scale(0.9); }

/* =========================================================================
   نوافذ العرض الجانبية (Sub-Views) والمواسم
   ========================================================================= */
.sub-view-modal { 
    position: fixed; top: 0; left: 0; width: 100%; 
    height: 100%; 
    /* 🌟 التعديل هنا: إصلاح طول ومحاذاة الشاشة في الآيفون */
    height: -webkit-fill-available; 
    background: #0a0a0a; z-index: 999999; display: none; 
    overflow-y: auto; flex-direction: column; 
    padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 20px 20px; box-sizing: border-box; 
    /* 🌟 التعديل هنا: إصلاح مشكلة السكرول والاختفاء في الآيفون */
    -webkit-overflow-scrolling: touch !important; transform: translateZ(0); will-change: transform;
} 
.sub-view-modal.active { display: flex; animation: slideUp 0.2s ease; } 
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } 
.cat-square { background: #1a1a1a; border-radius: 15px; padding: 25px 15px; text-align: center; cursor: pointer; border: 1px solid #333; transition: 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); position: relative; overflow: hidden; } 
.cat-square::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(229,9,20,0.1) 0%, transparent 60%); opacity: 0; transition: 0.5s; z-index: 0; } 
.cat-square:hover::before { opacity: 1; } 
.cat-square:hover { transform: translateY(-5px); border-color: #e50914; box-shadow: 0 8px 25px rgba(229,9,20,0.3); } 
.cat-square i { font-size: 35px; color: #e50914; position: relative; z-index: 1; text-shadow: 0 2px 10px rgba(229,9,20,0.5); } 
.cat-square span { color: #fff; font-family: 'Tajawal'; font-weight: bold; font-size: 15px; position: relative; z-index: 1; }

.season-tabs-wrapper { display: flex; gap: 10px; overflow-x: auto; padding: 15px 0; scrollbar-width: none; direction: rtl; margin-top: 10px; } 
.season-tabs-wrapper::-webkit-scrollbar { display: none; } 
.season-btn-front { background: #1a1a1a; color: #888; border: 1px solid #333; padding: 10px 24px; border-radius: 25px; cursor: pointer; font-family: 'Tajawal'; font-size: 14px; font-weight: bold; white-space: nowrap; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.5); } 
.season-btn-front.active { background: rgba(229,9,20,0.1); color: #e50914; border-color: #e50914; box-shadow: 0 4px 10px rgba(229,9,20,0.2); } 
.episodes-list-front { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; margin-bottom: 20px; } 
.ep-card-front { background: #151515; border: 1px solid #222; border-radius: 12px; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 8px rgba(0,0,0,0.4); } 
.ep-card-front:hover { background: #222; border-color: #e50914; transform: translateY(-2px); } 
.ep-card-title { color: #fff; font-weight: bold; font-size: 15px; font-family: 'Tajawal'; } 
.ep-card-play { color: #e50914; font-size: 22px; text-shadow: 0 0 10px rgba(229,9,20,0.4); }

/* =========================================================================
   واجهة الإكسبلور (Explore)
   ========================================================================= */
.explore-container { height: 100vh; overflow-y: auto; position: relative; transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); touch-action: pan-y; } 
.ptr-loader { position: absolute; top: -50px; left: 0; width: 100%; text-align: center; color: #aaa; font-family: 'Tajawal'; font-weight: bold; font-size: 14px; transition: 0.3s; opacity: 0; } 
.explore-card-modern { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 15px rgba(0,0,0,0.6); transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease; aspect-ratio: 2 / 3; background: #111; } 
.explore-card-modern:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 12px 25px rgba(229,9,20,0.4); } 
.explore-card-modern img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; } 
.explore-card-modern:hover img { transform: scale(1.1); } 
.explore-glass-stats { position: absolute; top: 6px; right: 6px; left: 6px; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 4px 6px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; color: #fff; font-size: 9px; font-weight: bold; border: 1px solid rgba(255,255,255,0.1); z-index: 2; } 
.explore-card-info { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%); padding: 25px 5px 6px 5px; text-align: center; z-index: 2; } 
.explore-title-modern { color: #fff; font-family: 'Tajawal', sans-serif; font-size: 11px; font-weight: 800; margin: 0 0 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 4px rgba(0,0,0,0.8); } 
.explore-cat-modern { color: #aaa; font-size: 9px; margin: 0; font-weight: 600; }
