/* --- Paleta de colores y variables --- */
:root {
    --bg-color-dark: #1a1a2e;
    --bg-color-light: #33334d;
    --primary-color: #7B68EE;
    --secondary-color: #FFC0CB;
    --accent-color: #00FFFF;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #f0f0f0;
    --title-color: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.05);

    /* Variables para el degradado del fondo con más contraste */
    --bg-start: rgba(14, 14, 30, 0.7);
    --bg-mid: rgba(42, 42, 74, 0.7);
    --bg-end: rgba(14, 14, 30, 0.7);

    /* Nueva variable para el color dinámico */
    --dynamic-color: var(--primary-color);
    
    /* Variables para texto en notificaciones */
    --theme-text: #2d3748;
    --theme-text-muted: #718096;
    
    /* Variables para indicadores de carga */
    --loading-bg: rgba(26, 26, 46, 0.9);
    --loading-spinner: #7B68EE;
    --loading-text: #f0f0f0;
}

html, body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Evitar cursor de texto en elementos no editables */
* {
    cursor: default;
}

/* Restaurar cursor de texto solo para elementos editables */
input, 
textarea, 
[contenteditable="true"], 
[contenteditable=""] {
    cursor: text;
}

/* Cursor pointer para elementos interactivos */
button, 
a, 
[role="button"], 
.clickable {
    cursor: pointer;
}

/* Evitar que elementos no interactivos sean focusables con teclado */
div, 
span, 
p, 
h1, h2, h3, h4, h5, h6, 
img, 
.logo, 
.channel-name {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #1a1a2e;
    color: #f0f0f0;
    margin: 0;
    padding: 0;
    background-image: linear-gradient(135deg, rgba(14, 14, 30, 0.7) 0%, rgba(42, 42, 74, 0.7) 50%, rgba(14, 14, 30, 0.7) 100%), url('../img/wallpaper.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #33334d;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    padding: 3rem;
}

h1 {
    color: #7B68EE;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 300;
}

/* --- Nuevo CSS para el efecto de carga progresiva --- */
.fade-in-slide-down {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-slide-down.loaded {
    opacity: 1;
    transform: translateY(0);
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Contenedor Principal (Flexbox) --- */
.app-container {
    display: flex;
    width: 100%;
    flex-grow: 1; /* Agregado: Ocupa el espacio disponible y empuja el footer hacia abajo */
}

/* --- Contenido Principal (Reproductor y EPG) --- */
.main-content {
    flex-grow: 1;
    padding: 0;
    overflow-y: auto;
    /* MODIFICACIÓN: Oculta la barra de desplazamiento vertical sin deshabilitar el scroll */
    -ms-overflow-style: none;  /* Para Internet Explorer y Edge */
    scrollbar-width: none;  /* Para Firefox */
}
.main-content::-webkit-scrollbar {
    /* Para navegadores basados en WebKit (Chrome, Safari) */
    display: none;
}

/* --- Encabezado con buscador y botones de cast --- */
.header {
    margin-bottom: 1rem;
    padding-top: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: transparent;
}

/* Fila principal del header */
.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Fila de botones - DESKTOP: parte de la fila principal */
.header-buttons-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0; /* Sin margen por defecto */
    padding: 0; /* Sin padding por defecto */
    border: none; /* Sin borde por defecto */
}

/* DESKTOP: Estructura de una sola fila horizontal */
@media (min-width: 769px) {
    .header {
        display: flex;
        align-items: center;
        justify-content: center; /* Cambiar a center para centrar todo el conjunto */
        padding: 0 2rem; /* Agregar padding horizontal para evitar que esté pegado a los lados */
        gap: 30px; /* Espacio entre el grupo de logo+búsqueda y los botones */
    }
    
    .header-main-row {
        display: flex;
        align-items: center;
        flex: 0 1 auto; /* No crecer, no encoger, tamaño automático */
        gap: 15px; /* Reducir espaciado entre logo y buscador */
        max-width: 800px; /* Limitar el ancho máximo para mejor distribución */
    }
    
    .header-buttons-row {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        flex-shrink: 0; /* No se encoge */
        gap: 10px; /* Espaciado entre botones */
    }
    
    /* En desktop nunca ocultar botones */
    .header.search-active .header-buttons-row {
        display: flex !important;
    }
}

/* Pantallas más grandes - Mejor distribución */
@media (min-width: 1200px) {
    .header {
        padding: 0 3rem; /* Más padding en pantallas grandes */
        gap: 40px; /* Más espacio entre grupos en pantallas grandes */
    }
    
    .header-main-row {
        max-width: 1000px; /* Más ancho en pantallas grandes */
        gap: 20px; /* Más espaciado en pantallas grandes */
    }
    
    .site-logo {
        margin-right: 20px; /* Más espacio en pantallas grandes */
    }
    
    .search-container {
        margin: 0 20px; /* Más espacio en pantallas grandes */
    }
}

.site-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* MODIFICACIÓN: Aumentar el tamaño del logo para pantallas de escritorio */
.site-logo {
    max-height: 150px;
    width: 200px;
    margin-right: 15px; /* Reducir margen para acercar al buscador */
}

.header h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--title-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.search-container {
    flex-grow: 1;
    margin: 0 15px; /* Reducir margen para mejor distribución */
    display: flex;
    justify-content: center;
    position: relative;
}

/* Botón para cerrar búsqueda */
.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.clear-search-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    font-size: 1em;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: #aaa;
}

#search-input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

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

.cast-tab-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 0.9em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cast-tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cast-tab-button:hover::before {
    opacity: 1;
}

.cast-tab-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cast-tab-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Botón de login rectangular */
.login-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    text-decoration: none;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-button:hover::before {
    opacity: 1;
}

.login-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.login-button i {
    font-size: 16px;
}

.login-button span {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Eliminado: Botón de cambio de tema */

/* Estilos del botón de Google Cast */
google-cast-launcher {
    display: none;
}

google-cast-launcher button {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

google-cast-launcher button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

/* --- Contenedor de resultados de búsqueda mejorado --- */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 120px;
    left: 1rem;
    right: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 10000;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.search-result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.2rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.search-result-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-result-card:hover img {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.search-result-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.8rem;
    color: var(--text-color);
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

/* --- Reproductor de Video y EPG (vista principal) --- */
.player-view {
    display: none;
}

.tv-player-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    /* MODIFICADO: Relleno inferior ajustado */
    padding: 2rem 2rem 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.player-info-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.tv-player {
    width: 70%;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#tvPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

.current-channel-info {
    width: 30%;
    text-align: center;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Contenedor del logo y el nombre del canal */
.channel-info-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}



.channel-logo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--dynamic-color);
    transition: border 1.5s ease-in-out;
}

.channel-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.current-channel-info h2 {
    color: var(--text-color);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-top: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Círculo de clasificación FRAC */
.classification-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--dynamic-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

#classification-letter {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Colores específicos para cada clasificación */
.classification-circle.classification-F {
    background-color: #28a745; /* Verde - Familiar */
}

.classification-circle.classification-R {
    background-color: #ffc107; /* Amarillo - Responsabilidad compartida */
}

.classification-circle.classification-A {
    background-color: #dc3545; /* Rojo - Adulto */
}

.classification-circle.classification-C {
    background-color: #007bff; /* Azul - Cultural */
}

/* Modal de ayuda para clasificaciones */
.classification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.classification-modal.visible {
    opacity: 1;
    visibility: visible;
}

.classification-modal-content {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(64, 64, 88, 0.95));
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.classification-modal.visible .classification-modal-content {
    transform: scale(1);
}

.classification-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.classification-modal-header h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.classification-modal-header p {
    color: #ccc;
    font-size: 0.95rem;
}


    background-color: #ffc107;
}

.classification-item-circle.classification-A {
    background-color: #dc3545;
}

.classification-item-circle.classification-C {
    background-color: #007bff;
}

/* --- Estilos para la función de compartir (modificado) --- */
.share-container {
    margin-top: 1rem;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1.2rem; /* Espaciado más uniforme */
    justify-content: center;
    min-height: 60px;
}

/* Botón de favoritos (corazón) */
.favorite-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ccc;
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    border-color: #ff4757;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.favorite-btn.active:hover {
    background: linear-gradient(135deg, #ff3742, #ff2f3a);
    transform: scale(1.15);
}

.favorite-btn i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.favorite-btn.active i {
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

#shareButton {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ccc;
    position: relative;
}

#shareButton:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    color: #fff;
}

#shareButton.active {
    background: linear-gradient(135deg, #7b68ee, #6a5acd);
    border-color: #7b68ee;
    color: white;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
}

#shareButton.active:hover {
    background: linear-gradient(135deg, #6a5acd, #5a4fcf);
    transform: scale(1.15);
}

/* Indicador de calidad de conexión */
/* Indicador de conexión con icono de señal */
.connection-indicator-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    margin: 0 auto 15px auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.connection-indicator-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Icono de señal */
.signal-icon {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    width: 16px;
}

.signal-bar {
    background: #4CAF50;
    border-radius: 1px;
    transition: all 0.3s ease;
    min-width: 2px;
}

.bar1 {
    height: 4px;
    background: #4CAF50;
}

.bar2 {
    height: 8px;
    background: #4CAF50;
}

.bar3 {
    height: 12px;
    background: #4CAF50;
}

.bar4 {
    height: 16px;
    background: #4CAF50;
}

/* Estados del indicador de conexión */
.connection-indicator-btn[data-quality="slow"] .signal-bar {
    background: #FF9800;
}

.connection-indicator-btn[data-quality="slow"] .bar1 {
    height: 4px;
}

.connection-indicator-btn[data-quality="slow"] .bar2 {
    height: 8px;
}

.connection-indicator-btn[data-quality="slow"] .bar3 {
    height: 0px;
}

.connection-indicator-btn[data-quality="slow"] .bar4 {
    height: 0px;
}

.connection-indicator-btn[data-quality="fast"] .signal-bar {
    background: #4CAF50;
}

.connection-indicator-btn[data-quality="fast"] .bar1 {
    height: 4px;
}

.connection-indicator-btn[data-quality="fast"] .bar2 {
    height: 8px;
}

.connection-indicator-btn[data-quality="fast"] .bar3 {
    height: 12px;
}

.connection-indicator-btn[data-quality="fast"] .bar4 {
    height: 16px;
}

.connection-indicator-btn[data-quality="unknown"] .signal-bar {
    background: #9E9E9E;
}

.connection-indicator-btn[data-quality="unknown"] .bar1 {
    height: 4px;
}

.connection-indicator-btn[data-quality="unknown"] .bar2 {
    height: 0px;
}

.connection-indicator-btn[data-quality="unknown"] .bar3 {
    height: 0px;
}

.connection-indicator-btn[data-quality="unknown"] .bar4 {
    height: 0px;
}

/* Animación de pulso para conexión lenta */
.connection-indicator-btn[data-quality="slow"] {
    animation: pulseSlow 2s infinite;
}

@keyframes pulseSlow {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Animación de brillo para conexión rápida */
.connection-indicator-btn[data-quality="fast"] {
    animation: shineFast 3s infinite;
}

@keyframes shineFast {
    0% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 0 15px rgba(76, 175, 80, 0.6); }
    100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); }
}
}

