/* assets/css/tv-broadcast.css
 * Kartuli TV — 24/7 Virtual Linear Online TV Styles
 * Ultra-Responsive 2-Column Cinema & Broadcast Studio Layout
 */

:root {
    --tv-bg-deep: #07080b;
    --tv-bg-surface: #0e1117;
    --tv-bg-surface-elevated: #151922;
    --tv-bg-card: #121620;
    --tv-border: rgba(255, 255, 255, 0.08);
    --tv-border-hover: rgba(255, 255, 255, 0.18);
    --tv-border-active: rgba(212, 175, 55, 0.4);
    --tv-accent: #d4af37; /* Georgian Gold */
    --tv-accent-hover: #f59e0b;
    --tv-accent-glow: rgba(212, 175, 55, 0.25);
    --tv-live-red: #e50914;
    --tv-live-glow: rgba(229, 9, 20, 0.4);
    --tv-text-primary: #f8fafc;
    --tv-text-secondary: #94a3b8;
    --tv-text-muted: #64748b;
    --tv-radius-sm: 6px;
    --tv-radius-md: 12px;
    --tv-radius-lg: 16px;
    --tv-font: 'FiraGO', 'BPG Nino Mtavruli', 'Noto Sans Georgian', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Body / Container reset for TV theater */
.tv-theater-body {
    background-color: var(--tv-bg-deep) !important;
    color: var(--tv-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--tv-font);
}

/* ==========================================================================
   1. TV Top Zone & Ad Case Integration
   ========================================================================== */
.tv-top-ad-wrapper {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
}
.tv-top-ad-wrapper .ad-case {
    max-width: 1480px;
    margin: 0 auto;
}

/* ==========================================================================
   2. Main 2-Column Broadcast Stage
   ========================================================================== */
.tv-stage-container {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.tv-stage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 24px;
    align-items: start;
    margin-bottom: 2.5rem;
}

@media (max-width: 1200px) {
    .tv-stage-grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .tv-stage-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Primary Column: Video Player & Info */
.tv-stage-primary {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Viewport Frame (16:9 Cinema Aspect Ratio) */
.tv-viewport-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--tv-radius-md);
    overflow: hidden;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95), 0 0 35px rgba(212, 175, 55, 0.08);
    border: 1px solid var(--tv-border);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.tv-viewport-frame:hover {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95), 0 0 45px rgba(212, 175, 55, 0.15);
}

/* Ambient Backlight Glow */
.tv-ambient-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(30px);
    z-index: 1;
    pointer-events: none;
}

/* Player Host & YouTube IFrame Full Fill */
.tv-player-host {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: #000;
}

.tv-player-host iframe,
.tv-player-host video,
#tv-yt-target,
#tv-player-target {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    pointer-events: none !important;
}

/* Overlays Layer */
.tv-overlay-layer {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    overflow: hidden;
}

/* Admin-only Viewers Badge */
.tv-admin-viewer-badge {
    position: absolute;
    top: 16px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 17, 23, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.6);
    padding: 5px 12px;
    border-radius: 20px;
    color: #f1f5f9;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    z-index: 25;
    pointer-events: auto;
}
.tv-admin-viewer-badge i {
    color: var(--tv-accent);
}

/* Pulsing LIVE Badge (Legacy fallback) */
.tv-live-indicator {
    position: absolute;
    top: 16px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 17, 23, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(229, 9, 20, 0.5);
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    z-index: 25;
}
.tv-live-dot {
    width: 9px;
    height: 9px;
    background-color: var(--tv-live-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--tv-live-red);
    animation: tv-pulse 1.8s infinite;
}
.tv-viewer-mini {
    font-size: 0.75rem;
    color: var(--tv-text-secondary);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 8px;
    margin-left: 2px;
}
@keyframes tv-pulse {
    0%   { transform: scale(0.9); opacity: 1; box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7); }
    70%  { transform: scale(1.1); opacity: 0.85; box-shadow: 0 0 0 8px rgba(229, 9, 20, 0); }
    100% { transform: scale(0.9); opacity: 1; box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

/* Corner Logo Watermark */
.tv-corner-logo {
    position: absolute;
    height: var(--tv-logo-h-desk, 42px);
    width: auto;
    max-height: 250px;
    max-width: 350px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85));
    transition: opacity 0.3s ease;
    z-index: 28;
    pointer-events: none;
    user-select: none;
}
.tv-corner-logo.pos-top-left,
.tv-corner-logo.pos-top_left     { top: 18px; left: 20px; }
.tv-corner-logo.pos-top-right,
.tv-corner-logo.pos-top_right    { top: 18px; right: 20px; }
.tv-corner-logo.pos-bottom-left,
.tv-corner-logo.pos-bottom_left  { bottom: 40px; left: 20px; }
.tv-corner-logo.pos-bottom-right,
.tv-corner-logo.pos-bottom_right { bottom: 40px; right: 20px; }

