#sgctv-player.sgctv-player {
    position: fixed;
    z-index: 9100;
    width: 360px;
    max-width: calc(100vw - 20px);
    right: 18px;
    bottom: 18px;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    box-sizing: border-box;
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, .38));
}

#sgctv-player *,
#sgctv-player *:before,
#sgctv-player *:after {
    box-sizing: border-box;
}

#sgctv-player .sgctv-shell {
    overflow: hidden;
    border: 1px solid rgba(95, 212, 255, .62);
    border-radius: 12px;
    background: rgba(4, 19, 33, .98);
    box-shadow: 0 0 0 1px rgba(21, 141, 209, .18), 0 0 28px rgba(21, 141, 209, .22);
}

#sgctv-player .sgctv-head {
    min-height: 40px;
    padding: 7px 8px 7px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: linear-gradient(180deg, #0b3452 0%, #071e31 100%);
    border-bottom: 1px solid rgba(95, 212, 255, .22);
    cursor: move;
    user-select: none;
    touch-action: none;
}

#sgctv-player .sgctv-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    font-size: 12px;
}

#sgctv-player .sgctv-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #5fd4ff;
    box-shadow: 0 0 10px rgba(95, 212, 255, .9);
    animation: sgctvPulse 1.9s ease-in-out infinite;
}

@keyframes sgctvPulse {
    0%, 100% { opacity: .55; transform: scale(.88); }
    50% { opacity: 1; transform: scale(1.08); }
}

#sgctv-player .sgctv-head-actions {
    display: flex;
    gap: 5px;
    cursor: default;
}

#sgctv-player button {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
    border-radius: 6px;
    min-width: 28px;
    height: 27px;
    padding: 0 8px;
    font-size: 11px;
    line-height: 25px;
    cursor: pointer;
}

#sgctv-player button:hover,
#sgctv-player button:focus {
    background: rgba(95, 212, 255, .18);
    border-color: rgba(95, 212, 255, .62);
    outline: none;
}

#sgctv-player .sgctv-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #02090f;
}

#sgctv-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 8%;
    background: #02090f;
}

#sgctv-player .sgctv-empty {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 24px;
    text-align: center;
    background: radial-gradient(circle at 50% 36%, rgba(21, 141, 209, .32), transparent 46%), #02090f;
}

#sgctv-player.sgctv-empty-mode .sgctv-empty {
    display: flex;
}

#sgctv-player.sgctv-empty-mode video {
    visibility: hidden;
}

#sgctv-player .sgctv-empty-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
}

#sgctv-player .sgctv-empty-copy {
    max-width: 260px;
    color: #a9cfe2;
    font-size: 12px;
    line-height: 1.45;
}

#sgctv-player .sgctv-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 12px 10px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .8) 100%);
    pointer-events: none;
}

#sgctv-player .sgctv-badge {
    display: none;
    margin-bottom: 5px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(21, 141, 209, .9);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .55px;
    text-transform: uppercase;
}

#sgctv-player .sgctv-badge.sgctv-visible {
    display: inline-block;
}

#sgctv-player .sgctv-item-title {
    display: block;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

#sgctv-player .sgctv-controls {
    min-height: 43px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #071827;
    border-top: 1px solid rgba(95, 212, 255, .16);
}

#sgctv-player .sgctv-controls .sgctv-cta {
    margin-left: auto;
    padding-left: 10px;
    padding-right: 10px;
    border-color: rgba(95, 212, 255, .45);
    color: #8ce2ff;
}

#sgctv-player.sgctv-no-cta .sgctv-cta {
    display: none;
}

#sgctv-player.sgctv-minimized .sgctv-stage,
#sgctv-player.sgctv-minimized .sgctv-controls {
    display: none;
}

#sgctv-player.sgctv-minimized .sgctv-head {
    border-bottom: 0;
}

#sgctv-player.sgctv-expanded {
    width: min(620px, calc(100vw - 24px)) !important;
}

#sgctv-player.sgctv-dragging {
    transition: none !important;
}

@media (max-width: 680px) {
    #sgctv-player.sgctv-player {
        width: min(320px, calc(100vw - 20px)) !important;
        right: 10px !important;
        bottom: 10px !important;
        left: auto !important;
        top: auto !important;
        filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .38));
    }

    #sgctv-player .sgctv-head {
        cursor: default;
    }

    #sgctv-player .sgctv-item-title {
        font-size: 13px;
    }

    #sgctv-player button {
        min-width: 27px;
        padding: 0 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #sgctv-player .sgctv-dot {
        animation: none;
    }
}


/* Build 5: safe temporary close + instant restore control. */
.sgctv-restore {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2147483000;
    border: 1px solid rgba(103, 207, 255, .85);
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(2, 20, 50, .94);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 90, 180, .35);
}

.sgctv-restore:hover,
.sgctv-restore:focus {
    color: #5fd4ff;
    outline: none;
}

@media (max-width: 680px) {
    .sgctv-restore {
        right: 10px;
        bottom: 10px;
    }
}

/* Build 8: embedded landing-page Eva; floating mode unchanged elsewhere. */
#sgctv-home-embed { width: 100%; min-width: 0; }
#sgctv-home-embed #sgctv-player.sgctv-embedded {
    position: relative !important; inset: auto !important; left: auto !important;
    top: auto !important; right: auto !important; bottom: auto !important;
    width: 100% !important; max-width: 100% !important; filter: none;
    transform: none !important; z-index: 1;
}
#sgctv-home-embed #sgctv-player.sgctv-embedded .sgctv-head { cursor: default; }
#sgctv-home-embed #sgctv-player.sgctv-embedded .sgctv-head-actions { display: none; }
#sgctv-home-embed #sgctv-player.sgctv-embedded .sgctv-shell {
    border-radius: 14px; border-color: rgba(100,225,255,.9);
}
#sgctv-home-embed #sgctv-player.sgctv-embedded .sgctv-stage { aspect-ratio: 16 / 9; }

/* Build 10: strong homepage embed rule, including cached older player instances. */
#sgc-home #sgctv-home-embed .sgctv-player,
#sgc-home #sgctv-home-embed #sgctv-player {
    position: relative !important;
    inset: auto !important;
    left: auto !important; top: auto !important;
    right: auto !important; bottom: auto !important;
    width: 100% !important; max-width: 100% !important;
    margin: 0 !important; transform: none !important;
    z-index: 1 !important;
}
#sgc-home #sgctv-home-embed .sgctv-head-actions { display:none !important; }
#sgc-home #sgctv-home-embed .sgctv-head { cursor:default !important; }
