/**
 * PlayVault3 - TV Mode Styles
 * Optimizado para Smart TVs, Android TV, Fire TV, Apple TV
 * Navegación con control remoto (D-pad)
 */

/* ============================================
   DETECCIÓN DE TV Y ACTIVACIÓN
   ============================================ */

/* Activar cuando hay clase .tv-mode en body */
body.tv-mode {
    cursor: none;
    overflow-x: hidden;
}

/* ============================================
   VARIABLES TV (High Performance)
   ============================================ */
body.tv-mode {
    --tv-focus-color: #00d9ff;
    --tv-focus-glow: 0 0 0 4px rgba(0, 217, 255, 0.6), 0 0 40px rgba(0, 217, 255, 0.4);
    --tv-card-scale: 1.08;
    --tv-transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Faster curve */
    --tv-font-scale: 1.3;
    --tv-spacing: 2rem;

    /* Hardware Acceleration Helpers */
    --gpu: translateZ(0);
}

/* Force GPU on interactive elements */
body.tv-mode .movie-card,
body.tv-mode .content-card,
body.tv-mode .hero-btn,
body.tv-mode .nav-links a {
    will-change: transform;
    transform: var(--gpu);
    backface-visibility: hidden;
}

/* Focus genérico (para elementos que no tienen regla específica) */
body.tv-mode .tv-focused {
    outline: none;
}

body.tv-mode a.tv-focused,
body.tv-mode button.tv-focused,
body.tv-mode input.tv-focused,
body.tv-mode select.tv-focused,
body.tv-mode textarea.tv-focused {
    box-shadow: var(--tv-focus-glow);
}

/* ============================================
   TIPOGRAFÍA TV - Más grande y legible
   ============================================ */
body.tv-mode {
    font-size: calc(16px * var(--tv-font-scale));
}

body.tv-mode h1 {
    font-size: 3rem;
}

body.tv-mode h2,
body.tv-mode .section-title {
    font-size: 2.2rem;
    margin-bottom: var(--tv-spacing);
}

body.tv-mode h3 {
    font-size: 1.6rem;
}

body.tv-mode p,
body.tv-mode span,
body.tv-mode a {
    font-size: 1.2rem;
}

/* ============================================
   HEADER TV
   ============================================ */
body.tv-mode header {
    padding: 25px 60px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
}

body.tv-mode .navbar {
    max-width: 100%;
    padding: 0 40px;
}

body.tv-mode .logo span {
    font-size: 2.5rem;
}

body.tv-mode .nav-links {
    gap: 40px;
}

body.tv-mode .nav-links a {
    font-size: 1.3rem;
    padding: 15px 25px;
    border-radius: 8px;
    transition: var(--tv-transition);
}

body.tv-mode .nav-links a:focus,
body.tv-mode .nav-links a.tv-focused {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: var(--tv-focus-glow);
    outline: none;
    color: var(--tv-focus-color);
}

body.tv-mode .menu-toggle,
body.tv-mode .mobile-sidebar,
body.tv-mode .mobile-menu-overlay {
    display: none !important;
}

/* Ocultar search en TV (difícil de usar con control) */
body.tv-mode .search-box {
    display: none;
}

/* Mostrar botón de búsqueda por voz/teclado */
body.tv-mode .tv-search-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--tv-transition);
}

body.tv-mode .tv-search-btn:focus,
body.tv-mode .tv-search-btn.tv-focused {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--tv-focus-color);
    box-shadow: var(--tv-focus-glow);
}

/* ============================================
   HERO SECTION TV
   ============================================ */
body.tv-mode .hero {
    height: 80vh;
    min-height: 600px;
}

body.tv-mode .hero-content {
    padding: 0 80px;
    max-width: 60%;
}

body.tv-mode .hero-content h1 {
    font-size: 4rem;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.8);
}

body.tv-mode .hero-content p {
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 800px;
}

body.tv-mode .hero-buttons {
    gap: 30px;
    margin-top: 40px;
}

body.tv-mode .hero-btn {
    padding: 20px 50px;
    font-size: 1.4rem;
    border-radius: 10px;
    transition: var(--tv-transition);
}

