/* =========================================
   Custom Video Player Styles | DevMan07
   ========================================= */

.custom-video-player {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* التعديل لمنع قص الفيديو واحتوائه بالكامل */
.custom-video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    background: #000;
    z-index: 1;
}

/* زر التشغيل الكبير في المنتصف */
.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 8, 20, 0.7);
    border: 2px solid #00e5ff;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    backdrop-filter: blur(3px);
}

.center-play-btn svg {
    width: 30px;
    height: 30px;
    color: #00e5ff;
    margin-left: 5px;
}

.center-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.8);
    background: rgba(0, 229, 255, 0.2);
}

.center-play-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(1.5);
}

/* شريط التحكم السفلي */
.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 25px 15px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.control-btn svg {
    width: 26px;
    height: 26px;
    color: #00e5ff;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(0,229,255,0.3));
    display: block;
}

.control-btn:hover svg {
    color: #ffffff;
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(0,229,255,0.8));
}

/* شريط التقدم */
.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.progress-bar {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    transition: 0.2s;
}

.progress-bar:hover { height: 6px; }

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00e5ff;
    cursor: pointer;
    box-shadow: 0 0 10px #00e5ff;
}

.progress-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00e5ff;
    cursor: pointer;
    box-shadow: 0 0 10px #00e5ff;
}

/* =========================================
   تأقلم المشغل مع الهواتف (Responsive Fix)
   ========================================= */
@media (max-width: 600px) {
    .custom-video-player {
        aspect-ratio: 16 / 9; /* تحويل المشغل ليصبح عرضياً في الهواتف */
        max-width: 100%;
        border-radius: 8px;
    }
    .center-play-btn {
        width: 50px;
        height: 50px;
    }
    .center-play-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* =========================================
   تأقلم الفيديو مع الشاشة الكاملة
   ========================================= */
.custom-video-player:fullscreen { max-width: 100%; width: 100%; height: 100%; border-radius: 0; }
.custom-video-player:fullscreen video { object-fit: contain; background: #000; }
.custom-video-player:-webkit-full-screen { max-width: 100%; width: 100%; height: 100%; border-radius: 0; }
.custom-video-player:-webkit-full-screen video { object-fit: contain; background: #000; }
.custom-video-player:-moz-full-screen { max-width: 100%; width: 100%; height: 100%; border-radius: 0; }
.custom-video-player:-moz-full-screen video { object-fit: contain; background: #000; }