/**
 * أسلوب وأنماط يلا أفلام - Clean-Room Modern CSS (No jQuery / Pure Vanilla)
 * مطابقة 100% للتصميم المرجعي + متجاوب بالكامل مع الهواتف والشاشات الذكية (100% Mobile-Friendly)
 */

:root {
    --bg-main: #060709;
    --bg-header: #0d0e12;
    --bg-card: #13141a;
    --bg-card-hover: #1b1c24;
    --border-color: #232530;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #8b929e;
    --accent-yellow: #f5b301;
    --accent-yellow-hover: #e0a300;
    --accent-green: #28a745;
    --accent-red: #dc3545;
    --font-stack: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    --header-height: 65px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-pill: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #121212;
    color: #e5e7eb;
    font-family: var(--font-stack);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
    color: var(--accent-yellow);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 10px;
}

.main-content {
    flex: 1;
    padding: 10px 0 25px;
}

/* ==========================================================================
   الهيدر وشريط التنقل العلوي (مطابق 100% للاسكرين المرجعي)
   ========================================================================== */
.site-header {
    background: #181818;
    border-bottom: 1px solid #282828;
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 16px;
}

/* اليمين: الشعار وزر القائمة للموبايل */
.header-col-start {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-nav-toggle {
    background: #1c1d22;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-nav-toggle:hover {
    background: #25262c;
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.25);
}

.btn-nav-toggle:active {
    transform: scale(0.95);
}

.btn-nav-toggle .hamburger-svg {
    display: block;
    width: 21px;
    height: 21px;
    stroke: currentColor;
    stroke-width: 2.3;
    transition: stroke 0.2s ease;
}

.site-logo {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.3px;
}

.site-logo a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.site-logo .logo-gold {
    color: var(--accent-yellow);
}

.site-logo .logo-white {
    color: #ffffff;
}

/* الوسط: محرك البحث بحقل أبيض وزر أصفر */
.header-col-search {
    flex: 1;
    max-width: 560px;
    position: relative;
}

.search-form {
    display: flex;
    width: 100%;
    position: relative;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #cccccc;
    overflow: visible;  /* مهم: لإظهار قائمة الاقتراحات المنسدلة */
    height: 38px;
}

.search-input {
    flex: 1;
    background: #ffffff;
    border: none;
    padding: 0 14px;
    color: #1f2937;
    font-size: 14.5px;
    font-weight: 500;
    font-family: var(--font-stack);
    outline: none;
    -webkit-appearance: none;
}

.search-input::placeholder {
    color: #6b7280;
    font-size: 14px;
}

.search-btn {
    background: var(--accent-yellow);
    color: #ffffff;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.search-btn:hover {
    background: var(--accent-yellow-hover);
}

/* ================================================================
   محرك البحث التفاعلي الفوري — Instant Search Suggestions
   ================================================================ */
