:root {
            --bg: #080c10;           /* tr-bg-dark */
            --surface: #0f1419;      /* tr-surface-primary */
            --surface2: #161d26;     /* tr-surface-secondary */
            --border: rgba(255,255,255,0.07); /* tr-border-subtle */
            --accent: #00e5ff;       /* tr-accent-cyan */
            --accent2: #ff2d6b;      /* tr-accent-red */
            --text: #e8edf2;         /* tr-text-primary */
            --muted: #5a6a7a;        /* tr-text-muted */
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            background: var(--bg);
            color: var(--text);
            font-family: 'DM Sans', sans-serif;
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Ambient background glow */
        body::before {
            content: '';
            position: fixed;
            top: -20%;
            left: -10%;
            width: 60%;
            height: 60%;
            background: radial-gradient(ellipse, rgba(0,229,255,0.04) 0%, transparent 70%);
            pointer-events: none;
            z-index: 0;
        }
        body::after {
            content: '';
            position: fixed;
            bottom: -20%;
            right: -10%;
            width: 50%;
            height: 50%;
            background: radial-gradient(ellipse, rgba(255,45,107,0.04) 0%, transparent 70%);
            pointer-events: none;
            z-index: 0;
        }

        /* Header — itv-player-header-module */
        .tr-site-header {
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(8,12,16,0.9);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border);
            padding: 0 24px;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        /* itv-logo-block */
        .itv-logo {
            font-family: cursive;
            font-size: 1.6rem;
            letter-spacing: 0px;
            color: var(--accent);
            text-decoration: none;
        }
        .itv-logo span { color: var(--accent2); }
        /* player-live-indicator */
        .player-live-badge {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 0.7rem;
            font-weight: 500;
            color: var(--muted);
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }
        .player-live-dot {
            width: 7px; height: 7px;
            border-radius: 50%;
            background: var(--accent2);
            animation: tr-pulse-dot 1.4s ease-in-out infinite;
        }
        @keyframes tr-pulse-dot {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.4; transform: scale(0.7); }
        }

        /* Layout — itv-player-grid-system */
        .tr-main-layout {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 20px;
            padding: 20px 20px 40px;
            max-width: 1650px;
            margin: 0 auto;
        }
        @media (max-width: 900px) {
            .tr-main-layout {
                grid-template-columns: 1fr;
                padding: 12px;
                gap: 12px;
            }
        }

        /* Player — itv-player-module */
        .itv-player-wrap {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .itv-player-container {
            position: relative;
            width: 100%;
            padding-top: 56.25%;
            background: #000;
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid var(--border);
            box-shadow: 0 0 40px rgba(0,229,255,0.05);
        }
        .itv-player-container iframe {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            border: none;
        }

        /* App download bar — player-appbar */
        .player-app-bar {
            display: flex;
            align-items: center;
            gap: 12px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 10px 16px;
        }
        .player-app-bar img { width: 36px; height: 36px; object-fit: contain; }
        .player-app-bar-text { flex: 1; }
        .player-app-bar-text strong { display: block; font-size: 0.82rem; font-weight: 500; }
        .player-app-bar-text span { font-size: 0.72rem; color: var(--muted); }
        .player-app-bar-btn {
            background: var(--accent2);
            color: #fff;
            border: none;
            border-radius: 6px;
            padding: 7px 16px;
            font-size: 0.75rem;
            font-weight: 600;
            text-decoration: none;
            letter-spacing: 0.5px;
            transition: opacity 0.2s;
        }
        .player-app-bar-btn:hover { opacity: 0.85; color: #fff; }

        /* Channel panel — itv-player-channel-panel */
        .tr-channel-panel {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            max-height: calc(100vh - 96px);
            position: sticky;
            top: 72px;
        }
        @media (max-width: 900px) {
            .tr-channel-panel {
                position: static;
                max-height: 420px;
            }
        }

        /* Category tabs — itv-cat-tabs */
        .itv-cat-tabs {
            display: flex;
            overflow-x: auto;
            scrollbar-width: none;
            border-bottom: 1px solid var(--border);
            padding: 0 4px;
            flex-shrink: 0;
        }
        .itv-cat-tabs::-webkit-scrollbar { display: none; }
        .itv-cat-tab {
            flex-shrink: 0;
            padding: 12px 16px;
            font-size: 0.72rem;
            font-weight: 500;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--muted);
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: color 0.2s, border-color 0.2s;
            white-space: nowrap;
            background: none;
            border-top: none;
            border-left: none;
            border-right: none;
        }
        .itv-cat-tab:hover { color: var(--text); }
        .itv-cat-tab.tr-active {
            color: var(--accent);
            border-bottom-color: var(--accent);
        }

        /* Channel grid — player-channel-grid */
        .player-channel-scroll {
            overflow-y: auto;
            flex: 1;
            padding: 14px;
            scrollbar-width: thin;
            scrollbar-color: var(--border) transparent;
        }
        .player-channel-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        /* itv-player-channel-card */
        .tr-channel-card {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            aspect-ratio: 1;
            background: var(--surface2);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s, transform 0.15s;
            padding: 8px;
            text-align: center;
            overflow: hidden;
        }
        .tr-channel-card.tr-visible { display: flex; }
        .tr-channel-card:hover {
            border-color: rgba(0,229,255,0.35);
            background: var(--bg);
            transform: scale(1.03);
        }
        .tr-channel-card.tr-playing {
            border-color: var(--accent);
            box-shadow: 0 0 12px rgba(0,229,255,0.2);
        }
        .tr-channel-card img {
            width: 100%;
            height: 70%;
            object-fit: contain;
            filter: brightness(0.85);
            transition: filter 0.2s;
        }
        .tr-channel-card:hover img,
        .tr-channel-card.tr-playing img { filter: brightness(1); }
        /* itv-player-channel-label */
        .itv-channel-label {
            font-size: 0.6rem;
            color: var(--muted);
            margin-top: 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            width: 100%;
        }
        .tr-channel-card.tr-playing .itv-channel-label { color: var(--accent); }