#shareButton i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.player-category-btn {
    background-color: var(--dynamic-color);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, --dynamic-color 1.5s ease-in-out;
}

.player-category-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

/* Definición obsoleta - ELIMINADA para menú radial */

/* Pseudo-elemento obsoleto - ELIMINADO */

.social-links.hidden {
    display: none;
    opacity: 0;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-btn:hover::before {
    opacity: 1;
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.social-btn.whatsapp { 
    background: linear-gradient(135deg, #25D366, #20B358);
}

.social-btn.facebook { 
    background: linear-gradient(135deg, #1877F2, #166FE5);
}

.social-btn.x { 
    background: linear-gradient(135deg, #1DA1F2, #1991DB);
}

.social-btn.copy { 
    background: linear-gradient(135deg, #6C757D, #5A6268);
}

/* Efectos hover específicos para cada botón */
.social-btn.whatsapp:hover {
    background: linear-gradient(135deg, #20B358, #1E9A50);
}

.social-btn.facebook:hover {
    background: linear-gradient(135deg, #166FE5, #1463CC);
}

.social-btn.x:hover {
    background: linear-gradient(135deg, #1991DB, #1480C7);
}

.social-btn.copy:hover {
    background: linear-gradient(135deg, #5A6268, #495057);
}

/* Feedback de copia al portapapeles */
.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-feedback.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.copy-feedback i {
    font-size: 1rem;
}

/* Responsive para feedback de copia */
@media (max-width: 768px) {
    .copy-feedback {
        left: 20px;
        right: 20px;
        transform: translateY(-50px);
        text-align: center;
        justify-content: center;
    }
    
    .copy-feedback.visible {
        transform: translateY(0);
    }
}

/* --- SECCIÓN MODIFICADA: CONTENEDOR DE EPG (vista principal) --- */
.epg-section {
    flex-grow: 1;
    position: relative; /* Agregado para posicionar el overlay de carga */
}

/* EPG Loading Overlay - DESACTIVADO para modo silencioso */
/* 
.epg-loading-overlay {
    - Overlay removido para actualizaciones silenciosas del EPG -
    - El EPG ahora se actualiza en background sin interrumpir la experiencia -
}
*/

.epg-title {
    /* MODIFICACIÓN: Estilo para un texto más fino y pequeño */
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 300; /* Hace la fuente más delgada */
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.epg-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.epg-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.epg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

/* Estilos para la barra de progreso */
.epg-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    z-index: 0;
    transition: width 1s linear;
}

.epg-card .epg-meta {
    position: relative;
    z-index: 1;
}

.epg-card img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.epg-meta {
    margin-top: 1rem;
}

.epg-meta .label {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

/* Colores corporativos para las tarjetas del EPG */
.epg-card:nth-child(1) {
    background-color: rgba(220, 53, 69, 0.2); /* Rojo transparente para AHORA */
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.epg-card:nth-child(2) {
    background-color: rgba(255, 182, 193, 0.2); /* Salmón transparente para A CONTINUACIÓN */
    border: 1px solid rgba(255, 182, 193, 0.3);
}

.epg-card:nth-child(3) {
    background-color: rgba(0, 255, 255, 0.2); /* Cian transparente para DESPUÉS */
    border: 1px solid rgba(0, 255, 255, 0.3);
}

/* Hover effects con colores corporativos */
.epg-card:nth-child(1):hover {
    background-color: rgba(220, 53, 69, 0.3);
    border: 1px solid rgba(220, 53, 69, 0.5);
}

.epg-card:nth-child(2):hover {
    background-color: rgba(255, 182, 193, 0.3);
    border: 1px solid rgba(255, 182, 193, 0.5);
}

.epg-card:nth-child(3):hover {
    background-color: rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.5);
}

.epg-meta .time {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.epg-meta .title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
}

.epg-meta p {
    font-size: 0.9rem;
    color: #ddd;
}

.epg-permanent-card {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.epg-permanent-card h4 {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

/* --- Estilos para la tarjeta de descripción deslizante --- */
#epg-description-card {
    position: fixed;
    left: 50%;
    bottom: 2vh;
    transform: translate(-50%, 500%);
    max-width: 90%;
    width: 500px;
    padding: 1.5rem;
    padding-bottom: 2.5rem;
    background-color: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 -8px 32px 0 rgba(0, 0, 0, 0.5);
    color: #f0f0f0;
    font-size: 1rem;
    z-index: 200;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 80vh;
    overflow-y: auto;
}

#epg-description-card.visible {
    transform: translate(-50%, 0);
}

/* Nueva clase para el fondo oscuro */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
.backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

#epg-description-card .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

#epg-description-card h4 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

#epg-description-card p {
    margin: 0;
}

/* Nuevo estilo para el botón "VER MÁS" */
.epg-card .ver-mas-btn {
    font-size: 0.8rem;
    text-align: right;
    color: var(--secondary-color);
    font-weight: bold;
    text-decoration: underline;
    margin-top: 0.5rem;
}

/* --- Nuevos estilos para categorías y canales, ahora debajo del EPG --- */
.player-categories-wrapper {
    max-width: 1200px;
    margin: 1rem auto;
}

.player-categories-title {
    /* MODIFICACIÓN: Estilo para un texto más fino y pequeño */
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 300; /* Hace la fuente más delgada */
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.category-scroll-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 2px;
    padding-bottom: 2px;
}

.scroll-btn {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}
.scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-btn:hover {
    background-color: var(--glass-border);
}

.player-category-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 10px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.player-category-list::-webkit-scrollbar {
    display: none;
}
.player-category-list:hover {
    cursor: grab;
}
.player-category-list.active {
    cursor: grabbing;
}

.player-category-btn {
    flex-shrink: 0;
}

/* Contenedor de Canales */
.player-channels-wrapper {
    max-width: 1200px;
    margin: 1rem auto 0;
    /* Nuevos estilos para la caja de canales */
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 1.5rem;
}

.channels-scroll-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 2px;
    padding-bottom: 2px;
}

.channels-scroll-container .scroll-btn {
    display: flex;
}

/* MODIFICACIÓN: Nuevo estilo para los canales que llena hacia los lados en una sola fila horizontal */
.category-channels-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 1rem;
    padding: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex: 1;
    /* Optimizaciones para cinta sin fin */
    scroll-snap-type: x mandatory;
    scroll-padding: 0 1rem;
    /* Optimizaciones específicas para PWA */
    touch-action: pan-x;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.category-channels-list::-webkit-scrollbar {
    display: none;
}
.category-channels-list:hover {
    cursor: grab;
}
.category-channels-list.active {
    cursor: grabbing;
}

.category-channel-logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    padding: 5px;
    width: auto;
    /* Optimizaciones para cinta sin fin */
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
    /* Mejorar compatibilidad táctil */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.category-channel-logo-item.loaded {
    opacity: 1;
}

.category-channel-logo-item.error {
    opacity: 0.5;
}

/* Estilos específicos para PWA/Standalone */
@media (display-mode: standalone) {
    .category-channels-list {
        /* Optimizaciones adicionales para PWA */
        scroll-snap-type: x proximity;
        scroll-padding: 0 0.5rem;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .category-channel-logo-item {
        /* Tamaños optimizados para PWA */
        padding: 8px;
        min-width: 80px;
        min-height: 80px;
    }
    
    .category-channel-logo-item img {
        width: 70px;
        height: 70px;
        border-radius: 12px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* Efectos táctiles mejorados para PWA */
    .category-channel-logo-item:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Feedback visual para gestos táctiles */
    .category-channel-logo-item.touch-active {
        transform: scale(0.9);
        box-shadow: 0 2px 8px rgba(123, 104, 238, 0.3);
    }
}

/* Detección de PWA para navegadores que no soportan display-mode */
@media (display-mode: standalone), 
       (display-mode: minimal-ui),
       (display-mode: fullscreen) {
    .category-channels-list {
        /* Configuraciones específicas para modo app */
        -webkit-overflow-scrolling: auto;
        scroll-behavior: auto;
    }
}
.category-channel-logo-item img {
    width: 60px;
    height: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    object-fit: contain;
    transition: transform 0.2s;
}
.category-channel-logo-item:hover img {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Efecto de brillo para la cinta sin fin */
.category-channel-logo-item {
    position: relative;
    overflow: hidden;
}

.category-channel-logo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    pointer-events: none;
    z-index: 1;
}

.category-channel-logo-item:hover::before {
    left: 100%;
}

/* --- Media Queries para responsividad --- */
@media (min-width: 993px) {
    .header h1 {
        display: none;
    }
    .header {
        justify-content: flex-start;
        gap: 20px;
    }
    .player-content-bottom {
        max-width: 1200px;
        margin: 2rem auto 0;
    }
    /* AJUSTES PARA CANALES EN ESCRITORIO */
    .channels-scroll-container .scroll-btn {
        display: flex;
    }
    /* Asegurar tamaño del logo en escritorio */
    .channel-logo {
        width: 160px !important;
        height: 160px !important;
    }
}

@media (max-width: 992px) {
    .player-info-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .tv-player, .current-channel-info {
        width: 100%;
    }
    .current-channel-info {
        margin-bottom: 1rem;
    }
    .current-channel-info h2 {
        text-align: center;
    }
    .player-content-bottom {
        flex-direction: column;
        gap: 1rem;
    }
    .epg-section {
        width: 100%;
        flex-basis: auto;
    }
    .header h1 {
        display: none;
    }
    .site-logo {
        max-height: 60px;
        width: auto;
        margin-right: 10px;
    }
    .header {
        justify-content: space-between;
    }
    .search-container {
        margin: 0;
    }
    /* AJUSTES PARA CANALES EN MÓVIL */
    .channels-scroll-container .scroll-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .main-content {
        padding: 0;
    }
    .tv-player-wrapper {
        padding: 1rem;
    }
    .player-view {
        padding: 0;
    }
    /* Se quita el display flex a .category-scroll-container para no interferir con los canales */
    .category-scroll-container, .channels-scroll-container {
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .scroll-btn {
        display: flex;
    }
    .player-category-list {
        flex: 1;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        gap: 10px;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .player-category-list::-webkit-scrollbar, .category-channels-list::-webkit-scrollbar {
        display: none;
    }
    .player-category-btn {
        flex-shrink: 0;
    }
    .current-channel-info {
        padding-top: 0;
        align-items: center;
    }
    .channel-info-header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }
    
    .classification-container {
        margin-top: 0.3rem;
        padding: 0.2rem 0.6rem;
    }
    
    .classification-label {
        font-size: 0.8rem;
    }
    
    .classification-circle {
        width: 24px;
        height: 24px;
    }
    
    #classification-letter {
        font-size: 0.8rem;
    }
    .channel-logo {
        width: 120px;
        height: 120px;
        margin-bottom: 0;
    }
    .current-channel-info h2 {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
    /* AJUSTES PARA CANALES EN MÓVIL */
    .channels-scroll-container .scroll-btn {
        display: flex;
    }
    
    /* Mejorar interactividad táctil en móviles */
    .category-channel-logo-item {
        min-width: 70px;
        min-height: 70px;
        padding: 8px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(123, 104, 238, 0.3);
    }
    
    .category-channel-logo-item img {
        width: 55px;
        height: 55px;
        border-radius: 8px;
    }
    
    .category-channel-logo-item:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

@media (max-width: 576px) {
    .player-info-container {
        gap: 1rem;
    }
    .current-channel-info h2 {
        font-size: 1.5rem;
    }
    .site-logo {
        max-height: 50px;
        margin-right: 10px;
        width: auto;
    }
    #epg-description-card {
        width: 100%;
        bottom: 2vh;
    }
    .search-container {
        max-width: 150px;
    }
    #search-input {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    .cast-tab-button, google-cast-launcher button {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.85em !important;
        border-radius: 8px !important;
    }
    .header-buttons {
        gap: 5px;
    }
    
    /* Búsqueda optimizada para pantallas muy pequeñas */
    .search-results-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.8rem;
        padding: 0.6rem;
    }
    
    .search-result-card {
        padding: 0.8rem;
    }
    
    .search-result-card img {
        width: 70px;
        height: 70px;
    }
    
    .search-result-card h3 {
        font-size: 0.9rem;
        margin-top: 0.5rem;
        line-height: 1.1;
    }
    
    /* Controles de canales para pantallas muy pequeñas */
    .channel-controls {
        margin: 10px auto;
        padding: 0 0.3rem;
    }
    
    .channel-controls-buttons {
        gap: 0.6rem;
        margin-bottom: 0.6rem;
    }
    
    .control-btn {
        padding: 8px 12px;
        border-radius: 18px;
    }
    
    .control-btn i {
        font-size: 1.1rem;
    }
    
    .channel-list {
        padding: 0.6rem;
    }
    
    .channel-list-content {
        gap: 10px;
    }
    
    .channel-item {
        min-width: 70px;
        padding: 8px;
    }
    
    .channel-item img {
        width: 45px;
        height: 45px;
    }
    
    .channel-item span {
        font-size: 0.75em;
        max-width: 60px;
        text-align: center;
        width: 100%;
        margin: 0 auto;
    }
    
    /* Botones de acción para pantallas muy pequeñas */
    .favorite-btn, #shareButton, .report-button {
        width: 42px;
        height: 42px;
    }
    
    .favorite-btn i, #shareButton i, .report-button i {
        font-size: 1rem;
    }
}

.site-footer {
    background-color: rgba(51, 51, 51, 0.4);
    color: white;
    font-weight: lighter;
    font-size: 0.9em;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    /* Corrección de la posición del footer */
    width: 100%;
}

.footer-content a {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* ===== NUEVAS FUNCIONALIDADES - MEJORAS MÓVILES Y ADMINISTRATIVAS ===== */

/* Búsqueda inteligente con sugerencias */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    margin-top: 5px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.search-suggestion {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-suggestion:hover {
    background-color: rgba(123, 104, 238, 0.3);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.suggestion-name {
    color: #fff;
    font-weight: 500;
}

.suggestion-category {
    color: #aaa;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Controles de canales (Favoritos y Últimos Vistos) */
.channel-controls {
    margin: 20px auto;
    max-width: 1200px;
    padding: 0;
}

.channel-controls-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.3);
}

.control-btn i {
    font-size: 1.1rem;
}

/* === TOOLTIPS MEJORADOS PARA BOTONES === */

/* DESHABILITAR tooltips nativos del navegador para evitar duplicados */
.control-btn[title], 
.cast-tab-button[title], 
.favorite-btn[title], 
#shareButton[title], 
#favoriteButton[title],
.report-button[title], 
.notification-permission-button[title],
.pip-button[title],
.pwa-install-button[title],
.clear-search-btn[title],
google-cast-launcher[title],
.header-buttons button[title],
.header button[title],
button[title],
.has-custom-tooltip {
    position: relative;
    /* Ocultar tooltip nativo del navegador */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Aumentar z-index específicamente para tooltips del header que pueden quedar debajo */
.control-btn[title]:hover::after,
.control-btn[title]:hover::before {
    z-index: 15000 !important;
}

/* Posicionamiento especial para tooltips de botones de control - A LOS LADOS */

/* FAVORITOS - HACIA LA IZQUIERDA */
#favorites-btn[title]:hover::after,
#favorites-btn[data-tooltip]:hover::after {
    top: 50% !important;
    bottom: auto !important;
    right: 120% !important; /* Hacia la izquierda */
    left: auto !important;
    transform: translateY(-50%) !important; /* Centrado verticalmente */
}

#favorites-btn[title]:hover::before,
#favorites-btn[data-tooltip]:hover::before {
    top: 50% !important;
    bottom: auto !important;
    right: 112% !important; /* Flecha hacia la izquierda */
    left: auto !important;
    transform: translateY(-50%) !important;
    border-left: none !important;
    border-right: 6px solid rgba(0, 0, 0, 0.9) !important;
    border-top: 6px solid transparent !important;
    border-bottom: 6px solid transparent !important;
}

/* CANALES VISTOS - HACIA LA DERECHA */
#history-btn[title]:hover::after,
#history-btn[data-tooltip]:hover::after {
    top: 50% !important;
    bottom: auto !important;
    left: 120% !important; /* Hacia la derecha */
    right: auto !important;
    transform: translateY(-50%) !important; /* Centrado verticalmente */
}

#history-btn[title]:hover::before,
#history-btn[data-tooltip]:hover::before {
    top: 50% !important;
    bottom: auto !important;
    left: 112% !important; /* Flecha hacia la derecha */
    right: auto !important;
    transform: translateY(-50%) !important;
    border-right: none !important;
    border-left: 6px solid rgba(0, 0, 0, 0.9) !important;
    border-top: 6px solid transparent !important;
    border-bottom: 6px solid transparent !important;
}

.control-btn[title]:hover::after,
.cast-tab-button[title]:hover::after,
.favorite-btn[title]:hover::after,
#shareButton[title]:hover::after,
#favoriteButton[title]:hover::after,
.report-button[title]:hover::after,
.notification-permission-button[title]:hover::after,
.pip-button[title]:hover::after,
.pwa-install-button[title]:hover::after,
.clear-search-btn[title]:hover::after,
google-cast-launcher[title]:hover::after,
.header-buttons button[title]:hover::after,
.header button[title]:hover::after,
button[title]:hover:not(.remove-favorite):not(.modal-close-btn)::after,
/* Selector alternativo usando data-tooltip */
[data-tooltip]:hover:not(.remove-favorite)::after,
.has-custom-tooltip:hover:not(.remove-favorite)::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: normal;
    z-index: 999999 !important; /* Z-index muy alto */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 220px;
    text-align: center;
    line-height: 1.4;
    animation: tooltipFadeIn 0.3s ease-out;
    pointer-events: none; /* Evitar interferencias */
}

/* Flecha del tooltip */
.control-btn[title]:hover::before,
.cast-tab-button[title]:hover::before,
.favorite-btn[title]:hover::before,
#shareButton[title]:hover::before,
#favoriteButton[title]:hover::before,
.report-button[title]:hover::before,
.notification-permission-button[title]:hover::before,
.pip-button[title]:hover::before,
.pwa-install-button[title]:hover::before,
.clear-search-btn[title]:hover::before,
google-cast-launcher[title]:hover::before,
.header-buttons button[title]:hover::before,
.header button[title]:hover::before,
button[title]:hover:not(.remove-favorite):not(.modal-close-btn)::before,
/* Flecha alternativa usando data-tooltip */
[data-tooltip]:hover:not(.remove-favorite)::before,
.has-custom-tooltip:hover:not(.remove-favorite)::before {
    content: '';
    position: absolute;
    bottom: 112%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.9);
    z-index: 999999 !important; /* Z-index muy alto */
    animation: tooltipFadeIn 0.3s ease-out;
    pointer-events: none; /* Evitar interferencias */
}

/* Las clasificaciones ya no tienen tooltips - información disponible en modal "Ver más" */

/* Posicionamiento especial para tooltips del header */
.cast-tab-button[title]:hover::after,
.notification-permission-button[title]:hover::after,
.pip-button[title]:hover::after,
.pwa-install-button[title]:hover::after,
google-cast-launcher[title]:hover::after,
.header-buttons button[title]:hover::after,
.header button[title]:hover::after,
.header .has-custom-tooltip:hover::after,
.clear-search-btn[title]:hover::after {
    top: 120% !important; /* Mostrar abajo del header */
    bottom: auto !important;
}

/* Posición relativa para botones específicos */
#notification-permission-btn[title],
.notification-permission-button[title],
button[onclick*="login.php"][title],
button[onclick*="alert"][title] {
    position: relative;
}

/* Estilos específicos para botones problemáticos */
#notification-permission-btn[title]:hover::after,
.notification-permission-button[title]:hover::after,
button[onclick*="login.php"][title]:hover::after,
button[onclick*="alert"][title]:hover::after,
/* Estilos usando data-tooltip para botones dinámicos */
#notification-permission-btn[data-tooltip]:hover::after,
.notification-permission-button[data-tooltip]:hover::after,
button[onclick*="login.php"][data-tooltip]:hover::after,
button[onclick*="alert"][data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 120% !important;
    bottom: auto !important;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: normal;
    z-index: 999999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 220px;
    text-align: center;
    line-height: 1.4;
    animation: tooltipFadeIn 0.3s ease-out;
    pointer-events: none;
}

.cast-tab-button[title]:hover::before,
.notification-permission-button[title]:hover::before,
.pip-button[title]:hover::before,
.pwa-install-button[title]:hover::before,
google-cast-launcher[title]:hover::before,
.header-buttons button[title]:hover::before,
.header button[title]:hover::before,
.header .has-custom-tooltip:hover::before,
.clear-search-btn[title]:hover::before {
    top: 112% !important;
    bottom: auto !important;
    border-top: none !important;
    border-bottom: 6px solid rgba(0, 0, 0, 0.9) !important;
}

/* Flechas específicas para botones problemáticos */
#notification-permission-btn[title]:hover::before,
.notification-permission-button[title]:hover::before,
button[onclick*="login.php"][title]:hover::before,
button[onclick*="alert"][title]:hover::before,
/* Flechas usando data-tooltip para botones dinámicos */
#notification-permission-btn[data-tooltip]:hover::before,
.notification-permission-button[data-tooltip]:hover::before,
button[onclick*="login.php"][data-tooltip]:hover::before,
button[onclick*="alert"][data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: 112% !important;
    bottom: auto !important;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 0, 0, 0.9);
    z-index: 999999 !important;
    animation: tooltipFadeIn 0.3s ease-out;
    pointer-events: none;
}

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

.channel-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.channel-list-content {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.channel-list-content::-webkit-scrollbar {
    height: 6px;
}

.channel-list-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.channel-list-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.channel-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 85px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative !important;
    overflow: visible !important;
}

.channel-item:hover {
    background: rgba(123, 104, 238, 0.2);
    border-color: rgba(123, 104, 238, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.channel-item img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.channel-item:hover img {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.channel-item span {
    color: #fff;
    font-size: 0.85em;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-word;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    width: 100%;
    -webkit-box-align: center;
    justify-content: center;
    align-items: center;
}

.empty-list {
    text-align: center;
    padding: 2rem;
    color: #ccc;
    font-style: italic;
}

/* Feedback de cambio de canal */
.channel-switch-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 500;
    z-index: 2000;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: fadeInScale 0.3s ease-out;
    display: none;
}

.channel-switch-feedback.next {
    border-color: rgba(40, 167, 69, 0.5);
    background: rgba(40, 167, 69, 0.2);
}

.channel-switch-feedback.prev {
    border-color: rgba(255, 193, 7, 0.5);
    background: rgba(255, 193, 7, 0.2);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeInMobile {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Botón Picture-in-Picture - mismo estilo que otros header buttons */
.pip-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    margin-right: 8px;
}

.pip-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pip-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Botón de reportes */
.report-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ccc;
    margin-top: 10px;
    position: relative;
}

.report-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    color: #fff;
}

.report-button.active {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: #dc3545;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.report-button.active:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: scale(1.15);
}

.report-button i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Modal de reportes */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
    padding: 20px;
    box-sizing: border-box;
}

.report-modal-content {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(64, 64, 88, 0.95));
    padding: 30px;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    animation: modalFadeIn 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 20px;
}

/* Botón de cerrar modal */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
    color: #ff6b6b;
}

/* Asegurar que el botón modal-close-btn no tenga pseudo-elementos de tooltip */
.modal-close-btn::before,
.modal-close-btn::after {
    display: none !important;
}

/* Reglas específicas para evitar duplicación */
.report-modal-content .modal-close-btn {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 35px !important;
    height: 35px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    border: none !important;
    color: #fff !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.report-modal-content .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: rotate(90deg) !important;
    color: #ff6b6b !important;
}

/* Asegurar que no haya múltiples botones de cerrar */
.report-modal-content .modal-close-btn:not(:first-of-type) {
    display: none !important;
}

/* Media query específica para desktop - Modal más pequeño */
@media (min-width: 769px) {
    .report-modal-content {
        max-width: 420px !important;
        width: 420px !important;
        margin: auto !important;
    }
}

.report-modal-content h3 {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3em;
    padding-right: 40px; /* Espacio para el botón de cerrar */
}

.report-modal-content p {
    color: #ccc;
    margin-bottom: 20px;
    text-align: center;
}

.report-modal-content .form-group {
    margin-bottom: 20px;
}

.report-modal-content label {
    color: #fff;
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.report-modal-content select,
.report-modal-content textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1em;
    backdrop-filter: blur(10px);
}

.report-modal-content select option {
    background: #fff !important;
    color: #333 !important;
    padding: 8px 12px;
    border: none;
    font-weight: 500;
}

.report-modal-content select option:hover,
.report-modal-content select option:focus,
.report-modal-content select option:checked {
    background: rgba(123, 104, 238, 0.8);
    color: white;
}

/* Mejorar apariencia del select */
.report-modal-content select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-modal-content select:hover {
    border-color: rgba(123, 104, 238, 0.4);
    background-color: rgba(255, 255, 255, 0.15);
}

/* Compatibilidad especial para Firefox en modales */
@-moz-document url-prefix() {
    .report-modal-content select option {
        background: white;
        color: black;
    }
    
    .report-modal-content select option:checked {
        background: rgba(123, 104, 238, 0.8);
        color: white;
    }
}

.report-modal-content select:focus,
.report-modal-content textarea:focus {
    outline: none;
    border-color: rgba(123, 104, 238, 0.6);
    box-shadow: 0 0 0 2px rgba(123, 104, 238, 0.2);
}

.report-modal-content textarea {
    resize: vertical;
    min-height: 80px;
}

.form-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.form-buttons button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-buttons button[type="submit"] {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: #fff;
}

.form-buttons button[type="submit"]:hover {
    background: linear-gradient(45deg, #218838, #1ea080);
    transform: translateY(-2px);
}

.form-buttons button[type="button"] {
    background: rgba(108, 117, 125, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-buttons button[type="button"]:hover {
    background: rgba(108, 117, 125, 0.5);
    transform: translateY(-2px);
}

/* Estados de carga para el reporte */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

#submit-report-btn:disabled,
#cancel-report-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.report-modal.loading {
    pointer-events: none;
}

.report-modal.loading .report-modal-content {
    opacity: 0.8;
}

/* Mensaje de éxito del reporte */
.report-success-message {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

.success-icon {
    font-size: 4em;
    color: #28a745;
    margin-bottom: 20px;
    animation: successBounce 0.6s ease-out;
}

.report-success-message h3 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.report-success-message p {
    color: #ccc;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Animación de checkmark */
.success-animation {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #28a745;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #28a745;
    animation: checkmarkFill 0.4s ease-in-out 0.4s forwards, checkmarkScale 0.3s ease-in-out 0.9s both;
    position: relative;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #28a745;
    fill: none;
    animation: checkmarkStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #28a745;
}

.checkmark-stem {
    position: absolute;
    width: 3px;
    height: 9px;
    background-color: #28a745;
    left: 28px;
    top: 32px;
    transform: rotate(45deg);
    transform-origin: left bottom;
    animation: checkmarkStem 0.3s ease-in-out 0.6s both;
}

.checkmark-kick {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: #28a745;
    left: 21px;
    top: 32px;
    transform: rotate(-45deg);
    transform-origin: left bottom;
    animation: checkmarkKick 0.2s ease-in-out 0.7s both;
}

/* Notificación de error */
.report-error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(255, 99, 132, 0.95));
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
    min-width: 300px;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.error-content i {
    font-size: 1.3em;
    flex-shrink: 0;
}

.error-content span {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.4;
    font-weight: 500;
}

/* Animaciones */
@keyframes successBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes checkmarkFill {
    100% { box-shadow: inset 0px 0px 0px 30px #28a745; }
}

@keyframes checkmarkScale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes checkmarkStroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes checkmarkStem {
    0% { height: 0; }
    100% { height: 9px; }
}

@keyframes checkmarkKick {
    0% { width: 0; }
    100% { width: 3px; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Responsive para notificaciones de error */
@media (max-width: 768px) {
    .report-error-notification {
        left: 20px;
        right: 20px;
        min-width: auto;
        max-width: calc(100vw - 40px);
    }
    
    .error-content {
        padding: 14px 16px;
    }
    
    .error-content span {
        font-size: 0.9em;
    }
}

/* === MEJORAS HEADER RESPONSIVO - SOLO MÓVILES === */
@media (max-width: 768px) {
    /* SOLO en móvil: Header en dos filas */
    .header-buttons-row {
        display: flex !important; /* Forzar flex en móvil */
        justify-content: center;
        margin-top: 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }
    
    /* SOLO en móvil: Ocultar botones cuando la búsqueda está activa */
    .header.search-active .header-buttons-row {
        display: none !important;
    }
    
    /* Mejorar el espaciado de la búsqueda en móvil */
    .search-container {
        margin: 0 10px;
    }
}
    
    .search-suggestions {
        left: -10px;
        right: -10px;
    }
    
    .channel-history {
        margin: 15px 0;
        padding: 15px;
    }
    
    .history-channels {
        gap: 10px;
    }
    
    .history-channel {
        min-width: 70px;
        padding: 8px;
    }
    
    .history-channel img {
        width: 40px;
        height: 40px;
    }
    
    .history-channel span {
        font-size: 0.75em;
        max-width: 60px;
    }
    
    /* Controles de canales responsivos */
    .channel-controls {
        margin: 15px auto;
        padding: 0 0.5rem;
    }
    
    .channel-controls-buttons {
        gap: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .control-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .control-btn span {
        display: none; /* Ocultar texto en móviles, solo mostrar iconos */
    }
    
    .control-btn i {
        font-size: 1.2rem;
    }
    
    .channel-list {
        padding: 0.8rem;
    }
    
    .channel-list-content {
        gap: 12px;
    }
    
    .channel-item {
        min-width: 75px;
        padding: 10px;
    }
    
    .channel-item img {
        width: 50px;
        height: 50px;
    }
    
    .channel-item span {
        font-size: 0.8em;
        max-width: 65px;
        text-align: center;
        width: 100%;
        margin: 0 auto;
    }
    
    /* Botones de acción responsivos */
    .favorite-btn, #shareButton, .report-button {
        width: 45px;
        height: 45px;
    }
    
    .favorite-btn i, #shareButton i, .report-button i {
        font-size: 1.1rem;
    }
    
    /* Mejorar búsqueda en móviles */
    .search-results-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
        padding: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .search-result-card {
        padding: 1rem;
    }
    
    .search-result-card img {
        width: 80px;
        height: 80px;
    }
    
    .search-result-card h3 {
        font-size: 1rem;
        margin-top: 0.6rem;
        font-weight: 600;
        line-height: 1.2;
    }
    
    .channel-switch-feedback {
        font-size: 1em;
        padding: 12px 20px;
    }
    
    .report-modal-content {
        padding: 20px;
        margin: 10px;
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
        max-height: 85vh;
        animation: modalFadeInMobile 0.3s ease-out;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .form-buttons button {
        width: 100%;
    }
    
    /* Modal de clasificación responsivo */
    .classification-modal-content {
        padding: 1.5rem;
        margin: 15px;
    }
    
    .classification-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .classification-item {
        padding: 0.8rem;
        margin-bottom: 0.6rem;
    }
    
    .classification-item-circle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .classification-item-title {
        font-size: 1rem;
    }
    
    .classification-item-description {
        font-size: 0.85rem;
    }
    
    /* Botones de compartir responsivos */
    .social-links {
        gap: 10px;
        padding: 1rem;
        margin-top: 12px;
    }
    
    .social-btn {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
    
    /* Mejorar selects en móviles para reportes */
    .report-modal-content select {
        font-size: 16px; /* Previene zoom automático en iOS */
        padding: 14px 40px 14px 16px;
    }
    
    .report-modal-content select option {
        padding: 12px 16px;
        font-size: 16px;
    }
}

/* Optimización del teclado virtual en móviles */
@media (max-width: 768px) {
    #search-input {
        font-size: 16px; /* Previene zoom automático en iOS */
        padding: 12px 15px;
    }
    
    /* Mejorar la visibilidad cuando aparece el teclado virtual */
    .search-container {
        position: relative;
        z-index: 100;
    }
    
    /* Ajustes para cuando el teclado esté visible */
    body.keyboard-visible .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.95);
        backdrop-filter: blur(10px);
        padding: 10px;
    }
}

/* Indicadores de estado para streams */
.stream-status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28a745;
    animation: pulse 2s infinite;
}

.stream-status-indicator.offline {
    background: #dc3545;
    animation: none;
}

.stream-status-indicator.loading {
    background: #ffc107;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* === ESTILOS ADICIONALES PARA MEJORAS === */

/* --- Botón de favoritos mejorado --- */
.favorite-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin: 0; /* Sin margen para espaciado uniforme */
}

.favorite-btn:hover {
    background-color: rgba(255, 192, 203, 0.2);
    border-color: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 192, 203, 0.3);
}

.favorite-btn.active {
    background-color: #ff4757 !important;
    color: white !important;
    border-color: #ff4757 !important;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4) !important;
    transform: scale(1.05) !important;
}

.favorite-btn i {
    font-size: 1.2rem;
}

/* --- Botón de reporte y compartir --- */
.report-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin: 0; /* Eliminar margen para alineación perfecta */
}

.report-button:hover {
    background-color: rgba(255, 69, 0, 0.2);
    border-color: #ff4500;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.3);
}

.report-button i {
    font-size: 1.1rem;
}

#shareButton {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin: 0; /* Sin margen para espaciado uniforme */
}

#shareButton:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(123, 104, 238, 0.3);
}

