/* ==========================================================================
   7 STAR NEWS - Custom 24x7 Live Stream Player Styles
   ========================================================================== */

:root {
    --live-red: #e50914;
    --live-red-glow: rgba(229, 9, 20, 0.6);
    --player-bg: #050811;
    --control-bar-bg: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(5,8,17,0.92) 100%);
    --ticker-bg: #0b2447;
    --ticker-accent: #fbbc05;
}

.live-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--player-bg);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
    font-family: 'Inter', 'Noto Sans Devanagari', sans-serif;
    user-select: none;
    outline: none;
}

.live-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

/* Watermark Overlay (Top Right) */
.player-watermark {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 40;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-watermark img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

.player-watermark:hover {
    transform: scale(1.05);
}

/* LIVE Indicator Badge (Top Left) */
.player-top-left-badges {
    position: absolute;
    top: 20px;
    left: 24px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-live-pulse {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--live-red);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 6px;
    box-shadow: 0 0 15px var(--live-red-glow);
}

.badge-live-pulse .pulse-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    animation: livePulseAnim 1.4s infinite ease-in-out;
}

@keyframes livePulseAnim {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #fff; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.badge-quality-hdr {
    background: rgba(11, 36, 71, 0.85);
    color: #fbbc05;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(251, 188, 5, 0.4);
    backdrop-filter: blur(6px);
}

/* Breaking News Ticker (Bottom of Stream) */
.player-ticker-bar {
    position: absolute;
    bottom: 56px; /* Positioned directly above the control bar */
    left: 0;
    width: 100%;
    height: 38px;
    background: rgba(11, 36, 71, 0.95);
    border-top: 2px solid var(--live-red);
    display: flex;
    align-items: center;
    z-index: 35;
    overflow: hidden;
    backdrop-filter: blur(4px);
    transition: bottom 0.3s ease;
}

.player-ticker-label {
    background: var(--live-red);
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    box-shadow: 4px 0 10px rgba(0,0,0,0.3);
    z-index: 2;
}

.player-ticker-content {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

.player-ticker-text {
    display: inline-block;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 38px;
    padding-left: 100%;
    animation: liveTickerScroll 28s linear infinite;
}

.player-ticker-text:hover {
    animation-play-state: paused;
}

@keyframes liveTickerScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Custom Player Controls Bar */
.player-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 18px;
    background: var(--control-bar-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.live-player-wrapper:hover .player-controls-overlay,
.live-player-wrapper.user-active .player-controls-overlay {
    opacity: 1;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.p-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-btn:hover {
    color: #fbbc05;
    transform: scale(1.1);
}

.btn-live-sync {
    background: rgba(229, 9, 20, 0.25);
    border: 1px solid var(--live-red);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-live-sync.is-live {
    background: var(--live-red);
    color: #fff;
}

.btn-live-sync .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

/* Volume Slider */
.volume-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 70px;
    height: 4px;
    accent-color: var(--live-red);
    cursor: pointer;
}

/* Quality Selector Menu */
.quality-menu-container {
    position: relative;
}

.quality-dropdown {
    position: absolute;
    bottom: 40px;
    right: 0;
    background: rgba(11, 36, 71, 0.95);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 8px 0;
    display: none;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 60;
}

.quality-dropdown.show {
    display: block;
}

.quality-opt {
    padding: 7px 16px;
    color: #e2e8f0;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.quality-opt:hover {
    background: rgba(229, 9, 20, 0.2);
    color: #fbbc05;
}

.quality-opt.active {
    color: #fbbc05;
    font-weight: 700;
}

/* Report Content Button (IT Rules Compliance) */
.btn-report-stream {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}

.btn-report-stream:hover {
    background: rgba(229, 9, 20, 0.8);
    color: #fff;
}

/* ==========================================================================
   Monetization: Pre-Roll Video Ad Overlay
   ========================================================================== */
.preroll-ad-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 100;
    display: none;
}

.preroll-ad-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-badge-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.75);
    color: #fbbc05;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
    border-left: 3px solid #fbbc05;
}

.ad-skip-btn {
    position: absolute;
    bottom: 30px;
    right: 25px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.ad-skip-btn.can-skip {
    background: var(--live-red);
    border-color: var(--live-red);
}

.ad-skip-btn.can-skip:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   Monetization: Lower-Third L-Band Sliding Banner Ad
   ========================================================================== */
.lowerthird-ad-container {
    position: absolute;
    bottom: 96px; /* Above ticker */
    left: 24px;
    background: linear-gradient(135deg, #0b2447 0%, #19376d 100%);
    border: 1px solid rgba(251, 188, 5, 0.5);
    border-radius: 8px;
    padding: 10px 18px;
    display: none;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    z-index: 45;
    animation: lowerThirdSlideIn 0.5s ease-out;
    max-width: 80%;
}

@keyframes lowerThirdSlideIn {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.lowerthird-ad-container .ad-tag {
    background: #fbbc05;
    color: #0b2447;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.lowerthird-ad-container .ad-content {
    color: #fff;
}

.lowerthird-ad-container .ad-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
}

.lowerthird-ad-container .ad-sub {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin: 0;
}

.lowerthird-ad-container .ad-btn {
    background: var(--live-red);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* ==========================================================================
   Standby / Offline Slate
   ========================================================================== */
.player-standby-slate {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, #19376d 0%, #050811 100%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 25;
    text-align: center;
    padding: 20px;
}

.standby-logo-pulse {
    width: 90px;
    height: auto;
    margin-bottom: 20px;
    animation: standbyGlow 2s infinite ease-in-out;
}

@keyframes standbyGlow {
    0% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(251,188,5,0.4)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(251,188,5,0.8)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(251,188,5,0.4)); }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .player-watermark img { height: 30px; }
    .player-top-left-badges { top: 12px; left: 14px; }
    .badge-live-pulse { font-size: 0.7rem; padding: 4px 8px; }
    .badge-quality-hdr { display: none; }
    .player-ticker-bar { height: 32px; bottom: 48px; }
    .player-ticker-label { font-size: 0.72rem; padding: 0 8px; }
    .player-ticker-text { font-size: 0.78rem; line-height: 32px; }
    .lowerthird-ad-container { bottom: 85px; left: 10px; max-width: 92%; padding: 8px 12px; }
    .volume-group { display: none; }
}