/* Broadcast Transition Curtain (Instant blackout during video transitions) */
.tv-channel-curtain {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 22;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.tv-channel-curtain.is-active {
    opacity: 1;
    pointer-events: auto;
}
.tv-curtain-spinner {
    color: var(--tv-accent);
    font-size: 2.2rem;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
    animation: tv-pulse 1.4s infinite;
}

/* Audio Unmute Overlay (Floating non-blocking callout) */
.tv-unmute-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 35;
    pointer-events: none;
    animation: tv-fade-in 0.3s ease;
}
.tv-unmute-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(14, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border: 1.5px solid var(--tv-accent);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    animation: tv-unmute-pulse 2.2s infinite;
}
.tv-unmute-btn:hover {
    background: var(--tv-accent);
    color: #07080b;
    transform: scale(1.06);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.7);
}
.tv-unmute-waves {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    color: var(--tv-accent);
    font-size: 1rem;
    transition: all 0.2s ease;
}
.tv-unmute-btn:hover .tv-unmute-waves {
    background: #07080b;
    color: var(--tv-accent);
}
@keyframes tv-unmute-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(212, 175, 55, 0.35); }
    50% { transform: scale(1.03); box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 28px rgba(212, 175, 55, 0.65); }
}

/* Touch & Gesture Feedback Ripple Indicator */
.tv-gesture-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 40;
}
.tv-gesture-indicator {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(14, 17, 23, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid var(--tv-accent);
    color: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(212, 175, 55, 0.3);
}
.tv-gesture-indicator.is-active {
    opacity: 1;
    transform: scale(1);
}
.tv-gesture-indicator i {
    font-size: 1.6rem;
    color: var(--tv-accent);
}
.tv-gesture-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--tv-text-primary);
}