.search-suggestions {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    background: #0d0f1a;
    border: 1px solid rgba(245,179,1,0.25);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.75);
    z-index: 999;
    display: none;
    max-height: 480px;
    overflow-y: auto;
    direction: rtl;
    scrollbar-width: thin;
    scrollbar-color: #2d303f #0d0f1a;
}
.search-suggestions::-webkit-scrollbar { width: 5px; }
.search-suggestions::-webkit-scrollbar-track { background: #0d0f1a; }
.search-suggestions::-webkit-scrollbar-thumb { background: #2d303f; border-radius: 4px; }

/* بطاقة اقتراح واحدة */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
    color: #f1f5f9;
    transition: background 0.13s;
    cursor: pointer;
}
.suggestion-item:last-of-type { border-bottom: none; }
.suggestion-item:hover,
.suggestion-item.active {
    background: rgba(245,179,1,0.08);
}

/* البوستر العمودي */
.suggestion-poster {
    width: 42px;
    height: 62px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* نص البطاقة */
.suggestion-body { flex: 1; min-width: 0; }

.suggestion-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* تمييز النص المطابق */
.search-hl {
    background: none;
    color: #f5b301;
    font-style: normal;
    font-weight: 800;
}

.suggestion-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #9aa0a6;
}

/* شارة نوع المحتوى */
.sug-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.sug-badge-movie  { background: rgba(245,179,1,0.15); color: #f5b301; }
.sug-badge-series { background: rgba(59,130,246,0.15); color: #60a5fa; }

/* شارة الجودة */
.sug-quality {
    display: inline-block;
    padding: 1px 5px;
    background: rgba(34,197,94,0.15);
    color: #4ade80;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
}

.sug-year { color: #9aa0a6; }
.sug-dur  { color: #9aa0a6; }

/* حالة التحميل */
.sug-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    color: #9aa0a6;
    font-size: 13px;
}
.sug-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(245,179,1,0.3);
    border-top-color: #f5b301;
    border-radius: 50%;
    animation: spin-sug 0.7s linear infinite;
}
@keyframes spin-sug { to { transform: rotate(360deg); } }

/* لا توجد نتائج */
.sug-empty {
    padding: 18px 14px;
    color: #9aa0a6;
    font-size: 13px;
    text-align: center;
}
.sug-empty strong { color: #f5b301; }

/* رابط "عرض كل النتائج" */
.sug-viewall {
    display: block;
    padding: 10px 14px;
    background: rgba(245,179,1,0.06);
    border-top: 1px solid rgba(245,179,1,0.15);
    color: #f5b301;
    text-decoration: none;
    font-size: 12.5px;
    text-align: center;
    transition: background 0.13s;
}
.sug-viewall:hover { background: rgba(245,179,1,0.14); }
.sug-viewall strong { font-weight: 800; }

/* اليسار: زر تسجيل الدخول */
.header-col-end {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-auth {
    background: #24252d;
    border: 1px solid #3c3e4a;
    color: #ffffff;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.btn-auth:hover {
    background: #2e303b;
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.btn-admin {
    background: var(--accent-yellow);
    color: #000000;
    font-weight: 800;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 13.5px;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-admin:hover {
    background: var(--accent-yellow-hover);
}

.user-greeting {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ==========================================================================
   شريط أزرار التصنيفات (Pills) كما في الاسكرين تماماً
   ========================================================================== */
.quick-categories-bar {
    background: #121212;
    border-bottom: 1px solid #202020;
    padding: 8px 0;
}

.quick-cat-list {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px;
}

.quick-cat-list::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    background: #22232a;
    color: #e2e8f0;
    border: 1px solid #333644;
    display: inline-block;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
    font-family: var(--font-stack);
}

.cat-btn:hover {
    background: #2d2e38;
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

/* زر أفلام 2026 الأخضر في أقصى اليمين */
.cat-btn-2026 {
    background: #388e3c !important;
    border-color: #388e3c !important;
    color: #ffffff !important;
}

.cat-btn-2026:hover {
    background: #2e7d32 !important;
}

/* زر أفلام 18+ الأحمر في أقصى اليسار */
.cat-btn-adult {
    background: #c62828 !important;
    border-color: #c62828 !important;
    color: #ffffff !important;
}

.cat-btn-adult:hover {
    background: #b71c1c !important;
}

/* ==========================================================================
   بلوك «حصريات يلا أفلام» (4 أعمدة × 5 صفوف على الخلفية الداكنة)
   ========================================================================== */
.exclusive-block {
    margin: 10px 0 16px;
    background: #181920;
    border: 1px solid #282a36;
    border-radius: 6px;
    overflow: hidden;
}

.exclusive-header {
    background: #20222c;
    border-bottom: 1px solid #282a36;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--accent-yellow);
}

.exclusive-header h3 {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.2px;
}

.exclusive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 6px;
}

.exclusive-item {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #121319;
    border: 1px solid #232532;
    border-radius: 4px;
    padding: 5px 7px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
    min-height: 46px;
}

.exclusive-item:hover {
    background: #1c1d27;
    border-color: rgba(245, 179, 1, 0.6);
}

.exclusive-thumb {
    width: 58px;
    height: 36px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.exclusive-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    font-family: var(--font-stack);
}

/* ==========================================================================
   الكونتينر الأبيض الكامل لمحتوى الأفلام (Home White Wrapper)
   ========================================================================== */
.home-white-wrapper {
    background: #ffffff;
    border-radius: 4px;
    padding: 12px 14px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
}

.home-section-unit {
    margin-bottom: 16px;
}

/* البلوكات الفاتحة لعناوين الأقسام الرمادية كالسكرين */
.section-light-title {
    background: #f0f2f5;
    border: 1px solid #e4e6eb;
    border-radius: 4px;
    padding: 8px 14px;
    margin: 0 0 12px;
    font-size: 15.5px;
    font-weight: 800;
    color: #1f2937;
    text-align: right;
    letter-spacing: -0.2px;
}

.section-light-title a {
    color: #1f2937;
    text-decoration: none;
    display: block;
}

.section-light-title a:hover {
    color: #000000;
}

/* شبكة الأفلام العامة */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

/* شبكة 4 أعمدة لقسم جديد الموقع */
.video-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

/* شبكة 5 أعمدة لأقسام الصفحة الرئيسية - 5 أفلام في نفس السطر */
.video-grid-5,
.video-grid.video-grid-5 {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px;
    margin-bottom: 8px;
}

.video-grid-5 .card-title-overlay {
    font-size: 11px;
    padding: 12px 3px 4px;
    line-height: 1.25;
}

.video-grid-5 .badge-duration {
    font-size: 9.5px;
    padding: 1.5px 5px;
    top: 4px;
    right: 4px;
}

.video-grid-5 .badge-tag {
    font-size: 9px;
    padding: 1.5px 5px;
}

.video-grid-5 .badge-status-group {
    top: 4px;
    left: 4px;
    gap: 2px;
}

/* ==========================================================================
   بطاقة الفيلم الموحدة مع العنوان المدمج داخل البوستر (16:9 Aspect Ratio)
   ========================================================================== */
.video-card {
    background: #000000;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.card-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.card-thumb-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.video-card:hover .card-thumb-wrap img {
    transform: scale(1.05);
}

/* شارة مدة الفيلم - أعلى يمين الصورة */
.badge-duration {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.82);
    color: #ffffff;
    font-size: 11px;
    font-family: var(--font-stack);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 2;
    direction: ltr;
    line-height: 1.25;
}

/* شارات الحالة (جديد / شائع / مميز) - أعلى يسار الصورة */
.badge-status-group {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    gap: 3px;
    z-index: 2;
}

.badge-tag {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1.25;
    display: inline-block;
    font-family: var(--font-stack);
}

.badge-tag.tag-new {
    background: #388e3c;
    color: #ffffff;
}

.badge-tag.tag-trending {
    background: #e53935;
    color: #ffffff;
}

.badge-tag.tag-featured {
    background: #1976d2;
    color: #ffffff;
}

/* عنوان الفيلم مدمج داخل أسفل البوستر بخلفية تدرج أسود كالصورة تماماً */
.card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.65) 65%, transparent 100%);
    color: #ffffff;
    font-size: 11.5px;
    padding: 14px 4px 4px;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 700;
    z-index: 2;
    pointer-events: none;
    font-family: var(--font-stack);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    line-height: 1.3;
}

/* ==========================================================================
   صفحة المشاهدة و Google Video SEO (watch.php) - مطابقة 100% للاسكرين المرجعي
   ========================================================================== */
.watch-page-container {
    max-width: 1050px;
    margin: 12px auto 35px;
}

/* البوكس العلوي الداكن: يضم الشارة ومسار التنقل والعنوان والمشغل */
.watch-player-box {
    background: #151515;
    border: 1px solid #222222;
    border-radius: 6px 6px 0 0;
    padding: 10px 14px 14px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* شارة متميز أعلى اليمين */
.badge-motamayez {
    position: absolute;
    top: 0;
    right: 0;
    background: #f5b301;
    color: #000000;
    font-size: 12px;
    font-weight: 900;
    padding: 3px 12px;
    border-radius: 0 6px 0 6px;
    z-index: 5;
    line-height: 1.4;
    font-family: var(--font-stack);
}

/* شريط مسار التنقل الداكن */
.watch-dark-breadcrumb {
    background: #000000;
    border-radius: 4px;
    padding: 8px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-stack);
}

.watch-dark-breadcrumb a {
    color: #f5b301;
    text-decoration: none;
    font-weight: 700;
}

.watch-dark-breadcrumb a:hover {
    color: #ffd040;
}

.watch-dark-breadcrumb .b-sep {
    color: #888888;
    font-size: 13px;
}

/* عنوان الفيلم الرئيسي H1 */
.watch-title-main {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    margin: 6px 0 14px;
    text-align: right;
    direction: rtl;
    line-height: 1.45;
    letter-spacing: -0.3px;
    font-family: var(--font-stack);
}

/* --------------------------------------------------------------------------
   بوستر الفيديو التفاعلي في watch.php (Fake Video Player)
   -------------------------------------------------------------------------- */
.fake-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
}

.fake-player-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.fake-player-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.fake-player-wrapper:hover .fake-player-poster {
    filter: brightness(0.92);
    transform: scale(1.01);
}

/* زر التشغيل الدائري الأصفر الكبير مع مثلث أبيض */
.fake-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    background: #f5b301;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 35px rgba(245, 179, 1, 0.75);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 5;
}

.fake-player-wrapper:hover .fake-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 0 50px rgba(245, 179, 1, 0.95);
}

