/* ==========================================================================
   XBOARD - DIGITAL MENU BOARD (CANVAS 1920x1080)
   Distribución Fiel al Sketch: Izquierda (Video + Recomendado) | Derecha (6 Platos 2x3)
   ========================================================================== */

:root {
    --bg-canvas: #090b11;
    --bg-card: rgba(18, 24, 38, 0.94);
    --gold-primary: #e5a93c;
    --gold-bright: #ffd700;
    --gold-gradient: linear-gradient(135deg, #ffe066 0%, #e5a93c 50%, #bf7e10 100%);
    --red-burgundy: #831414;
    --red-gradient: linear-gradient(135deg, #701010 0%, #8f1717 60%, #600c0c 100%);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border-subtle: rgba(229, 169, 60, 0.22);
    --border-strong: rgba(229, 169, 60, 0.65);
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.65);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000000;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Canvas Virtual 1920x1080 Auto-Ajustable con Transform Origin */
.screen-container {
    position: absolute;
    width: 1920px;
    height: 1080px;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 30% 25%, #151b2a 0%, #0d111b 50%, #07090f 100%);
    display: flex;
    flex-direction: column;
    padding: 16px 22px 14px 22px;
    box-sizing: border-box;
    transform-origin: 0 0;
    overflow: hidden;
}

.screen-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 75% 75%, rgba(229, 169, 60, 0.05) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   LOGO WATERMARK DE FONDO Y ANIMACIÓN HEARTBEAT (CADA 30 MINUTOS)
   ========================================================================== */
.watermark-bg-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1; /* Fondo marca de agua pasivo */
    overflow: hidden;
    transition: z-index 0.4s ease;
}

.watermark-glow-aura {
    position: absolute;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 169, 60, 0.35) 0%, rgba(229, 169, 60, 0.08) 55%, transparent 75%);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.8s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.watermark-logo-image {
    width: 760px;
    height: 760px;
    object-fit: contain;
    opacity: 0.13; /* Sutil y elegante marca de agua de fondo continuo */
    transform: scale(1);
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.85));
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), 
                opacity 1.2s ease, 
                filter 1.2s ease;
    will-change: transform, opacity, filter;
    pointer-events: none;
}

/* Efecto Activo del Heartbeat (Zoom de Aparecimiento en Primer Plano) */
.watermark-bg-container.heartbeat-active {
    z-index: 120; /* Se proyecta al frente para el zoom de validación */
}

.watermark-bg-container.heartbeat-active .watermark-glow-aura {
    opacity: 1;
    transform: scale(1.65);
}

.watermark-bg-container.heartbeat-active .watermark-logo-image {
    animation: heartbeatZoomEffect 3.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heartbeatZoomEffect {
    0% {
        opacity: 0.13;
        transform: scale(0.85);
        filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.85));
    }
    18% {
        opacity: 0.92;
        transform: scale(1.24);
        filter: drop-shadow(0 0 65px rgba(229, 169, 60, 0.95)) brightness(1.20);
    }
    32% {
        opacity: 0.78;
        transform: scale(1.14);
        filter: drop-shadow(0 0 45px rgba(229, 169, 60, 0.75)) brightness(1.10);
    }
    48% {
        opacity: 0.96;
        transform: scale(1.28);
        filter: drop-shadow(0 0 85px rgba(255, 215, 0, 0.98)) brightness(1.26);
    }
    72% {
        opacity: 0.68;
        transform: scale(1.16);
        filter: drop-shadow(0 0 40px rgba(229, 169, 60, 0.6)) brightness(1.05);
    }
    100% {
        opacity: 0.13;
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.85));
    }
}

/* Notificación Flotante HUD durante el Heartbeat */
.heartbeat-badge-hud {
    position: absolute;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(25px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    z-index: 121;
}

.watermark-bg-container.heartbeat-active .heartbeat-badge-hud {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.hb-hud-inner {
    background: rgba(13, 17, 27, 0.94);
    border: 2px solid var(--gold-bright);
    border-radius: 40px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(229, 169, 60, 0.5);
    backdrop-filter: blur(10px);
}

.hb-pulse-indicator {
    font-size: 28px;
    animation: heartBeatIconAnim 1s infinite;
}

@keyframes heartBeatIconAnim {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.12); }
    75% { transform: scale(1.35); }
}

.hb-hud-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.hb-hud-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    color: var(--gold-bright);
    letter-spacing: 1.5px;
    line-height: 1;
}

