/* =========================================================
   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;
    }
}


/* =========================================================
   v3.2 FtaFlix play button polish
   Light theme: funky orange. Dark theme: funky yellow.
   Smaller, cleaner TV play overlay.
   ========================================================= */

:root{
    --ms-stream-play-main:#ff7a18;
    --ms-stream-play-alt:#ffb000;
    --ms-stream-play-glow:rgba(255,122,24,.42);
    --ms-stream-play-pulse:rgba(255,122,24,.28);
}

html[data-theme="dark"],
body[data-theme="dark"],
[data-theme="dark"]{
    --ms-stream-play-main:#ffe259;
    --ms-stream-play-alt:#ffa751;
    --ms-stream-play-glow:rgba(255,226,89,.44);
    --ms-stream-play-pulse:rgba(255,226,89,.30);
}

.playing-button{
    width:54px!important;
    height:54px!important;
    top:50%!important;
    left:50%!important;
    background:linear-gradient(135deg,var(--ms-stream-play-main),var(--ms-stream-play-alt))!important;
    box-shadow:
        0 0 0 3px rgba(255,255,255,.22),
        0 8px 22px rgba(0,0,0,.32),
        0 0 22px var(--ms-stream-play-glow)!important;
    z-index:20!important;
}

.ms-streaming-thumb:hover .playing-button{
    transform:translate(-50%,-50%) scale(1.06)!important;
    box-shadow:
        0 0 0 4px rgba(255,255,255,.28),
        0 10px 28px rgba(0,0,0,.42),
        0 0 30px var(--ms-stream-play-glow)!important;
}

.playing-button::before{
    border-left-width:15px!important;
    border-top-width:10px!important;
    border-bottom-width:10px!important;
    margin-left:3px!important;
    filter:drop-shadow(0 1px 2px rgba(0,0,0,.25));
}

.playing-button::after{
    background:var(--ms-stream-play-pulse)!important;
    animation:msPulse 2.2s infinite!important;
}

/* Smaller on dense cards/widgets */
.related-card-media .playing-button,
.post-card-thumbnail .playing-button,
.fta-search-thumb .playing-button,
.widget .playing-button,
.site-sidebar .playing-button{
    width:44px!important;
    height:44px!important;
}

.related-card-media .playing-button::before,
.post-card-thumbnail .playing-button::before,
.fta-search-thumb .playing-button::before,
.widget .playing-button::before,
.site-sidebar .playing-button::before{
    border-left-width:12px!important;
    border-top-width:8px!important;
    border-bottom-width:8px!important;
}

/* Mobile: keep overlays compact */
@media(max-width:700px){
    .playing-button{
        width:46px!important;
        height:46px!important;
    }

    .playing-button::before{
        border-left-width:12px!important;
        border-top-width:8px!important;
        border-bottom-width:8px!important;
    }
}