.svg-play-icon {
    width: 32px;
    height: 32px;
    margin-right: -4px;
}

/* شريط التحكم السفلي للمشغل */
.fake-player-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    padding: 12px 14px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: ltr;
    z-index: 4;
}

.f-ctrl-left,
.f-ctrl-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 13px;
    font-family: var(--font-stack);
    font-weight: 600;
}

.f-ctrl-left .f-btn,
.f-ctrl-right .f-btn {
    cursor: pointer;
    opacity: 0.9;
}

.f-time-label {
    font-weight: 700;
    font-size: 12px;
}

.f-timeline {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 16px;
    position: relative;
    border-radius: 2px;
}

.f-timeline-dot {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.f-watermark {
    color: #f5b301;
    font-weight: 900;
    letter-spacing: 0.6px;
    font-size: 12px;
}

/* ==========================================================================
   الحاوية البيضاء لصفحة المشاهدة (Watch White Wrapper)
   ========================================================================== */
.watch-white-wrapper {
    background: #ffffff;
    border-radius: 0 0 6px 6px;
    padding: 14px 16px 26px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
}

/* شريط أزرار التفاعل البسيط (أعجبني / لم يعجبني / مشاركة / إبلاغ) */
.watch-reactions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px 14px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
    direction: rtl;
}

.react-items-right,
.react-items-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-react-text {
    background: transparent;
    border: none;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-stack);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.15s;
}

.btn-react-text:hover {
    color: #111827;
    background: #f3f4f6;
}

.btn-embed-trigger {
    background: rgba(245, 179, 1, 0.12) !important;
    color: #b45309 !important;
    border: 1px solid rgba(245, 179, 1, 0.4) !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}
.btn-embed-trigger:hover {
    background: #f5b301 !important;
    color: #000000 !important;
    border-color: #f5b301 !important;
    box-shadow: 0 2px 8px rgba(245, 179, 1, 0.35) !important;
}

.btn-react-icon {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-react-icon:hover {
    color: #111827;
    background: #f3f4f6;
}

/* بطاقة «قصة العمل» الداكنة */
.watch-story-box {
    background: #181920;
    border: 1px solid #282a36;
    border-radius: 6px;
    padding: 14px 18px 16px;
    margin-bottom: 14px;
    direction: rtl;
}

.story-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.story-icon-title {
    color: #f5b301;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.story-gold-line {
    flex: 1;
    height: 2px;
    background: #f5b301;
    opacity: 0.85;
}

.story-body-text p {
    color: #f1f5f9;
    font-size: 15px;
    line-height: 1.85;
    margin: 0;
    text-align: right;
    font-weight: 500;
    font-family: var(--font-stack);
}

/* بوكس «الوصف والتفاصيل» الأبيض بإطار أصفر */
.watch-seo-box {
    background: #ffffff;
    border: 1px solid #ffd066;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 14px;
    position: relative;
    direction: rtl;
    text-align: right;
}

.badge-seo-pill {
    background: #f5b301;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
    font-family: var(--font-stack);
}

.watch-seo-box p {
    color: #374151;
    font-size: 14px;
    line-height: 1.75;
    margin: 0;
    font-weight: 500;
    font-family: var(--font-stack);
}

/* شريط أزرار التصنيفات الصفراء (Tags) */
.watch-tags-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    direction: rtl;
}

.watch-tag-pill {
    background: #f5b301;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s;
    font-family: var(--font-stack);
}

.watch-tag-pill:hover {
    opacity: 0.9;
    color: #ffffff;
    transform: translateY(-1px);
}

/* قسم حصريات يلا أفلام داخل صفحة المشاهدة */
.watch-exclusives-section {
    margin-bottom: 18px;
}

.watch-exclusives-header-pill {
    text-align: center;
    margin-bottom: 10px;
}

.watch-exclusives-header-pill span {
    background: #181920;
    color: #f5b301;
    font-size: 15px;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 24px;
    display: inline-block;
    font-family: var(--font-stack);
    border: 1px solid rgba(245, 179, 1, 0.3);
}

/* إخفاء الهيدر الافتراضي داخل البلوك عند وجود البيل الخارجي */
.watch-exclusives-section .exclusive-block .exclusive-header {
    display: none;
}

/* قسم «قد يعجبك أيضًا..» */
.watch-related-section {
    margin-top: 16px;
}

.watch-related-header-bar {
    background: #181920;
    border: 1px solid #282a36;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 12px;
    direction: rtl;
}

.watch-related-header-bar h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
    font-family: var(--font-stack);
}

/* ==========================================================================
   عناصر صفحة المشاهدة والسيرفرات (play.php)
   ========================================================================== */

/* شريط مسار التنقل والعنوان المدمج كالسكرين */
.play-title-breadcrumb-bar {
    background: #0d0d0d;
    border-radius: 4px;
    padding: 8px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-stack);
}

.play-title-breadcrumb-bar .b-cat {
    color: #f5b301;
    text-decoration: none;
    flex-shrink: 0;
    font-weight: 800;
}

.play-title-breadcrumb-bar .b-cat:hover {
    color: #ffd040;
}

.play-title-breadcrumb-bar .b-sep {
    color: #6b7280;
    margin: 0 2px;
}

.play-title-breadcrumb-bar .b-title {
    color: #e5e7eb;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13.5px;
}

/* شريط سيرفرات المشاهدة بالأزرار الصفراء */
.servers-selection-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 10px;
    margin-bottom: 10px;
    direction: rtl;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.servers-selection-bar::-webkit-scrollbar {
    height: 3px;
}

.servers-selection-bar::-webkit-scrollbar-thumb {
    background: #f5b301;
    border-radius: 2px;
}