body.tv-mode .hero-btn:focus,
body.tv-mode .hero-btn.tv-focused {
    transform: scale(1.1);
    box-shadow: var(--tv-focus-glow);
}

/* ============================================
   MOVIE GRID TV
   ============================================ */
body.tv-mode .movie-grid,
body.tv-mode .content-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 30px;
    padding: 30px 60px;
    scroll-behavior: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Ocultar scrollbar pero mantener funcionalidad */
body.tv-mode .movie-grid::-webkit-scrollbar,
body.tv-mode .content-grid::-webkit-scrollbar {
    display: none;
}

body.tv-mode .movie-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   CARDS TV
   ============================================ */
body.tv-mode .movie-card,
body.tv-mode .content-card {
    flex: 0 0 280px;
    width: 280px;
    min-width: 280px;
    scroll-snap-align: start;
    transition: var(--tv-transition);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

body.tv-mode .movie-card:focus,
body.tv-mode .movie-card.tv-focused,
body.tv-mode .content-card:focus,
body.tv-mode .content-card.tv-focused {
    transform: scale(var(--tv-card-scale));
    z-index: 100;
    box-shadow: var(--tv-focus-glow);
    outline: none;
}

body.tv-mode .movie-card:focus .poster-wrapper,
body.tv-mode .movie-card.tv-focused .poster-wrapper {
    border: 4px solid var(--tv-focus-color);
}

body.tv-mode .movie-card .card-title,
body.tv-mode .content-card .card-title {
    font-size: 1.1rem;
    padding: 15px;
}

body.tv-mode .movie-card .card-meta {
    font-size: 0.95rem;
    padding: 0 15px 15px;
}

/* Info card expandida en focus */
body.tv-mode .movie-card:focus .card-info,
body.tv-mode .movie-card.tv-focused .card-info {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 100%);
}

/* Play icon en focus */
body.tv-mode .movie-card:focus .play-overlay,
body.tv-mode .movie-card.tv-focused .play-overlay {
    opacity: 1;
}

body.tv-mode .play-overlay i {
    font-size: 4rem;
    color: var(--tv-focus-color);
    text-shadow: 0 0 30px rgba(0, 217, 255, 0.8);
}

/* ============================================
   SECTIONS TV
   ============================================ */
body.tv-mode .movie-section,
body.tv-mode .content-section {
    padding: 40px 0;
    margin-bottom: 20px;
}

body.tv-mode .section-title {
    padding-left: 60px;
    margin-bottom: 25px;
}

body.tv-mode .sidebar {
    flex: 0 0 320px;
    width: 320px;
}

body.tv-mode .genre-list a {
    display: block;
    padding: 16px 20px;
    border-radius: 12px;
}

body.tv-mode .genre-list a:focus,
body.tv-mode .genre-list a.tv-focused {
    background: rgba(0, 217, 255, 0.2);
    color: var(--tv-focus-color);
}

/* ============================================
   SIDEBAR TV (para navegación)
   ============================================ */
body.tv-mode .tv-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 80px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
    gap: 30px;
    z-index: 1000;
    transition: width 0.3s ease;
}

body.tv-mode .tv-sidebar:hover,
body.tv-mode .tv-sidebar.expanded {
    width: 280px;
    background: rgba(0, 0, 0, 0.95);
}

body.tv-mode .tv-sidebar-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 25px;
    width: 100%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    transition: var(--tv-transition);
    border-radius: 0 30px 30px 0;
    text-decoration: none;
}

body.tv-mode .tv-sidebar-item i {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

body.tv-mode .tv-sidebar-item span {
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.2s;
}

body.tv-mode .tv-sidebar:hover .tv-sidebar-item span,
body.tv-mode .tv-sidebar.expanded .tv-sidebar-item span {
    opacity: 1;
}

body.tv-mode .tv-sidebar-item:focus,
body.tv-mode .tv-sidebar-item.tv-focused {
    background: rgba(0, 217, 255, 0.2);
    color: var(--tv-focus-color);
    box-shadow: inset 4px 0 0 var(--tv-focus-color);
}

/* ============================================
   FOOTER TV
   ============================================ */
body.tv-mode footer {
    padding: 60px 80px;
}

body.tv-mode footer p {
    font-size: 1.1rem;
}

/* ============================================
   MODAL DE BÚSQUEDA TV
   ============================================ */
body.tv-mode .tv-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    flex-direction: column;
    gap: 40px;
}

