:root {
            --bg-color: #000;
            --surface-color: rgba(10, 10, 10, 0.98);
            --accent-color: #0078ff;
            --text-color: #fff;
            /* DYNAMIC WIDTH: Min 260px, Max 300px, but 85% on very small screens */
            --nav-width: clamp(260px, 85vw, 300px); 
        }

        html, body {
            margin: 0; padding: 0;
            width: 100%; height: 100%;
            background: #000;
            color: var(--text-color);
            font-family: 'Segoe UI', Roboto, Arial, sans-serif;
            overflow: hidden;
        }

        /* 16:9 CENTERED PLAYER - NO CROPPING */
        #player-wrapper {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            aspect-ratio: 16 / 9;
            max-height: 100vh;
            max-width: 100vw;
            z-index: 1;
        }

        .jwplayer, video {
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: contain !important;
        }

        /* AUTO-HIDING HAMBURGER */
        #showMenuBtn {
            position: fixed;
            top: 20px; left: 20px;
            z-index: 1000;
            padding: 12px 18px;
            background: rgba(0, 0, 0, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            color: #fff;
            cursor: pointer;
            backdrop-filter: blur(10px);
            transition: opacity 0.5s ease, visibility 0.5s;
        }

        /* DYNAMIC NAVIGATION BAR */
        #navBox {
            position: fixed;
            top: 0; left: 0;
            width: var(--nav-width); 
            height: 100%;
            background: var(--surface-color);
            z-index: 9999;
            transform: translateX(0);
            transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
            display: flex;
            flex-direction: column;
            border-right: 1px solid #222;
            box-shadow: 10px 0 30px rgba(0,0,0,0.5);
        }

        #navBox.hide { transform: translateX(-110%); }

        .sidebar-header {
            padding: 25px 20px;
            flex-shrink: 0;
            text-align: center;
        }

        #currentInfo {
            display: block;
            font-size: 11px;
            color: var(--accent-color);
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-weight: 800;
            margin-bottom: 15px;
        }

        .searchInput {
            width: 100%; padding: 12px;
            background: #1a1a1a; border: 1px solid #333;
            color: #fff; border-radius: 8px; outline: none;
            box-sizing: border-box;
        }

        /* CHANNEL LIST */
        .channelScroll {
            flex: 1;
            overflow-y: auto;
            padding: 10px 15px;
            scrollbar-width: none;
        }
        .channelScroll::-webkit-scrollbar { display: none; }

        .item {
            padding: 18px 15px; margin-bottom: 5px;
            border-radius: 8px; cursor: pointer;
            border: 2px solid transparent; outline: none;
            transition: background 0.2s;
        }
        .item:focus, .item:hover { background: var(--accent-color); border-color: #fff; }

        .ui-faded { opacity: 0; visibility: hidden; }

        /* MODAL */
        .modal {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.9);
            display: none; justify-content: center; align-items: center; z-index: 10001;
        }
        .modal.show { display: flex; }
        .modalBox { background: #111; padding: 30px; border-radius: 15px; width: 280px; text-align: center; }
        .sourceBtn { width: 100%; padding: 15px; margin-top: 10px; background: #222; color: #fff; border-radius: 8px; border: 1px solid #333; cursor: pointer; }

        /* MOBILE OVERRIDE FOR FULL WIDTH IF DESIRED */
        @media (max-width: 400px) {
            :root { --nav-width: 90vw; }
        }