.hb-hud-subtitle {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #e2e8f0;
}

/* ==========================================================================
   1. ENCABEZADO SUPERIOR: LOGO, TÍTULO ÚNICO Y DOCK ÚTIL (76px)
   ========================================================================== */
.tv-header-bar {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid rgba(229, 169, 60, 0.35);
    padding-bottom: 10px;
    margin-bottom: 12px;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.header-brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.header-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
}

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

.brand-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 34px;
    letter-spacing: 1.5px;
    line-height: 1;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.branch-pill {
    background: var(--gold-gradient);
    color: #111;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: bold;
}

.brand-tagline {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: #ffd782;
    text-transform: uppercase;
}

/* TÍTULO ÚNICO CENTRAL: MENÚ DIGITAL */
.header-title-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.main-menu-headline {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 82px;
    letter-spacing: 20px;
    line-height: 1;
    display: inline-block;
    transform: scaleX(1.42);
    transform-origin: center center;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.8), 0 0 25px rgba(229, 169, 60, 0.4);
    white-space: nowrap;
}

/* Dock de Contacto y Widgets a la Derecha */
.header-info-dock {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.info-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(229, 169, 60, 0.28);
    border-radius: 12px;
    padding: 6px 14px;
    height: 58px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.info-pill .pill-icon {
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-pill .pill-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.info-pill .pill-main {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.info-pill .pill-sub {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.15;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* Dirección */
.address-pill {
    min-width: 250px;
}

.address-pill .pill-main {
    font-size: 14.5px;
    font-weight: 800;
    color: #ffffff;
}

.address-pill .pill-sub {
    color: #cbd5e1;
    font-size: 10.5px;
}

/* Clima: Temperatura grande y legible */
.weather-pill {
    min-width: 145px;
}

.weather-pill .pill-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 1px;
    color: var(--gold-bright);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.weather-pill .pill-sub {
    color: #cbd5e1;
    font-size: 10.5px;
}

/* Reloj: Hora grande y legible */
.clock-pill {
    min-width: 180px;
}

.clock-pill .pill-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 27px;
    letter-spacing: 1.2px;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.clock-pill .clock-ampm {
    font-size: 13.5px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--gold-bright);
    margin-left: 4px;
}

.clock-pill .pill-sub {
    color: #cbd5e1;
    font-size: 11px;
    text-transform: capitalize;
}

/* Indicador sutil y discreto debajo del texto de XBOARD */
.server-status-sub {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1;
}

.server-mini-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.85);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.server-mini-dot.pulse-green {
    background-color: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: serverLedPulse 3s infinite ease-in-out;
}

.server-mini-dot.pulse-red {
    background-color: #ef4444;
    box-shadow: 0 0 6px #ef4444;
    animation: serverLedPulseFast 1s infinite ease-in-out;
}

.server-mini-dot.activity-flash {
    background-color: #86efac !important;
    box-shadow: 0 0 10px #22c55e !important;
    transform: scale(1.35);
}

@keyframes serverLedPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.45;
        transform: scale(0.9);
    }
}

@keyframes serverLedPulseFast {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.85);
    }
}

.server-status-text {
    font-weight: 700;
    color: #86efac;
    transition: color 0.3s ease;
}

.server-status-sub.offline .server-status-text {
    color: #fca5a5;
}

.server-status-sep {
    color: #475569;
    font-size: 8px;
}

.server-status-ip {
    color: #cbd5e1;
    font-size: 9.5px;
    font-weight: 600;
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: 0.2px;
}

.server-status-detail {
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 500;
}

/* ==========================================================================
   2. CUERPO PRINCIPAL SEGÚN EL SKETCH (IZQUIERDA: VIDEO + REC | DERECHA: PLATOS)
   ========================================================================== */
.sketch-layout-body {
    display: flex;
    gap: 22px;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   COLUMNA IZQUIERDA: VIDEO ARRIBA (465px) + RECOMENDADO ABAJO (435px) = 870px WIDTH
   ========================================================================== */
.sketch-left-column {
    width: 870px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
}

/* Tarjeta del Video / Canales en Vivo (16:9 Estricto y Proporcional) */
.sketch-video-card {
    width: 870px;
    height: 490px;
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.75), 0 0 25px rgba(229, 169, 60, 0.15);
    flex-shrink: 0;
    position: relative;
    background: #000000;
    overflow: hidden;
}