body.tv-mode .tv-search-modal.active {
    display: flex;
}

body.tv-mode .tv-search-input {
    width: 60%;
    max-width: 800px;
    padding: 25px 40px;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: #fff;
    text-align: center;
}

body.tv-mode .tv-search-input:focus {
    border-color: var(--tv-focus-color);
    box-shadow: var(--tv-focus-glow);
    outline: none;
}

body.tv-mode .tv-keyboard {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    max-width: 800px;
}

body.tv-mode .tv-key {
    padding: 20px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    text-align: center;
    cursor: pointer;
    transition: var(--tv-transition);
}

body.tv-mode .tv-key:focus,
body.tv-mode .tv-key.tv-focused {
    background: rgba(0, 217, 255, 0.3);
    border-color: var(--tv-focus-color);
    box-shadow: var(--tv-focus-glow);
}

body.tv-mode .tv-key.special {
    grid-column: span 2;
    background: rgba(0, 217, 255, 0.2);
}

/* ============================================
   INDICADOR DE MODO TV
   ============================================ */
body.tv-mode .tv-mode-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 217, 255, 0.2);
    border: 2px solid var(--tv-focus-color);
    padding: 15px 25px;
    border-radius: 50px;
    color: var(--tv-focus-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* ============================================
   PLAYER TV
   ============================================ */
body.tv-mode .player-wrapper {
    width: 100vw;
    height: 100vh;
}

body.tv-mode .player-controls {
    padding: 30px 60px;
    font-size: 1.3rem;
}

body.tv-mode .player-controls button {
    padding: 20px 30px;
    font-size: 1.5rem;
}

body.tv-mode .player-controls button:focus {
    box-shadow: var(--tv-focus-glow);
}

/* ============================================
   ANIMACIONES TV
   ============================================ */
@keyframes tv-focus-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.6), 0 0 40px rgba(0, 217, 255, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(0, 217, 255, 0.8), 0 0 60px rgba(0, 217, 255, 0.6);
    }
}

body.tv-mode *:focus {
    animation: tv-focus-pulse 1.5s infinite;
}

/* ============================================
   RESPONSIVE TV (diferentes tamaños de TV)
   ============================================ */

/* TVs pequeñas (32-40") */
@media screen and (min-width: 1280px) and (max-width: 1599px) {
    body.tv-mode {
        --tv-font-scale: 1.1;
    }

    body.tv-mode .movie-card {
        flex: 0 0 220px;
        width: 220px;
    }
}

/* TVs medianas (42-55") */
@media screen and (min-width: 1600px) and (max-width: 1919px) {
    body.tv-mode {
        --tv-font-scale: 1.2;
    }

    body.tv-mode .movie-card {
        flex: 0 0 260px;
        width: 260px;
    }
}

/* TVs grandes (55"+) - 4K */
@media screen and (min-width: 1920px) {
    body.tv-mode {
        --tv-font-scale: 1.4;
    }

    body.tv-mode .movie-card {
        flex: 0 0 320px;
        width: 320px;
    }

    body.tv-mode .hero-content h1 {
        font-size: 5rem;
    }
}

/* Ultra Wide / 8K */
@media screen and (min-width: 2560px) {
    body.tv-mode {
        --tv-font-scale: 1.6;
    }

    body.tv-mode .movie-card {
        flex: 0 0 400px;
        width: 400px;
    }
}

/* ============================================
   PÁGINA DE DETALLE (ver.php) TV
   ============================================ */
body.tv-mode .movie-detail,
body.tv-mode .content-detail {
    padding: 60px 80px;
}

body.tv-mode .movie-detail .poster {
    width: 350px;
    min-width: 350px;
    border-radius: 15px;
}

body.tv-mode .movie-detail .info h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