/* Mobile Floating HUD Bar */
.tv-mobile-hud {
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 32;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.tv-viewport-frame.show-hud .tv-mobile-hud,
.tv-mobile-hud:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.tv-hud-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tv-hud-btn {
    background: rgba(14, 17, 23, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}
.tv-hud-btn:hover {
    background: var(--tv-accent);
    color: #07080b;
    border-color: var(--tv-accent);
}
.tv-hud-btn-live {
    border-color: rgba(229, 9, 20, 0.45);
}
.tv-hud-btn-live .tv-live-dot {
    width: 7px;
    height: 7px;
}

/* On-Screen Notification Toast */
.tv-player-toast {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(14, 17, 23, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--tv-accent);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    z-index: 45;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.tv-player-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Standard HTML5 Fullscreen & Pseudo Fullscreen for Mobile/iOS */
.tv-viewport-frame:fullscreen,
.tv-viewport-frame:-webkit-full-screen,
.tv-viewport-frame.is-pseudo-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    aspect-ratio: auto !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    border: none !important;
    background: #000 !important;
    margin: 0 !important;
}

.tv-viewport-frame:fullscreen .tv-player-host,
.tv-viewport-frame:-webkit-full-screen .tv-player-host,
.tv-viewport-frame.is-pseudo-fullscreen .tv-player-host {
    width: 100% !important;
    height: 100% !important;
}

.tv-viewport-frame:fullscreen .tv-player-host iframe,
.tv-viewport-frame:-webkit-full-screen .tv-player-host iframe,
.tv-viewport-frame.is-pseudo-fullscreen .tv-player-host iframe {
    pointer-events: none !important;
}

/* Viewport Spacer Placeholder for Sticky Mini-Player */
.tv-viewport-placeholder {
    display: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    pointer-events: none;
}
.tv-viewport-frame.is-sticky-mini + .tv-viewport-placeholder {
    display: block !important;
}

/* PiP Floating Controls */
.tv-pip-controls {
    position: absolute;
    top: 6px;
    right: 6px;
    display: none;
    gap: 6px;
    z-index: 60;
    pointer-events: auto;
}
.tv-viewport-frame.is-sticky-mini .tv-pip-controls {
    display: flex !important;
}
.tv-pip-btn {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}
.tv-pip-btn:hover {
    background: var(--tv-accent);
    color: #000;
    transform: scale(1.1);
}
.tv-pip-btn-close:hover {
    background: var(--tv-live-red);
    color: #fff;
}

/* "Next Up" Snype Lower Third Banner */
.tv-snype-box {
    position: absolute;
    bottom: 30px;
    left: 20px;
    background: rgba(14, 17, 23, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 4px solid var(--tv-accent);
    border-radius: 0 var(--tv-radius-sm) var(--tv-radius-sm) 0;
    padding: 10px 18px;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
    z-index: 30;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.tv-snype-label {
    font-size: 0.7rem;
    color: var(--tv-accent);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
}
.tv-snype-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tv-snype-time {
    font-size: 0.75rem;
    color: var(--tv-text-secondary);
}

/* Dual-Ad Engine: Overlay Ad Container */
.tv-ad-overlay-container {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 728px;
    width: 90%;
    height: 90px;
    z-index: 45;
    pointer-events: auto;
    transition: all 0.3s ease;
    border-radius: var(--tv-radius-sm);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--tv-border-active);
}
.tv-ad-close-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    z-index: 10;
}
.tv-ad-badge {
    position: absolute;
    top: 6px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--tv-accent);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
}
.tv-ad-overlay-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fullscreen Ad Takeover */
.tv-ad-takeover-screen {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}
.tv-ad-takeover-header {
    position: absolute;
    top: 20px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}
.tv-ad-takeover-badge {
    background: rgba(229, 9, 20, 0.85);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tv-ad-countdown {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.tv-ad-video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Real-Time Linear Broadcast Progress Strip */
.tv-live-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 14px;
}
.tv-live-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f59e0b);
    transition: width 0.5s linear;
}

/* On-Air Program Details Card */
.tv-now-card {
    background: var(--tv-bg-surface);
    border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius-md);
    padding: 22px 26px;
    margin-top: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.tv-now-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tv-now-title-group {
    flex-grow: 1;
    min-width: 0;
}

.tv-program-type-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    color: var(--tv-accent);
    border: 1px solid rgba(212, 175, 55, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.tv-program-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.25;
}

.tv-timing-box {
    text-align: right;
    flex-shrink: 0;
}
.tv-time-range {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}
.tv-time-range .divider {
    color: var(--tv-accent);
}
.tv-remaining-text {
    font-size: 0.8rem;
    color: var(--tv-accent);
    margin-top: 2px;
    font-weight: 600;
}

.tv-now-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin: 10px 0;
    font-size: 0.85rem;
    color: var(--tv-text-secondary);
}
.tv-now-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tv-now-meta .meta-item i {
    color: var(--tv-accent);
}

.tv-now-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--tv-text-secondary);
    margin-top: 8px;
}

/* News Ticker (Marquee Strip) */
.tv-ticker-bar {
    position: relative;
    width: 100%;
    height: 40px;
    background: #0d1017;
    border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius-sm);
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.tv-ticker-label {
    flex-shrink: 0;
    background: var(--tv-live-red);
    color: #fff;
    font-size: 0.95rem;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.4);
}
.tv-ticker-content {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}
.tv-ticker-track {
    display: inline-block;
    padding-left: 100%;
    animation: tv-marquee 25s linear infinite;
    font-size: 0.88rem;
    color: var(--tv-text-primary);
    will-change: transform;
}
.tv-ticker-track:hover {
    animation-play-state: paused;
}
.tv-ticker-track.speed-slow,
.tv-ticker-track.tv-speed-slow   { animation-duration: 38s; }
.tv-ticker-track.speed-normal,
.tv-ticker-track.tv-speed-normal { animation-duration: 25s; }
.tv-ticker-track.speed-fast,
.tv-ticker-track.tv-speed-fast   { animation-duration: 15s; }

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