.server-pill-btn {
    background: #f5b301;
    color: #000000;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
    font-family: var(--font-stack);
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.15s, transform 0.1s;
    direction: rtl;
    flex-shrink: 0;
}

.server-pill-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.server-pill-btn.btn-server-vip {
    background: #24252d;
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.15);
}

.server-pill-btn.btn-server-vip:hover {
    background: #2d2e38;
    border-color: var(--accent-yellow);
    color: #ffffff;
}

.server-pill-btn.active {
    box-shadow: 0 0 0 2.5px #ffffff;
    transform: translateY(-1px);
}

/* مشغل الفيديو الفعلي */
.player-stage-wrap {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: #000000;
}

.player-screen-watermark {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 40;
    pointer-events: none;
    user-select: none;
    display: inline-flex;
    align-items: center;
}

.player-screen-watermark.wm-pos-top-right {
    top: 14px;
    right: 18px;
    left: auto;
    bottom: auto;
}
.player-screen-watermark.wm-pos-top-left {
    top: 14px;
    left: 18px;
    right: auto;
    bottom: auto;
}
.player-screen-watermark.wm-pos-bottom-right {
    bottom: 52px;
    right: 18px;
    left: auto;
    top: auto;
}
.player-screen-watermark.wm-pos-bottom-left {
    bottom: 52px;
    left: 18px;
    right: auto;
    top: auto;
}

.ps-watermark-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 179, 1, 0.5);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 16px;
    letter-spacing: 0.5px;
}

.ps-watermark-dot {
    width: 7px;
    height: 7px;
    background: #f5b301;
    border-radius: 50%;
    box-shadow: 0 0 8px #f5b301;
    display: inline-block;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .player-screen-watermark {
        top: 10px;
        right: 12px;
    }
    .ps-watermark-badge {
        font-size: 11px;
        padding: 4px 10px;
        gap: 5px;
    }
    .ps-watermark-dot {
        width: 6px;
        height: 6px;
    }
}

.real-player-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
    position: relative;
}

.html5-video-player,
.embed-player-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000000;
}

/* زر عرض سيرفرات التحميل الأصفر العريض */
.download-section-wrap {
    margin-bottom: 0;
}

.btn-download-servers {
    width: 100%;
    background: #f5b301;
    color: #000000;
    border: none;
    border-radius: 0 0 4px 4px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 900;
    font-family: var(--font-stack);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.15s;
    letter-spacing: -0.2px;
}

.btn-download-servers:hover {
    background: #e5a700;
    color: #000000;
}

.dl-btn-icon-circle {
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.15);
    color: #000000;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* قائمة روابط التحميل المنبثقة بالأكورديون */
.downloads-accordion-panel {
    background: #181920;
    border: 1px solid #282a36;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 14px;
    margin-bottom: 10px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #22232d;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    gap: 10px;
    direction: rtl;
    transition: border-color 0.15s;
}

.download-item:hover {
    border-color: rgba(245, 179, 1, 0.4);
}

.dl-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #e2e8f0;
    flex-wrap: wrap;
    font-family: var(--font-stack);
    font-weight: 600;
}

.dl-badge {
    background: #f5b301;
    color: #000000;
    font-weight: 800;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-stack);
}

.dl-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
}

.dl-size {
    color: #94a3b8;
    font-size: 12.5px;
}

.btn-dl-link {
    background: #16a34a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 4px;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-dl-link:hover {
    background: #15803d;
    color: #ffffff;
}

/* ==========================================================================
   صفحة التصنيف (category.php)
   ========================================================================== */
.category-yellow-banner {
    background: var(--accent-yellow);
    color: #000000;
    text-align: center;
    padding: 26px 16px;
    border-radius: 6px;
    margin: 15px 0 10px;
}

.category-yellow-banner h1 {
    font-size: 28px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.4px;
    font-family: var(--font-stack);
}

.sub-categories-bar {
    background: #14151c;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    overflow-x: auto;
    white-space: nowrap;
    font-family: var(--font-stack);
}

.sub-cat-label {
    color: var(--text-muted);
    font-weight: 700;
}

.sub-cat-link {
    color: var(--accent-yellow);
    font-weight: 700;
}

/* كلاسات صفحة التصنيف */

/* شريط التصنيفات الفرعية */
.category-subcats-bar {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    flex-wrap: wrap;
    direction: rtl;
    font-family: var(--font-stack);
}

.category-subcats-bar .sub-cat-label {
    color: #6b7280;
    font-weight: 700;
}

.category-subcats-bar .sub-cat-link {
    color: #374151;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.15s;
}

.category-subcats-bar .sub-cat-link:hover {
    color: #000000;
    background: #f3f4f6;
}

/* شريط مسار التنقل Breadcrumb الداكن */
.category-dark-breadcrumb {
    background: #181920;
    border: 1px solid #282a36;
    border-radius: 4px;
    padding: 9px 16px;
    margin: 8px 0 12px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    flex-wrap: wrap;
    font-family: var(--font-stack);
}

.category-dark-breadcrumb .b-home {
    color: #f5b301;
    text-decoration: none;
    font-weight: 700;
}

.category-dark-breadcrumb .b-home:hover {
    color: #ffcc33;
}

.category-dark-breadcrumb .b-sep {
    color: #6b7280;
}

.category-dark-breadcrumb .b-current {
    color: #f1f5f9;
    font-weight: 700;
}

/* الحاوية البيضاء للأفلام والوصف والترقيم */
.category-white-wrapper {
    background: #ffffff;
    border-radius: 6px;
    padding: 16px 16px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
}

/* بوكس الوصف والتفاصيل */
.category-seo-box {
    background: #ffffff;
    border: 1px solid #e4e6eb;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 18px;
    text-align: right;
}

.badge-seo-title {
    background: #f5b301;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
    font-family: var(--font-stack);
}

.category-seo-box p {
    color: #374151;
    font-size: 14px;
    line-height: 1.75;
    margin: 0;
    font-family: var(--font-stack);
    font-weight: 500;
}

/* بطاقة السيو النصية في أسفل الصفحة الرئيسية */
.home-seo-card {
    margin-top: 20px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ترقيم صفحات التصنيف */
.category-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    direction: ltr;
    flex-wrap: wrap;
}

.category-pagination .page-arrow,
.category-pagination .page-num {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.15s;
    font-family: var(--font-stack);
}