body.tv-mode .movie-detail .info p {
    font-size: 1.4rem;
    line-height: 1.8;
}

body.tv-mode .movie-detail .meta {
    font-size: 1.2rem;
    gap: 30px;
    margin: 25px 0;
}

body.tv-mode .movie-detail .meta span {
    padding: 12px 25px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
}

body.tv-mode .movie-detail .buttons,
body.tv-mode .action-buttons {
    display: flex;
    gap: 25px;
    margin-top: 30px;
}

body.tv-mode .movie-detail .btn,
body.tv-mode .action-btn,
body.tv-mode .play-btn,
body.tv-mode .btn-primary,
body.tv-mode .btn-secondary {
    padding: 20px 45px;
    font-size: 1.4rem;
    border-radius: 12px;
    transition: var(--tv-transition);
}

body.tv-mode .movie-detail .btn:focus,
body.tv-mode .action-btn:focus,
body.tv-mode .play-btn:focus,
body.tv-mode .btn-primary:focus,
body.tv-mode .btn-secondary:focus,
body.tv-mode .movie-detail .btn.tv-focused,
body.tv-mode .action-btn.tv-focused,
body.tv-mode .play-btn.tv-focused {
    transform: scale(1.08);
    box-shadow: var(--tv-focus-glow);
    outline: none;
}

/* Temporadas y episodios */
body.tv-mode .seasons-list,
body.tv-mode .episodes-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: none;
}

body.tv-mode .season-btn,
body.tv-mode .episode-card {
    flex: 0 0 auto;
    padding: 18px 35px;
    font-size: 1.2rem;
    border-radius: 10px;
    transition: var(--tv-transition);
}

body.tv-mode .season-btn:focus,
body.tv-mode .episode-card:focus,
body.tv-mode .season-btn.tv-focused,
body.tv-mode .episode-card.tv-focused {
    transform: scale(1.05);
    box-shadow: var(--tv-focus-glow);
    background: rgba(0, 217, 255, 0.2);
}

body.tv-mode .episode-card {
    width: 300px;
    min-width: 300px;
}

body.tv-mode .episode-card img {
    border-radius: 10px;
}

body.tv-mode .episode-card .title {
    font-size: 1.2rem;
    margin-top: 12px;
}

/* ============================================
   PÁGINA DE BÚSQUEDA TV
   ============================================ */
body.tv-mode .search-container {
    padding: 40px 60px;
}