/* Admin Quick Control Bar */
.tv-admin-control-bar {
    background: linear-gradient(90deg, #161b22, #0d1117);
    border: 1px solid var(--tv-accent-glow);
    border-radius: var(--tv-radius-sm);
    padding: 12px 18px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.tv-admin-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.tv-admin-viewer-pill {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #f87171;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tv-admin-ticker-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--tv-text-secondary);
}
.tv-admin-inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}
.tv-admin-inline-input {
    background: #090d13;
    border: 1px solid var(--tv-border);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    flex-grow: 1;
    min-width: 200px;
}
.tv-admin-inline-input:focus {
    outline: none;
    border-color: var(--tv-accent);
}
.tv-admin-btn {
    background: var(--tv-accent);
    color: #07080b;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}
.tv-admin-btn:hover {
    opacity: 0.9;
}

/* ==========================================================================
   3. Sidebar: Today's Live Broadcast Lineup / Up Next
   ========================================================================== */
.tv-stage-sidebar {
    min-width: 0;
}

.tv-sidebar-panel {
    background: var(--tv-bg-surface);
    border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    height: calc(100% - 10px);
    max-height: 740px;
}

.tv-sidebar-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--tv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.tv-sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tv-sidebar-time-badge {
    font-size: 0.8rem;
    color: var(--tv-text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tv-sidebar-list {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.tv-sidebar-list::-webkit-scrollbar {
    width: 6px;
}
.tv-sidebar-list::-webkit-scrollbar-track {
    background: transparent;
}
.tv-sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

/* Sidebar Timeline Item */
.tv-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius-sm);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.tv-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
}

/* Active Live Item */
.tv-sidebar-item.is-live {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), rgba(14, 17, 23, 0.95));
    border-color: var(--tv-border-active);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}
.tv-sidebar-item.is-live::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--tv-accent);
    border-radius: 3px 0 0 3px;
}

.tv-sidebar-thumb {
    width: 80px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    position: relative;
}
.tv-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tv-sidebar-item-info {
    flex-grow: 1;
    min-width: 0;
}

.tv-sidebar-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.tv-sidebar-item-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tv-accent);
}

.tv-sidebar-item-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.tv-sidebar-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-sidebar-item-sub {
    font-size: 0.72rem;
    color: var(--tv-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.tv-sidebar-footer {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--tv-border);
    text-align: center;
    flex-shrink: 0;
}

.tv-sidebar-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tv-accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.tv-sidebar-more-btn:hover {
    color: #fff;
    transform: translateY(2px);
}

/* ==========================================================================
   4. Interactive 7-Day EPG Guide (Electronic Program Guide)
   ========================================================================== */
.tv-epg-wrapper {
    margin-top: 2rem;
    margin-bottom: 4rem;
}
.tv-epg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--tv-border);
    padding-bottom: 1rem;
}
.tv-epg-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.tv-epg-title i {
    color: var(--tv-accent);
}

/* Day Selector Tabs (დღეს, ხვალ, ზეგ...) */
.tv-day-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}
.tv-day-pill {
    background: var(--tv-bg-surface);
    border: 1px solid var(--tv-border);
    color: var(--tv-text-secondary);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.tv-day-pill:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}
.tv-day-pill.active {
    background: var(--tv-accent);
    color: #07080b;
    border-color: var(--tv-accent);
    box-shadow: 0 4px 15px var(--tv-accent-glow);
}

/* EPG Schedule Timeline Cards */
.tv-timeline-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tv-epg-card {
    background: var(--tv-bg-surface);
    border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}
.tv-epg-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

/* Active Live Card */
.tv-epg-card.is-live-card {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), rgba(14, 17, 23, 0.95));
    border-color: var(--tv-border-active);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.12);
}
.tv-epg-card.is-live-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--tv-accent);
}

