

/* ==================================================== */
/* 1. الحاوية الرئيسية للفيديو (Relative Container) */
/* ==================================================== */
.video-display-box {
    position: relative;
    /* ضروري لضبط تموضع عناصر التحكم المطلق */
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    /* لمنع عناصر التحكم من الخروج عن الزوايا المستديرة */
    background: transparent;
    /* خلفية سوداء للمشغل */
}
.vdb {
    position: relative;
    /* ضروري لضبط تموضع عناصر التحكم المطلق */
    width: 10%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    /* لمنع عناصر التحكم من الخروج عن الزوايا المستديرة */
    background: transparent;
    /* خلفية سوداء للمشغل */
}

/* ==================================================== */
/* 2. حاوية التحكم العايمة (The Floating Bar) */
/* ==================================================== */
.video-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    /* تموضع متوسط وإزاحة عمودية للتأثير */
    width: 100%;
    background: transparent;
    /* backdrop-filter: blur(14px);  */
    /* -webkit-backdrop-filter: blur(14px); */
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    padding: 8px 18px;
    box-sizing: border-box;
    z-index: 10;
    opacity: 0;
    /* مخفي افتراضياً */
    transition: transform 0.3s ease, opacity 0.3s ease;
    /* تأثير دخول ناعم */
}

/* إظهار اللوحة بسلاسة عند وقوف الماوس على صندوق الفيديو */
.video-display-box:hover .video-controls {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================
   تنسيق قائمة الجودات المنبثقة (Pixelum Premium Style)
   ========================================== */
.video-display-box {
    position: relative; /* لضمان أن القائمة تطفو بناءً على صندوق الفيديو */
}

.quality-menu-popup {
    position: absolute;
    bottom: 60px; /* ترفع القائمة فوق شريط التحكم */
    right: 20px;  /* محاذاة جهة اليمين فوق أزرار التحكم والترس */
    background: rgba(15, 15, 20, 0.95); /* خلفية داكنة فخمة */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 0;
    min-width: 100px;
    z-index: 200; /* لضمان ظهورها فوق الفيديو وأي عناصر أخرى */
    backdrop-filter: blur(10px); /* تأثير الزجاج الضبابي الفخم */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: none; /* مخفية افتراضياً والـ JS بيتحكم فيها */
}

/* الكلاس الخاص بالإخفاء */
.quality-menu-popup.hide {
    display: none !important;
}

/* تنسيق أزرار الجودات الداخلية */
.quality-menu-popup button {
    width: 100%;
    background: none;
    border: none;
    color: var(--text);
    padding: 8px 16px;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: block;
    font-weight: normal;
}

/* تأثير المرور فوق الأزرار */
.quality-menu-popup button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #007bff; /* يقلب أزرق خفيف عند الوقوف عليه */
}

/* تنسيق أزرار الجودة الافتراضي */
.quality-btn {
    position: relative;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* إخفاء علامة الصح الافتراضية عن الزراير المش نشطة */
.quality-btn .check-mark {
    display: none;
    margin-left: 5px;
    color: #28a745; /* لون أخضر جذاب للعلامة */
    font-weight: bold;
    object-fit: contain;
}

/* الزرار النشط المتفعل حالياً (Luxury Tech Style) */
.quality-btn.active {
    background: rgba(0, 123, 255, 0.2); /* خلفية زرقاء خفيفة وفخمة */
    border-color: #007bff; /* إطار أزرق مضيء */
    color: #007bff;
    font-weight: bold;
}

/* إظهار علامة الصح فقط جوه الزرار النشط */
.quality-btn.active .check-mark {
    display: inline;
}

/* ==================================================== */
/* 3. شريط التقدم الكامل (Full Progress Bar) */
/* ==================================================== */
.progress-area {
    width: 100%;
    display: flex;
    align-items: center;
    height: 16px;
    /* ارتفاع مريح لتفاعل الماوس */
    position: relative;
    padding-bottom: 2px;
}

/* السلايدر الرفيع المودرن (The Modern Seek Slider) */
.seek-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    /* الارتفاع النحيف الافتراضي */
    /* التلوين الافتراضي: برتقالي قبل، ورمادي بعد (النسبة بتتعدل بالجافا سكريبت) */
    background: linear-gradient(to right, var(--icon1) 0%, rgba(255, 255, 255, 0.2) 0%);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    transition: height 0.1s ease;
}

.progress-area:hover .seek-slider {
    height: 6px;
}

/* الدائرة المودرن اللي في النص (لإصدارات Webkit مثل Chrome و Edge و Safari) */
.seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    /* الدائرة بيضاء ناصعة في المنتصف */
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: transform 0.1s ease;
}

/* تكبير الدائرة سنّة عند الهوفر عشان تسهل السحب */
.progress-area:hover .seek-slider::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* الدائرة المودرن (لإصدارات Firefox) */
.seek-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.progress-area:hover .seek-slider::-moz-range-thumb {
    transform: scale(1.2);
}

/* ==================================================== */
/* 4. لوحة الأزرار السفلية المقسمة (The Button Bar) */
/* ==================================================== */
.controls-buttons-bar {
    display: flex;
    justify-content: space-between;
    /* توزيع الأطراف يمين وشمال */
    align-items: center;
    width: 100%;
    padding-top: 4px;
    /* background: gold; */
}

.controls-left-side,
.controls-right-side {
    display: flex;
    align-items: center;
    gap: 16px;
    /* مسافة بين الأزرار المجاورة */
    /* background: rgb(109, 99, 41); */
}

/* ==================================================== */
/* 5. تنسيق الأزرار وعرض التوقيت الرقمي (Buttons & Time) */
/* ==================================================== */

/* ستايل الأزرار الموحد داخل المشغل */
.video-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    font-size: 21;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10 50;
    border-radius: 10%;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.play-btn:hover {
    transform: scale(1.05);
    /* تكبير رفيع جداً لزر التشغيل */
}

/* تأثير وقوف الماوس لباقي الأزرار */
.video-controls button:not(.play-btn):hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--icon1);
    /* يضيء باللون البرتقالي الهوية الخاص ببيكسلوم */
}

/* تنسيق عرض التوقيت الرقمي */
.time-display {
    color: var(--text);
    font-size: 18;
    font-family: monospace;
    /* لمنع الـ layout shift عند تغيير الأرقام */
    user-select: none;
    /* لمنع اختيار النص عند السحب */
}

/* زر الـ Play/Pause */
.play-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50;
    height: 50;
}

.play-btn:hover {
    color: var(--icon1);
    /* يضيء بالبرتقالي عند الهوفر */
}


/* سحب شريط التمرير المستقبلي (Seek Slider) */
.seek-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
}

.seek-slider:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* تخصيص الدائرة المتحركة جوه شريط التمرير */
.seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--icon1);
    /* لون الهوية البرتقالي */
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.seek-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--icon1);
    cursor: pointer;
    border: none;
}
