
        @font-face {
            font-family: 'FatFrank';
            src: url('/assets/fat-frank-heavy.otf') format('opentype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }

        :root {
            --primary: #1b3b82; /* Azul corporativo del cartel */
            --primary-dark: #112656; /* Azul corporativo más oscuro */
            --bg-body: #f4f7f6;
            --bg-card: #ffffff;
            --text-main: #2c3e50;
            --text-muted: #7f8c8d;
            --accent: #f8a816; /* Amarillo/naranja de atención del cartel */
            --font-display: 'FatFrank', 'Segoe UI', Roboto, sans-serif;
            --font-body: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--font-body);
            background-color: var(--bg-body);
            color: var(--text-main);
            height: 100vh; /* Fallback */
            height: 100dvh; /* Altura dinámica para evitar que las barras móviles tapen el footer */
            overflow: hidden; /* Evita el scroll global de la página */
            display: flex;
            flex-direction: column;
        }

        /* --- CABECERA Y NAVEGACIÓN --- */
        .site-header {
            background-color: var(--primary); /* Azul corporativo */
            flex-shrink: 0; 
            z-index: 100;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .header-content {
            display: flex;
            flex-direction: row; 
            align-items: flex-end; 
            justify-content: space-between;
            max-width: 1000px;
            margin: 0 auto;
            padding: 12px 20px 0; /* Un poco más de aire arriba */
            gap: 15px;
        }

        .logo-header {
            height: 44px; /* Un poco más bajo para compensar los márgenes */
            width: auto;
            object-fit: contain;
            margin-top: 4px;
            margin-bottom: 12px; /* Más aire abajo para que respire */
        }

        .nav-tabs {
            display: flex;
            justify-content: flex-end;
            gap: 15px;
            flex-grow: 1;
        }

        .tab-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 15px 5px;
            border: none;
            background: none;
            font-family: var(--font-display);
            font-size: 18px;
            font-weight: normal;
            color: rgba(255, 255, 255, 0.7); /* Blanco semitransparente */
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.3s;
            border-bottom: 3px solid transparent;
        }

        .tab-btn svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
        }

        .tab-btn:hover {
            color: #ffffff;
        }

        .tab-btn.active {
            color: #ffffff;
            border-bottom: 3px solid #ffffff;
        }

        /* Diseño responsivo para móviles */
        @media (max-width: 600px) {
            .header-content {
                padding: 12px 10px 0;
                gap: 10px;
            }
            .logo-header {
                height: 30px; 
                margin-top: 2px;
                margin-bottom: 10px;
            }
            .nav-tabs {
                gap: 5px;
            }
            .tab-btn {
                padding: 12px 5px;
                font-size: 15px; 
            }
            .tab-btn svg {
                width: 16px;
                height: 16px;
            }
        }

        /* --- CONTENEDOR PRINCIPAL --- */
        .main-container {
            flex-grow: 1;
            overflow-y: auto; 
            max-width: 1000px;
            margin: 0 auto;
            width: 100%;
            padding: 20px;
            display: flex;
            flex-direction: column; 
        }

        .view-section {
            display: none;
            animation: fadeIn 0.4s ease;
            flex-grow: 1; 
        }

        .view-section.active {
            display: flex;
            flex-direction: column;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* --- VISTA: TELEVISIÓN --- */
        .tv-layout {
            display: flex;
            flex-direction: column;
            align-items: center;
            max-width: 800px;
            margin: 0 auto;
            gap: 15px; 
            flex-grow: 1; 
            width: 100%;
            justify-content: flex-start;
        }

        .video-container {
            background: #000;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            aspect-ratio: 16/9;
            width: 100%;
            position: relative;
            flex-shrink: 0;
        }

        video {
            width: 100%;
            height: 100%;
            outline: none;
        }

        /* --- GUÍA DE TV --- */
        .guide-container {
            background: var(--bg-card);
            border-radius: 12px;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 12px rgba(0,0,0,0.02);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            width: 100%;
            flex-grow: 0; 
        }

        .lista-programas {
            display: flex;
            flex-direction: column;
        }

        .item-programa {
            display: flex;
            align-items: center; 
            gap: 12px;
            padding: 10px 12px; 
            border-bottom: 1px solid var(--border-color);
            transition: background 0.2s;
        }

        .item-programa:nth-child(even) {
            background-color: #fafafa;
        }

        .item-programa:hover {
            background-color: #f0f4f8;
        }

        .item-programa.en-directo {
            background-color: #fff8f8;
            border-left: 4px solid var(--accent);
        }

        .hora-bloque {
            min-width: 45px;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-shrink: 0;
        }

        .hora-inicio {
            font-family: var(--font-display);
            font-size: 16px; /* Letra un poco más grande */
            font-weight: normal;
            color: var(--text-main);
            display: block;
        }

        /* Separador visual entre hora y título */
        .linea-divisoria {
            width: 2px;
            height: 34px;
            border-radius: 2px;
            background-color: var(--border-color);
            flex-shrink: 0;
        }

        .item-programa.en-directo .linea-divisoria {
            background-color: var(--accent); /* Línea amarilla si está en directo */
        }

        .info-programa {
            flex-grow: 1;
            overflow: hidden;
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
        }

        .titulo-wrapper {
            width: 100%;
            overflow: hidden;
        }

        .titulo-programa {
            font-family: var(--font-display);
            font-size: 15px; /* Más grande (antes 14px) */
            font-weight: normal;
            letter-spacing: 0.5px;
            margin-bottom: 0;
            display: -webkit-box;
            -webkit-line-clamp: 3; /* Ampliado a 3 líneas para móviles */
            -webkit-box-orient: vertical;
            white-space: normal;
            overflow: hidden;
            line-height: 1.25; 
        }

        .etiqueta {
            font-family: var(--font-body);
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            padding: 4px 10px;
            border-radius: 6px;
            display: inline-block;
            margin-top: 6px;
        }

        .etiqueta.roja {
            background-color: var(--accent); /* Ahora es amarillo corporativo */
            color: var(--primary-dark); /* Letra oscura para contrastar */
            text-decoration: none;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
        }

        .etiqueta.roja:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(248, 168, 22, 0.3);
            background-color: #e69a10;
        }

        .loader-text {
            text-align: center;
            padding: 20px;
            color: var(--text-muted);
            font-size: 13px;
        }

        /* --- CONTROLES PAGINACIÓN GUÍA --- */
        .guide-pagination {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 12px; 
            background: #f8f9fa;
        }

        .btn-page {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 6px 12px; 
            border-radius: 15px;
            font-size: 11px;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s;
            text-transform: uppercase;
        }

        .btn-page:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }

        .btn-page:hover:not(:disabled) {
            background-color: var(--primary-dark);
        }

        .page-indicator {
            font-size: 11px; 
            font-weight: bold;
            color: var(--text-muted);
        }

        /* --- VISTA: RADIO --- */
        .radio-card {
            background: var(--bg-card); 
            border-radius: 12px;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 12px rgba(0,0,0,0.02);
            padding: 30px;
            text-align: center;
            max-width: 800px;
            width: 100%;
            margin: 0 auto;
            color: var(--text-main);
            position: relative;
            flex-grow: 1; 
            display: flex;
            flex-direction: column;
            justify-content: center; 
            align-items: center;
        }

        .btn-play-radio {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 14px 40px;
            font-family: var(--font-display);
            font-size: 18px;
            font-weight: normal;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 15px rgba(28, 91, 164, 0.2);
            margin-bottom: 30px;
        }

        .btn-play-radio:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(28, 91, 164, 0.3);
        }

        .btn-play-radio svg {
            width: 20px;
            height: 20px;
            fill: white;
        }

        /* Ecualizador animado */
        .equalizer {
            display: flex;
            align-items: flex-end;
            justify-content: center;
            gap: 5px;
            height: 40px;
            margin-bottom: 20px;
        }

        .equalizer .bar {
            width: 6px;
            background-color: #e0e0e0; 
            border-radius: 3px;
            height: 6px;
            transition: height 0.2s, background-color 0.2s;
        }

        .equalizer.playing .bar {
            background-color: var(--primary); 
            animation: bounce-eq 0.6s infinite alternate ease-in-out;
        }

        .equalizer.playing .bar:nth-child(1) { animation-delay: 0.1s; }
        .equalizer.playing .bar:nth-child(2) { animation-delay: 0.4s; }
        .equalizer.playing .bar:nth-child(3) { animation-delay: 0.2s; }
        .equalizer.playing .bar:nth-child(4) { animation-delay: 0.5s; }
        .equalizer.playing .bar:nth-child(5) { animation-delay: 0.3s; }

        @keyframes bounce-eq {
            0% { height: 6px; }
            100% { height: 40px; }
        }

        .now-playing-title {
            font-family: var(--font-display);
            font-size: 24px;
            font-weight: normal;
            color: var(--text-main);
            margin-top: 20px;
            margin-bottom: 0;
            min-height: 30px;
            text-transform: uppercase;
            letter-spacing: 1px;
            opacity: 0; 
            transition: opacity 0.3s ease;
        }

        .now-playing-title.visible {
            opacity: 1; 
        }

        /* --- PIE DE PÁGINA (FOOTER) --- */
        .site-footer {
            background-color: var(--primary); /* Azul corporativo */
            padding: 15px 20px; 
            text-align: center;
            flex-shrink: 0; 
            z-index: 100;
        }

        .social-links {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px; 
            margin-bottom: 8px; 
        }

        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 36px;
            border-radius: 18px;
            background-color: rgba(255, 255, 255, 0.1); /* Botones translúcidos sobre azul */
            color: #ffffff;
            text-decoration: none;
            transition: all 0.3s ease;
        }
        
        .social-links a:not(.wa-link) {
            width: 36px; 
        }

        .social-links a:hover {
            background-color: #ffffff;
            color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        }

        .social-links svg {
            width: 18px; 
            height: 18px;
            fill: currentColor;
        }

        /* Botón WhatsApp Fijo y Visible */
        .social-links a.wa-link {
            width: auto;
            padding: 0 14px;
            gap: 6px;
        }

        .wa-text {
            display: inline-block;
            font-size: 12px;
            font-weight: 700;
            font-family: var(--font-body);
            white-space: nowrap;
        }

        .wa-link:hover {
            color: #25D366 !important; /* Mantiene el verde whatsapp al desplegarse */
        }

        .site-footer p {
            font-size: 11px; 
            color: rgba(255, 255, 255, 0.7);
            margin: 0;
        }

    
:root{--border-color:#e8edf0}[hidden]{display:none!important}.video-section{width:100%}.player-message{text-align:center;color:var(--text-muted);font-size:12px;padding:8px 12px;line-height:1.5}.player-footer-name{font-size:10px!important}.guide-day{padding:6px 12px;background:#eef2f7;color:var(--primary);font-size:11px}.logo-link{flex-shrink:0}.radio-volume{width:180px;accent-color:var(--primary);margin-top:12px}.radio-volume-label{font-size:11px;color:var(--text-muted)}.guide-pagination select{border:1px solid #d9e1eb;border-radius:5px;background:white;color:var(--primary);font-size:11px;padding:4px}.tab-btn:focus-visible,.btn-play-radio:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.social-links a[hidden]{display:none}.site-footer .social-links{flex-wrap:wrap}.site-footer{padding:12px 20px}.now-playing-title{overflow-wrap:anywhere;max-width:100%}.video-container{background:#000}.nav-tabs{min-width:0}.app-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