body.tv-mode .search-tabs {
    gap: 15px;
    padding: 20px 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

body.tv-mode .search-tab {
    flex: 0 0 auto;
    padding: 18px 35px;
    font-size: 1.3rem;
    border-radius: 10px;
    white-space: nowrap;
    transition: var(--tv-transition);
}

body.tv-mode .search-tab:focus,
body.tv-mode .search-tab.tv-focused {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: var(--tv-focus-glow);
    color: var(--tv-focus-color);
}

body.tv-mode .search-tab.active {
    background: var(--accent-color);
}

body.tv-mode .search-results {
    margin-top: 30px;
}

/* ============================================
   PERFIL DE USUARIO TV
   ============================================ */
body.tv-mode .profile-container {
    padding: 60px 80px;
}

body.tv-mode .profile-header {
    padding: 40px;
}

body.tv-mode .profile-avatar {
    width: 180px;
    height: 180px;
    font-size: 4rem;
}

body.tv-mode .profile-name {
    font-size: 2.5rem;
}

body.tv-mode .profile-stats {
    gap: 50px;
    margin-top: 30px;
}

body.tv-mode .stat-item {
    font-size: 1.3rem;
}

body.tv-mode .stat-item .number {
    font-size: 2.5rem;
}

body.tv-mode .profile-tabs {
    gap: 20px;
    padding: 25px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

body.tv-mode .profile-tab {
    padding: 18px 40px;
    font-size: 1.3rem;
    border-radius: 10px;
    white-space: nowrap;
    transition: var(--tv-transition);
}

body.tv-mode .profile-tab:focus,
body.tv-mode .profile-tab.tv-focused {
    box-shadow: var(--tv-focus-glow);
    background: rgba(0, 217, 255, 0.2);
}

/* ============================================
   FORMULARIOS TV (Login, Registro)
   ============================================ */
body.tv-mode .auth-container,
body.tv-mode .login-container,
body.tv-mode .register-container {
    max-width: 600px;
    padding: 50px;
}

body.tv-mode .auth-container h1,
body.tv-mode .auth-container h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

body.tv-mode .form-group {
    margin-bottom: 30px;
}

body.tv-mode .form-group label {
    font-size: 1.3rem;
    margin-bottom: 12px;
    display: block;
}

body.tv-mode .form-group input,
body.tv-mode .form-input,
body.tv-mode input[type="text"],
body.tv-mode input[type="email"],
body.tv-mode input[type="password"] {
    width: 100%;
    padding: 20px 25px;
    font-size: 1.4rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: var(--tv-transition);
}

body.tv-mode .form-group input:focus,
body.tv-mode .form-input:focus,
body.tv-mode input:focus {
    border-color: var(--tv-focus-color);
    box-shadow: var(--tv-focus-glow);
    outline: none;
}

body.tv-mode .form-group button,
body.tv-mode .submit-btn,
body.tv-mode button[type="submit"] {
    width: 100%;
    padding: 22px;
    font-size: 1.5rem;
    border-radius: 12px;
    margin-top: 20px;
    transition: var(--tv-transition);
}

body.tv-mode .form-group button:focus,
body.tv-mode .submit-btn:focus,
body.tv-mode button[type="submit"]:focus {
    transform: scale(1.03);
    box-shadow: var(--tv-focus-glow);
}

/* ============================================
   MODALES TV
   ============================================ */
body.tv-mode .modal,
body.tv-mode .popup {
    padding: 50px;
    border-radius: 20px;
    max-width: 700px;
}

body.tv-mode .modal h2,
body.tv-mode .popup h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
}

body.tv-mode .modal p,
body.tv-mode .popup p {
    font-size: 1.3rem;
    line-height: 1.7;
}

body.tv-mode .modal-close,
body.tv-mode .popup-close {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
}

body.tv-mode .modal-close:focus,
body.tv-mode .popup-close:focus {
    box-shadow: var(--tv-focus-glow);
}

/* ============================================
   CATEGORÍAS / GÉNEROS TV
   ============================================ */
body.tv-mode .genres-list,
body.tv-mode .categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px 60px;
}

body.tv-mode .genre-item,
body.tv-mode .category-item {
    padding: 18px 35px;
    font-size: 1.2rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: var(--tv-transition);
}

body.tv-mode .genre-item:focus,
body.tv-mode .category-item:focus,
body.tv-mode .genre-item.tv-focused,
body.tv-mode .category-item.tv-focused {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--tv-focus-color);
    box-shadow: var(--tv-focus-glow);
    transform: scale(1.05);
}

/* ============================================
   PAGINACIÓN TV
   ============================================ */
body.tv-mode .pagination {
    gap: 15px;
    padding: 40px 0;
    justify-content: center;
}

body.tv-mode .pagination a,
body.tv-mode .pagination button,
body.tv-mode .page-btn {
    padding: 18px 30px;
    font-size: 1.3rem;
    border-radius: 10px;
    min-width: 60px;
    transition: var(--tv-transition);
}

body.tv-mode .pagination a:focus,
body.tv-mode .pagination button:focus,
body.tv-mode .page-btn:focus {
    box-shadow: var(--tv-focus-glow);
    transform: scale(1.1);
}

/* ============================================
   COMMENTS / REVIEWS TV
   ============================================ */
body.tv-mode .comments-section {
    padding: 40px 60px;
}

body.tv-mode .comment-item {
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    font-size: 1.2rem;
}