.category-pagination .page-num:hover,
.category-pagination .page-arrow:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: #9ca3af;
}

.category-pagination .page-num.active {
    background: #f5b301 !important;
    border-color: #f5b301 !important;
    color: #000000 !important;
    font-weight: 900;
}

/* ترقيم الصفحات الداكن Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 30px 0 20px;
    direction: rtl;
    flex-wrap: wrap;
}

.page-num,
.page-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #14151c;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-stack);
    transition: all 0.15s;
    user-select: none;
}

.page-num:hover,
.page-arrow:hover {
    background: #232530;
    color: #ffffff;
    border-color: rgba(255,255,255,0.2);
}

.page-num.active {
    background: var(--accent-yellow);
    border-color: var(--accent-yellow);
    color: #000000;
    font-weight: 900;
}

/* ==========================================================================
   الفوتر والنوافذ المنبثقة
   ========================================================================== */
.site-footer {
    background: #0d0e12;
    border-top: 2px solid var(--accent-yellow);
    padding: 22px 0;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    font-family: var(--font-stack);
}

.footer-inner {
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 12px;
}

.footer-nav a {
    color: var(--accent-yellow);
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-stack);
    transition: color 0.15s;
}

.footer-nav a:hover {
    color: #ffffff;
}

.site-footer p {
    color: #6b7280;
    font-size: 13.5px;
    font-family: var(--font-stack);
    font-weight: 500;
}

/* القائمة الجانبية Off-Canvas المنسدلة */
.offcanvas-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.offcanvas-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.offcanvas-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: #111218;
    border-left: 1px solid var(--border-color);
    z-index: 510;
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff;
    font-family: var(--font-stack);
}

.offcanvas-backdrop.active .offcanvas-sidebar {
    right: 0;
}

.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 15px;
}

.offcanvas-header h4 {
    color: var(--accent-yellow);
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.btn-close-offcanvas {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-offcanvas:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: var(--accent-red);
    color: #ff6b6b;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 6px;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-links a:hover {
    background: rgba(245, 179, 1, 0.12);
    border-color: rgba(245, 179, 1, 0.35);
    color: var(--accent-yellow) !important;
    transform: translateX(-4px);
}

.nav-section-title {
    margin-top: 18px !important;
    margin-bottom: 10px !important;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 16px;
    color: var(--accent-yellow) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-category-list {
    list-style: none;
    padding-right: 14px;
    margin-top: 6px;
    margin-bottom: 10px;
    border-right: 2px solid rgba(245, 179, 1, 0.4);
}

.sub-category-list li {
    margin-bottom: 4px;
}

.sub-category-list a {
    font-size: 13.5px;
    font-weight: 600;
    color: #cbd5e1 !important;
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
}

.sub-category-list a:hover {
    color: var(--accent-yellow) !important;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(-3px);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #14151c;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 100%;
    max-width: 440px;
    padding: 28px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
}

.modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.modal-close:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
}

.modal-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-yellow);
    margin-bottom: 20px;
    text-align: center;
    font-family: var(--font-stack);
    letter-spacing: -0.3px;
}

/* ==========================================================================
   التجاوب الشامل مع جميع شاشات الموبايل والتابلت (100% Mobile & Tablet Responsive)
   ========================================================================== */

/* 1. أجهزة التابلت والشاشات المتوسطة (1024px فما دون - iPad Pro, iPad Air, Galaxy Tab) */
@media (max-width: 1024px) {
    .container {
        padding: 0 12px;
    }

    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .video-grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .video-grid-5,
    .video-grid.video-grid-5 {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 5px;
    }

    .exclusive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .quick-cat-list {
        justify-content: flex-start;
        padding: 4px 10px;
    }

    .watch-page-container {
        margin: 10px auto 25px;
    }
}

