/* Match End Manager Styles */

/* إخفاء فوري للمشغل - يعمل حتى قبل تحميل JavaScript */
body.match-ended .video-con,
body.match-ended .embed-responsive,
body.match-ended .embed-responsive-16by9,
body.match-ended iframe[data-loader-src],
body.match-ended div.video-con,
body.match-ended div.embed-responsive,
body.match-ended div[class*="video-con"],
body.match-ended div[class*="embed-responsive"],
body.match-ended iframe,
body.match-ended video,
body.match-ended embed,
body.match-ended object,
body[data-match-ended="1"] .video-con,
body[data-match-ended="1"] .embed-responsive,
body[data-match-ended="1"] .embed-responsive-16by9,
body[data-match-ended="1"] iframe[data-loader-src],
body[data-match-ended="1"] div.video-con,
body[data-match-ended="1"] div.embed-responsive,
body[data-match-ended="1"] div[class*="video-con"],
body[data-match-ended="1"] div[class*="embed-responsive"],
body[data-match-ended="1"] iframe,
body[data-match-ended="1"] video,
body[data-match-ended="1"] embed,
body[data-match-ended="1"] object {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

body.match-ended .mem-match-ended-message {
    display: block !important;
}

.mem-match-ended-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in;
}

.mem-message-content {
    text-align: center;
    color: #fff;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.mem-message-content h3 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.mem-message-content p {
    font-size: 1.5em;
    margin: 0;
    color: #fff;
}

/* إخفاء الإعلانات والمشغل عند انتهاء المباراة */
body.match-ended .video-player,
body.match-ended iframe[src*="youtube"],
body.match-ended iframe[src*="vimeo"],
body.match-ended .player-container,
body.match-ended .video-con,
body.match-ended .embed-responsive,
body.match-ended .embed-responsive-16by9,
body.match-ended iframe[data-loader-src],
body.match-ended .advertisement,
body.match-ended .ads,
body.match-ended [class*="ad-"],
body.match-ended [id*="ad-"],
body.match-ended iframe,
body.match-ended video,
body.match-ended embed,
body.match-ended object {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* إخفاء فوري عند تحميل الصفحة إذا كانت المباراة منتهية */
body[data-match-ended="1"] .video-player,
body[data-match-ended="1"] iframe[src*="youtube"],
body[data-match-ended="1"] iframe[src*="vimeo"],
body[data-match-ended="1"] .player-container,
body[data-match-ended="1"] .video-con,
body[data-match-ended="1"] .embed-responsive,
body[data-match-ended="1"] .embed-responsive-16by9,
body[data-match-ended="1"] iframe[data-loader-src],
body[data-match-ended="1"] iframe,
body[data-match-ended="1"] video,
body[data-match-ended="1"] embed,
body[data-match-ended="1"] object,
body.match-ended .video-player,
body.match-ended iframe[src*="youtube"],
body.match-ended iframe[src*="vimeo"],
body.match-ended .player-container,
body.match-ended .video-con,
body.match-ended .embed-responsive,
body.match-ended .embed-responsive-16by9,
body.match-ended iframe[data-loader-src],
body.match-ended iframe,
body.match-ended video,
body.match-ended embed,
body.match-ended object {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* إخفاء شامل لجميع المشغلات */
body.match-ended iframe,
body.match-ended video,
body.match-ended embed,
body.match-ended object,
body.match-ended [class*="player"],
body.match-ended [id*="player"],
body.match-ended [class*="video"],
body.match-ended [id*="video"],
body.match-ended .video-con,
body.match-ended .embed-responsive,
body.match-ended .embed-responsive-16by9,
body.match-ended iframe[data-loader-src],
div.video-con,
div.embed-responsive,
div.embed-responsive-16by9 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* إخفاء مباشر بدون شرط body.match-ended */
.video-con.match-ended,
.embed-responsive.match-ended,
iframe[data-loader-src].match-ended {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mem-message-content {
        padding: 20px;
        margin: 20px;
    }
    
    .mem-message-content h3 {
        font-size: 1.8em;
    }
    
    .mem-message-content p {
        font-size: 1.2em;
    }
}