/* Special Live Event Card */
.tv-epg-card.is-special-live {
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.1), rgba(14, 17, 23, 0.95));
    border-color: rgba(229, 9, 20, 0.4);
}
.tv-epg-card.is-special-live::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--tv-live-red);
}

/* Time Block */
.tv-card-time {
    flex-shrink: 0;
    width: 90px;
    text-align: center;
}
.tv-card-time .start {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}
.tv-card-time .end {
    font-size: 0.75rem;
    color: var(--tv-text-muted);
}

/* Poster Thumbnail */
.tv-card-thumb {
    flex-shrink: 0;
    width: 110px;
    height: 65px;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    position: relative;
}
.tv-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Details */
.tv-card-details {
    flex-grow: 1;
    min-width: 0;
}
.tv-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.tv-card-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}
.tv-badge-live {
    background: var(--tv-live-red);
    color: #fff;
}
.tv-badge-movie {
    background: rgba(212, 175, 55, 0.15);
    color: var(--tv-accent);
}
.tv-badge-music {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.tv-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tv-card-meta {
    font-size: 0.8rem;
    color: var(--tv-text-secondary);
    display: flex;
    align-items: center;
    gap: 14px;
}
.tv-card-meta span i {
    margin-right: 4px;
    color: var(--tv-text-muted);
}

/* Progress bar inside active card */
.tv-card-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}
.tv-card-progress-fill {
    height: 100%;
    background: var(--tv-accent);
    transition: width 1s linear;
}

/* Card Actions */
.tv-card-actions {
    flex-shrink: 0;
}
.tv-btn-remind {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tv-border);
    color: var(--tv-text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.tv-btn-remind:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ==========================================================================
   5. Mobile Sticky Mini-Player (Picture-in-Picture) & Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .tv-stage-container {
        padding: 0 0.75rem;
    }
    .tv-now-card {
        padding: 16px;
    }
    .tv-program-title {
        font-size: 1.25rem;
    }
    .tv-time-range {
        font-size: 1rem;
    }

    .tv-corner-logo {
        height: var(--tv-logo-h-mob, 32px) !important;
    }

    .tv-viewport-frame.is-sticky-mini {
        position: fixed !important;
        bottom: 20px !important;
        right: 16px !important;
        width: 240px !important;
        max-width: calc(100vw - 32px) !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        z-index: 9999 !important;
        border-radius: var(--tv-radius-md) !important;
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.95), 0 0 18px rgba(212, 175, 55, 0.35) !important;
        border: 1.5px solid var(--tv-accent) !important;
        animation: tv-pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        transition: transform 0.25s ease, opacity 0.25s ease;
        touch-action: pan-y;
    }
    .tv-viewport-frame.is-sticky-mini.is-dismissing {
        transform: translateX(120%) scale(0.8) !important;
        opacity: 0 !important;
    }
    .tv-viewport-frame.is-sticky-mini .tv-corner-logo,
    .tv-viewport-frame.is-sticky-mini .tv-ticker-bar,
    .tv-viewport-frame.is-sticky-mini .tv-snype-box,
    .tv-viewport-frame.is-sticky-mini .tv-mobile-hud,
    .tv-viewport-frame.is-sticky-mini .tv-live-progress-container {
        display: none !important;
    }
    .tv-viewport-frame.is-sticky-mini .tv-live-indicator,
    .tv-viewport-frame.is-sticky-mini .tv-admin-viewer-badge {
        top: 6px !important;
        right: auto !important;
        left: 6px !important;
        padding: 2px 7px !important;
        font-size: 0.65rem !important;
        gap: 4px !important;
    }
    .tv-viewport-frame.is-sticky-mini .tv-unmute-btn {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
    }
    .tv-viewport-frame.is-sticky-mini .tv-unmute-waves {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.75rem !important;
    }

    .tv-epg-card {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }
    .tv-card-time {
        width: auto;
        display: flex;
        align-items: baseline;
        gap: 6px;
    }
    .tv-card-thumb {
        width: 80px;
        height: 48px;
    }
    .tv-card-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

@keyframes tv-pop-in {
    from { transform: scale(0.6) translateY(40px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes tv-slide-up {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes tv-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
