:root {
            --bg: #0f0f10;
            --text: #fff;
            --muted: #b9b9c0;
            --radius: 14px;
        }

        * {
            box-sizing: border-box
        }

        /* Keyboard-only focus outlines (not shown on mouse clicks) */
        :focus-visible {
            outline: 2px solid rgba(229,9,20,0.8);
            outline-offset: 2px;
        }

        :focus:not(:focus-visible) {
            outline: none;
        }

        html,
        body {
            overscroll-behavior: none;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            margin: 0;
            background: var(--bg);
            color: var(--text);
            font-family: Arial,sans-serif;
            overflow-y: auto;
            overflow-x: hidden;
            height: 100vh;
        }

        /* Smooth scrollbar for the whole app */
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

        /* Boot splash (blocks interaction during init) */
        .bootSplash {
            position: fixed;
            inset: 0;
            z-index: 2500;
            background: var(--bg);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 14px;
            pointer-events: all;
        }

        .bootSpinner {
            width: 44px;
            height: 44px;
            border-radius: 999px;
            border: 4px solid rgba(255,255,255,0.18);
            border-top-color: rgba(255,255,255,0.92);
            animation: bootSpin 0.9s linear infinite;
        }

        .bootText {
            font-weight: 900;
            font-size: 16px;
            letter-spacing: 0.2px;
            color: rgba(255,255,255,0.92);
        }

        /* Skeleton shimmer for lazy-loading catalog rows */
        @keyframes shimmer {
            0%   { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        .tileSkeleton {
            flex: 0 0 auto;
            width: 140px;
            border-radius: 12px;
            background: linear-gradient(90deg,
                rgba(255,255,255,0.05) 25%,
                rgba(255,255,255,0.12) 50%,
                rgba(255,255,255,0.05) 75%
            );
            background-size: 200% 100%;
            animation: shimmer 1.4s ease-in-out infinite;
            aspect-ratio: 2/3;
        }
        html.tv-compact .tileSkeleton { width: 80px; }

        /* Tile fade-in when loaded */
        @keyframes tileFadeIn {
            from { opacity: 0; transform: translateY(12px) scale(0.97); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .tile { animation: tileFadeIn 0.35s ease-out both; }
        .tile:nth-child(1) { animation-delay: 0ms; }
        .tile:nth-child(2) { animation-delay: 40ms; }
        .tile:nth-child(3) { animation-delay: 80ms; }
        .tile:nth-child(4) { animation-delay: 120ms; }
        .tile:nth-child(5) { animation-delay: 160ms; }
        .tile:nth-child(6) { animation-delay: 200ms; }
        .tile:nth-child(7) { animation-delay: 240ms; }
        .tile:nth-child(8) { animation-delay: 280ms; }

        /* Section fade in */
        @keyframes sectionSlideIn {
            from { opacity: 0; transform: translateY(18px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .section { animation: sectionSlideIn 0.4s ease-out both; }

        .bootSub {
            font-size: 12px;
            color: rgba(255,255,255,0.55);
        }

        @keyframes bootSpin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        body.tv-active {
            overflow: hidden;
        }

        /* Subtle fade pulse on view changes (keeps navigation feeling smooth) */
        @keyframes uiFadePulse {
            from { opacity: 0.6; transform: translateY(4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .uiFadePulse {
            animation: uiFadePulse 250ms ease-out;
        }
        
        /* Custom scrollbar styling for TV interface */
        #tvMainCategoriesList::-webkit-scrollbar,
        #tvSubfoldersList::-webkit-scrollbar,
        #tvChannelsContainer::-webkit-scrollbar {
            width: 8px;
        }
        
        #tvMainCategoriesList::-webkit-scrollbar-track,
        #tvSubfoldersList::-webkit-scrollbar-track,
        #tvChannelsContainer::-webkit-scrollbar-track {
            background: transparent;
        }
        
        #tvMainCategoriesList::-webkit-scrollbar-thumb,
        #tvSubfoldersList::-webkit-scrollbar-thumb,
        #tvChannelsContainer::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            border: 2px solid transparent;
            background-clip: padding-box;
        }
        
        #tvMainCategoriesList::-webkit-scrollbar-thumb:hover,
        #tvSubfoldersList::-webkit-scrollbar-thumb:hover,
        #tvChannelsContainer::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.25);
            background-clip: padding-box;
        }

        .topbar {
            position: sticky;
            top: 0;
            z-index: 10;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            box-sizing: border-box;
            background: rgba(12,13,17,0.95);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 18px;
            font-weight: 900;
            letter-spacing: .4px;
            margin-right: 4px
        }

        .brandMenu {
            position: relative;
            display: flex;
            align-items: center;
            flex: 0 0 auto;
        }

        .brandMenuBtn {
            border: 0;
            background: transparent;
            padding: 0;
            width: 44px;
            height: 44px;
            border-radius: 999px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .brandMenuBtn:focus-visible {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
        }

        .brandLogoBtn {
            border: 0;
            background: transparent;
            padding: 4px;
            border-radius: 999px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
        }
        .brandLogoBtn:hover {
            background: rgba(255,255,255,0.08);
        }
        .brandLogoBtn:focus-visible {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
        }

        /* Logo + search toggle + (absolutely positioned) expanded field — keeps .tabs centered */
        .topbarStart {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
            position: relative;
            z-index: 20;
        }

        .brandIcon {
            width: 32px;
            height: 32px;
            flex: 0 0 auto;
            overflow: visible;
        }

        .tileLogo {
            position: absolute;
            bottom: 10px;
            left: 10px;
            max-width: 55%;
            max-height: 44px;
            object-fit: contain;
            filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
            pointer-events: none;
            z-index: 3;
        }

        .brandText {
            white-space: nowrap;
        }

        .tabs {
            display: flex;
            gap: 14px;
            align-items: center;
            position: relative;
            flex: 1 1 auto;
            justify-content: center;
        }

        .brandMenuDropdown {
            position: absolute;
            top: calc(100% + 10px);
            left: 0;
            min-width: 160px;
            padding: 8px;
            border-radius: 10px;
            background: rgba(20,20,22,0.98);
            border: 1px solid rgba(255,255,255,0.10);
            box-shadow: 0 8px 30px rgba(0,0,0,0.6);
            display: none;
            flex-direction: column;
            gap: 8px;
            z-index: 1300;
        }

        .brandMenuDropdown.open {
            display: flex;
        }

        .brandMenuItem {
            width: 100%;
            text-align: left;
        }

        .iconBtn {
            width: 40px;
            height: 40px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .iconBtn svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
            opacity: 0.95;
        }

        .tabIndicator {
            position: absolute;
            top: 50%;
            left: 0;
            height: 34px;
            width: 0;
            border-radius: 999px;
            background: rgba(255,255,255,0.20);
            transform: translateY(-50%);
            transition: left 180ms ease, width 180ms ease, height 180ms ease;
            pointer-events: none;
            z-index: 0;
        }

        .topbarSpacer {
            flex: 1 1 auto;
        }

        .topbarActions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .tabBtn {
            border: 0;
            background: transparent;
            color: rgba(255,255,255,0.92);
            padding: 8px 12px;
            border-radius: 999px;
            cursor: pointer;
            font-weight: 900;
            font-size: 14px;
            opacity: 1;
            white-space: nowrap;
            position: relative;
            z-index: 1;
            transition: color 140ms ease;
        }

        .tabBtn:hover {
            background: rgba(255,255,255,0.08);
        }

        .tabBtn:focus-visible {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
        }

            .tabBtn.active {
                color: rgba(255,255,255,0.98);
            }

        /* Out of flex flow so nav tabs stay centered; anchored to .topbarStart */
        .search {
            display: flex;
            align-items: center;
            height: 36px;
            box-sizing: border-box;
            padding: 0 4px 0 12px;
            gap: 2px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 10px;
            position: absolute;
            left: 100%;
            top: 50%;
            transform: translateY(-50%) translateX(0);
            margin-left: 8px;
            width: min(380px, max(200px, calc(100vw - 300px)));
            max-width: min(380px, max(200px, calc(100vw - 300px)));
            z-index: 20;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
            overflow: hidden;
            opacity: 1;
            pointer-events: auto;
            transform-origin: left center;
            transition:
                max-width 320ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity 220ms ease,
                transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
                padding 280ms cubic-bezier(0.22, 1, 0.36, 1),
                gap 280ms ease,
                border-color 200ms ease,
                box-shadow 280ms ease,
                margin-left 280ms cubic-bezier(0.22, 1, 0.36, 1);
        }

        /* Collapsible search UI (opened via icon click) — animate instead of display:none */
        .search.collapsed {
            max-width: 0;
            margin-left: 0;
            padding-left: 0;
            padding-right: 0;
            gap: 0;
            opacity: 0;
            pointer-events: none;
            border-color: transparent;
            box-shadow: none;
            transform: translateY(-50%) translateX(-6px) scale(0.98);
        }

        @media (prefers-reduced-motion: reduce) {
            .search {
                transition: none;
            }
        }

        .searchSubmitBtn {
            flex: 0 0 auto;
            width: 30px;
            height: 30px;
            margin: 0;
            padding: 0;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.88);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.15s ease, color 0.15s ease;
        }

        .searchSubmitBtn:hover {
            background: rgba(255, 255, 255, 0.16);
            color: #fff;
        }

        .searchSubmitBtn:focus-visible {
            outline: 2px solid rgba(255, 255, 255, 0.55);
            outline-offset: 2px;
        }

        .searchSubmitBtn svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
            opacity: 0.95;
        }

        /* Highlighted search results row */
        .searchResultsRow {
            border-top: 1px solid rgba(255,255,255,0.06);
            padding: 12px 0 20px 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
        }
            /* Dropdown container attached to the search bar */
            #searchResultsContainer {
                position: absolute;
                left: 0;
                right: 0;
                top: 100%; /* attach directly to bottom of topbar */
                z-index: 1200;
                margin: 0;
                padding: 8px 10px;
                background: rgba(20,20,22,0.98);
                border-radius: 8px;
                box-shadow: 0 8px 30px rgba(0,0,0,0.6);
                transform-origin: top center;
                opacity: 0;
                pointer-events: none;
                max-height: 0;
                overflow: hidden;
                transition: max-height 240ms ease, opacity 180ms ease, transform 200ms ease;
            }
            #searchResultsContainer.open {
                opacity: 1;
                pointer-events: auto;
                max-height: 320px;
                transform: translateY(0);
            }
            #searchResultsContainer .sectionTitle { font-weight:700; }

            /* Make the search row horizontal scrollable */
            .searchResultsRow {
                display: flex;
                gap: 12px;
                overflow-x: auto;
                padding: 10px 6px;
                align-items: flex-start;
            }
            .searchResultsRow .tile { min-width: 120px; max-width: 140px; }

            .search input {
                flex: 1;
                min-width: 0;
                width: 100%;
                height: 34px;
                margin: 0;
                padding: 0 6px 0 0;
                box-sizing: border-box;
                background: transparent;
                border: none;
                outline: none;
                color: var(--text);
                font-size: 13px;
                line-height: 1.25;
                font-weight: 500;
            }

            .search input[type="search"]::-webkit-search-decoration,
            .search input[type="search"]::-webkit-search-cancel-button {
                -webkit-appearance: none;
                appearance: none;
                display: none;
            }

                .search input::placeholder {
                    color: rgba(255, 255, 255, 0.42);
                }

        .btn {
            border: 1px solid rgba(255,255,255,0.14);
            background: rgba(255,255,255,0.06);
            color: var(--text);
            padding: 10px 14px;
            border-radius: 999px;
            cursor: pointer;
            font-weight: 900;
            font-size: 13px
        }

        .btnPrimary {
            background: rgba(255,255,255,0.92);
            color: #0f0f10;
            border-color: rgba(255,255,255,0.92)
        }

        .btnDanger {
            border-color: rgba(255,120,120,0.35);
            background: rgba(255,120,120,0.10)
        }

        #status {
            display: none;
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            padding: 12px 24px;
            background: rgba(30,30,38,0.95);
            border: 1px solid rgba(255,255,255,0.10);
            border-radius: 12px;
            color: rgba(255,255,255,0.85);
            font-size: 13px;
            font-weight: 600;
            white-space: pre-wrap;
            z-index: 9000;
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            opacity: 0;
            transition: opacity 0.3s ease, transform 0.3s ease;
            pointer-events: none;
            max-width: min(90vw, 420px);
            text-align: center;
        }

        #status.toast-visible {
            display: block;
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .error {
            color: #ff7a7a
        }

        @media (max-width: 720px) {
            #status {
                bottom: calc(86px + env(safe-area-inset-bottom) + 10px);
            }
        }

        /* ===== Fullscreen Player Overlay (Netflix-style) ===== */
        /* ===== Fullscreen Player Overlay (TV-app style) ===== */
        .playerOverlay {
            position: fixed;
            inset: 0;
            z-index: 2000;
            background: #000;
            display: none;
            cursor: default;
        }

        .playerOverlay.isActive { display: block; }
        .playerOverlay.controlsHidden { cursor: none; }

        /* Video host fills entire overlay */
        .playerVideoHost {
            position: absolute;
            inset: 0;
            background: #000;
            overflow: hidden;
        }

        .playerVideoHost video {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #000;
        }

        /* Error overlay — sits ON TOP of the video, doesn't replace it */
        .playerErrorOverlay {
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0.82);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 14px;
            padding: 28px;
            text-align: center;
            z-index: 6;
        }

        @keyframes pulseLogo {
            0% { transform: scale(1); opacity: 0.6; }
            50% { transform: scale(1.08); opacity: 0.9; }
            100% { transform: scale(1); opacity: 0.6; }
        }

        /* Controls chrome — overlays the video */
        .playerTopBar,
        .playerBottomBar {
            position: absolute;
            left: 0;
            right: 0;
            z-index: 10;
            pointer-events: none;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        .playerOverlay.controlsHidden .playerTopBar,
        .playerOverlay.controlsHidden .playerBottomBar {
            opacity: 0;
            pointer-events: none !important;
        }

        /* ── TOP BAR: back+rewind on left, quality+FS on right ── */
        .playerTopBar {
            top: 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 24px 72px 24px;
            background: linear-gradient(to bottom, rgba(0,0,0,0.82) 0%, transparent 100%);
        }

        .playerOverlay.controlsHidden .playerTopBar { transform: translateY(-22px); }
        .playerTopBar > * { pointer-events: auto; }

        .playerTopLeft,
        .playerTopRight {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .playerTopBtn {
            width: 40px;
            height: 40px;
            min-width: 40px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: none;
            background: rgba(255,255,255,0.07);
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            font-size: 20px;
            font-weight: 400;
            transition: background 0.15s ease, transform 0.1s;
            outline: none;
            -webkit-tap-highlight-color: transparent;
        }

        .playerTopBtn:hover { background: rgba(255,255,255,0.14); color: #fff; }
        .playerTopBtn:active { transform: scale(0.92); }

        /* Quality badge — e.g. [4K] [1080p] */
        .playerQualityBadge {
            display: none;
            align-items: center;
            padding: 3px 9px;
            border: 1px solid rgba(255,255,255,0.22);
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.5px;
            color: rgba(255,255,255,0.65);
            background: rgba(0,0,0,0.35);
        }

        .playerQualityBadge.isVisible { display: inline-flex; }

        /* ── BOTTOM BAR ── */
        .playerBottomBar {
            bottom: 0;
            padding: 72px 24px 22px 24px;
            background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.35) 60%, transparent 100%);
        }

        .playerOverlay.controlsHidden .playerBottomBar { transform: translateY(22px); }
        .playerBottomBar > * { pointer-events: auto; }

        /* ── Skip Intro / Skip Credits button ── */
        .playerSkipBtn {
            position: absolute;
            bottom: 130px;
            right: 24px;
            padding: 9px 20px;
            background: rgba(0,0,0,0.55);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 8px;
            color: rgba(255,255,255,0.88);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            z-index: 15;
            pointer-events: auto;
            transition: background 0.15s, border-color 0.15s;
            display: none;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .playerSkipBtn.isVisible { display: block; }
        .playerSkipBtn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.55); color: #fff; }

        /* ── Scrubber row — scrubber + time side-by-side ── */
        .playerScrubberRow {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 14px;
        }

        .playerScrubberRow .playerScrubberWrap {
            flex: 1;
        }

        /* Custom progress bar */
        .playerScrubberWrap {
            position: relative;
            height: 20px;
            display: flex;
            align-items: center;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .playerScrubberTrack {
            position: relative;
            width: 100%;
            height: 3px;
            background: rgba(255,255,255,0.15);
            border-radius: 2px;
            overflow: visible;
            transition: height 0.15s ease;
        }

        .playerScrubberWrap:hover .playerScrubberTrack,
        .playerScrubberWrap.scrubbing .playerScrubberTrack { height: 5px; }

        .playerScrubberBuffered {
            position: absolute;
            left: 0; top: 0;
            height: 100%;
            background: rgba(255,255,255,0.28);
            border-radius: 2px;
            pointer-events: none;
        }

        .playerScrubberFill {
            position: absolute;
            left: 0; top: 0;
            height: 100%;
            background: rgba(255,255,255,0.88);
            border-radius: 2px;
            pointer-events: none;
        }

        .playerScrubberThumb {
            position: absolute;
            top: 50%;
            width: 13px;
            height: 13px;
            border-radius: 50%;
            background: #fff;
            transform: translate(-50%, -50%) scale(0);
            transition: transform 0.15s ease;
            pointer-events: none;
            box-shadow: 0 0 6px rgba(0,0,0,0.5);
        }

        .playerScrubberWrap:hover .playerScrubberThumb,
        .playerScrubberWrap.scrubbing .playerScrubberThumb {
            transform: translate(-50%, -50%) scale(1);
        }

        .playerScrubberTooltip {
            position: absolute;
            bottom: 22px;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.85);
            color: #fff;
            font-size: 12px;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 4px;
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.12s ease;
        }

        .playerScrubberWrap:hover .playerScrubberTooltip { opacity: 1; }

        /* Time display: "04:21 / 24:16" right of the scrubber */
        .playerTimeDisplay {
            font-variant-numeric: tabular-nums;
            font-size: 13px;
            font-weight: 600;
            color: rgba(255,255,255,0.82);
            white-space: nowrap;
            min-width: 90px;
            text-align: right;
            flex-shrink: 0;
        }

        .playerTimeSep {
            color: rgba(255,255,255,0.4);
            margin: 0 2px;
        }

        /* ── Info row: [play] [title+meta] [controls] ── */
        .playerInfoRow {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        /* Play / Pause — clean and modern */
        .playerPlayPauseCircle {
            width: 46px;
            height: 46px;
            min-width: 46px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.18);
            color: rgba(255,255,255,0.95);
            font-size: 19px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s;
            outline: none;
            -webkit-tap-highlight-color: transparent;
            flex-shrink: 0;
            line-height: 1;
        }

        .playerPlayPauseCircle:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.35); }
        .playerPlayPauseCircle:active { transform: scale(0.91); }

        /* Title + episode info */
        .playerInfoCenter {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .playerInfoTitle {
            font-size: 15px;
            font-weight: 600;
            color: rgba(255,255,255,0.88);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .playerInfoMeta {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: nowrap;
            overflow: hidden;
        }

        .playerEpBadge {
            display: inline-flex;
            align-items: center;
            padding: 2px 8px;
            background: rgba(255,255,255,0.18);
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
            color: rgba(255,255,255,0.9);
            flex-shrink: 0;
        }

        .playerEpName {
            font-size: 13px;
            color: rgba(255,255,255,0.58);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Right control buttons */
        .playerInfoRight {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .playerCtlSmall {
            height: 34px;
            min-width: 34px;
            padding: 0 11px;
            border-radius: 8px;
            background: rgba(255,255,255,0.07);
            border: 1px solid rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.75);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.15s ease, transform 0.1s, border-color 0.15s, color 0.15s;
            outline: none;
            -webkit-tap-highlight-color: transparent;
            white-space: nowrap;
        }

        .playerCtlSmall:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.22); color: #fff; }
        .playerCtlSmall:active { transform: scale(0.93); }

        .playerCtlSmall.textIcon {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.07em;
            text-transform: uppercase;
        }

        /* Volume control */
        .playerVolumeWrap {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }
        .playerVolBtn {
            width: 32px;
            height: 32px;
            min-width: 32px;
            border-radius: 8px;
            background: transparent;
            border: none;
            color: rgba(255,255,255,0.65);
            font-size: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: color 0.15s, background 0.15s;
            outline: none;
            -webkit-tap-highlight-color: transparent;
        }
        .playerVolBtn:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.08); }
        .playerVolSlider {
            -webkit-appearance: none;
            appearance: none;
            width: 76px;
            height: 3px;
            background: rgba(255,255,255,0.18);
            border-radius: 2px;
            outline: none;
            cursor: pointer;
        }
        .playerVolSlider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255,255,255,0.9);
            cursor: pointer;
        }
        .playerVolSlider::-moz-range-thumb {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255,255,255,0.9);
            cursor: pointer;
            border: none;
        }

        /* Hidden volume range (kept for JS sync) */
        .playerVolumeHidden {
            position: absolute;
            opacity: 0;
            pointer-events: none;
            width: 1px;
            height: 1px;
        }

        /* ── Subtitle Panel ── */
        .playerSubPanel {
            position: fixed;
            bottom: 120px;
            right: 24px;
            background: rgba(18,18,22,0.96);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 12px;
            min-width: 220px;
            max-height: 45vh;
            overflow-y: auto;
            padding: 8px 0;
            display: none;
            z-index: 2010;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
        }

        .playerSubPanel.isOpen { display: block; }

        .playerSubPanelTitle {
            font-size: 11px;
            font-weight: 700;
            color: rgba(255,255,255,0.45);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 6px 14px 4px;
        }

        .playerSubGroupLabel {
            font-size: 10px;
            font-weight: 700;
            color: rgba(255,255,255,0.35);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 10px 14px 4px;
            margin-top: 4px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }

        .playerSubGroupLabel-first {
            margin-top: 0;
            border-top: none;
            padding-top: 6px;
        }

        .playerSubItem {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            transition: background 0.1s ease;
        }

        .playerSubItem:hover { background: rgba(255,255,255,0.08); }
        .playerSubItem.active { color: #e50914; font-weight: 700; }
        .playerSubItem.active::before { content: '✓'; font-size: 14px; min-width: 16px; }

        /* ── Subtitle Settings Overlay ── */
        .playerSubSettingsOverlay {
            position: absolute;
            inset: 0;
            z-index: 2500;
            background: rgba(0,0,0,0.6);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: center;
            padding-bottom: 80px;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }
        .playerSubSettingsOverlay.isVisible {
            opacity: 1;
            pointer-events: auto;
        }
        .subSettingsDemoText {
            text-align: center;
            margin-bottom: 60px;
            line-height: 1.3;
            padding: 0;
            display: inline-block;
        }
        .subSettingsDemoText span {
            font-family: sans-serif;
            padding: 2px 6px;
            /* dynamic styles will be applied here */
        }
        .subSettingsControls {
            display: flex;
            flex-direction: row;
            gap: 40px;
            align-items: flex-end;
            background: rgba(0,0,0,0.4);
            padding: 20px 40px;
            border-radius: 12px;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
        .subSettingsGroup {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .subSettingsLabel {
            color: rgba(255,255,255,0.8);
            font-size: 14px;
            font-weight: 600;
        }
        .subSettingsButtons {
            display: flex;
            flex-direction: row;
            gap: 8px;
        }
        .subSettingsBtn {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            color: #fff;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .subSettingsBtn:hover {
            background: rgba(255,255,255,0.2);
        }
        .subSettingsBtn.active {
            background: #fff;
            color: #000;
            border-color: #fff;
        }
        .subSettingsDoneBtn {
            background: #22c55e;
            color: #000;
            border: none;
            padding: 12px 24px;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 800;
            cursor: pointer;
            transition: transform 0.1s, background 0.2s;
            margin-left: 20px;
        }
        .subSettingsDoneBtn:hover {
            background: #16a34a;
        }
        .subSettingsDoneBtn:active {
            transform: scale(0.95);
        }

        /* ── Double-Tap Seek Ripple ── */
        .playerSeekRipple {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 50%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 26px;
            font-weight: 900;
            opacity: 0;
            pointer-events: none;
            z-index: 5;
        }

        .playerSeekRipple.left { left: 0; }
        .playerSeekRipple.right { right: 0; }

        .playerSeekRipple.show {
            animation: seekRippleFade 0.6s ease forwards;
        }

        @keyframes seekRippleFade {
            0%   { opacity: 1; transform: translateY(-50%) scale(1); }
            100% { opacity: 0; transform: translateY(-50%) scale(1.2); }
        }

        /* ── Next Episode Card ── */
        .playerNextEpCard {
            position: absolute;
            bottom: 130px;
            right: 24px;
            background: rgba(20,20,24,0.92);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 12px;
            padding: 14px 16px;
            display: none;
            flex-direction: column;
            gap: 8px;
            min-width: 260px;
            max-width: 320px;
            z-index: 15;
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            animation: slideInRight 0.3s ease;
        }

        .playerNextEpCard.isVisible { display: flex; }

        @keyframes slideInRight {
            from { opacity: 0; transform: translateX(20px); }
            to   { opacity: 1; transform: translateX(0); }
        }

        .nextEpLabel {
            font-size: 11px;
            font-weight: 700;
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .nextEpTitle { font-size: 14px; font-weight: 700; color: #fff; }
        .nextEpCountdown { font-size: 12px; color: rgba(255,255,255,0.5); }

        .nextEpActions { display: flex; gap: 8px; margin-top: 4px; }

        .nextEpBtn {
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            border: none;
            transition: background 0.15s ease;
        }

        .nextEpPlayBtn { background: #e50914; color: #fff; }
        .nextEpPlayBtn:hover { background: #f6121d; }
        .nextEpDismissBtn { background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.8); }
        .nextEpDismissBtn:hover { background: rgba(255,255,255,0.18); }

        /* Home */
        .hero {
            padding: 16px 18px 6px 18px
        }

        .heroCard {
            display: grid;
            grid-template-columns: 240px 1fr;
            gap: 16px;
            padding: 16px;
            border: 1px solid rgba(255,255,255,0.08);
            background: radial-gradient(1200px 500px at 20% 10%, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
            border-radius: var(--radius);
            box-shadow: 0 20px 60px var(--shadow);
            min-height: 210px
        }

        .heroPoster {
            width: 100%;
            border-radius: 12px;
            background: #202028;
            aspect-ratio: 2/3;
            object-fit: cover
        }

        .heroTitle {
            font-size: 26px;
            font-weight: 900;
            margin-top: 6px
        }

        .heroMeta {
            margin-top: 8px;
            color: var(--muted);
            font-size: 13px
        }

        .heroActions {
            margin-top: 14px;
            display: flex;
            gap: 10px;
            flex-wrap: wrap
        }

        .section {
            padding: 0 0 18px 0;
            position: relative;
        }

        .sectionHeader {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 2px;
            margin: 10px 0 8px 0
        }

        .sectionTitle {
            font-size: 22px;
            font-weight: 900;
            letter-spacing: .3px
        }

        .sectionHint {
            color: rgba(255,255,255,0.45);
            font-size: 12px
        }

        .rowWrapper {
            position: relative;
            margin: 0 0 0 -48px;
            padding: 0 0 0 48px;
        }

        .rowWrapper.at-start .rowNav.left {
            opacity: 0 !important;
            pointer-events: none !important;
        }

        .row {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 6px 3px 12px 3px;
            scroll-behavior: smooth;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        /* During JS-driven horizontal animation, disable snap so the row can glide smoothly */
        .row.row--animating-scroll {
            scroll-snap-type: none !important;
        }

            .row::-webkit-scrollbar {
                display: none;
            }

        .rowNav {
            position: absolute;
            top: 0;
            bottom: 12px;
            width: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 5;
            opacity: 0;
            pointer-events: none;
            transition: opacity 200ms ease;
            cursor: pointer;
        }

        .rowWrapper:hover .rowNav {
            opacity: 1;
            pointer-events: auto;
        }

        .rowNav.left {
            left: 0;
            background: linear-gradient(to right, rgba(15,15,16,0.95), transparent);
        }

        .rowNav.right {
            right: 0;
            background: linear-gradient(to left, rgba(15,15,16,0.95), transparent);
        }

        .rowNav svg {
            width: 40px;
            height: 40px;
            fill: rgba(255,255,255,0.7);
            transition: fill 150ms ease, transform 150ms ease;
        }

        .rowNav:hover svg {
            fill: rgba(255,255,255,1);
            transform: scale(1.15);
        }

        .rowNav:active svg {
            transform: scale(0.95);
            fill: rgba(255,255,255,0.9);
        }

        .rowNav.scrolling svg {
            animation: arrowPulse 0.4s ease;
        }

        @keyframes arrowPulse {
            0%, 100% { transform: scale(1.15); }
            50% { transform: scale(1.3); opacity: 0.8; }
        }

        .tile {
            flex: 0 0 auto;
            width: 165px;
            cursor: pointer;
            outline: none;
            border-radius: 12px;
            transform-origin: center center;
            transition: transform 120ms ease, box-shadow 120ms ease, outline 120ms ease;
            will-change: transform;
        }

            .tile:hover {
                transform: scale(1.06);
            }

            .tile:focus {
                transform: scale(1.08);
                box-shadow: 0 18px 50px rgba(0,0,0,0.65);
                outline: 3px solid rgba(255,255,255,0.85);
                outline-offset: 2px
            }

            .tile img:not(.tileLogo) {
                width: 100%;
                border-radius: 12px;
                background: #1e1e26;
                aspect-ratio: 2/3;
                object-fit: cover;
                object-position: center;
                display: block
            }

            /* Backward compat: tiles without .tileImgWrap still look right */
            .tile > img {
                border-radius: 12px;
            }

        .tileTitle {
            margin-top: 10px;
            font-size: 13px;
            color: rgba(255,255,255,0.92);
            text-align: center;
            max-width: 165px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap
        }

        /* Continue-watching progress bar on tiles */
        .tileProgressWrap {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: rgba(0,0,0,0.5);
            border-radius: 0 0 12px 12px;
            overflow: hidden;
        }

        .tileProgressBar {
            height: 100%;
            background: #e50914;
            border-radius: 0 0 0 12px;
            transition: width 0.3s ease;
        }

        /* Episode badge on portrait catalog tiles */
        .tileEpBadge {
            position: absolute;
            bottom: 8px;
            left: 8px;
            background: rgba(0,0,0,0.80);
            border: 1px solid rgba(255,255,255,0.18);
            border-radius: 5px;
            padding: 2px 7px;
            font-size: 10px;
            font-weight: 700;
            color: rgba(255,255,255,0.92);
            pointer-events: none;
            z-index: 2;
            letter-spacing: 0.03em;
        }

        /* Horizontal system rows (CW / Up Next / Coming Up): match TV top-end episode pill */
        .tile--landscape .tileEpBadge {
            position: static;
            bottom: auto;
            left: auto;
        }

        .tileTopEndStack {
            position: absolute;
            top: 8px;
            right: 8px;
            left: 8px;
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            align-items: flex-start;
            gap: 4px;
            pointer-events: none;
            z-index: 4;
        }

        .tileComingUpDay {
            background: rgba(0,0,0,0.65);
            border-radius: 4px;
            padding: 3px 5px;
            font-size: 9px;
            font-weight: 600;
            color: rgba(255,255,255,0.85);
            letter-spacing: 0.02em;
        }

        .tileComingUpCountdown {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background: rgba(0,0,0,0.75);
            border-radius: 4px;
            padding: 3px 6px;
            font-size: 10px;
            font-weight: 700;
            pointer-events: none;
            z-index: 4;
        }

        .tileComingUpCountdown--accent { color: #e50914; }
        .tileComingUpCountdown--amber { color: #ffc107; }
        .tileComingUpCountdown--white { color: rgba(255,255,255,0.92); }

        /* Episodes-left ring (TV EpisodesLeftCircleBadge parity) */
        .tileEpisodesLeftRing {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            flex-shrink: 0;
            background: rgba(0,0,0,0.6);
            box-sizing: border-box;
            padding: 2px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .tileEpisodesLeftRing svg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
        }

        .tileEpisodesLeftRing .tileEpisodesLeftNum {
            position: relative;
            z-index: 1;
            font-size: 11px;
            font-weight: 700;
            color: rgba(255,255,255,0.95);
            line-height: 1;
        }

        .tileWatchedBadge {
            position: absolute;
            top: 8px;
            right: 8px;
            background: rgba(232,124,26,0.92);
            border-radius: 50%;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            color: #fff;
            pointer-events: none;
            z-index: 2;
        }

        /* Landscape rows: top-end is episode + rings; keep watched check top-left */
        .tile--landscape .tileWatchedBadge {
            left: 8px;
            right: auto;
        }

        .tile .tileImgWrap {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
        }

        .tile .tileImgWrap img:not(.tileLogo) {
            display: block;
            width: 100%;
            border-radius: 12px;
            background: #1e1e26;
            aspect-ratio: 2/3;
            object-fit: cover;
            object-position: center;
        }

        .tile .tileImgWrap .tileLogo {
            width: auto;
            height: auto;
            border-radius: 0;
            background: transparent;
            aspect-ratio: auto;
            object-fit: contain;
            object-position: left bottom;
            display: block;
        }

        /* Android TV / large-screen compact layout */
        html.tv-compact .topbar {
            padding: 8px 12px;
            gap: 10px;
        }
        html.tv-compact .brandIcon {
            width: 28px;
            height: 28px;
            border-radius: 8px;
        }
        html.tv-compact .tabBtn,
        html.tv-compact .btn {
            padding: 8px 12px;
            font-size: 12px;
        }
        html.tv-compact .sectionHeader {
            margin: 8px 16px 6px 16px;
        }
        html.tv-compact .sectionTitle {
            font-size: 18px;
        }
        html.tv-compact .rowWrapper {
            margin: 0 -16px;
            padding: 0 16px;
        }
        html.tv-compact .row {
            gap: 10px;
            padding: 4px 2px 10px 2px;
        }
        html.tv-compact .tile {
            width: 80px;
        }
        html.tv-compact .tileTitle {
            max-width: 80px;
            font-size: 9px;
            margin-top: 5px;
        }
        html.tv-compact .tile:hover {
            transform: scale(1.03);
        }
        html.tv-compact .tile:focus {
            transform: scale(1.04);
        }

        html.tv-compact .searchResultsRow .tile { min-width: 80px; max-width: 100px; }

        html.tv-compact .modalBackdrop {
            /* TV overscan-safe insets so title/footer aren't clipped */
            padding: 26px 0;
            align-items: stretch;
            justify-content: flex-end;
        }
        html.tv-compact .modal {
            width: min(860px, 76vw);
            /* Fit inside the overscan-safe backdrop padding */
            height: calc(100vh - 52px);
            box-sizing: border-box;
            border-radius: 0;
            border-left: 1px solid rgba(255,255,255,0.10);
        }
        /* On TV: avoid squeezing the main content. Use a single column modal.
           Episodes/seasons are rendered inside the modal body (not the side pane). */
        html.tv-compact .modalGrid {
            grid-template-columns: 1fr;
        }
        html.tv-compact .modalPoster {
            display: none;
        }
        html.tv-compact .modalSide {
            display: none !important;
        }
        html.tv-compact .modalBody {
            padding: 14px 16px;
            gap: 8px;
            flex: 1;
            overflow: hidden;
        }

        /* TV movie details: header uses full top area (title left, meta right) */
        html.tv-compact .modal.movieTvMode .modalHeader {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            column-gap: 14px;
            row-gap: 4px;
            align-items: start;
        }

        html.tv-compact .modal.movieTvMode .modalTitle {
            grid-column: 1;
            margin: 0;
        }

        html.tv-compact .modal.movieTvMode .modalMeta {
            grid-column: 2;
            justify-self: end;
            align-self: start;
            justify-content: flex-end;
            text-align: right;
        }

        /* TV movie details: add comfortable top/bottom breathing room */
        html.tv-compact .modal.movieTvMode .modalBody {
            /* Use the full top area for the title again */
            padding-top: 18px;
            padding-bottom: 28px;
            gap: 6px;
        }

        /* Keep actions/art away from the footer edge */
        html.tv-compact .modal.movieTvMode .movieHero {
            margin-top: 10px;
            padding-bottom: 18px;
        }

        /* Play button uses a flex spacer to sit at the bottom; add real bottom padding */
        html.tv-compact .modal.movieTvMode .movieActions {
            padding-bottom: 22px;
        }

        /* Keep the poster from feeling glued to the footer edge */
        html.tv-compact .modal.movieTvMode .movieArt {
            margin-bottom: 22px;
        }
        html.tv-compact .modalSide {
            padding: 14px 12px;
        }
        html.tv-compact .modalTitle {
            font-size: 26px;
        }

        /* TV movie: keep the title area fixed so long titles don't make the modal scroll */
        html.tv-compact .modal.movieTvMode .modalTitle {
            height: 64px;
            overflow: hidden;
            display: -webkit-box;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            word-break: break-word;
        }
        html.tv-compact .modalMeta {
            font-size: 12px;
            gap: 10px;
        }
        html.tv-compact .modalEpisodesWrap {
            margin-top: 6px;
            padding: 10px;
            border-radius: 12px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            min-height: 0;
            overflow: auto;
            max-height: 24vh;
        }

        /* TV series/anime details: use the full modal height (no tiny 24vh box) */
        html.tv-compact .modal.seriesTvMode .modalEpisodesWrap {
            flex: 1;
            max-height: none;
            overflow: hidden;
            padding: 0;
            margin-top: 10px;
            background: transparent;
            border: none;
        }

        html.tv-compact .modal.seriesTvMode .detailsDescription {
            display: none !important;
        }

        /* TV series/anime: never show stream picker (episodes already represent playable sources) */
        html.tv-compact .modal.seriesTvMode #streamHeader,
        html.tv-compact .modal.seriesTvMode #streamList {
            display: none !important;
        }

        /* TV series layout shell: stacked panels (stable on overscan) */
        .tvSeriesShell {
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-height: 0;
            height: 100%;
        }
        .tvSeriesInfoPanel {
            min-height: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 12px 12px;
            border-radius: 14px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            overflow: hidden;
        }
        html.tv-compact .tvSeriesInfoPanel {
            /* Keep the header visible and avoid stealing too much vertical space */
            max-height: 18vh;
        }
        .tvSeriesInfoTitle {
            font-weight: 900;
            font-size: 13px;
            color: rgba(255,255,255,0.75);
        }
        .tvSeriesInfoText {
            color: rgba(255,255,255,0.78);
            font-size: 13px;
            line-height: 1.5;
            overflow: auto;
            padding-right: 6px;
            min-height: 0;
        }
        .tvSeriesMainPanel {
            min-height: 0;
            padding: 10px 10px;
            border-radius: 14px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            overflow: hidden;
            flex: 1;
            display: block;
        }
        /* inside the main panel, the existing seriesBrowser already lays out seasons + list */
        html.tv-compact .modal.seriesTvMode .seriesBrowser {
            width: 100%;
            height: 100%;
            grid-template-columns: 260px minmax(0, 1fr);
            gap: 12px;
        }
        html.tv-compact .modal.seriesTvMode .seriesSeasonsTitle,
        html.tv-compact .modal.seriesTvMode .seriesMainTitle {
            font-size: 14px;
        }
        html.tv-compact .modal.seriesTvMode .seasonBtn {
            padding: 14px 12px;
            font-size: 14px;
        }
        html.tv-compact .streamList {
            flex: 1;
            min-height: 0;
            max-height: none;
        }
        html.tv-compact .streamItem {
            padding: 10px 10px;
            border-radius: 12px;
        }
        html.tv-compact .streamName {
            font-size: 12px;
        }
        html.tv-compact .streamUrl {
            font-size: 10px;
        }
        html.tv-compact .modalFooter {
            padding: 10px 12px;
        }

        .section--upnext .sectionTitle  {
            /* inherits default white from .sectionTitle */
        }
        .section--comingup .sectionTitle {
            /* inherits default white from .sectionTitle */
        }

        /* Landscape tile gradient so logo overlay is always legible */
        .section--compact .tile .tileImgWrap::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, transparent 35%, rgba(0,0,0,0.65) 100%);
            border-radius: 12px;
            pointer-events: none;
            z-index: 1;
        }
        /* Ensure badges and logo stay above the gradient overlay */
        .section--compact .tile .tileEpBadge,
        .section--compact .tile .tileWatchedBadge,
        .section--compact .tile .tileLogo,
        .section--compact .tile .tileProgressWrap,
        .section--compact .tile .tileTopEndStack,
        .section--compact .tile .tileComingUpCountdown,
        .section--compact .tile .tileWatchedBadge { z-index: 4; }

        /* Smaller tiles for compact sections (e.g., Continue Watching) */
        .section--compact .row {
            gap: 12px;
            padding: 4px 3px 8px 3px;
        }

        .section--compact .tile {
            width: 280px;
        }

        .section--compact .tile img:not(.tileLogo) {
            aspect-ratio: 16/9;
            object-fit: cover;
            object-position: center;
        }

        .section--compact .tileTitle {
            max-width: 280px;
            font-size: 12px;
            margin-top: 8px;
            text-align: left;
        }

        /* Settings */
        .settingsWrap {
            padding: 0;
            display: none
        }

        .settingsSubtabs {
            display: flex;
            gap: 8px;
            padding: 16px 18px 0 18px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }

        .settingsSubtabBtn {
            border: none;
            background: transparent;
            color: rgba(255,255,255,0.65);
            padding: 12px 20px;
            border-radius: 12px 12px 0 0;
            cursor: pointer;
            font-weight: 900;
            font-size: 14px;
            transition: all 150ms ease;
        }

        .settingsSubtabBtn:hover {
            background: rgba(255,255,255,0.04);
            color: rgba(255,255,255,0.85);
        }

        .settingsSubtabBtn.active {
            background: rgba(255,255,255,0.08);
            color: var(--text);
        }

        .settingsPanel {
            padding: 16px 18px 26px 18px;
            display: none;
        }

        .settingsPanel.active {
            display: block;
        }

        .settingsCard {
            border: 1px solid rgba(255,255,255,0.10);
            background: rgba(255,255,255,0.04);
            border-radius: 18px;
            padding: 14px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.35);
            margin-bottom: 14px;
        }

        .settingsFormRow {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        .settingsInputRow {
            display: flex;
            gap: 10px;
            align-items: center;
            flex: 1;
            min-width: 260px;
        }

        .settingsActionsRow {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .settingsToggleRow {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px;
            background: rgba(255,255,255,0.04);
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.06);
        }

        .settingsToggleRow label {
            flex: 1;
            cursor: pointer;
        }

        /* TV-friendly Settings controls */
        html.tv-compact .settingsSubtabs {
            padding: 12px 12px 0 12px;
        }
        html.tv-compact .settingsPanel {
            padding: 12px 12px 18px 12px;
        }
        html.tv-compact .settingsTitle {
            font-size: 16px;
        }
        html.tv-compact .settingsSub {
            font-size: 11px;
        }
        html.tv-compact .settingsCard {
            padding: 12px;
            border-radius: 16px;
        }
        html.tv-compact .settingsFormRow {
            flex-wrap: nowrap;
            align-items: stretch;
        }
        html.tv-compact .settingsInputRow {
            min-width: 0;
        }
        html.tv-compact .settingsActionsRow {
            flex-wrap: nowrap;
        }
        html.tv-compact .settingsActionsRow .btn {
            padding: 12px 16px;
            font-size: 13px;
        }
        html.tv-compact .settingsWrap input[type="text"],
        html.tv-compact .settingsWrap input[type="password"],
        html.tv-compact .settingsWrap input[type="number"] {
            padding: 12px 14px !important;
            border-radius: 999px !important;
            font-size: 13px;
        }

        /* Switch-style checkboxes in Settings (TV mode) */
        html.tv-compact .settingsWrap input[type="checkbox"] {
            -webkit-appearance: none;
            appearance: none;
            width: 54px;
            height: 30px;
            border-radius: 999px;
            background: rgba(255,255,255,0.10);
            border: 1px solid rgba(255,255,255,0.14);
            position: relative;
            cursor: pointer;
            outline: none;
            flex: 0 0 auto;
        }
        html.tv-compact .settingsWrap input[type="checkbox"]::before {
            content: "";
            position: absolute;
            top: 3px;
            left: 3px;
            width: 24px;
            height: 24px;
            border-radius: 999px;
            background: rgba(255,255,255,0.85);
            transition: transform 160ms ease, background 160ms ease;
        }
        html.tv-compact .settingsWrap input[type="checkbox"]:checked {
            background: rgba(255,255,255,0.92);
            border-color: rgba(255,255,255,0.92);
        }
        html.tv-compact .settingsWrap input[type="checkbox"]:checked::before {
            transform: translateX(24px);
            background: #0f0f10;
        }
        html.tv-compact .settingsWrap input[type="checkbox"]:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
        }

        /* Clearer focus in Settings */
        html.tv-compact .settingsWrap .btn:focus,
        html.tv-compact .settingsWrap button:focus,
        html.tv-compact .settingsWrap input:focus,
        html.tv-compact .settingsSubtabBtn:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
        }

        .settingsTitle {
            font-size: 18px;
            font-weight: 900;
            margin: 4px 0 10px 0
        }

        .settingsSub {
            color: rgba(255,255,255,0.60);
            font-size: 12px;
            margin-bottom: 12px
        }

        /* Catalogs Order UI */
        .catalogOrderList { border: 1px solid rgba(255,255,255,0.06); padding: 8px; border-radius: 8px; background: rgba(255,255,255,0.02); }
        .catalogRow { display:flex; align-items:center; gap:8px; padding:8px; border-radius:8px; margin-bottom:6px; background: rgba(0,0,0,0.14); cursor:grab; }
        .catalogRow.dragging { opacity:0.5; }
        .dragHandle { width:22px; text-align:center; font-size:18px; color:rgba(255,255,255,0.7); }
        .catalogName { flex:1; font-weight:700; }
        .catalogSmall { color: rgba(255,255,255,0.6); font-size:12px; margin-left:6px; }

        .installRow {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
            padding: 12px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
            margin-bottom: 12px;
        }

            .installRow input {
                flex: 1;
                min-width: 280px;
                background: rgba(255,255,255,0.06);
                border: 1px solid rgba(255,255,255,0.10);
                border-radius: 999px;
                padding: 10px 14px;
                color: var(--text);
                outline: none;
            }

        .addonRow {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 12px;
            padding: 12px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
            margin-bottom: 10px;
        }

        /* Episode List Styles */
        .episode-card {
            display: flex;
            gap: 16px;
            padding: 14px;
            border-radius: 10px;
            background: transparent;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s;
            align-items: center;
            border: 1px solid rgba(255,255,255,0.04);
            border-left: 3px solid transparent;
            position: relative;
            overflow: hidden;
        }
        .episode-card:hover {
            background: rgba(255,255,255,0.06);
            border-color: rgba(255,255,255,0.10);
        }
        .episode-card.active {
            background: rgba(255,255,255,0.12);
            border-left-color: rgba(255,255,255,0.92);
            border-color: rgba(255,255,255,0.16);
        }
        .episode-card:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
            background: rgba(255,255,255,0.08);
            border-color: rgba(255,255,255,0.14);
        }

        .tv-main-folder-btn:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: -3px;
        }

        .tv-card:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
            transform: translateY(-3px);
            box-shadow: 0 6px 18px rgba(0,0,0,0.35);
            border-color: rgba(59, 130, 246, 0.5) !important;
        }

        .tv-history-item:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
        }
        .episode-thumb {
            width: 160px;
            height: 90px;
            border-radius: 8px;
            object-fit: cover;
            background: #222;
            flex-shrink: 0;
        }

        .episode-thumbPlaceholder {
            width: 160px;
            height: 90px;
            border-radius: 8px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.10);
            color: rgba(255,255,255,0.60);
            font-size: 12px;
            font-weight: 900;
            letter-spacing: 0.2px;
        }
        .episode-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 3px;
            min-width: 0;
        }
        .episode-kicker {
            font-weight: 700;
            font-size: 12px;
            color: rgba(255,255,255,0.60);
        }
        .episode-title {
            font-weight: 900;
            font-size: 14px;
            line-height: 1.25;
            white-space: normal;
            overflow: hidden;
            display: -webkit-box;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .episode-meta {
            font-size: 13px;
            color: rgba(255,255,255,0.60);
        }
        .episode-right {
            min-width: 60px;
            text-align: right;
            color: rgba(255,255,255,0.55);
            font-size: 13px;
            font-weight: 700;
        }

        .episodeProgressWrap {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 3px;
            background: rgba(255,255,255,0.16);
        }

        .episodeProgressBar {
            height: 100%;
            background: #e50914;
        }
        
        /* Season Selector Styles */
        .season-selector {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: transparent;
            padding: 10px 0;
            margin-bottom: 10px;
        }

        .season-selectWrap {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            border-radius: 999px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.10);
        }

        .season-select {
            background: transparent;
            color: var(--text);
            border: none;
            font-size: 14px;
            font-weight: 900;
            cursor: pointer;
            outline: none;
            appearance: none;
            padding: 0;
        }

        .season-select:focus {
            outline: 3px solid rgba(255,255,255,0.75);
            outline-offset: 3px;
            border-radius: 999px;
        }

        .season-selectArrow {
            font-size: 10px;
            opacity: 0.75;
            pointer-events: none;
        }
        .season-nav-btn {
            background: transparent;
            border: none;
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            padding: 5px 10px;
            transition: color 0.2s;
        }
        .season-nav-btn:hover { color: #fff; }
        .season-nav-btn:disabled { opacity: 0.3; cursor: default; }
        
        .season-dropdown-trigger {
            background: transparent;
            color: #fff;
            border: none;
            font-size: 18px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .season-dropdown-trigger:after {
            content: '▼';
            font-size: 10px;
            opacity: 0.7;
        }

        /* Modal Styles Override */
        .detailsDescription {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            padding: 16px;
            color: rgba(255,255,255,0.86);
            line-height: 1.55;
            font-size: 14px;
            margin: 6px 0 10px 0;
        }

        .detailsMetaGrid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px 16px;
            margin: 8px 0 14px 0;
        }

        .detailsMetaItem {
            font-size: 13px;
            color: rgba(255,255,255,0.75);
        }

        .detailsMetaLabel {
            color: rgba(255,255,255,0.55);
            font-weight: 900;
            margin-bottom: 3px;
        }

        .detailsMetaValue {
            color: rgba(255,255,255,0.92);
            font-weight: 700;
        }

        .episodesHeader {
            font-size: 22px;
            font-weight: 900;
            margin: 14px 0 10px 0;
        }

        .addonName {
            font-weight: 900;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .addonMeta {
            margin-top: 6px;
            color: rgba(255,255,255,0.60);
            font-size: 11px;
            line-height: 1.5;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            line-clamp: 3;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            max-width: 100%;
            word-break: break-word;
        }

        .addonRight {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: wrap
        }

        .toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-weight: 900;
            user-select: none
        }

            .toggle input {
                transform: scale(1.2)
            }

        /* Modal */
        .modalBackdrop {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.82);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 50;
            padding: 20px;
            overscroll-behavior: contain;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 230ms ease, visibility 230ms ease;
        }

        /* Blurred art backdrop — injected by JS behind the modal */
        .modalBgArt {
            position: absolute;
            inset: 0;
            background-size: cover;
            background-position: center top;
            filter: blur(40px) brightness(0.22) saturate(1.4);
            transform: scale(1.06);
            pointer-events: none;
            z-index: 0;
        }

        /* Hide blurry backdrop art for clean series detail */
        .modalBackdrop:has(.modal.seriesMode) .modalBgArt { display: none !important; }
        .modalBackdrop:has(.modal.movieMode) .modalBgArt { display: none !important; }

        .modalBackdrop.isOpen {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .modal {
            position: relative;
            z-index: 1;
            width: min(1400px, 95vw);
            height: min(90vh, 980px);
            max-width: 100%;
            background: rgba(14,14,18,0.94);
            border: 1px solid rgba(255,255,255,0.10);
            border-radius: 18px;
            box-shadow: 0 32px 96px rgba(0,0,0,0.85);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            overscroll-behavior: contain;
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            opacity: 0;
            transform: scale(0.95) translateY(16px);
            transition: opacity 260ms ease, transform 280ms cubic-bezier(0.34, 1.18, 0.64, 1);
        }

        .modalBackdrop.isOpen .modal {
            opacity: 1;
            transform: scale(1) translateY(0);
        }

        .modalGrid {
            display: grid;
            grid-template-columns: 360px 1fr;
            gap: 0;
            min-height: 0;
            flex: 1;
        }

        .modal.hasSide .modalGrid {
            grid-template-columns: 360px minmax(0, 1fr) 440px;
        }

        .modalPoster {
            width: 100%;
            height: 100%;
            object-fit: cover;
            background: #202028;
            min-height: 100%
        }

        .modalBody {
            padding: 26px 30px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-height: 0;
        }

        .modalHeader {
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-width: 0;
        }

        .modalSide {
            display: none;
            padding: 26px 18px;
            border-left: 1px solid rgba(255,255,255,0.08);
            min-height: 0;
        }

        .modal.hasSide .modalSide {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .episodesList {
            display: flex;
            flex-direction: column;
            gap: 8px;
            overflow: auto;
            padding-right: 6px;
            min-height: 0;
            flex: 1;
        }

        /* TV Series details (clean two-column browser) */
        .seriesBrowser {
            display: grid;
            grid-template-columns: 240px minmax(0, 1fr);
            gap: 12px;
            min-height: 0;
        }
        .seriesSeasons {
            min-height: 0;
            overflow: auto;
            padding-right: 6px;
        }
        .seriesSeasonsTitle {
            font-weight: 900;
            font-size: 13px;
            color: rgba(255,255,255,0.75);
            margin: 2px 0 8px 0;
        }
        .seasonBtn {
            width: 100%;
            text-align: left;
            border: 1px solid rgba(255,255,255,0.10);
            background: rgba(255,255,255,0.04);
            color: rgba(255,255,255,0.86);
            padding: 10px 12px;
            border-radius: 12px;
            cursor: pointer;
            outline: none;
            font-weight: 900;
            font-size: 13px;
            margin-bottom: 8px;
        }
        .seasonBtn.active {
            background: rgba(255,255,255,0.10);
            border-color: rgba(255,255,255,0.18);
            color: rgba(255,255,255,0.95);
        }
        .seasonBtn:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
        }
        .seriesMain {
            min-height: 0;
            display: flex;
            flex-direction: column;
        }
        .seriesMainHeader {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 2px;
            margin: 2px 0 8px 0;
        }
        .seriesMainTitle {
            font-weight: 900;
            font-size: 13px;
            color: rgba(255,255,255,0.75);
        }
        .miniBackBtn {
            border: 1px solid rgba(255,255,255,0.14);
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.92);
            padding: 8px 12px;
            border-radius: 999px;
            cursor: pointer;
            font-weight: 900;
            font-size: 12px;
            outline: none;
        }
        .miniBackBtn:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
        }
        .seriesListBox {
            flex: 1;
            min-height: 0;
            overflow: auto;
            padding-right: 6px;
        }

        /* Movie details (TV-style) */
        .movieHero {
            display: none;
            margin-top: 10px;
            gap: 12px;
            align-items: stretch;
            flex: 1;
            min-height: 0;
        }

        /* Desktop web movie hero layout */
        .modal.movieTvMode .movieHero {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        }

        .modal.movieTvMode .movieArt {
            min-height: 200px;
            height: clamp(200px, 38vh, 360px);
        }

        .movieLeft {
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-width: 0;
            min-height: 0;
        }

        .movieOverview {
            color: rgba(255,255,255,0.78);
            font-size: 13px;
            line-height: 1.5;
            display: -webkit-box;
            line-clamp: 4;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        html.tv-compact .movieOverview {
            line-clamp: 3;
            -webkit-line-clamp: 3;
        }

        .movieActions {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-height: 0;
            flex: 1;
        }

        /* Scrollable list styling (used for movie sources and series lists) */
        .seriesListBox::-webkit-scrollbar {
            width: 10px;
        }
        .seriesListBox::-webkit-scrollbar-track {
            background: transparent;
        }
        .seriesListBox::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.16);
            border-radius: 999px;
            border: 2px solid transparent;
            background-clip: padding-box;
        }
        .seriesListBox::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.26);
            background-clip: padding-box;
        }
        .seriesListBox {
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.18) transparent;
        }

        .actionBtn {
            text-align: left;
            border: 1px solid rgba(255,255,255,0.10);
            background: rgba(255,255,255,0.05);
            color: rgba(255,255,255,0.92);
            padding: 12px 12px;
            border-radius: 14px;
            cursor: pointer;
            font-weight: 900;
            font-size: 14px;
            outline: none;
        }

        html.tv-compact .actionBtn {
            padding: 10px 10px;
            border-radius: 12px;
            font-size: 13px;
        }

        .actionBtn:focus {
            outline: 3px solid rgba(255,255,255,0.85);
            outline-offset: 2px;
            background: rgba(255,255,255,0.92);
            color: var(--bg);
            border-color: rgba(255,255,255,0.30);
        }

        .actionBtnSub {
            font-size: 12px;
            font-weight: 700;
            color: rgba(255,255,255,0.65);
            margin-top: 4px;
        }

        html.tv-compact .actionBtnSub {
            font-size: 11px;
            margin-top: 3px;
        }

        .actionBtn:focus .actionBtnSub {
            color: rgba(0,0,0,0.70);
        }

        .movieArt {
            border-radius: 16px;
            border: 1px solid rgba(255,255,255,0.10);
            background: rgba(255,255,255,0.04);
            background-size: cover;
            background-position: center;
            position: relative;
            overflow: hidden;
            min-height: 240px;
            height: 100%;
        }

        .movieArt::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, rgba(15,15,16,0.95) 0%, rgba(15,15,16,0.55) 32%, rgba(15,15,16,0.05) 70%);
            pointer-events: none;
        }

        html.tv-compact .movieHero {
            display: grid;
            grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
        }

        html.tv-compact .movieArt {
            /* Keep the art tall on TV, but responsive so it doesn't break the modal layout */
            height: clamp(340px, 52vh, 620px);
            min-height: 0;
            /* Keep top of poster visible (avoid cropping the title area) */
            background-position: top center;
        }

        /* TV movie mode: header is full-width (title + meta) */
        html.tv-compact .modal.movieTvMode .modalTitle,
        html.tv-compact .modal.movieTvMode .modalMeta {
            max-width: none;
        }

        html.tv-compact .seriesBrowser {
            grid-template-columns: 200px minmax(0, 1fr);
            gap: 10px;
        }
        html.tv-compact .seasonBtn {
            padding: 12px 12px;
            font-size: 13px;
        }

        .modalTitle {
            font-size: 40px;
            font-weight: 900;
            margin: 0;
            line-height: 1.15;
        }

        .modalMeta {
            color: rgba(255,255,255,0.60);
            font-size: 14px;
            line-height: 1.5;
            white-space: pre-wrap;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .imdbBadge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 152, 0, 0.15));
            border: 1px solid rgba(255, 193, 7, 0.4);
            border-radius: 6px;
            font-weight: 600;
            color: #ffc107;
            font-size: 13px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .imdbBadge::before {
            content: "★";
            font-size: 14px;
        }

        .metaInfo {
            display: contents;
        }

        .streamList {
            margin-top: 10px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            overflow: auto;
            padding-right: 6px;
            min-height: 0;
            flex: 1
        }

        .streamItem {
            display: flex;
            align-items: stretch;
            gap: 0;
            padding: 0;
            border-radius: 12px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.13);
            cursor: pointer;
            outline: none;
            transition: background 130ms ease, border-color 130ms ease;
            overflow: hidden;
        }
        .streamItem:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); }
        .streamItem:focus { outline: 2px solid rgba(255,255,255,0.7); outline-offset: 2px; }
        .streamItem.stream-best { border-color: rgba(255,165,0,0.65); background: rgba(255,165,0,0.05); }
        .streamItem.stream-best:hover { background: rgba(255,165,0,0.09); }

        .streamItemBody {
            flex: 1;
            min-width: 0;
            padding: 13px 14px;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        .streamItemArrow {
            flex-shrink: 0;
            width: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgba(255,255,255,0.3);
            font-size: 18px;
            border-left: 1px solid rgba(255,255,255,0.07);
        }
        .streamItem:hover .streamItemArrow { color: rgba(255,255,255,0.7); }

        .streamTopRow {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .streamName {
            font-weight: 800;
            font-size: 14px;
            color: rgba(255,255,255,0.95);
            line-height: 1.3;
        }
        .streamBestBadge {
            flex-shrink: 0;
            padding: 1px 7px;
            border-radius: 5px;
            background: rgba(255,165,0,0.25);
            border: 1px solid rgba(255,165,0,0.5);
            color: #ffb347;
            font-size: 10px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .streamCompatBadge {
            flex-shrink: 0;
            padding: 1px 7px;
            border-radius: 5px;
            font-size: 10px;
            font-weight: 700;
        }
        .streamCompatBadge.compat-high {
            background: rgba(34,197,94,0.15);
            color: #4ade80;
        }
        .streamCompatBadge.compat-good {
            background: rgba(59,130,246,0.15);
            color: #93c5fd;
        }
        .streamCompatBadge.compat-warn {
            background: rgba(239,68,68,0.15);
            color: #f87171;
        }
        .streamDesc {
            font-size: 12px;
            color: rgba(255,255,255,0.65);
            line-height: 1.45;
            word-break: break-word;
        }
        .streamFooter {
            font-size: 11px;
            color: rgba(255,255,255,0.38);
            margin-top: 1px;
        }

        .streamMeta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 4px;
            font-size: 12px;
            color: rgba(255,255,255,0.55);
        }

        .streamBadge {
            display: inline-flex;
            align-items: center;
            padding: 2px 8px;
            border-radius: 6px;
            font-weight: 700;
            font-size: 11px;
            letter-spacing: 0.3px;
        }

        .streamBadge.q-4k { background: rgba(168,85,247,0.22); color: #d8b4fe; }
        .streamBadge.q-1080 { background: rgba(59,130,246,0.22); color: #93c5fd; }
        .streamBadge.q-720 { background: rgba(34,197,94,0.22); color: #86efac; }
        .streamBadge.q-480 { background: rgba(234,179,8,0.22); color: #fde68a; }
        .streamBadge.q-unknown { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
        .streamBadge.s-size { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }
        .streamBadge.s-type { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }
        .streamBadge.s-source { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.45); }

        .streamProviderChips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 12px;
            padding: 0 2px;
        }
        .streamProviderChip {
            appearance: none;
            border: 1px solid rgba(255,255,255,0.2);
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.85);
            border-radius: 999px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            outline: none;
        }
        .streamProviderChip:hover { background: rgba(255,255,255,0.1); }
        .streamProviderChip.is-selected {
            border-color: rgba(255,165,0,0.55);
            background: rgba(255,165,0,0.12);
            color: #ffb347;
        }
        .streamProviderLabel {
            font-size: 12px;
            color: rgba(255,255,255,0.5);
            margin-right: 4px;
        }
        .streamBadgeRow2 {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 2px;
            overflow-x: auto;
            padding-bottom: 2px;
        }
        .streamMarqueeTitle {
            font-size: 13px;
            font-weight: 600;
            color: rgba(255,255,255,0.92);
            margin-top: 6px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .streamLastPlayedBadge {
            flex-shrink: 0;
            padding: 1px 7px;
            border-radius: 5px;
            background: rgba(76,175,80,0.85);
            color: #fff;
            font-size: 10px;
            font-weight: 800;
        }
        .streamItem.stream-card-compatible {
            background: rgba(27,46,27,0.35);
            border-color: rgba(74,222,128,0.25);
        }
        .streamItem.stream-card-incompatible {
            background: rgba(46,27,27,0.4);
            border-color: rgba(248,113,113,0.28);
        }
        .streamItem.stream-tier-unknown {
            border-color: rgba(147,197,253,0.22);
        }
        .streamItem.stream-tier-risky {
            background: rgba(55,40,20,0.35);
            border-color: rgba(251,191,36,0.28);
        }
        .streamItem.stream-tier-unsupported {
            background: rgba(46,27,27,0.4);
            border-color: rgba(248,113,113,0.28);
        }
        .streamListInner {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        /* ===== Series Detail Screen — Netflix-like clean layout ===== */
        .modal.seriesMode {
            width: min(860px, 94vw);
            height: min(88vh, 840px);
            background: #141414;
            border-color: rgba(255,255,255,0.08);
        }
        .modal.seriesMode .modalGrid { grid-template-columns: 1fr; }
        .modal.seriesMode .modalPoster { display: none !important; }
        .modal.seriesMode .modalSide { display: none !important; }
        .modal.seriesMode .modalBody {
            padding: 0;
            overflow-y: auto;
            flex: 1;
            min-height: 0;
        }
        .modal.seriesMode .modalFooter { display: none; }
        .modal.seriesMode .modalHeader { display: none; }
        .modal.seriesMode #movieHero,
        .modal.seriesMode #trailerBtn,
        .modal.seriesMode #modalDesc,
        .modal.seriesMode #streamHeader,
        .modal.seriesMode #streamList,
        .modal.seriesMode #modalEpisodesWrap {
            display: none !important;
        }

        /* ===== Movie Detail Screen — Netflix-like ===== */
        .modal.movieMode {
            width: min(900px, 96vw);
            height: min(92vh, 860px);
            background: #141414;
            border-color: rgba(255,255,255,0.08);
        }
        .modal.movieMode .modalGrid { grid-template-columns: 1fr; }
        .modal.movieMode .modalPoster { display: none !important; }
        .modal.movieMode .modalSide { display: none !important; }
        .modal.movieMode .modalBody {
            padding: 0;
            overflow-y: auto;
            flex: 1;
            min-height: 0;
        }
        .modal.movieMode .modalFooter { display: none; }
        .modal.movieMode .modalHeader { display: none; }

        .movieDetailWrap {
            display: flex;
            flex-direction: column;
            min-height: 100%;
            background: #141414;
            position: relative;
        }

        /* ── Movie Hero ── */
        .movieHeroSection {
            position: relative;
            width: 100%;
            height: 0;
            padding-bottom: 48%;
            flex-shrink: 0;
            overflow: hidden;
            background: #000;
        }
        .movieHeroImg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .movieHeroGradient {
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, rgba(0,0,0,0.02) 0%, rgba(20,20,20,0.35) 55%, #141414 100%);
        }
        /* Transparent logo overlay — shared by movie and series */
        .movieHeroLogo, .seriesHeroLogo {
            position: absolute;
            bottom: 24px;
            left: 28px;
            max-width: 260px;
            max-height: 96px;
            object-fit: contain;
            object-position: left bottom;
            filter: drop-shadow(0 2px 10px rgba(0,0,0,0.8));
        }
        /* Progress bar at bottom of details hero */
        .detailsHeroProgressWrap {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: rgba(255,255,255,0.12);
            z-index: 5;
        }
        .detailsHeroProgressBar {
            height: 100%;
            background: #e87c1a;
            border-radius: 0 2px 2px 0;
            min-width: 2px;
        }

        /* Progress under hero / above title (movie + series detail layouts) */
        .detailsPosterProgressHost {
            position: relative;
            width: 100%;
            flex-shrink: 0;
            box-sizing: border-box;
        }
        .detailsPosterProgressHost .detailsHeroProgressWrap {
            position: relative;
            bottom: auto;
            left: auto;
            right: auto;
            height: 4px;
            border-radius: 2px;
            overflow: hidden;
        }
        .seriesInfoSection > .detailsPosterProgressHost:not(:empty) {
            margin: 0 0 12px 0;
        }
        .movieDetailWrap > .detailsPosterProgressHost:not(:empty) {
            padding: 0 28px;
            margin-top: -4px;
            margin-bottom: 4px;
        }

        /* ── Actions row ── */
        .movieActionsRow {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            padding: 18px 28px 10px;
            flex-shrink: 0;
        }

        .detailsTextCheck {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 6px 10px;
            margin: 0;
            background: transparent;
            border: none;
            border-radius: 6px;
            color: rgba(255,255,255,0.88);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            text-align: left;
            transition: background 0.12s;
            font-family: inherit;
        }
        .detailsTextCheck:hover { background: rgba(255,255,255,0.08); }
        .detailsTextCheck:focus-visible {
            outline: 2px solid #e87c1a;
            outline-offset: 2px;
        }
        .detailsTextCheckBox {
            flex-shrink: 0;
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255,255,255,0.45);
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            line-height: 1;
            transition: border-color 0.12s, background 0.12s;
        }
        .detailsTextCheck.isOn .detailsTextCheckBox {
            border-color: #e87c1a;
            background: rgba(232, 124, 26, 0.22);
        }
        .detailsTextCheck.isOn .detailsTextCheckBox::after {
            content: '\2713';
            font-weight: 900;
            color: #e87c1a;
        }
        .detailsTextCheckLabel { line-height: 1.35; }

        /* ── Two-column content area ── */
        .movieContentSection {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 220px;
            gap: 28px;
            padding: 0 28px 32px;
        }
        .movieContentLeft { display: flex; flex-direction: column; gap: 14px; }
        .movieContentRight {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding-top: 4px;
            font-size: 13px;
        }
        .movieMetaRow {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            font-size: 13px;
            font-weight: 600;
            color: rgba(255,255,255,0.7);
        }
        .movieMetaGreen { color: #e87c1a; font-weight: 800; }
        .movieMetaDot { color: rgba(255,255,255,0.3); }
        .movieMetaBadge {
            padding: 1px 7px;
            border: 1px solid rgba(255,255,255,0.45);
            border-radius: 3px;
            font-size: 11px;
            font-weight: 700;
            color: rgba(255,255,255,0.8);
        }
        .movieDescription {
            font-size: 14px;
            color: rgba(255,255,255,0.88);
            line-height: 1.6;
        }
        .movieInfoRow { line-height: 1.6; }
        .movieInfoLabel { color: rgba(255,255,255,0.45); font-weight: 700; font-size: 12px; }
        .movieInfoValue { color: rgba(255,255,255,0.88); font-size: 13px; }

        /* ── Inline streams (expands on Play click) ── */
        .movieStreamsSection { display: none; flex-direction: column; gap: 4px; }
        .movieStreamsSection.isOpen { display: flex; }
        .movieStreamsHeading {
            font-size: 17px;
            font-weight: 800;
            color: rgba(255,255,255,0.95);
            padding: 14px 0 10px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .movieStreamsList { display: flex; flex-direction: column; }

        /* ── Close button ── */
        .movieCloseBtn {
            position: absolute;
            top: 12px;
            right: 12px;
            z-index: 10;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(20,20,20,0.85);
            border: 2px solid rgba(255,255,255,0.18);
            color: #fff;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.14s;
        }
        .movieCloseBtn:hover { background: rgba(80,80,80,0.95); }

        @media (max-width: 700px) {
            .movieHeroSection { padding-bottom: 60%; }
            .movieHeroLogo, .seriesHeroLogo { max-width: 180px; left: 16px; bottom: 16px; }
            .movieActionsRow { padding: 14px 16px 8px; }
            .movieContentSection { grid-template-columns: 1fr; padding: 0 16px 24px; gap: 14px; }
        }

        /* Full-height stacked wrapper */
        .seriesDetailWrap {
            display: flex;
            flex-direction: column;
            min-height: 100%;
            position: relative;
            background: #141414;
        }

        /* Netflix-style close button overlaid top-right */
        .seriesCloseBtn {
            position: absolute;
            top: 12px;
            right: 12px;
            z-index: 10;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(20,20,20,0.85);
            border: 2px solid rgba(255,255,255,0.18);
            color: #fff;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.14s;
        }
        .seriesCloseBtn:hover { background: rgba(80,80,80,0.95); }

        /* ── Hero backdrop ── */
        .seriesHero {
            position: relative;
            width: 100%;
            height: 0;
            padding-bottom: 42%;
            flex-shrink: 0;
            overflow: hidden;
            background: #000;
        }
        .seriesHeroImg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .seriesHeroGradient {
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, rgba(0,0,0,0.05) 30%, rgba(20,20,20,0.7) 72%, #141414 100%);
        }

        /* ── Info section ── */
        .seriesInfoSection {
            padding: 0 28px 16px;
            flex-shrink: 0;
        }
        .seriesInfoTitle {
            font-size: 32px;
            font-weight: 900;
            color: #fff;
            line-height: 1.1;
            margin-bottom: 10px;
        }
        .seriesInfoMetaRow {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            font-size: 13px;
            font-weight: 600;
            color: rgba(255,255,255,0.7);
            margin-bottom: 16px;
        }
        .seriesInfoMetaDot { color: rgba(255,255,255,0.3); }
        .seriesInfoMetaGreen { color: #e87c1a; font-weight: 800; }

        /* Action buttons row */
        .seriesActionsBar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            margin-bottom: 14px;
        }
        .seriesPlayBtn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 9px 24px;
            background: #fff;
            color: #000;
            border: none;
            border-radius: 5px;
            font-size: 15px;
            font-weight: 800;
            cursor: pointer;
            transition: background 0.12s;
        }
        .seriesPlayBtn:hover { background: rgba(255,255,255,0.82); }
        .seriesCircleBtn {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: transparent;
            border: 2px solid rgba(255,255,255,0.5);
            color: #fff;
            font-size: 20px;
            line-height: 1;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.12s, background 0.12s;
            flex-shrink: 0;
        }
        .seriesCircleBtn:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
        .seriesCircleBtn.inList { border-color: #e87c1a; color: #e87c1a; }
        .seriesCircleBtn .addIcon { font-size: 22px; font-weight: 300; }

        .seriesInfoDescription {
            font-size: 14px;
            color: rgba(255,255,255,0.88);
            line-height: 1.55;
            margin-bottom: 12px;
        }
        .seriesGenreTags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
        .seriesGenreTag {
            padding: 3px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.20);
            font-size: 11px;
            font-weight: 600;
            color: rgba(255,255,255,0.65);
            background: rgba(255,255,255,0.04);
            white-space: nowrap;
        }
        .seriesCastRow { font-size: 12px; color: rgba(255,255,255,0.42); margin-top: 4px; }
        .seriesCastRow span { color: rgba(255,255,255,0.72); }

        /* ── Episodes section ── */
        .seriesEpPanel {
            display: flex;
            flex-direction: column;
            flex: 1;
            padding: 4px 20px 20px;
        }
        .seriesEpHeading {
            font-size: 22px;
            font-weight: 700;
            color: rgba(255,255,255,0.95);
        }
        .seriesSeasonBar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 8px 0 12px;
            border-bottom: 1px solid rgba(255,255,255,0.12);
            flex-shrink: 0;
            position: sticky;
            top: 0;
            background: #141414;
            z-index: 3;
        }
        .seriesSeasonSelectWrap { width: 220px; position: relative; }
        .seriesSeasonSelectWrap::after {
            content: '▾';
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
            color: rgba(255,255,255,0.5);
            font-size: 14px;
        }
        .seriesSeasonSelect {
            width: 100%;
            padding: 10px 36px 10px 14px;
            border-radius: 10px;
            background: rgba(42,42,42,0.95);
            border: 1px solid rgba(255,255,255,0.24);
            color: #fff;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            outline: none;
            appearance: none;
            -webkit-appearance: none;
        }
        /* Shared slot: episode list — streams pane overlays it */
        .seriesEpSlot { flex: 1; overflow: hidden; position: relative; min-height: 320px; }
        .seriesEpList { height: 100%; overflow-y: auto; padding: 6px 0 12px; }

        /* Streams pane overlays the episode list */
        .seriesStreamsPane {
            position: absolute;
            inset: 0;
            display: none;
            flex-direction: column;
            background: rgba(16,16,18,0.99);
            overflow: hidden;
            animation: slideInRight 0.18s ease;
        }
        .seriesStreamsPane.isOpen { display: flex; }
        .seriesStreamsPaneHeader {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 11px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.07);
            flex-shrink: 0;
        }
        .seriesStreamsPaneBackBtn {
            padding: 6px 13px;
            border-radius: 8px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.12);
            color: rgba(255,255,255,0.85);
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            flex-shrink: 0;
            transition: background 0.12s;
        }
        .seriesStreamsPaneBackBtn:hover { background: rgba(255,255,255,0.15); }
        .seriesStreamsPaneTitle {
            font-size: 13px;
            font-weight: 800;
            color: rgba(255,255,255,0.9);
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .seriesStreamsList { flex: 1; overflow-y: auto; padding: 10px 14px; }

        /* ── Episode card ── */
        .epCard {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 16px 12px;
            cursor: pointer;
            transition: background 0.12s;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            position: relative;
            outline: none;
        }
        .epCard:hover { background: rgba(255,255,255,0.06); }
        .epCard:focus-visible { outline: 2px solid rgba(229,9,20,0.65); outline-offset: -2px; }
        .epCard.active { background: rgba(255,255,255,0.08); }

        /* Episode number column */
        .epCardNum {
            flex-shrink: 0;
            width: 28px;
            text-align: center;
            font-size: 20px;
            font-weight: 400;
            color: rgba(255,255,255,0.5);
            line-height: 1;
        }

        .epCardThumbWrap {
            flex-shrink: 0;
            width: 180px;
            height: 101px;
            border-radius: 4px;
            overflow: hidden;
            background: rgba(255,255,255,0.06);
        }
        .epCardThumb { width: 100%; height: 100%; object-fit: cover; display: block; }
        .epCardThumbPh {
            width: 100%; height: 100%;
            display: flex; align-items: center; justify-content: center;
            color: rgba(255,255,255,0.28); font-size: 11px; font-weight: 600;
            text-align: center; padding: 6px;
        }

        .epCardInfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

        .epCardWatchedBadge {
            flex-shrink: 0;
            align-self: center;
            width: 22px;
            height: 22px;
            background: rgba(40,180,70,0.85);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            color: #fff;
            pointer-events: none;
        }

        .epCardWatchedBtn {
            flex-shrink: 0;
            align-self: center;
            width: 26px;
            height: 26px;
            border-radius: 50%;
            border: 2px solid rgba(255,255,255,0.3);
            background: transparent;
            color: rgba(255,255,255,0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all 150ms;
        }
        .epCardWatchedBtn:hover { border-color: rgba(255,255,255,0.8); color: #fff; background: rgba(255,255,255,0.08); }
        .epCardWatchedBtn.watched { border-color: #ff8a00; color: #ff8a00; background: rgba(255,138,0,0.12); }
        .epCardWatchedBtn.watched:hover { border-color: #e07000; color: #e07000; }

        .seriesMarkSeasonBtn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.2);
            color: rgba(255,255,255,0.6);
            border-radius: 6px;
            padding: 4px 10px;
            font-size: 11px;
            cursor: pointer;
            transition: all 150ms;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .seriesMarkSeasonBtn:hover { border-color: #ff8a00; color: #ff8a00; }
        .seriesMarkSeasonBtn:disabled { opacity: 0.5; cursor: default; }

        .seriesCircleBtn.watched { border-color: #ff8a00; color: #ff8a00; }
        .seriesCircleBtn.watched:hover { border-color: #e07000; }

        .epCardProgressWrap {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 3px;
            background: rgba(255,255,255,0.14);
        }

        .epCardProgressBar {
            height: 100%;
            background: #e50914;
        }

        /* Title row: name left, duration right */
        .epCardTitleRow {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 10px;
        }
        .epCardTitle {
            font-size: 15px;
            font-weight: 700;
            color: rgba(255,255,255,0.95);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .epCardDuration {
            flex-shrink: 0;
            font-size: 13px;
            font-weight: 400;
            color: rgba(255,255,255,0.55);
        }
        .epCardDesc {
            font-size: 13px;
            color: rgba(255,255,255,0.65);
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .epCardDate { display: none; }
        .epCardPlayArrow { display: none; }

        @media (max-width: 900px) {
            .seriesHero { padding-bottom: 58%; }
            .seriesInfoSection { padding: 0 16px 14px; }
            .seriesInfoTitle { font-size: 22px; }
            .seriesInfoDescription { font-size: 13px; }
            .seriesEpHeading { font-size: 18px; }
            .seriesSeasonSelectWrap { width: 150px; }
            .epCardNum { display: none; }
            .epCardThumbWrap { width: 130px; height: 73px; }
            .epCardTitle { font-size: 14px; }
            .epCardDesc { font-size: 12px; }
        }

        /* ── Audio Track Panel ── */
        .playerAudioPanel {
            position: fixed;
            bottom: 120px;
            right: 24px;
            background: rgba(18,18,22,0.96);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 12px;
            min-width: 220px;
            max-height: 45vh;
            overflow-y: auto;
            padding: 8px 0;
            display: none;
            z-index: 2010;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
        }

        .playerAudioPanel.isOpen { display: block; }

        .playerAudioPanelTitle {
            font-size: 11px;
            font-weight: 700;
            color: rgba(255,255,255,0.45);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 6px 14px 4px;
        }

        .playerAudioItem {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            transition: background 0.1s ease;
        }

        .playerAudioItem:hover { background: rgba(255,255,255,0.08); }
        .playerAudioItem.active { color: #e50914; font-weight: 700; }
        .playerAudioItem.active::before { content: '✓'; font-size: 14px; min-width: 16px; }

        /* Mobile-only elements (hidden on desktop by default) */
        .mobileSearchFab,
        .mobileSearchOverlay { display: none; }

        /* Bottom-sheet drag strip (shown only in mobile media query below) */
        .modalSheetDragZone { display: none; }
        html.tv-compact .modalSheetDragZone { display: none !important; }

        .modalFooter {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            padding: 14px 18px;
            border-top: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03)
        }

        .modalFooterLeft,
        .modalFooterRight {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        @media (max-width: 920px) {
            .heroCard {
                grid-template-columns: 180px 1fr
            }

            .modalGrid {
                grid-template-columns: 200px 1fr
            }

            .modal.hasSide .modalGrid {
                grid-template-columns: 200px 1fr
            }

            .modalSide {
                display: none !important;
            }
        }

        @media (max-width: 720px) {
            body {
                padding-bottom: 86px;
                overscroll-behavior: none;
            }

            .topbar {
                position: fixed;
                top: auto;
                bottom: 0;
                left: 0;
                right: 0;
                padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
                border-top: 1px solid rgba(255,255,255,0.08);
                background: rgba(0,0,0,0.94);
            }

            .brandMenu,
            .topbarActions,
            #searchWrap {
                display: none !important;
            }

            .tabs {
                width: 100%;
                justify-content: space-between;
                gap: 4px;
            }

            .tabIndicator {
                height: 32px;
            }

            .tabBtn {
                flex: 1 1 0;
                min-width: 0;
                font-size: 12px;
                padding: 8px 4px;
                text-align: center;
            }

            .row {
                scroll-snap-type: x mandatory;
                -webkit-overflow-scrolling: touch;
            }

            .tile {
                width: 145px;
                scroll-snap-align: start;
            }

            .heroCard {
                grid-template-columns: 1fr
            }

            .search {
                display: none
            }

            /* ===== Mobile bottom-sheet modal ===== */
            .modalBackdrop {
                padding: 0;
                align-items: flex-end;
            }

            .modal {
                width: 100%;
                height: 92dvh;
                max-width: 100%;
                border-radius: 20px 20px 0 0;
                display: flex;
                flex-direction: column;
            }

            /* Pull-handle + touch target (pseudo-elements cannot receive pointer events) */
            .modalSheetDragZone {
                display: flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;
                min-height: 44px;
                width: 100%;
                touch-action: none;
                cursor: grab;
                -webkit-user-select: none;
                user-select: none;
            }
            .modalSheetDragZone:active { cursor: grabbing; }
            .modalSheetDragHandle {
                display: block;
                width: 36px;
                height: 4px;
                border-radius: 2px;
                background: rgba(255,255,255,0.20);
                pointer-events: none;
            }

            /* Grid becomes a vertical flex container — NO overflow:hidden so .modalBody can scroll */
            .modalGrid,
            .modal.hasSide .modalGrid {
                display: flex;
                flex-direction: column;
                grid-template-columns: none;
                flex: 1;
                min-height: 0;
                overflow: visible;
            }

            .modalSide {
                display: none !important;
            }

            /* Poster as a hero banner: wide, short, image fades out at bottom */
            .modalPoster {
                width: 100%;
                height: 200px;
                min-height: 0 !important;
                flex-shrink: 0;
                border-radius: 0;
                object-position: center 20%;
                object-fit: cover;
                -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
                mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
            }

            /* Body is the SOLE scroll container for the whole sheet */
            .modalBody {
                flex: 1;
                min-height: 0;
                overflow-y: auto;
                overflow-x: hidden;
                -webkit-overflow-scrolling: touch;
                padding: 8px 16px 16px;
                gap: 8px;
                /* Counteract desktop flex: 1 / min-height: 0 so natural height is used */
                display: block;
            }

            /* Inner lists must NOT have their own scroll containers on mobile —
               they grow naturally so all content is visible inside .modalBody */
            .streamList {
                overflow: visible !important;
                flex: none !important;
                max-height: none !important;
                min-height: 0 !important;
            }

            .seriesBrowser {
                overflow: visible !important;
                min-height: 0;
            }

            .seriesListBox {
                overflow: visible !important;
                max-height: none !important;
                flex: none !important;
                min-height: 0;
            }

            .modalEpisodesWrap {
                overflow: visible !important;
            }

            .episodesList {
                overflow: visible !important;
                flex: none !important;
            }

            /* Compact title */
            .modalTitle {
                font-size: 22px !important;
                line-height: 1.2;
            }

            .modalMeta {
                font-size: 12px;
                gap: 8px;
            }

            /* Movie hero on mobile: single-column, hide art, just show overview + actions */
            #movieHero,
            .movieHero {
                display: flex !important;
                flex-direction: column;
                gap: 8px;
            }

            .movieArt {
                display: none !important;
            }

            .movieLeft {
                width: 100%;
            }

            .movieOverview {
                font-size: 14px;
                -webkit-line-clamp: 3;
                line-clamp: 3;
            }

            /* Bigger stream rows for finger tapping */
            .streamList {
                gap: 8px;
            }

            .streamItem {
                padding: 16px 14px !important;
                border-radius: 16px;
            }

            .streamName {
                font-size: 15px !important;
            }

            .streamUrl {
                font-size: 12px;
                margin-top: 5px;
            }

            /* Series browser: single column on mobile */
            .seriesBrowser {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .seriesSeasons {
                display: flex;
                flex-direction: row;
                flex-wrap: nowrap;
                gap: 6px;
                overflow-x: auto;
                overflow-y: hidden;
                padding-bottom: 4px;
                -webkit-overflow-scrolling: touch;
            }

            .seasonBtn {
                flex-shrink: 0;
                padding: 10px 16px;
                font-size: 13px;
                white-space: nowrap;
                margin-bottom: 0;
            }

            /* Action buttons */
            .actionBtn {
                padding: 16px 14px;
                font-size: 14px;
                border-radius: 16px;
            }

            /* Footer: sticky at bottom of sheet */
            .modalFooter {
                position: sticky;
                bottom: 0;
                flex-shrink: 0;
                padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
                background: rgba(20,20,24,0.98);
                border-top: 1px solid rgba(255,255,255,0.10);
            }

            /* ===== Mobile Player Adjustments ===== */
            .playerTopBar { padding: 12px 12px 36px 12px; }
            .playerBottomBar { padding: 36px 12px 14px 12px; }

            .playerScrubberRow { gap: 8px; margin-bottom: 10px; }
            .playerTimeDisplay { font-size: 11px; min-width: 72px; }

            .playerPlayPauseCircle { width: 48px; height: 48px; min-width: 48px; font-size: 18px; }
            .playerCtlSmall { width: 38px; height: 38px; min-width: 38px; font-size: 12px; }
            .playerInfoTitle { font-size: 13px; }
            .playerEpBadge { font-size: 10px; padding: 2px 6px; }
            .playerEpName { font-size: 11px; }

            .playerScrubberWrap { height: 32px; }
            .playerScrubberTrack { height: 4px; }
            .playerScrubberWrap:hover .playerScrubberTrack,
            .playerScrubberWrap.scrubbing .playerScrubberTrack { height: 6px; }

            .playerSubPanel {
                right: 8px;
                left: 8px;
                bottom: 100px;
                min-width: unset;
                max-height: 40vh;
            }
            .playerAudioPanel {
                right: 8px;
                left: 8px;
                bottom: 100px;
                min-width: unset;
                max-height: 40vh;
            }

            .playerVolSlider { display: none; }
            .playerVolumeWrap { gap: 0; }

            .playerNextEpCard {
                left: 12px;
                right: 12px;
                bottom: 110px;
                max-width: none;
            }

            /* ===== Mobile Search FAB ===== */
            .mobileSearchFab {
                display: none !important;
                position: fixed;
                bottom: calc(76px + env(safe-area-inset-bottom));
                right: 16px;
                width: 52px;
                height: 52px;
                border-radius: 50%;
                background: rgba(229,9,20,0.95);
                color: #fff;
                border: none;
                align-items: center;
                justify-content: center;
                z-index: 40;
                box-shadow: 0 4px 16px rgba(0,0,0,0.4);
                cursor: pointer;
                transition: transform 0.15s ease;
            }

            .mobileSearchFab:active { transform: scale(0.9); }
            .mobileSearchFab svg { width: 22px; height: 22px; fill: currentColor; }

            .mobileSearchOverlay {
                display: none;
                position: fixed;
                inset: 0;
                z-index: 60;
                background: rgba(10,10,14,0.98);
                flex-direction: column;
                padding: 16px;
                padding-top: calc(16px + env(safe-area-inset-top));
            }

            .mobileSearchOverlay.isOpen {
                display: flex;
            }

            .mobileSearchBar {
                display: flex;
                gap: 10px;
                align-items: center;
            }

            .mobileSearchBar input {
                flex: 1;
                padding: 14px 16px;
                border-radius: 14px;
                border: 1px solid rgba(255,255,255,0.12);
                background: rgba(255,255,255,0.06);
                color: #fff;
                font-size: 16px;
                outline: none;
            }

            .mobileSearchBar input:focus {
                border-color: rgba(229,9,20,0.5);
            }

            .mobileSearchBar button {
                padding: 10px;
                background: none;
                border: none;
                color: rgba(255,255,255,0.7);
                font-size: 16px;
                cursor: pointer;
            }

            .mobileSearchResults {
                flex: 1;
                overflow-y: auto;
                margin-top: 16px;
                -webkit-overflow-scrolling: touch;
            }

            /* Fix 1: Remove nav-arrow bleed margin on mobile — arrows are hidden anyway */
            #homeWrap {
                padding: 0 0 0 12px !important;
            }

            .rowWrapper {
                margin: 0;
                padding: 0;
            }

            .rowNav {
                display: none !important;
            }

            /* Fix 5: Compact tiles (CW, Up Next, Coming Up) fit 3 per row like Netflix */
            .section--compact .tile {
                width: 120px;
            }

            .section--compact .tileTitle {
                max-width: 120px;
            }
        }

        /* ====== My List Hero View ====== */
        #myListView {
            position: fixed;
            inset: 0;
            z-index: 10;
            display: flex;
            flex-direction: column;
            background: #0a0a0a;
            overflow: hidden;
        }
        #mlHero {
            position: relative;
            flex: 1;
            overflow: hidden;
            min-height: 0;
        }
        #mlHeroBg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center top;
            transition: opacity 0.4s ease;
        }
        .mlHeroBgFade { opacity: 0 !important; }
        #mlHeroGrad {
            position: absolute;
            inset: 0;
            background:
                linear-gradient(to right, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 55%, rgba(0,0,0,0.05) 100%),
                linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.0) 100%),
                linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 18%);
            z-index: 1;
        }
        #mlHeroInfo {
            position: absolute;
            bottom: 28px;
            left: 52px;
            max-width: 540px;
            z-index: 2;
        }
        #mlHeroTitle {
            font-size: 40px;
            font-weight: 800;
            color: #fff;
            line-height: 1.1;
            margin-bottom: 12px;
            text-shadow: 0 2px 16px rgba(0,0,0,0.8);
        }
        #mlHeroMeta {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        .mlMetaYear { color: #bbb; font-size: 14px; }
        .mlMetaImdbBadge {
            background: #f5c518;
            color: #000;
            font-weight: 700;
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 3px;
            letter-spacing: 0.5px;
        }
        .mlMetaRating { color: #bbb; font-size: 14px; }
        #mlHeroGenres {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }
        .mlGenreTag {
            color: rgba(255,255,255,0.6);
            font-size: 12px;
            padding: 3px 10px;
            border: 1px solid rgba(255,255,255,0.22);
            border-radius: 20px;
        }
        #mlHeroDesc {
            color: rgba(255,255,255,0.65);
            font-size: 14px;
            line-height: 1.6;
            max-width: 460px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        #mlCategoryNav {
            position: absolute;
            right: 44px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 3;
            display: flex;
            flex-direction: column;
            gap: 22px;
            align-items: flex-end;
        }
        .mlCatItem {
            font-size: 17px;
            font-weight: 600;
            color: rgba(255,255,255,0.3);
            cursor: pointer;
            transition: color 0.25s, font-size 0.25s;
            text-align: right;
            user-select: none;
            letter-spacing: 0.4px;
        }
        .mlCatItem:hover { color: rgba(255,255,255,0.65); }
        .mlCatItem.active { color: #e87c1a; font-size: 21px; }
        #mlPosterRow {
            flex-shrink: 0;
            display: flex;
            gap: 10px;
            padding: 14px 52px 22px;
            overflow-x: auto;
            scrollbar-width: none;
            z-index: 2;
            position: relative;
            background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.55));
        }
        #mlPosterRow::-webkit-scrollbar { display: none; }
        .mlPosterCard {
            flex-shrink: 0;
            width: 130px;
            height: 195px;
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
            border: 2.5px solid transparent;
            transition: border-color 0.2s, transform 0.25s;
            background: #1a1a1a;
        }
        .mlPosterCard:hover { transform: scale(1.05); }
        .mlPosterCard.active { border-color: #e87c1a; }
        .mlPosterCard img { width: 100%; height: 100%; object-fit: cover; display: block; }
        /* Topbar: float above the fixed hero view */
        body.mylist-active .topbar {
            position: fixed !important;
            top: 0 !important;
            bottom: auto !important;
            left: 0 !important;
            right: 0 !important;
            height: auto !important;
            z-index: 20 !important;
            background: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%) !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            box-shadow: none !important;
            border-bottom: none !important;
            border-top: none !important;
        }
        /* Transparent logo overlay */
        #mlHeroLogo {
            display: none;
            max-width: 280px;
            max-height: 100px;
            object-fit: contain;
            object-position: left bottom;
            margin-bottom: 14px;
            filter: drop-shadow(0 2px 12px rgba(0,0,0,0.85));
        }
        /* Action buttons row */
        #mlHeroActions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 18px;
            flex-wrap: wrap;
        }
        .mlBtn {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 10px 22px;
            border-radius: 6px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            border: none;
            transition: opacity 0.2s, transform 0.15s;
            white-space: nowrap;
        }
        .mlBtn:active { transform: scale(0.97); }
        .mlBtn:disabled { opacity: 0.5; pointer-events: none; }
        .mlBtnPlay {
            background: #fff;
            color: #111;
        }
        .mlBtnPlay:hover { background: rgba(255,255,255,0.85); }
        .mlBtnRemove {
            background: rgba(255,255,255,0.15);
            color: #fff;
            border: 1px solid rgba(255,255,255,0.35) !important;
        }
        .mlBtnRemove:hover { background: rgba(255,255,255,0.25); }
        .mlMetaContentRating {
            color: rgba(255,255,255,0.55);
            font-size: 12px;
            border: 1px solid rgba(255,255,255,0.3);
            padding: 1px 6px;
            border-radius: 3px;
        }
        /* State message (empty / login required) */
        #mlStateMsg {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: rgba(255,255,255,0.5);
            font-size: 15px;
            z-index: 4;
            width: 280px;
            line-height: 1.6;
        }
        @media (max-width: 720px) {
            #mlHeroTitle { font-size: 22px; }
            #mlHeroInfo { left: 16px; bottom: 14px; max-width: calc(100% - 110px); }
            #mlHeroLogo { max-width: 180px; max-height: 70px; margin-bottom: 10px; }
            #mlHeroDesc { font-size: 13px; -webkit-line-clamp: 2; }
            #mlHeroActions { margin-top: 12px; gap: 8px; }
            .mlBtn { padding: 8px 16px; font-size: 13px; }
            #mlCategoryNav { right: 12px; gap: 14px; }
            .mlCatItem { font-size: 13px; }
            .mlCatItem.active { font-size: 15px; }
            #mlPosterRow { padding: 10px 16px 16px; }
            .mlPosterCard { width: 100px; height: 150px; }
        }

        /* Home: hover trailer preview card (below modals ~2000, above rows) */
        .hoverTrailerCard {
            /* Uniform scale preserves aspect ratio. 1 = full 16:9 embed (fit; scope trailers may letterbox).
               .hoverTrailerCard--fill bumps zoom ~1.34 to mostly fill scope (~2.39:1) in the player; 16:9 trailers may crop slightly. */
            --hover-trailer-iframe-zoom: 1;
            position: fixed;
            z-index: 1900;
            max-width: calc(100vw - 24px);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
            background: linear-gradient(180deg, rgba(24, 24, 26, 0.98), rgba(14, 14, 16, 0.99));
            border: 1px solid rgba(255, 255, 255, 0.12);
            pointer-events: auto;
            will-change: transform;
            display: flex;
            flex-direction: column;
            align-items: stretch;
        }

        .hoverTrailerCard.hoverTrailerCard--expanded {
            will-change: auto;
            cursor: pointer;
        }

        .hoverTrailerCard.hoverTrailerCard--fill {
            --hover-trailer-iframe-zoom: 1.34;
        }

        .hoverTrailerCardVideo {
            position: relative;
            width: 100%;
            flex-shrink: 0;
            aspect-ratio: 16 / 9;
            background: #0a0a0b;
            border-radius: 10px 10px 0 0;
            overflow: hidden;
        }

        .hoverTrailerCardIframeShell {
            position: absolute;
            inset: 0;
            overflow: hidden;
            background: #000;
            transition: opacity 0.38s ease;
            cursor: pointer;
        }

        .hoverTrailerCardIframeShell--out {
            opacity: 0;
            pointer-events: none;
        }

        /* Centered uniform scale + shell overflow:hidden; YtBar* masks handle residual YouTube chrome. */
        .hoverTrailerCardIframe {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 100%;
            height: 100%;
            border: 0;
            transform: translate(-50%, -50%) scale(var(--hover-trailer-iframe-zoom));
            transform-origin: center center;
            pointer-events: none;
        }

        .hoverTrailerCardYtBarTop {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            height: clamp(16px, 4%, 28px);
            background: #000;
            pointer-events: none;
            z-index: 4;
        }

        .hoverTrailerCardYtBarBottom {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: clamp(16px, 4.5%, 30px);
            background: #000;
            pointer-events: none;
            z-index: 4;
        }

        .hoverTrailerCardYtBarRight {
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: clamp(28px, 6%, 44px);
            background: #000;
            pointer-events: none;
            z-index: 3;
        }

        .hoverTrailerCardLoading,
        .hoverTrailerCardError {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            text-align: center;
            font-size: 13px;
            color: rgba(255, 255, 255, 0.65);
            background: rgba(0, 0, 0, 0.35);
        }

        .hoverTrailerCardMute {
            position: absolute;
            top: 8px;
            left: 8px;
            right: auto;
            z-index: 8;
            width: 36px;
            height: 36px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.25);
            background: rgba(0, 0, 0, 0.55);
            color: #fff;
            font-size: 16px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .hoverTrailerCardMute:hover {
            background: rgba(0, 0, 0, 0.75);
        }

        .hoverTrailerCardStartPreview,
        .hoverTrailerCardOpenTrailer {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            z-index: 2;
            padding: 10px 18px;
            border-radius: 999px;
            border: none;
            background: rgba(255, 255, 255, 0.92);
            color: #111;
            font-weight: 800;
            font-size: 13px;
            cursor: pointer;
        }

        .hoverTrailerCardStartPreview:hover,
        .hoverTrailerCardOpenTrailer:hover {
            background: #fff;
        }

        .hoverTrailerCardFallbackActions {
            position: absolute;
            inset: 0;
            z-index: 2;
        }

        .hoverTrailerCardFooter {
            flex-shrink: 0;
            padding: 10px 12px 12px;
            background: rgb(10, 10, 12);
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .hoverTrailerCardFooterTop {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 12px;
            min-height: 40px;
        }

        .hoverTrailerCardLogoRow {
            flex: 1;
            min-width: 0;
            display: flex;
            align-items: flex-end;
            padding: 0;
            margin: 0;
            position: relative;
            z-index: 1;
            background: none;
        }

        .hoverTrailerCardLogo {
            max-height: 52px;
            max-width: min(72%, calc(100% - 100px));
            object-fit: contain;
            object-position: left bottom;
            filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85));
            display: block;
        }

        .hoverTrailerCardTitleFallback {
            font-weight: 800;
            font-size: 15px;
            line-height: 1.25;
            color: rgba(255, 255, 255, 0.95);
            text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
        }

        .hoverTrailerCardMetaRow {
            min-height: 0;
        }

        .hoverTrailerCardPrimaryBtn {
            flex-shrink: 0;
            position: relative;
            z-index: 2;
            margin: 0;
            padding: 9px 20px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.32);
            background: rgba(255, 255, 255, 0.94);
            color: #111;
            font-weight: 800;
            font-size: 13px;
            letter-spacing: 0.03em;
            cursor: pointer;
            box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
            transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
        }

        .hoverTrailerCardPrimaryBtn:hover {
            background: #fff;
            transform: translateY(-1px);
            box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
        }

        .hoverTrailerCardPrimaryBtn:active {
            transform: translateY(0);
        }

        .hoverTrailerCardMeta {
            font-size: 12px;
            line-height: 1.45;
            color: rgba(255, 255, 255, 0.62);
            margin-bottom: 0;
        }

        @media (prefers-reduced-motion: reduce) {
            .hoverTrailerCardIframeShell {
                transition: none;
            }
        }