.video-inner-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000000;
    border: 2px solid rgba(229, 169, 60, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-inner-wrap video,
.video-inner-wrap .video-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    object-fit: contain; /* Proporcionalidad 100% fiel al video original, sin distorsión ni recorte */
    background: #000000;
    display: block;
    /* Sin translateZ/will-change: en Vega/FireOS el plano de video promocionado
       no se compone dentro de un contenedor con overflow:hidden + border-radius
       y el recuadro queda NEGRO aunque el video siga avanzando. */
    transform: none;
    -webkit-transform: none;
    will-change: auto;
    z-index: 1;
}

.video-inner-wrap img#promoVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    background: #000000;
    display: block;
    z-index: 1;
}

.video-inner-wrap canvas#promoCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    display: block;
    pointer-events: none;
    z-index: 2;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.video-inner-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000000;
    z-index: 5;
}

.video-overlay-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(10, 14, 24, 0.92);
    /* Sin backdrop-filter para evitar fallos de compositing de capa en Android WebView / Fire TV */
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    padding: 5px 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(229, 169, 60, 0.45);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 1.6s infinite ease-in-out;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #ef4444; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* Banner flotante en pantalla (OSD) para cambio de canales por control remoto */
.channel-osd-banner {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(10, 14, 24, 0.95);
    border: 2px solid var(--gold-bright);
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(229, 169, 60, 0.35);
    z-index: 30;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.35s ease;
    pointer-events: none;
}

.channel-osd-banner.show {
    opacity: 1;
    transform: translateY(0);
}

.osd-icon {
    font-size: 32px;
}

.osd-text {
    display: flex;
    flex-direction: column;
}

.osd-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    color: var(--gold-bright);
    letter-spacing: 1px;
    line-height: 1.1;
}

.osd-sub {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 500;
}

/* Sección de Plato Recomendado (Diseño Orgánico Integrado, Sin Marco Rígido) */
.sketch-recommended-card {
    flex: 1;
    min-height: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 6px 4px 2px 4px;
    display: flex;
    flex-direction: column;
}

.rec-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1.5px solid rgba(229, 169, 60, 0.35);
    padding-bottom: 8px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.rec-badge-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rec-star-icon {
    font-size: 20px;
}

.rec-badge-txt {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--gold-bright);
    text-transform: uppercase;
}

.rec-counter-pill {
    background: rgba(229, 169, 60, 0.2);
    color: #ffd700;
    border: 1px solid rgba(229, 169, 60, 0.4);
    font-size: 12px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 10px;
}

.rec-content-split {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
    align-items: center;
}

.rec-photo-box {
    width: 440px;
    height: 100%;
    position: relative;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    overflow: visible;
    flex-shrink: 0;
}

.rec-dish-img {
    max-width: 98%;
    max-height: 98%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.95));
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.rec-tag-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(10, 14, 22, 0.88);
    color: #fde68a;
    border: 1px solid rgba(229, 169, 60, 0.5);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 9px;
    border-radius: 6px;
    text-transform: uppercase;
}

.rec-info-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.rec-dish-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 38px;
    letter-spacing: 1px;
    line-height: 1.05;
    color: #ffffff;
}

.rec-price-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rec-price-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.rec-price-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 54px;
    letter-spacing: 1px;
    line-height: 1;
    color: var(--gold-bright);
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8), 0 0 18px rgba(229, 169, 60, 0.45);
}

.rec-order-cta {
    align-self: flex-start;
    background: var(--red-gradient);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    margin-top: 4px;
}

/* ==========================================================================
   COLUMNA DERECHA: 6 PLATOS EN 2 COLUMNAS X 3 FILAS (986px WIDTH)
   ========================================================================== */
.sketch-right-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sketch-dishes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 16px;
    flex: 1;
    min-height: 0;
}

/* ==========================================================================
   TARJETA DE PLATO HERO IMAGE (COBERTURA TOTAL + OVERLAY CINEMATOGRÁFICO)
   ========================================================================== */
.dish-card {
    background: #0d121e;
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    width: 100%;
    height: 100%;
}

.dish-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold-bright);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 22px rgba(229, 169, 60, 0.4);
}

/* 1. FOTO HERO COMPLETA: CUBRE EL 100% DEL MARCO */
.dish-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

.dish-card:hover .dish-hero-img {
    transform: scale(1.07);
}