/* 2. أجهزة التابلت الرأسية والهواتف الكبيرة (768px فما دون - iPad Portrait, iPhone Pro Max) */
@media (max-width: 768px) {
    /* منع تقريب الشاشة التلقائي في آيفون (iOS auto-zoom prevention) */
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }

    .container {
        padding: 0 8px;
    }

    /* هيدر الموبايل: سطر للشعار وزر الدخول، وسطر كامل لمحرك البحث */
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 0;
        gap: 8px;
    }

    .header-col-start {
        order: 1;
    }

    .header-col-end {
        order: 2;
    }

    .header-col-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
    }

    .site-logo {
        font-size: 22px;
    }

    .btn-auth {
        padding: 6px 12px;
        font-size: 13px;
    }

    .search-form {
        height: 40px;
    }

    .search-input {
        font-size: 14px;
    }

    /* شريط التصنيفات السريعة: سحب سلس بأصبع اليد RTL touch scroll */
    .quick-categories-bar {
        padding: 6px 0;
    }

    .quick-cat-list {
        justify-content: flex-start;
        padding: 2px 8px;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .cat-btn {
        padding: 6px 12px;
        font-size: 12.5px;
        flex-shrink: 0;
    }

    /* الحاويات البيضاء للمحتوى */
    .home-white-wrapper,
    .category-white-wrapper,
    .watch-white-wrapper {
        padding: 10px 10px 20px;
        border-radius: 6px;
        margin-bottom: 16px;
    }

    /* شبكة الأفلام الموحدة */
    .video-grid,
    .video-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
    }

    .video-grid-5,
    .video-grid.video-grid-5 {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 5px;
    }

    .main-section-title,
    .section-light-title {
        padding: 7px 12px;
        font-size: 14px;
        margin-bottom: 10px;
    }

    /* حصريات يلا أفلام في الموبايل والتابلت */
    .exclusive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 6px;
    }

    .exclusive-thumb {
        width: 52px;
        height: 33px;
    }

    .exclusive-title {
        font-size: 12px;
    }

    /* بطاقات الأفلام والتراكبات */
    .card-title-overlay {
        font-size: 11.5px;
        padding: 10px 5px 3px;
    }

    .badge-duration {
        font-size: 10px;
        padding: 2px 4px;
    }

    .badge-tag {
        font-size: 9.5px;
        padding: 2px 4px;
    }

    /* صفحة التصنيف (category.php) */
    .category-yellow-banner {
        padding: 14px 12px;
        margin-top: 6px;
    }

    .category-yellow-banner h1 {
        font-size: 21px;
    }

    .category-subcats-bar {
        padding: 6px 10px;
        font-size: 13px;
        gap: 6px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .category-subcats-bar::-webkit-scrollbar {
        display: none;
    }

    .category-dark-breadcrumb {
        padding: 7px 12px;
        font-size: 13px;
        margin: 6px 0 10px;
        flex-wrap: wrap;
    }

    .category-seo-box {
        padding: 12px 14px;
        margin-bottom: 14px;
    }

    .category-seo-box p {
        font-size: 13.5px;
        line-height: 1.7;
    }

    .category-pagination {
        gap: 4px;
        margin-top: 16px;
        flex-wrap: wrap;
    }

    .category-pagination .page-arrow,
    .category-pagination .page-num {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 6px;
    }

    /* صفحات المشاهدة والتشغيل (watch.php & play.php) */
    .watch-page-container {
        margin: 6px auto 20px;
    }

    .watch-player-box {
        padding: 10px 10px 12px;
    }

    .badge-motamayez {
        font-size: 11px;
        padding: 3px 9px;
    }

    .watch-title-main {
        font-size: 17px;
        margin: 5px 0 10px;
        line-height: 1.45;
    }

    .play-title-breadcrumb-bar {
        font-size: 13px;
        padding: 7px 10px;
        white-space: normal;
        flex-wrap: wrap;
    }

    .fake-play-btn {
        width: 56px;
        height: 56px;
    }

    .svg-play-icon {
        width: 26px;
        height: 26px;
    }

    .fake-player-controls-bar {
        padding: 10px 10px 6px;
    }

    .f-ctrl-left,
    .f-ctrl-right {
        font-size: 12px;
        gap: 6px;
    }

    .f-timeline {
        margin: 0 8px;
    }

    .f-watermark {
        font-size: 11px;
    }

    /* أزرار السيرفرات في play.php */
    .servers-selection-bar {
        padding: 2px 0 8px;
        gap: 5px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .servers-selection-bar::-webkit-scrollbar {
        display: none;
    }

    .server-pill-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-height: 34px;
    }

    /* زر وروابط التحميل */
    .btn-download-servers {
        padding: 11px 14px;
        font-size: 14px;
        min-height: 46px;
    }

    .download-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .download-item {
        padding: 8px 12px;
    }

    /* شريط التفاعل البسيط */
    .watch-reactions-bar {
        padding: 6px 4px 8px;
        margin-bottom: 10px;
    }

    .btn-react-text {
        font-size: 11.5px;
        padding: 3px 6px;
    }

    /* بوكس قصة العمل والوصف */
    .watch-story-box {
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .story-icon-title {
        font-size: 13px;
    }

    .story-body-text p {
        font-size: 11.5px;
        line-height: 1.7;
    }

    .watch-seo-box {
        padding: 8px 12px;
        margin-bottom: 10px;
    }

    .watch-seo-box p {
        font-size: 11px;
        line-height: 1.6;
    }

    .watch-tags-row {
        gap: 4px;
        margin-bottom: 12px;
    }

    .watch-tag-pill {
        font-size: 10.5px;
        padding: 3px 8px;
    }

    .watch-exclusives-header-pill span,
    .watch-related-header-bar h3 {
        font-size: 12.5px;
    }

    .watch-related-header-bar {
        padding: 6px 10px;
        margin-bottom: 8px;
    }

    /* الفوتر */
    .site-footer {
        padding: 14px 0;
        font-size: 11.5px;
    }

    .footer-nav {
        gap: 10px;
    }
}

/* 3. شاشات الموبايل القياسية والصغيرة (480px فما دون - iPhone SE, Android Compact) */
@media (max-width: 480px) {
    .container {
        padding: 0 6px;
    }

    .site-logo {
        font-size: 20px;
    }

    .site-logo a {
        gap: 2px;
    }

    .home-white-wrapper,
    .category-white-wrapper,
    .watch-white-wrapper {
        padding: 8px 6px 14px;
    }

    .category-yellow-banner h1 {
        font-size: 19px;
    }

    .watch-title-main {
        font-size: 15px;
        font-weight: 900;
    }

    .exclusive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .exclusive-thumb {
        width: 44px;
        height: 28px;
    }

    .exclusive-title {
        font-size: 11px;
        font-weight: 700;
    }

    .video-grid,
    .video-grid-4,
    .video-grid-5,
    .video-grid.video-grid-5 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
    }

    .card-title-overlay {
        font-size: 11px;
        font-weight: 700;
        padding: 8px 2px 2px;
    }

    .section-light-title {
        font-size: 13.5px;
        font-weight: 800;
    }

    .badge-duration {
        font-size: 9.5px;
    }

    .badge-tag {
        font-size: 9px;
        font-weight: 800;
    }

    .server-pill-btn {
        font-size: 11.5px;
        min-height: 32px;
    }

    .btn-download-servers {
        font-size: 13px;
    }

    .footer-nav a {
        font-size: 13px;
    }

    .site-footer {
        font-size: 13px;
    }
}

/* 4. الشاشات فائقة الصغر (360px فما دون - iPhone 5/SE1 / Galaxy Z Flip Folded) */
@media (max-width: 360px) {
    .exclusive-grid {
        grid-template-columns: 1fr;
    }

    .exclusive-thumb {
        width: 48px;
        height: 30px;
    }

    .exclusive-title {
        font-size: 11px;
        font-weight: 700;
    }

    .btn-react-text .react-label {
        font-size: 11px;
    }

    .watch-tag-pill {
        font-size: 10.5px;
        padding: 2px 6px;
    }

    .watch-title-main {
        font-size: 14px;
        font-weight: 900;
    }

    .section-light-title {
        font-size: 13px;
        font-weight: 800;
    }

    .card-title-overlay {
        font-size: 10.5px;
        font-weight: 700;
    }

    .site-logo {
        font-size: 18px;
    }
}


/* ==========================================================================
   نافذة المشاركة المطابقة للشاشة المرجعية (Light Theme Modal Share)
   ========================================================================== */
.modal-share-card {
    background: #ffffff !important;
    color: #333333 !important;
    width: 820px !important;
    max-width: 95vw !important;
    border-radius: 4px !important;
    padding: 0 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7) !important;
    overflow: hidden !important;
    border: 1px solid #dcdcdc !important;
    direction: rtl !important;
}

/* شريط الرأس */
.modal-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
}

.modal-share-head-label {
    font-size: 15px;
    color: #666666;
    font-weight: 600;
}

.modal-share-close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}

