/* =========================================================
   PREMIUM PLAY BUTTON (Modern Glass Effect)
   ========================================================= */

.playing-button {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 74px;
    height: 74px;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: linear-gradient(
        135deg,
        rgba(0, 200, 255, 0.7),
        rgba(0, 140, 255, 0.6)
    );
    box-shadow:
        0 0 0 4px rgba(255,255,255,0.15),
        0 10px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.ms-streaming-thumb:hover .playing-button {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow:
        0 0 0 6px rgba(255,255,255,0.2),
        0 12px 40px rgba(0,0,0,0.6);
}

/* Play triangle */
.playing-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #fff;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    margin-left: 4px;
}

/* Pulse animation */
.playing-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 200, 255, 0.35);
    animation: msPulse 2s infinite;
    z-index: -1;
}

@keyframes msPulse {
    0%   { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.8); opacity: 0; }
}









/* =========================================================
   MEDIA POPUP SYSTEM (Unified)
   ========================================================= */

.media-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    padding: 20px;
}

.media-popup.active {
    opacity: 1;
    visibility: visible;
}

/* Popup content */
.popup-content {
    position: relative;
    width: 100%;
    max-width: 1100px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

/* 16:9 responsive container */
.popup-inner {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.popup-inner iframe,
.popup-inner video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
    background: #000;
}




/* =========================================================
   CLOSE BUTTON (Clean Version)
   ========================================================= */

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s ease;
    z-index: 10;
}

.popup-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg) scale(1.1);
}

/* =========================================================
   MOBILE OPTIMIZATION
   ========================================================= */

@media (max-width: 600px) {
    .media-popup {
        padding: 12px;
    }

    .popup-content {
        border-radius: 12px;
    }

    .playing-button {
        width: 60px;
        height: 60px;
    }

    .playing-button::before {
        border-left: 16px solid #fff;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
    }
}