#shareButton i {
    font-size: 1.1rem;
}

/* --- Enlaces sociales en fila horizontal debajo de los 3 botones --- */
.social-links {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding: 0;
    pointer-events: none;
    z-index: 10000;
    transition: all 0.3s ease;
    background: none !important;
    border: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}

.social-links.hidden {
    opacity: 0;
    visibility: hidden;
}

.social-links:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Eliminado - consolidado abajo */

/* Eliminado - consolidado arriba */

.social-link:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
    z-index: 1001;
    filter: brightness(1.2);
}

/* Eliminado código de líneas conectoras anterior */

/* Eliminado código de líneas conectoras */

/* Menú radial igual al de la imagen - hacia abajo desde el botón compartir */
.social-link {
    /* Estilo EXACTO a los otros 3 botones principales */
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    
    /* Inicialmente invisibles, se mostrarán en fila debajo */
    position: relative;
    top: auto;
    left: auto;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

/* Animación simple de aparición en fila */
.social-link:nth-child(1) { /* Facebook */
    transition-delay: 0.1s;
}

.social-link:nth-child(2) { /* Twitter */
    transition-delay: 0.15s;
}

.social-link:nth-child(3) { /* WhatsApp */
    transition-delay: 0.2s;
}

.social-link:nth-child(4) { /* Telegram */
    transition-delay: 0.25s;
}

.social-link:nth-child(5) { /* Copy */
    transition-delay: 0.3s;
}

/* Cuando se muestran, aparecen con scale normal */
.social-links:not(.hidden) .social-link {
    transform: scale(1);
    opacity: 1;
}

/* Sin líneas conectoras - iconos limpios y sueltos */

/* Colores específicos para cada red social - efecto glow como en la imagen */
.social-link.facebook:hover {
    background: rgba(24, 119, 242, 0.3) !important;
    border-color: #1877f2 !important;
    box-shadow: 0 0 20px rgba(24, 119, 242, 0.6), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.social-link.twitter:hover {
    background: rgba(29, 161, 242, 0.3) !important;
    border-color: #1da1f2 !important;
    box-shadow: 0 0 20px rgba(29, 161, 242, 0.6), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.social-link.whatsapp:hover {
    background: rgba(37, 211, 102, 0.3) !important;
    border-color: #25d366 !important;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.6), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.social-link.telegram:hover {
    background: rgba(0, 136, 204, 0.3) !important;
    border-color: #0088cc !important;
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.6), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.social-link.copy:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Eliminado - punto central no necesario para fila horizontal */

/* Hover específico eliminado - se usa el hover general de arriba */

.social-link i {
    font-size: 1.1rem;
}

/* Colores específicos para redes sociales */
.social-link.facebook:hover {
    background-color: #1877f2;
    border-color: #1877f2;
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.3);
}

.social-link.twitter:hover {
    background-color: #1da1f2;
    border-color: #1da1f2;
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.3);
}

.social-link.whatsapp:hover {
    background-color: #25d366;
    border-color: #25d366;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.social-link.telegram:hover {
    background-color: #0088cc;
    border-color: #0088cc;
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.3);
}