body.tv-mode .comment-author {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

body.tv-mode .comment-form textarea {
    padding: 20px;
    font-size: 1.3rem;
    border-radius: 12px;
    min-height: 150px;
}

body.tv-mode .comment-form textarea:focus {
    border-color: var(--tv-focus-color);
    box-shadow: var(--tv-focus-glow);
}

/* ============================================
   REPRODUCTOR DE VIDEO TV (Plyr)
   ============================================ */
body.tv-mode .plyr {
    --plyr-font-size-base: 20px;
    --plyr-font-size-small: 16px;
    --plyr-font-size-large: 24px;
}

body.tv-mode .plyr__controls {
    padding: 20px 40px;
}

body.tv-mode .plyr__control {
    padding: 15px;
}

body.tv-mode .plyr__control:focus {
    box-shadow: var(--tv-focus-glow);
    border-radius: 8px;
}

body.tv-mode .plyr__time {
    font-size: 1.3rem;
}

body.tv-mode .plyr__progress {
    height: 8px;
}

body.tv-mode .plyr__volume {
    width: 150px;
}

/* ============================================
   LOADING / SKELETON TV
   ============================================ */
body.tv-mode .skeleton,
body.tv-mode .loading-card {
    border-radius: 12px;
}

body.tv-mode .loading-text {
    font-size: 1.5rem;
}

/* ============================================
   NOTIFICACIONES / TOASTS TV
   ============================================ */
body.tv-mode .toast,
body.tv-mode .notification {
    padding: 25px 40px;
    font-size: 1.3rem;
    border-radius: 12px;
}

/* ============================================
   BADGES / CHIPS TV
   ============================================ */
body.tv-mode .badge,
body.tv-mode .chip,
body.tv-mode .tag {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 20px;
}

body.tv-mode .quality-badge {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ============================================
   WELCOME MODAL TV
   ============================================ */
body.tv-mode .welcome-modal {
    padding: 60px;
    max-width: 800px;
}

body.tv-mode .welcome-modal-box {
    padding: 60px;
    max-width: 800px;
}

body.tv-mode .welcome-modal h2 {
    font-size: 2.8rem;
}

body.tv-mode .welcome-title {
    font-size: 2.8rem;
}

body.tv-mode .welcome-modal p {
    font-size: 1.4rem;
}

body.tv-mode .welcome-message {
    font-size: 1.4rem;
}

body.tv-mode .welcome-button {
    padding: 22px 50px;
    font-size: 1.4rem;
}

body.tv-mode .welcome-button:focus {
    transform: scale(1.05);
    box-shadow: var(--tv-focus-glow);
}

/* ============================================
   CONTINUE WATCHING TV
   ============================================ */
body.tv-mode .continue-watching-card {
    width: 400px;
    min-width: 400px;
}

body.tv-mode .continue-watching-card:focus,
body.tv-mode .continue-watching-card.tv-focused {
    transform: scale(1.05);
    box-shadow: var(--tv-focus-glow);
}

/* Compat: clases actuales en la web */
body.tv-mode .continue-card {
    width: 400px;
    min-width: 400px;
}

body.tv-mode .continue-card:focus,
body.tv-mode .continue-card.tv-focused {
    transform: scale(1.05);
    box-shadow: var(--tv-focus-glow);
}

body.tv-mode .progress-bar {
    height: 6px;
}

/* ============================================
   EMPTY STATES TV
   ============================================ */
body.tv-mode .empty-state,
body.tv-mode .no-results {
    padding: 80px;
}

body.tv-mode .empty-state i {
    font-size: 5rem;
    margin-bottom: 30px;
}

body.tv-mode .empty-state p {
    font-size: 1.5rem;
}

/* ============================================
   CONTAINER TV - Más ancho
   ============================================ */
body.tv-mode .container {
    max-width: 95%;
    padding: 0 60px;
}

/* ============================================
   GRID LAYOUTS TV
   ============================================ */
body.tv-mode .grid-4,
body.tv-mode .grid-5,
body.tv-mode .grid-6 {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 30px;
    scrollbar-width: none;
}

/* ============================================
   SCROLLBARS OCULTOS EN TV
   ============================================ */
body.tv-mode *::-webkit-scrollbar {
    display: none;
}

body.tv-mode * {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   SAFE AREA TV (para TVs con overscan)
   ============================================ */
@supports (padding: env(safe-area-inset-top)) {
    body.tv-mode {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}