.modal-share-close-btn:hover {
    color: #333333;
}

/* محتوى النافذة */
.modal-share-body {
    padding: 16px 22px 24px;
}

.modal-share-title {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 16px 0;
    line-height: 1.4;
    text-align: right;
}

/* شبكة العمودين */
.modal-share-grid {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 24px;
    align-items: start;
}

/* العمود الأيمن: البوستر */
.share-movie-col {
    display: flex;
    flex-direction: column;
}

.share-movie-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 3px;
    overflow: hidden;
    background: #000000;
}

.share-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.share-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-thumb-play-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-thumb-play-circle svg {
    margin-right: -2px;
}

.share-movie-synopsis-text {
    font-size: 11.5px;
    color: #777777;
    line-height: 1.65;
    margin-top: 10px;
    text-align: right;
}

/* العمود الأيسر: الحقول والأزرار */
.share-form-col {
    display: flex;
    flex-direction: column;
}

.share-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #555555;
    margin: 0 0 8px 0;
    text-align: right;
}

/* أزرار التواصل المربعة */
.share-social-icons-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.share-sq-icon {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.share-sq-icon:hover {
    opacity: 0.88;
}

.sq-red {
    background: #dd4b39;
}

.sq-whatsapp {
    background: #25d366 !important;
}

.sq-telegram {
    background: #0088cc !important;
}

.sq-twitter {
    background: #000000 !important;
    border: 1px solid rgba(255,255,255,0.2);
}

.sq-facebook {
    background: #1877f2 !important;
}

/* حقول الإدخال مع الأيقونة المرفقة */
.share-input-addon-group {
    display: flex;
    align-items: stretch;
    margin-bottom: 10px;
    direction: ltr;
}

.share-field-input {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 13px;
    color: #444444;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.share-field-input:focus {
    border-color: #999999;
}

.share-input-addon-group .share-field-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    font-family: monospace, Tahoma, sans-serif;
    font-size: 12px;
}

.share-textarea-field {
    resize: none;
    height: 48px;
    line-height: 1.4;
}

.btn-share-addon {
    background: #f5f5f5;
    border: 1px solid #cccccc;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-share-addon:hover {
    background: #e8e8e8;
}

.btn-addon-textarea {
    height: 48px;
}

/* نموذج المشاركة عبر البريد */
.share-email-subform {
    margin-top: 4px;
}

.share-form-row {
    margin-bottom: 8px;
}

.share-form-row .share-field-input {
    width: 100%;
    box-sizing: border-box;
}