.social-link.copy:hover {
    background-color: #666;
    border-color: #666;
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.3);
}

/* --- Resultados de búsqueda mejorados --- */
.search-results-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 80px;
    left: 1rem;
    right: 1rem;
    z-index: 200;
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-card {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-result-card:hover {
    background-color: var(--glass-border);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.search-result-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-result-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    text-align: left;
}

.search-result-info h3 {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}

.channel-category {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.8rem;
    font-style: italic;
}

/* --- Controles de favoritos e historial --- */
.channel-list {
    display: none;
    margin-top: 1rem;
}

.channel-list[style*="block"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.favorite-channel, .history-channel {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    /* Limpiar cualquier pseudo-elemento */
}

.favorite-channel::before,
.favorite-channel::after {
    display: none !important;
}

.favorite-channel:hover, .history-channel:hover {
    background-color: var(--glass-border);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.favorite-channel img, .history-channel img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.favorite-channel span, .history-channel span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.remove-favorite {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    /* Asegurar que solo aparezca una vez */
    opacity: 1;
}

/* Estilos para el botón de eliminar favorito en el sistema de perfiles */
.remove-favorite-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background-color: rgba(255, 0, 0, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 22px !important;
    height: 22px !important;
    color: white !important;
    cursor: pointer !important;
    font-size: 0.8rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 100 !important;
    opacity: 1 !important;
    /* Asegurar que no herede posicionamiento del padre */
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.remove-favorite-btn:hover {
    background-color: rgba(255, 0, 0, 1) !important;
    transform: scale(1.1) !important;
}

/* Asegurar que el botón esté siempre en la esquina superior derecha */
.channel-item .remove-favorite-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 1000 !important;
}

/* Evitar que otros elementos interfieran con el posicionamiento */
.channel-item * {
    position: static !important;
}

.channel-item .remove-favorite-btn {
    position: absolute !important;
}

.remove-favorite:hover {
    background-color: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* Asegurar que el botón remove-favorite no tenga pseudo-elementos de tooltip */
.remove-favorite::before,
.remove-favorite::after {
    display: none !important;
}

/* Forzar que solo aparezca un botón remove-favorite por contenedor */
.favorite-channel {
    overflow: visible !important;
}

.favorite-channel .remove-favorite {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 20px !important;
    height: 20px !important;
    background-color: rgba(255, 0, 0, 0.8) !important;
    border-radius: 50% !important;
    border: none !important;
    color: white !important;
    font-size: 0.8rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    /* Eliminar cualquier transformación o duplicación */
    transform: none !important;
    box-shadow: none !important;
}

.favorite-channel .remove-favorite:hover {
    background-color: rgba(255, 0, 0, 1) !important;
    transform: scale(1.1) !important;
}

/* Asegurar que no haya múltiples elementos con la misma clase en el mismo contenedor */
.favorite-channel .remove-favorite:not(:first-of-type) {
    display: none !important;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    padding: 2rem;
    font-style: italic;
}

/* === ESTILOS PARA CLASIFICACIONES EPG === */

/* Clasificación en la información del canal */
.classification-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.classification-container:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.classification-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.classification-label {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Clasificación en las tarjetas EPG */
.epg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.classification-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Clasificación en las descripciones del programa */
.program-classification {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.classification-text {
    color: var(--text-color);
    font-size: 0.9rem;
    font-style: italic;
}

/* Colores específicos para cada clasificación */
.classification-f { background-color: #28a745 !important; }
.classification-r { background-color: #ffc107 !important; }
.classification-a { background-color: #dc3545 !important; }
.classification-c { background-color: #17a2b8 !important; }

/* Responsive para clasificaciones */
@media (max-width: 768px) {
    .classification-container {
        padding: 0.2rem 0.6rem;
        gap: 0.3rem;
    }
    
    .classification-circle {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    
    .classification-label {
        font-size: 0.8rem;
    }
    
    .classification-badge {
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .epg-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .classification-badge {
        align-self: flex-end;
    }
}

/* === MODAL DE CLASIFICACIÓN === */
.classification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.classification-modal.visible {
    opacity: 1;
    visibility: visible;
}

.classification-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.classification-modal.visible .classification-modal-content {
    transform: translateY(0);
}

.classification-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.classification-modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

.classification-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.classification-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.classification-modal-body {
    padding: 1.5rem;
}

.current-program-info {
    margin-bottom: 2rem;
}

.current-program-info h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.all-classifications h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1rem;
}

.classification-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.classification-item.current-classification {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.classification-item-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.classification-item-info {
    flex: 1;
}

.classification-item-title {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.classification-item-description {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Responsive para modal */
@media (max-width: 768px) {
    .classification-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .classification-modal-header,
    .classification-modal-body {
        padding: 1rem;
    }
    
    .classification-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .classification-item-circle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* === SUGERENCIAS DE BÚSQUEDA MEJORADAS === */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    animation: slideDown 0.2s ease-out;
}

.search-suggestion {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(2px);
}

.search-suggestion i {
    margin-right: 12px;
    width: 16px;
    color: var(--text-color);
    opacity: 0.7;
    flex-shrink: 0;
}

.search-suggestion[data-type="history"] i {
    color: #6c757d;
}

.search-suggestion[data-type="channel"] i {
    color: var(--primary-color);
}

.search-suggestion[data-type="category"] i {
    color: #28a745;
}

.search-suggestion span {
    color: var(--text-color);
    font-size: 0.9rem;
    flex: 1;
}

.search-suggestion mark {
    background: rgba(123, 104, 238, 0.3);
    color: var(--text-color);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
}

/* Mejoras en no-results */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.no-results small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive para sugerencias */
@media (max-width: 768px) {
    .search-suggestions {
        max-height: 250px;
        margin-top: 3px;
        border-radius: 8px;
    }
    
    .search-suggestion {
        padding: 14px 16px;
    }
    
    .search-suggestion span {
        font-size: 1rem;
    }
    
    .search-suggestion i {
        margin-right: 14px;
    }
}

/* Eliminado: Notificación de cambio de tema */

/* === PWA STYLES === */

/* Botón de instalación PWA */
.pwa-install-button, .notification-permission-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 0.9em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.pwa-install-button:hover, .notification-permission-button:hover {
    background: rgba(123, 104, 238, 0.2);
    border-color: rgba(123, 104, 238, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.3);
}

.pwa-install-button:disabled, .notification-permission-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pwa-install-button i, .notification-permission-button i {
    font-size: 1rem;
}

/* Ocultar texto en botones pequeños (solo mostrar icono) */
.pwa-install-button span, .notification-permission-button span {
    display: none;
}

/* Notificación de actualización */
.update-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: #ffffff;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: all 0.3s ease;
    max-width: 90vw;
    width: 400px;
}

.update-notification.show {
    transform: translateX(-50%) translateY(0);
}

.update-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.update-content i {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.update-text {
    flex: 1;
    color: var(--theme-text);
}

.update-text strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
    font-weight: 700;
    color: #1a202c;
}

.update-text small {
    font-size: 0.8rem;
    color: var(--theme-text-muted);
    opacity: 0.9;
}

.update-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.update-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.close-btn {
    background: none;
    border: none;
    color: #718096;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: #2d3748;
    transform: scale(1.1);
}

/* Notificación de instalación exitosa */
.install-success-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 10000;
}

.install-success-notification.show {
    transform: translateX(0);
}

.install-success-notification i {
    font-size: 1.2rem;
}

/* Responsive para PWA */
@media (max-width: 768px) {
    .update-notification {
        width: calc(100vw - 20px);
        max-width: none;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .update-notification.show {
        transform: translateY(0);
    }
    
    .update-content {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .update-text strong {
        font-size: 0.9rem;
    }
    
    .update-text small {
        font-size: 0.75rem;
    }
    
    .install-success-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(100%);
    }
    
    .install-success-notification.show {
        transform: translateY(0);
    }
    
    /* Hacer los botones PWA más pequeños en móvil */
    .cast-tab-button, .theme-toggle-button, .pwa-install-button, .notification-permission-button {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.8rem !important;
    }
    
    /* Botón de login responsivo en móvil */
    .login-button {
        padding: 8px 16px !important;
        font-size: 12px !important;
        min-width: 120px !important;
        gap: 6px !important;
    }
    
    .login-button i {
        font-size: 14px !important;
    }
    
    .login-button span {
        font-size: 12px !important;
        letter-spacing: 0.3px !important;
    }
}

/* === SECCIÓN QR PWA === */
.qr-pwa-section {
    padding: 3rem 0;
    margin: 2rem 0;
}

.qr-container {
    max-width: 1000px;
    margin: 0 auto;
}

.qr-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
}

.qr-info {
    flex: 1;
    min-width: 300px;
}

.qr-info h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.qr-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.qr-features {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.qr-features span {
    color: white;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
}

.qr-code-wrapper {
    flex: 0 0 auto;
    text-align: center;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.qr-instruction {
    margin-top: 1rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Responsive para QR section */
@media (max-width: 768px) {
    .qr-pwa-section {
        padding: 2rem 0;
        margin: 1rem 0;
    }
    
    .qr-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .qr-info {
        min-width: unset;
    }
    
    .qr-info h3 {
        font-size: 1.5rem;
    }
    
    .qr-features {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    #qr-code {
        width: 180px;
        height: 180px;
    }
}

/* === SECCIÓN DE TÉRMINOS Y POLÍTICAS === */
.legal-section {
    padding: 3rem 0;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.legal-container h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}

.legal-container p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    text-align: center;
    line-height: 1.6;
}

.legal-links {
    display: flex;
    justify-content: space-around;
    gap: 3rem;
    flex-wrap: wrap;
}

.legal-group {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.legal-group h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.legal-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.legal-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.legal-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.legal-btn i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.legal-btn span {
    font-weight: 500;
}

/* Responsive para legal section */
@media (max-width: 768px) {
    .legal-section {
        padding: 2rem 0;
        margin: 1rem 0;
    }
    
    .legal-container {
        padding: 0 1rem;
    }
    
    .legal-container h3 {
        font-size: 1.5rem;
    }
    
    .legal-container p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 2rem;
    }
    
    .legal-group {
        min-width: unset;
    }
    
    .legal-buttons {
        gap: 0.8rem;
    }
    
    .legal-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* === MODAL DE NOTIFICACIONES === */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-modal.show {
    opacity: 1;
    visibility: visible;
}

.notification-modal-content {
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(50px) scale(0.9);
    transition: transform 0.3s ease;
    color: white;
}

.notification-modal.show .notification-modal-content {
    transform: translateY(0) scale(1);
}

.notification-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px 20px 0 0;
}

.notification-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.notification-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.notification-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.notification-modal-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

.notification-icon {
    margin-bottom: 1rem;
}

.notification-icon i {
    font-size: 3rem;
    color: #7B68EE;
    animation: bellRing 2s infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.notification-modal-body h4 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.notification-modal-body p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.notification-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.notification-features li {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
}

.notification-features li i {
    margin-right: 0.75rem;
    color: #7B68EE;
    width: 16px;
    text-align: center;
}

.notification-note {
    background: rgba(123, 104, 238, 0.1);
    border: 1px solid rgba(123, 104, 238, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.notification-note i {
    margin-right: 0.5rem;
    color: #7B68EE;
}

.notification-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
}

.notification-btn-primary,
.notification-btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.notification-btn-primary {
    background: linear-gradient(135deg, #7B68EE 0%, #9B59B6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
}

.notification-btn-primary:hover {
    background: linear-gradient(135deg, #6A5ACD 0%, #8E44AD 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 104, 238, 0.6);
}

.notification-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.notification-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Responsive para modal de notificaciones */
@media (max-width: 768px) {
    .notification-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .notification-modal-header,
    .notification-modal-body,
    .notification-modal-footer {
        padding: 1rem;
    }
    
    .notification-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .notification-modal-footer {
        flex-direction: column;
    }
    
    .notification-btn-primary,
    .notification-btn-secondary {
        padding: 14px 20px;
    }
}

/* === MODAL DE INSTALACIÓN PWA PARA QR === */
.pwa-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pwa-install-modal.show {
    opacity: 1;
    visibility: visible;
}

.pwa-install-modal-content {
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(50px) scale(0.9);
    transition: transform 0.3s ease;
    color: white;
}

.pwa-install-modal.show .pwa-install-modal-content {
    transform: translateY(0) scale(1);
}

.pwa-install-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px 20px 0 0;
}

.pwa-install-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.pwa-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pwa-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.pwa-install-body {
    padding: 1.5rem;
    color: white;
    line-height: 1.6;
}

.pwa-install-body p {
    margin-bottom: 1rem;
}

.pwa-install-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.pwa-install-body li {
    margin-bottom: 0.5rem;
}

.pwa-benefits {
    background: rgba(40, 167, 69, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.pwa-install-footer {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 20px 20px;
}

.pwa-btn-primary,
.pwa-btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pwa-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.pwa-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pwa-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Responsive para modal PWA */
@media (max-width: 768px) {
    .pwa-install-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .pwa-install-header,
    .pwa-install-body,
    .pwa-install-footer {
        padding: 1rem;
    }
    
    .pwa-install-header h3 {
        font-size: 1.1rem;
    }
    
    .pwa-install-footer {
        flex-direction: column;
    }
    
    .pwa-btn-primary,
    .pwa-btn-secondary {
        padding: 14px 20px;
    }
}

/* === INDICADORES DE CARGA DE CANALES === */
.channel-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--loading-bg);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.channel-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(123, 104, 238, 0.2);
    border-left: 4px solid var(--loading-spinner);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-content {
    text-align: center;
    color: var(--loading-text);
}

.loading-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.loading-message {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.loading-progress {
    font-size: 0.8rem;
    opacity: 0.6;
    font-family: monospace;
}

.buffering-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 15px 0 10px 0;
    overflow: hidden;
}

.buffering-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--loading-spinner), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.loading-timeout {
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 0.9rem;
    display: none;
}

.loading-retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.loading-retry-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive para indicadores de carga */
@media (max-width: 768px) {
    .loading-spinner {
        width: 50px;
        height: 50px;
    }
    
    .loading-title {
        font-size: 1.1rem;
    }
    
    .buffering-bar {
        width: 150px;
    }
}

/* ===== ESTILOS PARA MODALES DE TÉRMINOS Y POLÍTICAS ===== */

/* Overlay del modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: none;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}



.modal-overlay.show {
    display: flex;
}

/* Contenido del modal */
.modal-content {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: none;
    max-width: 90vw;
    min-width: 320px;
    max-height: 85vh;
    width: 90%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content.show {
    display: block !important;
    transform: scale(1);
    opacity: 1;
    position: relative;
    z-index: 100000;
    visibility: visible !important;
}

/* Header del modal */
.modal-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: #ffd700;
    font-size: 1.2rem;
}

/* Botón de cerrar */
.close-button {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Cuerpo del modal */
.modal-body {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow: hidden;
}

.modal-body iframe {
    border: none;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* Enlaces del footer */
.footer-links {
    margin-top: 10px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    white-space: nowrap;
}

.footer-links a i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.footer-links a:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Animaciones para modales */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

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

.modal-overlay.show {
    display: block;
    animation: overlayFadeIn 0.3s ease;
}

.modal-content.show {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

/* Responsive para modales */
@media (min-width: 1200px) {
    .modal-content {
        width: 80%;
        max-width: 1200px;
        min-width: 800px;
    }
    
    .modal-body iframe {
        min-height: 600px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .modal-content {
        width: 85%;
        max-width: 900px;
        min-width: 600px;
    }
    
    .modal-body iframe {
        min-height: 500px;
    }
}

@media (max-width: 767px) {
    .modal-content {
        width: 95vw;
        max-height: 95vh;
        margin: 5px;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
        border-radius: 10px 10px 0 0;
    }
    
    .modal-header h2 {
        font-size: 1rem;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .modal-header h2 i {
        font-size: 1.5rem;
    }
    
    .modal-body iframe {
        min-height: 400px;
        border-radius: 0 0 10px 10px;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        margin-top: 15px;
    }
    
    .footer-links a {
        font-size: 0.8rem;
        padding: 10px 15px;
        margin: 0;
        width: 100%;
        text-align: center;
        max-width: 300px;
    }
    
    .close-button {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98vw;
        max-height: 98vh;
        margin: 2px;
    }
    
    .modal-header h2 {
        font-size: 0.9rem;
    }
    
    .modal-body iframe {
        min-height: 350px;
    }
    
    .footer-links a {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
}

/* Optimizaciones para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .footer-links a {
        min-height: 44px; /* Tamaño mínimo para toques */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .close-button {
        min-width: 44px;
        min-height: 44px;
    }
    
    .modal-content {
        touch-action: pan-y; /* Permitir scroll vertical en el modal */
    }
}

/* Optimizaciones para PWA/App */
@media (display-mode: standalone) {
    .modal-content {
        max-height: 100vh;
        height: 100vh;
    }
    
    .modal-body iframe {
        height: calc(100vh - 80px);
    }
}

/* ===== ESTILOS DE FORMULARIOS ===== */

.form-container {
    background: #555577;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
    font-weight: 500;
    font-size: 1.1rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #666688;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    background: #33334d;
    color: #f0f0f0;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #7B68EE;
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.1);
}

.form-group small {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

/* ===== ESTILOS DE BOTONES ===== */

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #7B68EE;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    background: #6A5ACD;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 104, 238, 0.4);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #666688;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #555577;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===== ESTILOS DE MENSAJES ===== */

.message {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.message.error {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.message.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.message ul {
    margin: 0;
    padding-left: 1.5rem;
    text-align: left;
}

.message li {
    margin: 0.5rem 0;
}

/* ===== ESTILOS DEL BANNER ANÓNIMO (SIN MARQUEE) ===== */

.anonymous-mode-indicator {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

.anonymous-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
    max-width: 800px;
}

.banner-icon {
    flex-shrink: 0;
    color: #FFC107;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.banner-message {
    flex: 1;
    display: flex;
    align-items: center;
}

.banner-text {
    color: #FFC107;
    font-weight: 500;
    font-size: 0.95rem;
}

.banner-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.8), rgba(106, 90, 205, 0.8));
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(123, 104, 238, 0.2);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-upgrade:hover {
    background: linear-gradient(135deg, rgba(106, 90, 205, 0.9), rgba(90, 74, 205, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
    color: white;
    text-decoration: none;
}

.btn-upgrade:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(123, 104, 238, 0.2);
}

.btn-register {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.8), rgba(32, 201, 151, 0.8));
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-register:hover {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.9), rgba(23, 162, 184, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

/* ===== ESTILOS DEL MODAL DE BENEFICIOS ===== */

.benefits-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: none;
}

.benefits-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.benefits-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefits-header .close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefits-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.benefits-content {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.benefit-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.benefit-text h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.benefit-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

.benefits-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-register-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-register-large:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .anonymous-banner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: center;
    }
    
    .banner-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    
    .banner-action {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-upgrade, .btn-register {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .benefits-modal {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .benefits-header {
        padding: 15px 20px;
    }
    
    .benefits-header h3 {
        font-size: 1.1rem;
    }
    
    .benefits-content {
        padding: 20px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .benefit-item {
        padding: 15px;
    }
    
    .benefit-icon {
        font-size: 1.5rem;
    }
    
    .benefit-text h4 {
        font-size: 1rem;
    }
    
    .benefit-text p {
        font-size: 0.85rem;
    }
}

/* ===== ESTILOS PARA AUTO-FULLSCREEN EN MÓVILES ===== */

/* Estilos cuando el reproductor está en fullscreen */
#tvPlayer:fullscreen {
    background: #000;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

#tvPlayer:-webkit-full-screen {
    background: #000;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

#tvPlayer:-moz-full-screen {
    background: #000;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

#tvPlayer:-ms-fullscreen {
    background: #000;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

/* Ocultar elementos innecesarios en fullscreen */
:fullscreen .header,
:fullscreen .nav-header,
:fullscreen .search-container,
:fullscreen .categories-container,
:fullscreen .footer,
:fullscreen .user-welcome-container {
    display: none !important;
}

:-webkit-full-screen .header,
:-webkit-full-screen .nav-header,
:-webkit-full-screen .search-container,
:-webkit-full-screen .categories-container,
:-webkit-full-screen .footer,
:-webkit-full-screen .user-welcome-container {
    display: none !important;
}

:-moz-full-screen .header,
:-moz-full-screen .nav-header,
:-moz-full-screen .search-container,
:-moz-full-screen .categories-container,
:-moz-full-screen .footer,
:-moz-full-screen .user-welcome-container {
    display: none !important;
}

:-ms-fullscreen .header,
:-ms-fullscreen .nav-header,
:-ms-fullscreen .search-container,
:-ms-fullscreen .categories-container,
:-ms-fullscreen .footer,
:-ms-fullscreen .user-welcome-container {
    display: none !important;
}

/* Centrar el reproductor en fullscreen */
:fullscreen #player-view {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: #000;
    margin: 0;
    padding: 0;
}

:-webkit-full-screen #player-view {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: #000;
    margin: 0;
    padding: 0;
}

:-moz-full-screen #player-view {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: #000;
    margin: 0;
    padding: 0;
}

:-ms-fullscreen #player-view {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: #000;
    margin: 0;
    padding: 0;
}

/* Botón para salir del fullscreen (solo en móviles) */
.fullscreen-exit-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-exit-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

:fullscreen .fullscreen-exit-btn,
:-webkit-full-screen .fullscreen-exit-btn,
:-moz-full-screen .fullscreen-exit-btn,
:-ms-fullscreen .fullscreen-exit-btn {
    display: flex !important;
}

/* Indicador de orientación para móviles */
.orientation-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-size: 16px;
    z-index: 9999;
    display: none;
    text-align: center;
    backdrop-filter: blur(10px);
}

.orientation-indicator.show {
    display: block;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* Mejoras para dispositivos móviles en landscape */
@media (orientation: landscape) and (max-width: 1024px) {
    #tvPlayer {
        max-height: 100vh;
        max-width: 100vw;
    }
    
    .player-controls {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        border-radius: 25px;
        padding: 10px 20px;
        display: flex;
        gap: 15px;
        align-items: center;
        z-index: 1000;
    }
}