/* 2. SCRIM / DEGRADADO CINEMATOGRÁFICO DE CONTRASTE */
.dish-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(5, 8, 14, 0.25) 0%,
        rgba(5, 8, 14, 0.0) 30%,
        rgba(5, 8, 14, 0.35) 65%,
        rgba(3, 5, 10, 0.88) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* 3. TAG / CATEGORÍA FLOTANTE EN ESQUINA SUPERIOR IZQUIERDA */
.dish-hero-tag {
    position: absolute;
    top: 10px;
    left: 12px;
    background: rgba(9, 13, 22, 0.88);
    border: 1px solid rgba(229, 169, 60, 0.8);
    color: #ffd700;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    z-index: 3;
}

/* 4. OVERLAY INFERIOR: NOMBRE DEL PLATO Y PRECIO DESTACADO */
.dish-hero-overlay {
    position: relative;
    z-index: 3;
    padding: 12px 14px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* NOMBRE DEL PLATO (EFECTO OVER SOBRE LA IMAGEN CON ALTA LEGIBILIDAD) */
.dish-hero-info {
    flex: 1;
    min-width: 0;
}

.dish-hero-name {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.18;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 16px rgba(0, 0, 0, 0.9);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* PRECIO RESALTADO CON MEDALLÓN METÁLICO DORADO */
.dish-hero-price {
    flex-shrink: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 29px;
    font-weight: 900;
    letter-spacing: 0.6px;
    line-height: 1;
    padding: 5px 13px 3px 13px;
    border-radius: 9px;
    background: linear-gradient(135deg, #ffe066 0%, #ffd700 35%, #e5a93c 75%, #b87a14 100%);
    color: #110e04;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), 0 0 14px rgba(229, 169, 60, 0.45);
    white-space: nowrap;
}

/* Estilos de compatibilidad legacy si fueran necesarios */
.dish-photo-stage {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    background: radial-gradient(circle at 50% 50%, rgba(28, 36, 56, 0.5) 0%, rgba(12, 16, 26, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
}

.dish-photo-img {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8));
    transition: transform 0.35s ease;
}

.dish-card:hover .dish-photo-img {
    transform: scale(1.04);
}

.dish-price-corner {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(10, 14, 22, 0.9);
    border: 1.5px solid var(--gold-primary);
    color: var(--gold-bright);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    letter-spacing: 0.5px;
    font-weight: 800;
    padding: 3px 13px;
    border-radius: 10px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 8px rgba(229, 169, 60, 0.25);
    z-index: 4;
}

.dish-tag-corner {
    position: absolute;
    top: 8px;
    left: 12px;
    background: rgba(8, 11, 18, 0.88);
    border: 1px solid rgba(229, 169, 60, 0.6);
    color: #ffd700;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 5px;
    z-index: 4;
}

.dish-card-footer {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 12px;
    background: rgba(14, 19, 30, 0.98);
    border-top: 1px solid rgba(229, 169, 60, 0.2);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    flex-shrink: 0;
}

.dish-official-name {
    font-size: 18.5px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* ==========================================================================
   3. FOOTER: MARQUESINA CONTINUA DE NOTICIAS RSS (46px)
   ========================================================================== */
.tv-footer-bar {
    height: 46px;
    margin-top: 12px;
    background: rgba(14, 18, 28, 0.96);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.ticker-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 1.5px;
    color: var(--gold-bright);
    flex-shrink: 0;
}

.ticker-dot {
    width: 9px;
    height: 9px;
    background: #22c55e;
    border-radius: 50%;
    animation: livePulse 2s infinite ease-in-out;
}

.ticker-marquee-box {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000000 2.5%, #000000 97.5%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000000 2.5%, #000000 97.5%, transparent 100%);
}

.ticker-sliding-text {
    display: inline-flex;
    white-space: nowrap;
    will-change: transform;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
    animation: tickerLoopSmooth 260s linear infinite;
    font-size: 17.5px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.ticker-sliding-text:hover {
    animation-play-state: paused;
}

/* PÍLDORAS Y ESTILOS DE CATEGORÍAS PARA EL TICKER DE NOTICIAS */
.ticker-sliding-text > span.ticker-item,
.ticker-item {
    display: inline-flex !important;
    align-items: center;
    margin-right: 65px !important;
    gap: 12px;
}

.ticker-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.ticker-cat-pill.cat-ecuador {
    background: rgba(234, 179, 8, 0.22);
    color: #fef08a;
    border: 1px solid rgba(234, 179, 8, 0.6);
}

.ticker-cat-pill.cat-deportes {
    background: rgba(34, 197, 94, 0.22);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.6);
}

.ticker-cat-pill.cat-actualidad {
    background: rgba(59, 130, 246, 0.22);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.6);
}

.ticker-cat-pill.cat-internacional {
    background: rgba(168, 85, 247, 0.22);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.6);
}

.ticker-cat-pill.cat-economia {
    background: rgba(20, 184, 166, 0.22);
    color: #5eead4;
    border: 1px solid rgba(20, 184, 166, 0.6);
}

.ticker-cat-pill.cat-entretenimiento {
    background: rgba(236, 72, 153, 0.22);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.6);
}

.ticker-cat-pill.cat-promo {
    background: linear-gradient(135deg, rgba(229, 169, 60, 0.28) 0%, rgba(220, 38, 38, 0.28) 100%);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.7);
}