/* صف الكابتشا وزر أرسل */
.share-captcha-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.captcha-controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-refresh-captcha {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-refresh-captcha:hover {
    transform: rotate(45deg);
}

.share-captcha-pic {
    width: 105px;
    height: 34px;
    border-radius: 3px;
    border: 1px solid #cccccc;
    display: block;
}

.captcha-input-box {
    width: 110px !important;
    flex: none !important;
    text-align: center;
    height: 34px;
    box-sizing: border-box;
}

.btn-share-green-submit {
    background: #5cb85c;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    padding: 7px 26px;
    cursor: pointer;
    height: 34px;
    transition: background 0.2s;
}

.btn-share-green-submit:hover {
    background: #4cae4c;
}

.share-status-message {
    margin-top: 8px;
    font-size: 12.5px;
    display: none;
}

.share-status-message.success {
    display: block;
    color: #3c763d;
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    padding: 8px 12px;
    border-radius: 4px;
}

.share-status-message.error {
    display: block;
    color: #a94442;
    background: #f2dede;
    border: 1px solid #ebccd1;
    padding: 8px 12px;
    border-radius: 4px;
}

/* تجاوب نافذة المشاركة في الموبايل */
@media (max-width: 768px) {
    .modal-share-card {
        width: 95vw !important;
        margin: 10px auto !important;
    }

    .modal-share-body {
        padding: 14px 14px 18px;
    }

    .modal-share-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .modal-share-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .share-movie-col {
        order: 1;
    }

    .share-form-col {
        order: 2;
    }

    .share-captcha-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .captcha-controls-group {
        justify-content: space-between;
    }

    .captcha-input-box {
        flex: 1 !important;
        width: auto !important;
    }

    .btn-share-green-submit {
        width: 100%;
    }
}




/* ============================================================
   مناطق الإعلانات – Ad Zones (Frontend)
   ============================================================ */
.pm-ads-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* بانر أعلى الموقع */
.pm-ads-banner:not([class*="pm-ads-"]) {
    padding: 10px 0;
    min-height: 90px;
}

/* قبل المشغل */
.pm-ads-before-player {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    min-height: 60px;
}

/* بعد المشغل */
.pm-ads-after-player {
    margin-top: 14px;
    border-radius: 8px;
    overflow: hidden;
    min-height: 60px;
}

/* وسط صفحة المشاهدة */
.pm-ads-watch-middle {
    margin: 18px 0;
    border-radius: 8px;
    overflow: hidden;
    min-height: 90px;
}

/* أعلى صفحة التصنيف */
.pm-ads-category {
    margin-bottom: 18px;
    border-radius: 8px;
    overflow: hidden;
    min-height: 90px;
}

/* أسفل الموقع */
.pm-ads-footer {
    padding: 12px 0;
    min-height: 90px;
}

/* تجاوبية: إخفاء الإعلانات الكبيرة على الموبايل */
@media (max-width: 480px) {
    .pm-ads-banner img,
    .pm-ads-banner ins {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* ============================================================
   الذكاء الاصطناعي – AI Features Frontend CSS
   ============================================================ */

/* بادج AI في البحث */
.search-ai-badge {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: .7;
    pointer-events: none;
    z-index: 2;
}
.search-form { position: relative; }

/* chatbot bubble */
.chatbot-bubble {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9999;
}
@media (max-width: 480px) {
    .chatbot-bubble { bottom: 16px; left: 16px; }
    .chatbot-window { bottom: 80px !important; left: 10px !important; right: 10px !important; width: auto !important; }
}

/* ============================================================
   الميزات التنافسية الحصرية (Super Features)
   ============================================================ */

/* زر قائمتي في الهيدر */
.btn-watchlist-nav {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #22242e;
    border: 1px solid #363948;
    color: #e5e7eb;
}
.btn-watchlist-nav:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}
.badge-watchlist-count {
    background: var(--accent-yellow);
    color: #000000;
    font-size: 11px;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.2;
}

/* زر اقترح لي فيلم في الشريط السريع */
.cat-btn-roulette {
    background: linear-gradient(135deg, #f5b301 0%, #e08b00 100%) !important;
    color: #000000 !important;
    font-weight: 900 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(245, 179, 1, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    font-size: 12.5px;
    padding: 5px 12px;
}
.cat-btn-roulette:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 179, 1, 0.6);
}

/* أيقونة حفظ الفيلم على كارت البوستر */
.card-btn-watchlist {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 26px;
    height: 26px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s, background 0.15s, color 0.15s, transform 0.15s;
}
.video-card:hover .card-btn-watchlist {
    opacity: 1;
}
.card-btn-watchlist:hover {
    background: rgba(0, 0, 0, 0.95);
    color: var(--accent-yellow);
    transform: scale(1.1);
}
.card-btn-watchlist.active {
    opacity: 1;
    background: var(--accent-yellow);
    color: #000000;
    border-color: var(--accent-yellow);
}
@media (max-width: 768px) {
    .card-btn-watchlist {
        opacity: 0.85;
    }
}

/* نافذة روليت الأفلام المنبثقة Modal Roulette */
.modal-roulette-card {
    background: #14151b !important;
    border: 1px solid #282a36 !important;
    color: #f1f5f9 !important;
    width: 580px !important;
    max-width: 95vw !important;
    border-radius: 8px !important;
    padding: 0 !important;
    overflow: hidden;
    direction: rtl;
}
.modal-roulette-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #1c1d26;
    border-bottom: 1px solid #282a36;
}
.modal-roulette-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-yellow);
}
.modal-roulette-body {
    padding: 18px;
}
.roulette-section-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #d1d5db;
    margin-bottom: 8px;
}
.mood-chips, .lang-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.mood-chip, .lang-chip {
    background: #20222d;
    border: 1px solid #323545;
    color: #e5e7eb;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-stack);
    cursor: pointer;
    transition: all 0.15s;
}
.mood-chip:hover, .lang-chip:hover {
    background: #2a2d3c;
    border-color: var(--accent-yellow);
}
.mood-chip.active, .lang-chip.active {
    background: var(--accent-yellow);
    color: #000000;
    border-color: var(--accent-yellow);
}
.roulette-action-box {
    text-align: center;
    margin-bottom: 16px;
}
.btn-spin-roulette {
    background: linear-gradient(135deg, #f5b301 0%, #e08b00 100%);
    color: #000;
    border: none;
    padding: 11px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 900;
    font-family: var(--font-stack);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(245, 179, 1, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-spin-roulette:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(245, 179, 1, 0.6);
}
.roulette-result-card {
    background: #1c1d27;
    border: 1px solid #2d3040;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
}
.result-card-inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.result-thumb-wrap {
    position: relative;
    width: 140px;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}
.result-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.result-badge-year {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.8);
    color: var(--accent-yellow);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
}
.result-info {
    flex: 1;
    min-width: 0;
}
.result-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
}
.result-synopsis {
    margin: 0 0 10px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.result-actions {
    display: flex;
    gap: 8px;
}
.btn-res-watch {
    background: #16a34a;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-res-watch:hover {
    background: #15803d;
}
.btn-res-next {
    background: #2b2e3d;
    color: #e5e7eb;
    border: 1px solid #3c4052;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: background 0.15s;
}
.btn-res-next:hover {
    background: #35394b;
}

/* نافذة قائمتي للمشاهدة لاحقاً Modal Watchlist */
.modal-watchlist-card {
    background: #14151b !important;
    border: 1px solid #282a36 !important;
    color: #f1f5f9 !important;
    width: 650px !important;
    max-width: 95vw !important;
    border-radius: 8px !important;
    padding: 0 !important;
    overflow: hidden;
    direction: rtl;
}
.modal-watchlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #1c1d26;
    border-bottom: 1px solid #282a36;
}
.modal-watchlist-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-yellow);
}
.modal-watchlist-body {
    padding: 16px;
    max-height: 480px;
    overflow-y: auto;
}
.watchlist-empty-state {
    text-align: center;
    padding: 30px 15px;
    color: #9ca3af;
}
.watchlist-empty-state .empty-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}
.watchlist-empty-state h4 {
    color: #ffffff;
    margin: 0 0 6px;
}
.watchlist-items-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.watchlist-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1c1d26;
    border: 1px solid #282a36;
    border-radius: 6px;
    padding: 8px 12px;
    transition: background 0.15s;
}
.watchlist-card-item:hover {
    background: #222430;
}
.wl-thumb-link {
    flex-shrink: 0;
    width: 70px;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
}
.wl-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wl-info {
    flex: 1;
    min-width: 0;
}
.wl-title {
    display: block;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.wl-year {
    font-size: 11px;
    color: var(--accent-yellow);
}
.wl-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-wl-play {
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
}
.btn-wl-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.watchlist-footer-actions {
    padding-top: 14px;
    text-align: center;
    border-top: 1px solid #282a36;
    margin-top: 14px;
}
.btn-clear-watchlist {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-stack);
}

/* أكمل المشاهدة */
.continue-watching-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-clear-history {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-stack);
    font-weight: 600;
}
.btn-clear-history:hover {
    color: #ef4444;
}

/* شريط فاحص ومساعد السيرفرات الذكي */
.server-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: #191b24;
    border: 1px solid #262835;
    border-radius: 4px;
    padding: 6px 12px;
    margin: 8px 0 10px;
}
.server-status-tip {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
}
.server-status-actions {
    display: flex;
    gap: 6px;
}
.btn-server-action {
    background: #252836;
    border: 1px solid #383c50;
    color: #e5e7eb;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: all 0.15s;
}
.btn-server-action:hover {
    background: #313548;
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}
.btn-server-report {
    color: #f87171;
    border-color: #552727;
}
.btn-server-report:hover {
    background: #451a1a;
    color: #fca5a5;
    border-color: #ef4444;
}
.srv-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    margin-left: 4px;
    flex-shrink: 0;
}

/* توست الإشعارات الذكي */
.qfilm-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1c1d27;
    color: #ffffff;
    border: 1px solid var(--accent-yellow);
    padding: 10px 18px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    font-size: 13.5px;
    font-weight: 700;
    z-index: 99999;
    direction: rtl;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.qfilm-toast.show {
    opacity: 1;
    transform: translateY(0);
}