.ticker-text {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
}

@keyframes tickerLoopSmooth {
    0% {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    100% {
        -webkit-transform: translate3d(-50%, 0, 0);
        transform: translate3d(-50%, 0, 0);
    }
}

.live-sys-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #4ade80;
    letter-spacing: 1.2px;
    flex-shrink: 0;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.sys-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

/* ==========================================================================
   TOAST Y DIALOGO DE SALIDA (DOBLE CLIC ATRAS FIRE TV)
   ========================================================================== */
.back-toast-banner {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 20, 32, 0.95);
    border: 2px solid var(--gold-primary);
    border-radius: 40px;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(229, 169, 60, 0.35);
    z-index: 99999;
    animation: toastSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-toast-banner.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.back-toast-icon {
    font-size: 26px;
}

.back-toast-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.back-toast-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.back-toast-timer-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.back-toast-progress {
    height: 100%;
    background: var(--gold-primary);
    width: 100%;
}

.web-exit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    animation: modalFadeIn 0.25s ease-out forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.web-exit-box {
    background: #141926;
    border: 2px solid var(--gold-primary);
    border-radius: 20px;
    padding: 36px 48px;
    text-align: center;
    max-width: 580px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(229, 169, 60, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.web-exit-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.web-exit-icon {
    font-size: 36px;
}

.web-exit-header h3 {
    font-size: 26px;
    font-weight: 800;
    color: var(--gold-bright);
    letter-spacing: 0.8px;
}

.web-exit-box p {
    font-size: 19px;
    color: #cbd5e1;
    line-height: 1.5;
}

.web-exit-actions {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

.web-exit-btn {
    padding: 14px 28px;
    font-size: 17px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.2s ease;
}

.web-exit-btn.cancel-btn {
    background: #232c40;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.web-exit-btn.cancel-btn:focus,
.web-exit-btn.cancel-btn:hover {
    background: #33415e;
    border-color: var(--gold-bright);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.web-exit-btn.confirm-btn {
    background: linear-gradient(135deg, #c53030 0%, #9b1c1c 100%);
    color: #ffffff;
    border: 2px solid #e53e3e;
}

.web-exit-btn.confirm-btn:focus,
.web-exit-btn.confirm-btn:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(229, 62, 62, 0.6);
}

/* ========================================================
   LAUNCHER / SPLASH SCREEN DE LA APP XBOARD
   ======================================================== */
.app-launcher-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 40%, #151c2e 0%, #0c0f18 60%, #06080d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
    pointer-events: all;
}

.app-launcher-splash.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 650px;
}

.splash-logo-box {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.splash-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 169, 60, 0.35) 0%, rgba(229, 169, 60, 0.05) 60%, transparent 70%);
    animation: splashGlowPulse 2.5s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes splashGlowPulse {
    0% { transform: scale(0.92); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 1; }
}

.splash-logo-img {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 30px rgba(0,0,0,0.85)) drop-shadow(0 0 20px rgba(229, 169, 60, 0.5));
    animation: splashLogoFloat 3s ease-in-out infinite alternate;
}

@keyframes splashLogoFloat {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-8px) scale(1.04); }
}

.splash-brand-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    letter-spacing: 4px;
    color: var(--gold-bright);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9), 0 0 30px rgba(229, 169, 60, 0.45);
}

.splash-brand-sub {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold-primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 34px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.splash-loader-bar {
    width: 360px;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
    border: 1px solid rgba(229, 169, 60, 0.25);
}

.splash-loader-progress {
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, #e5a93c 0%, #ffd700 50%, #fff 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

.splash-status-text {
    font-size: 15px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.5px;
}
