/* ════════════════════════════════════════════════════════════════
   🚀 OPTIMIZACIÓN ANTILAG EXTREMO SMART TV (VIDAA OS / WEBOS / TIZEN)
════════════════════════════════════════════════════════════════ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: none !important; /* Elimina el retraso al mover el foco D-PAD */
    animation: none !important;
}

/* Permitir cursor de mouse visible y puntero interactivo en PC/Web */
body, button, input, a, .virtual-key, .nav-item, .card, .tv-card, .futbol-card, .zonap-card, .modal-btn, .btn-activar, .acc-modal-close-btn, .acc-btn-logout {
    cursor: pointer;
}
input, .login-code-display {
    cursor: text !important;
    user-select: text !important;
}

/* ════════════════════════════════════════════════════════════════
   🚀 REGLA DEFINITIVA DE OCULTAMIENTO (.hidden)
   ════════════════════════════════════════════════════════════════ */
.hidden,
[hidden],
.view.hidden,
.account-modal-overlay.hidden,
.expired-view-container.hidden,
.login-view-container.hidden,
.exit-modal.hidden,
.login-error-container.hidden {
    display: none !important;
}

/* Mantener solo un borde simple y limpio para el elemento enfocado */
.focusable:focus,
.focusable.focused,
.nav-item:focus,
.nav-item.focused,
.tv-card:focus,
.tv-card.focused,
.futbol-card:focus,
.futbol-card.focused,
.futbol-chip:focus,
.futbol-chip.focused,
.zonap-card:focus,
.zonap-card.focused,
.zonap-chip:focus,
.zonap-chip.focused,
.zonap-btn-volver:focus,
.zonap-btn-volver.focused,
.canalesar-item:focus,
.canalesar-item.focused,
[tabindex="0"]:focus,
[tabindex="0"].focused {
    outline: 3px solid #00ff88 !important;
    outline-offset: -3px !important;
    background-color: rgba(0, 255, 136, 0.15) !important;
}

html, body {
  background: #0f0f13;
  color: #fff;
  font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  cursor: none !important;
}

*, video, iframe {
  cursor: none !important;
}

/* ════════════════════════════════════════════════════════════════
   📺 PLAYER HTML5: VIDEO vs IFRAME — STACKING CONTEXT DEFINITIVO
   Pantalla negra con audio en VIDAA OS / WEBOS / Tizen ocurre cuando
   el iframe o un overlay se superpone al canvas de video.
   Forzamos z-index y object-fit seguros aquí como base CSS.
════════════════════════════════════════════════════════════════ */
#view-player {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
    background: #000 !important;
}

#video-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #000 !important;
    overflow: hidden !important;
}

/* El <video> siempre encima del iframe */
#video-player {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;   /* contain evita pantalla negra en VIDAA OS */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
    background: transparent !important;
}

/* El iframe va debajo del video cuando está en modo video nativo */
#iframe-player {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    z-index: 9998 !important;         /* siempre 1 nivel bajo el <video> */
    background: #000 !important;
}

/* Cuando el iframe está oculto, sacarlo completamente del stacking context */
#iframe-player[style*="display: none"],
#iframe-player[style*="display:none"] {
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.spinner-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10001 !important;
}

.player-controls {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 10002 !important;
    background: linear-gradient(transparent, rgba(0,0,0,0.85)) !important;
    padding: 20px 30px !important;
    box-sizing: border-box !important;
}

.error-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10003 !important;
    background: rgba(0,0,0,0.8) !important;
    padding: 30px !important;
    border-radius: 12px !important;
    text-align: center !important;
    color: #fff !important;
    max-width: 70vw !important;
}

/* Clases utilitarias SVG */
.svg-icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.svg-icon-large {
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
    display: block;
}

/* App Container con Safe Area */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    padding: 35px 30px 25px 30px; /* Overscan Safe Area superior de 35px */
    gap: 20px;
    box-sizing: border-box;
}

/* Sidebar */
.sidebar {
    width: 220px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    background-color: #0f131a;
    border-radius: 12px;
    padding: 20px;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
}

.sidebar-header .badge {
    background-color: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    align-self: flex-start;
}

.sidebar-menu-title {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.sidebar-list {
    list-style: none;
    flex: 1;
}

.sidebar-list li {
    padding: 10px 15px;
    font-size: 16px;
    color: #aaa;
    border-radius: 10px;
    margin-bottom: 5px;
    transition: none; /* TV: GPU-only */
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Foco del Sidebar (Rojo) */
.sidebar-list li.focused, .sidebar-footer .btn-more.focused {
    background-color: rgba(255, 0, 68, 0.2);
    color: #ffffff;
    border: 2px solid #ff0044;
    
}

.sidebar-list li.active {
    background-color: #ff0044;
    color: #ffffff;
}

.btn-more {
    padding: 10px 15px;
    font-size: 16px;
    color: #ffd700;
    border: 1px solid #444;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

/* Content Area */
.content-area {
    flex: 1;
    height: 100%;
    position: relative;
    background-color: #090b10;
    overflow-y: hidden;
    border-radius: 12px;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.view.hidden {
    display: none !important;
}

.view.full-screen {
    position: fixed;
    padding: 0;
    z-index: 50;
    background-color: #000;
    border-radius: 0;
}

/* Launcher View */
#view-launcher {
    justify-content: space-around; /* Compactar verticalmente */
}

.category-row {
    margin-bottom: 0;
}

.row-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cards-container {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 6px 0;
}

.cards-container > .card{
    width: 33%;
    height: 20vh;
}

.cards-container[data-category="tv"] {
    grid-template-columns: repeat(4, 1fr);
}

.cards-container[data-category="movies"],
.cards-container[data-category="sports"] {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 85px;
    background: #161c26;
    border-radius: 10px;
    border: 2px solid transparent;
    text-align: center;
    padding: 8px;
    transition: none; /* TV: GPU-only */
    
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Foco de Tarjetas (Verde Neón) */
.card.focused {
    border-color: #00e676 !important;
    background-color: #242c38;
    
    position: relative;
    z-index: 10;
}

/* Catalog View */
.catalog-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.catalog-header h2 {
    font-size: 32px;
}

.back-hint {
    font-size: 18px;
    color: #888;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.catalog-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: #161c26;
    border-radius: 10px;
    border: 2px solid transparent;
    text-align: center;
    padding: 15px;
    transition: none; /* TV: GPU-only */
    
}

.catalog-item.focused {
    border-color: #00e676 !important;
    
    background-color: #242c38;
}

.catalog-item .item-title {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #ddd;
}

.catalog-item.focused .item-title {
    color: #fff;
}

/* Player View */
video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    transition: opacity 0.5s ease;
}

.player-controls.hidden {
    opacity: 0;
}

#player-title {
    font-size: 36px;
    font-weight: bold;
}

.status-indicator {
    font-size: 24px;
    color: #ffaa00;
}

/* HUD / Player Progress */
.progress-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}
.progress-container span {
    font-size: 20px;
    font-family: monospace;
}
.progress-bar-bg {
    flex: 1;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #00e676;
    transition: none; /* TV: no width anim */
}

/* Spinner */
.spinner-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 25;
}
.spinner-overlay.hidden { display: none; }
.loader {
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top: 8px solid #00e676;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
}

.error-overlay.hidden {
    display: none;
}

.error-overlay p {
    font-size: 28px;
    color: #ff5555;
    padding: 30px;
    border: 2px solid #ff5555;
    border-radius: 12px;
}

/* Exit Modal */
.cards-container[data-category="sports"] {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 85px;
    background: #161c26;
    border-radius: 10px;
    border: 2px solid transparent;
    text-align: center;
    padding: 8px;
    transition: none; /* TV: GPU-only */
    
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Foco de Tarjetas (Verde Neón) */
.card.focused {
    border-color: #00e676 !important;
    background-color: #242c38;
    
    position: relative;
    z-index: 10;
}

/* Catalog View */
.catalog-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.catalog-header h2 {
    font-size: 32px;
}

.back-hint {
    font-size: 18px;
    color: #888;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.catalog-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: #161c26;
    border-radius: 10px;
    border: 2px solid transparent;
    text-align: center;
    padding: 15px;
    transition: none; /* TV: GPU-only */
    
}

.catalog-item.focused {
    border-color: #00e676 !important;
    
    background-color: #242c38;
}

.catalog-item .item-title {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #ddd;
}

.catalog-item.focused .item-title {
    color: #fff;
}

/* Player View */
video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    transition: opacity 0.5s ease;
}

.player-controls.hidden {
    opacity: 0;
}

#player-title {
    font-size: 36px;
    font-weight: bold;
}

.status-indicator {
    font-size: 24px;
    color: #ffaa00;
}

/* HUD / Player Progress */
.progress-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}
.progress-container span {
    font-size: 20px;
    font-family: monospace;
}
.progress-bar-bg {
    flex: 1;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #00e676;
    transition: none; /* TV: no width anim */
}

/* Spinner */
.spinner-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 25;
}
.spinner-overlay.hidden { display: none; }
.loader {
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top: 8px solid #00e676;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
}

.error-overlay.hidden {
    display: none;
}

.error-overlay p {
    font-size: 28px;
    color: #ff5555;
    padding: 30px;
    border: 2px solid #ff5555;
    border-radius: 12px;
}

/* Exit Modal */
.exit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.exit-modal.hidden {
    display: none !important;
}

.modal-content {
    background-color: #1b2029;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #333;
}

.modal-content h2 {
    font-size: 28px;
    margin-bottom: 40px;
    color: #fff;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.modal-btn {
    padding: 15px 40px;
    font-size: 22px;
    font-weight: bold;
    border-radius: 12px;
    border: 3px solid transparent;
    transition: none; /* TV: GPU-only */
    background-color: #242c38;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-btn.cancel.focused {
    border-color: #ff3344;
    color: #fff;
}

.modal-btn.accept.focused {
    border-color: #00e676;
    color: #fff;
}

/* ════════════════════════════════════════════════════════════
   CANALES VIVO ARGENTINA TV
   ════════════════════════════════════════════════════════════ */
.canalesar-view {
    padding: 16px;
    gap: 0;
}

.canalesar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    flex-shrink: 0;
}

.canalesar-volver {
    padding: 8px 16px;
    background-color: #2A2A2A;
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    border: 2px solid transparent;
}

.canalesar-volver.focused {
    background-color: #444444;
    border-color: #AAAAAA;
}

.canalesar-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E50914;
    display: inline-block;
}

.live-count {
    color: #888;
    font-size: 12px;
    font-weight: 400;
    margin-left: 4px;
}

.canalesar-search {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background-color: #141414;
    border: 1px solid #2A2A2A;
    border-radius: 10px;
}

.canalesar-search:focus-within {
    background-color: #1A1A1A;
    border: 2px solid #E50914;
}

.canalesar-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    cursor: text !important;
}

.canalesar-search input::placeholder {
    color: #555555;
}

.canalesar-clear {
    color: #888888;
    font-size: 13px;
    cursor: pointer !important;
}

.canalesar-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.canalesar-loading {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
}

.canalesar-list {
    width: 280px;
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 6px;
}

.canalesar-empty {
    padding-top: 32px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.canalesar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    background-color: #1A1A1A;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.canalesar-item.selected {
    background-color: #1E2A3A;
    border-color: rgba(229, 9, 20, 0.4);
}

.canalesar-item.focused {
    background-color: #2E2E2E;
    border-color: #CCCCCC;
}

.canalesar-item.selected.focused {
    background-color: #253040;
    border-color: #FF3322;
}

.canalesar-item-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    background-color: #2A2A2A;
    flex-shrink: 0;
}

.canalesar-item-info {
    flex: 1;
    min-width: 0;
}

.canalesar-item-title {
    font-size: 13px;
    color: #BBBBBB;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.canalesar-item.selected .canalesar-item-title,
.canalesar-item.focused .canalesar-item-title {
    color: #fff;
    font-weight: 700;
}

.canalesar-item-live {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #E50914;
    margin-top: 2px;
}

.canalesar-item-live .live-dot {
    width: 6px;
    height: 6px;
}

.canalesar-item-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
    font-weight: 600;
    width: fit-content;
}

.canalesar-item-status.badge-token {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.canalesar-item-status.badge-offline {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.canalesar-item-status.badge-direct {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.canalesar-item-status.badge-streamhdx {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.canalesar-player-wrap {
    flex: 1;
    margin-left: 12px;
    height: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
    outline: none;
    transition: none; /* TV: GPU-only */
}

.canalesar-player-wrap:focus,
.canalesar-player-wrap.focused {
    outline: 2px solid var(--accent, #38bdf8);
    /* box-shadow glow removed for TV */
}

.canalesar-player-wrap video,
.canalesar-player-wrap iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    border: none;
    pointer-events: auto;
}

/* Fix Pantalla Completa para VIDAA OS / WebTV (CSS Fullscreen Fallback & Native API) */
.fullscreen-tv-mode,
.fullscreen-tv-mode #video-container,
.fullscreen-tv-mode video,
.fullscreen-tv-mode iframe,
body.fullscreen-tv-mode .canalesar-player-wrap,
body.fullscreen-tv-mode #canales-ar-video,
body.fullscreen-tv-mode #canales-ar-iframe,
body.fullscreen-tv-mode #video-container,
body.fullscreen-tv-mode #video-player,
body.fullscreen-tv-mode #iframe-player,
body.fullscreen-tv-mode video,
body.fullscreen-tv-mode iframe,
.canalesar-player-wrap.fullscreen-tv-mode,
.canalesar-player-wrap.fullscreen-tv-mode video,
.canalesar-player-wrap.fullscreen-tv-mode iframe,
#video-container.fullscreen-tv-mode,
#video-container.fullscreen-tv-mode video,
#video-container.fullscreen-tv-mode iframe {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 999999 !important;
    object-fit: contain !important;
    background: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
}

body.fullscreen-tv-mode .canalesar-header,
body.fullscreen-tv-mode .canalesar-list,
body.fullscreen-tv-mode #sidebar {
    display: none !important;
}

:fullscreen, :-webkit-full-screen, :-moz-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  background: #000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

:fullscreen video, :-webkit-full-screen video, :-moz-full-screen video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
  z-index: 2147483647 !important; /* Forzar el nivel más alto */
}

/* Ocultar loaders/spinners/overlays transparentes en fullscreen */
:fullscreen .loading-overlay, 
:fullscreen .player-overlay,
:-webkit-full-screen .loading-overlay {
  display: none !important;
}

.canalesar-player-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    pointer-events: none;
}

.canalesar-player-overlay.visible {
    display: flex;
    pointer-events: auto;
}

.canalesar-player-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.6);
    font-size: 12px;
    pointer-events: none;
    z-index: 5;
}

.canalesar-player-tag strong {
    color: #fff;
    font-weight: 700;
}

.canalesar-player-tag span {
    color: #888888;
    font-size: 10px;
}

/* ════════════════════════════════════════════════════════════════
   PELÍCULAS & SERIES (PELISPLUS / POSEIDÓN / PELISJUANITA)
   ════════════════════════════════════════════════════════════════ */

.peliculas-series-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 10% 20%, rgba(20, 26, 38, 0.95), #080a0f 90%);
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

/* Header */
.movies-header {
    padding: 12px 24px;
    background: rgba(15, 19, 26, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    z-index: 10;
}

.movies-nav-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.movies-volver {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    transition: none; /* TV: GPU-only */
    
}

.movies-volver.focused {
    background: rgba(229, 9, 20, 0.25);
    border-color: #e50914;
    color: #ffffff;
    
}

.movies-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid;
    letter-spacing: 0.5px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Tabs */
.movies-tabs {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.movies-tab-item {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border: 1px solid transparent;
    transition: none; /* TV: GPU-only */
    
}

.movies-tab-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.movies-tab-item.focused {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: #ff0055;
    
}

/* Buscador */
.movies-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    padding: 4px 14px;
    gap: 8px;
    min-width: 260px;
    transition: none; /* TV: GPU-only */
    
}

.movies-search.focused {
    border-color: #e50914;
    background: rgba(0, 0, 0, 0.7);
}

.movies-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    width: 100%;
}

.movies-grid {
    transform: translateZ(0);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    width: 100%;
}

/* Movie Card */
.movie-card {
    position: relative;
    background: #121721;
    border-radius: 6px;
    overflow: hidden;
    border: 4px solid transparent;
    display: flex;
    flex-direction: column;
}

.movie-card.focused {
    border-color: #e50914;
    background: #1e2638;
    z-index: 5;
}

.movie-poster-wrap {
    width: 100%;
    padding-top: 150%; /* Reemplazo compatible para aspect-ratio: 2/3 */
    position: relative;
    background: #0d1017;
    overflow: hidden;
}

.movie-poster-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.movie-play-hover {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.movie-card.focused .movie-play-hover .movie-play-hover {
    opacity: 1;
}

.movie-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    background: #0f131a;
}

.movie-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

/* Paginación */
.movies-pagination {
    display: flex;
    justify-content: center;
    margin-top: 28px;
    margin-bottom: 20px;
}

.movies-more-btn {
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    transition: none; /* TV: GPU-only */
    
}

.movies-more-btn.focused {
    background: #e50914;
    border-color: #e50914;
    color: #fff;
    
}

/* Loading y Vacío */
.movies-loading-overlay, .movies-empty {
    width: 100%;
    height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #94a3b8;
    font-size: 15px;
}

/* ════════════════════════════════════════════════════════════════
   MODAL DE DETALLE CINEMATOGRÁFICO
   ════════════════════════════════════════════════════════════════ */

.movies-modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 40px;
}

.movies-modal-backdrop.hidden {
    display: none !important;
}

.movies-modal-content {
    position: relative;
    width: 100%;
    max-width: 1080px;
    height: 90vh;
    max-height: 640px;
    background: #0f131a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.movies-modal-backdrop-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center 20%;
    opacity: 0.18;
    
    z-index: 0;
}

.movies-modal-close-btn {
    position: absolute;
    top: 18px;
    right: 20px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
    z-index: 10;
    transition: none; /* TV: GPU-only */
    
}

.movies-modal-close-btn.focused {
    background: #e50914;
    border-color: #e50914;
    color: #fff;
    
}

.movies-modal-body {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 30px;
    padding: 36px 40px;
    height: 100%;
    overflow-y: auto;
}

.movies-modal-poster {
    width: 220px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    align-self: flex-start;
}

.movies-modal-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.movies-modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.movies-modal-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.movies-modal-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.meta-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.meta-tag.type { background: #e50914; color: #fff; }
.meta-tag.year { background: rgba(255, 255, 255, 0.12); color: #38bdf8; }
.meta-tag.site { background: rgba(255, 255, 255, 0.08); color: #a855f7; }

.movies-modal-genres {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
}

.movies-modal-overview {
    font-size: 14px;
    line-height: 1.5;
    color: #cbd5e1;
    max-height: 120px;
    overflow-y: auto;
}

/* Servidores */
.movies-modal-actions {
    margin-top: 10px;
}

.servers-label, .serie-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.servers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.server-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    transition: none; /* TV: GPU-only */
    
}

.server-chip .srv-lang {
    font-size: 11px;
    color: #38bdf8;
    font-weight: normal;
}

.server-chip.focused {
    background: #e50914;
    border-color: #ff3344;
    color: #ffffff;
    
}

.server-chip.focused .srv-lang .srv-lang {
    color: #fff;
}

/* Series / Temporadas / Capítulos */
.series-seasons-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.seasons-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.season-tab-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    transition: none; /* TV: GPU-only */
    
}

.season-tab-btn.active {
    background: #e50914;
    color: #ffffff;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 6px;
}

.episode-card {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: none; /* TV: GPU-only */
    
}

.episode-card.focused {
    background: rgba(229, 9, 20, 0.3);
    border-color: #e50914;
    
}

.ep-num {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
}

.ep-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.detail-loader {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #94a3b8;
}

/* ════════════════════════════════════════════════════════════════
   ⚽ SECCIÓN EVENTOS DEPORTIVOS Y FÚTBOL EN VIVO
   Tema: Obsidian & Emerald Green (TV Premium)
════════════════════════════════════════════════════════════════ */
.futbol-eventos-view {
    width: 100%;
    height: 100%;
    background: #070e09;
    color: #ffffff;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.futbol-view-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 16px 24px;
    box-sizing: border-box;
    gap: 14px;
}

/* Header */
.futbol-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1a3320;
    padding-bottom: 12px;
    flex-shrink: 0;
}

.futbol-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.futbol-btn-volver {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #142417;
    border: 1.5px solid #1a3320;
    color: #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: transform 0.15s ease, opacity 0.15s ease; /* TV: GPU-only */
}

.futbol-btn-volver.focused {
    background: #00e676;
    color: #000000;
    border-color: #ffffff;
    transform: scale(1.05);
    /* box-shadow glow removed for TV */
}

.futbol-header-titles {
    display: flex;
    flex-direction: column;
}

.futbol-main-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.futbol-sub-title {
    font-size: 12px;
    color: #88a08c;
    margin-top: 2px;
}

/* Chips Filtros */
.futbol-chips-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.futbol-chip {
    padding: 7px 14px;
    background: #142417;
    border: 1.5px solid #1a3320;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    color: #88a08c;
    outline: none;
    transition: transform 0.15s ease, opacity 0.15s ease; /* TV: GPU-only */
}

.futbol-chip.active {
    background: #00c853;
    color: #ffffff;
    border-color: #00e676;
}

.futbol-chip.focused {
    border-color: #ffffff;
    background: #00e676;
    color: #000000;
    transform: scale(1.06);
    /* box-shadow glow removed for TV */
}

/* Content Area & Grid */
.futbol-content-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.futbol-content-area::-webkit-scrollbar {
    width: 6px;
}

.futbol-content-area::-webkit-scrollbar-thumb {
    background: #1a3320;
    border-radius: 4px;
}

.futbol-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-bottom: 24px;
}

@media (max-width: 1100px) {
    .futbol-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tarjeta de Partido */
.futbol-card {
    background: #0e1a11;
    border: 1.5px solid #1a3320;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 180px;
    outline: none;
    transition: transform 0.15s ease, opacity 0.15s ease; /* TV: GPU-only */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.futbol-card.focused {
    border-color: #ffffff;
    background: #142b1a;
    transform: scale(1.03);
    /* box-shadow glow removed for TV */
}

.futbol-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.futbol-liga-badge {
    font-size: 10px;
    font-weight: 700;
    color: #88a08c;
    background: #142417;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.futbol-status-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
}

.status-vivo {
    background: rgba(255, 23, 68, 0.2);
    color: #ff1744;
    border: 1px solid #ff1744;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.98); }
}

.status-prox {
    background: rgba(0, 200, 83, 0.15);
    color: #00e676;
}

.status-fin {
    background: rgba(120, 144, 156, 0.15);
    color: #78909c;
}

.futbol-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.futbol-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.futbol-crest-wrapper {
    width: 44px;
    height: 44px;
    background: #142417;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.futbol-crest {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.futbol-team-name {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.futbol-center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}

.futbol-vs-badge {
    font-size: 10px;
    font-weight: 800;
    color: #88a08c;
    background: #142417;
    padding: 2px 6px;
    border-radius: 4px;
}

.futbol-score-box {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #142417;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #1a3320;
}

.futbol-score-box.score-vivo {
    border-color: #ff1744;
    background: rgba(255, 23, 68, 0.15);
}

.score-num {
    font-size: 15px;
    font-weight: 900;
    color: #ffffff;
}

.score-sep {
    font-size: 12px;
    color: #88a08c;
}

.futbol-match-time {
    font-size: 9.5px;
    color: #88a08c;
    white-space: nowrap;
}

.futbol-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #09140b;
    padding: 5px 8px;
    border-radius: 6px;
    border-top: 1px solid #122216;
}

.futbol-tv-icon {
    width: 14px;
    height: 14px;
    fill: #00e676;
    flex-shrink: 0;
}

.futbol-tv-text {
    font-size: 10px;
    color: #88a08c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading & Empty States */
.futbol-loading-container, .futbol-empty-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    gap: 12px;
    text-align: center;
}

.futbol-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(0, 230, 118, 0.2);
    border-top-color: #00e676;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.futbol-loading-text {
    font-size: 15px;
    color: #88a08c;
    font-weight: 500;
}

.futbol-empty-icon {
    font-size: 40px;
}

.futbol-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.futbol-empty-desc {
    font-size: 13px;
    color: #88a08c;
    max-width: 360px;
}

/* Modal Selector de Canales */
.futbol-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    /* backdrop-filter removed for TV */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.futbol-modal-container {
    width: 480px;
    max-width: 90vw;
    background: #0e1a11;
    border: 2px solid #00e676;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* box-shadow glow removed for TV */
}

.futbol-modal-header {
    border-bottom: 1px solid #1a3320;
    padding-bottom: 10px;
}

.futbol-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: #00e676;
}

.futbol-modal-subtitle {
    font-size: 12px;
    color: #88a08c;
    margin-top: 3px;
}

.futbol-modal-channels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.futbol-channel-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #142417;
    border: 1.5px solid #1a3320;
    border-radius: 8px;
    outline: none;
    transition: transform 0.15s ease, opacity 0.15s ease; /* TV: GPU-only */
}

.futbol-channel-option.focused {
    background: #00e676;
    color: #000000;
    border-color: #ffffff;
    transform: scale(1.02);
}

.futbol-channel-icon {
    font-size: 14px;
}

.futbol-channel-name {
    font-size: 13px;
    font-weight: 700;
    flex: 1;
    margin-left: 10px;
}

.futbol-channel-play {
    font-size: 10.5px;
    font-weight: 800;
    opacity: 0.8;
}

.futbol-modal-footer {
    font-size: 11px;
    color: #88a08c;
    text-align: center;
    border-top: 1px solid #1a3320;
    padding-top: 8px;
}

/* Resolving Overlay */
.futbol-resolving-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10000;
}

.futbol-resolving-text {
    font-size: 16px;
    font-weight: 600;
    color: #00e676;
}

/* ════════════════════════════════════════════════════════════════
   📺 FULLSCREEN ESTRICTO SMART TV (VIDAA OS / WebOS / Tizen)
════════════════════════════════════════════════════════════════ */
.tv-player-fullscreen,
.tv-player-fullscreen video,
.tv-player-fullscreen iframe,
#video-container.tv-player-fullscreen,
#canalesar-player-wrap.tv-player-fullscreen,
.canalesar-player-wrap.tv-player-fullscreen,
#canales-ar-video.tv-player-fullscreen,
#video-player.tv-player-fullscreen,
#view-player.tv-player-fullscreen,
.fullscreen-tv-mode,
.fullscreen-tv-mode video,
.fullscreen-tv-mode iframe,
#video-container.fullscreen-tv-mode,
#canalesar-player-wrap.fullscreen-tv-mode {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  z-index: 999999 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: #000 !important;
  object-fit: fill !important; /* Forzar a que ocupe todo el marco */
}

.tv-player-fullscreen video,
.tv-player-fullscreen iframe,
.fullscreen-tv-mode video,
.fullscreen-tv-mode iframe {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  object-fit: fill !important;
  display: block !important;
}

/* ════════════════════════════════════════════════════════════════
   🔞 ZONA P - SALA ADULTOS UI (VIDAA OS / WEBOS / TIZEN)
════════════════════════════════════════════════════════════════ */
.zonap-view {
  width: 100%;
  height: 100%;
}

.zonap-view-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0a0a0a;
  color: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.zonap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px 12px 28px;
  background: #111111;
  border-bottom: 1px solid #222222;
  flex-shrink: 0;
}

.zonap-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.zonap-btn-volver {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #222222;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: none;
}

.zonap-header-titles {
  display: flex;
  flex-direction: column;
}

.zonap-main-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.zonap-sub-title {
  font-size: 13px;
  color: #999999;
  margin: 2px 0 0 0;
}

.zonap-chips-container {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
}

.zonap-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1a1a1a;
  color: #cccccc;
  border: 1px solid #333333;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: none;
}

.zonap-chip.active {
  background: #e50914;
  color: #ffffff;
  border-color: #e50914;
}

.zonap-content-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  box-sizing: border-box;
}

.zonap-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.zonap-card {
  background: #141414;
  border: 1px solid #222222;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: none;
}

.zonap-card-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #000;
  overflow: hidden;
}

.zonap-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zonap-card-quality {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(229, 9, 20, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.zonap-card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.zonap-card-info {
  padding: 10px 12px;
}

.zonap-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zonap-loader-wrap,
.zonap-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: #999;
  text-align: center;
}

.zonap-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: spin 0.8s linear infinite !important;
}

.zonap-loader-text {
  margin-top: 14px;
  font-size: 14px;
  color: #999;
}

.zonap-resolving-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   🔐 ZONAHACK TV — LOGIN Y TRIAL 2026 (PANTALLA REGISTRO MEJORADA)
   ════════════════════════════════════════════════════════════════ */

.login-view-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: radial-gradient(circle at 50% 30%, #1a1a2e 0%, #16213e 50%, #0f0f0f 100%) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 48px 20px 48px;
  overflow-y: auto;
  box-sizing: border-box;
}

.login-split-layout {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: auto;
  gap: 40px;
}

/* --- COLUMNA IZQUIERDA: BRANDING & AVISO LEGAL --- */
.login-left-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-branding-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.login-logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.35) 0%, rgba(229, 9, 20, 0.05) 70%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 1px solid rgba(229, 9, 20, 0.3);
}

.login-branding-text {
  display: flex;
  flex-direction: column;
}

.login-title-row {
  display: flex;
  align-items: baseline;
}

.login-title-row .brand-white {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.login-title-row .brand-red {
  font-size: 28px;
  font-weight: 900;
  color: #e50914;
  letter-spacing: -0.5px;
}

.login-branding-text .brand-sub {
  font-size: 11px;
  color: #777777;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.login-branding-text .brand-ver {
  font-size: 10px;
  color: #555555;
}

/* --- TARJETA DE AVISO LEGAL --- */
.login-legal-card {
  background: linear-gradient(180deg, #1e1e2e 0%, #181825 100%);
  border: 1px solid #3a3a4a;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.legal-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.legal-icon-badge {
  background: rgba(229, 9, 20, 0.15);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 14px;
}

.legal-card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.legal-main-text {
  font-size: 11px;
  line-height: 15px;
  color: #aaaaaa;
  margin-bottom: 12px;
}

.legal-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3a3a4a, transparent);
  margin-bottom: 12px;
}

.legal-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.legal-cat-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.legal-cat-item .cat-emoji {
  font-size: 12px;
  margin-top: 1px;
}

.legal-cat-item .cat-info h4 {
  font-size: 11px;
  font-weight: 600;
  color: #cccccc;
  margin-bottom: 2px;
}

.legal-cat-item .cat-info p {
  font-size: 9.5px;
  color: #777777;
  line-height: 12px;
}

.legal-footer-note {
  background: #0d0d1a;
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
}

.legal-footer-note p {
  font-size: 9.5px;
  color: #666677;
  line-height: 13px;
}

/* --- COLUMNA DERECHA: FORMULARIO ACTIVAR --- */
.login-right-col {
  flex: 1;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-card {
  background: linear-gradient(180deg, rgba(30, 30, 46, 0.85) 0%, rgba(24, 24, 37, 0.95) 100%);
  border: 1px solid #4a4a5a;
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.login-lock-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.25) 0%, rgba(229, 9, 20, 0.05) 70%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
  border: 1px solid rgba(229, 9, 20, 0.3);
}

.login-card-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.login-card-subtitle {
  font-size: 13px;
  color: #888888;
  margin-bottom: 4px;
}

.login-telegram-hint {
  font-size: 9.5px;
  color: #888888;
  margin-bottom: 14px;
}

.login-telegram-hint b {
  color: #0088cc;
}

/* Input Display */
.login-input-wrapper {
  width: 100%;
  margin-bottom: 10px;
}

.login-code-display {
  width: 100%;
  height: 50px;
  background: #0a0a0a;
  border: 2px solid #4a4a5a;
  border-radius: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 8px;
  text-align: center;
  outline: none;
  font-family: inherit;
}

.login-code-display:focus,
.login-code-display.focused {
  border-color: #00ff88 !important;
  outline: 3px solid #00ff88 !important;
  /* box-shadow glow removed for TV */
}

/* 8 Barras de Progreso */
.code-progress-container {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 16px;
}

.code-progress-bar {
  flex: 1;
  max-width: 22px;
  height: 4px;
  background: #3a3a4a;
  border-radius: 2px;
  transition: none; /* TV: no bg anim */
}

.code-progress-bar.active {
  background: #e50914 !important;
  /* box-shadow glow removed for TV */
}

/* Teclado Numérico Virtual para TV / Mouse */
.virtual-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 14px;
}

.virtual-key {
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.virtual-key:hover,
.virtual-key.focused,
.virtual-key:focus {
  background: #e50914 !important;
  border-color: #ffffff !important;
  outline: 3px solid #00ff88 !important;
  outline-offset: 1px !important;
  transform: scale(1.08) !important;
  /* box-shadow glow removed for TV */
  z-index: 2;
}

.virtual-key.key-pressed {
  background: #00ff88 !important;
  color: #000000 !important;
  outline: 3px solid #ffffff !important;
  transform: scale(0.95) !important;
  /* box-shadow glow removed for TV */
}

.virtual-key.key-clear {
  color: #ff5555;
}

.virtual-key.key-backspace {
  color: #ffaa55;
  font-size: 19px;
}

/* Error Box */
.login-error-container {
  width: 100%;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.5);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
}

.login-error-container.hidden {
  display: none !important;
}

.error-msg-text {
  font-size: 11.5px;
  color: #ffaaaa;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.login-error-container.shake {
  animation: shakeError 0.4s ease-in-out !important;
}

/* Botón Activar */
.btn-activar {
  width: 100%;
  height: 48px;
  background: #e50914;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
  margin-bottom: 14px;
}

.btn-activar:hover,
.btn-activar.focused,
.btn-activar:focus {
  background: #ff1c28 !important;
  outline: 3px solid #00ff88 !important;
  outline-offset: 2px !important;
  transform: scale(1.03) !important;
  /* box-shadow glow removed for TV */
}

.btn-activar.disabled {
  background: #4a4a5a !important;
  color: #888888 !important;
  cursor: not-allowed !important;
  outline: none !important;
  transform: none !important;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite !important;
}

/* Contact Links */
.login-support-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: #777777;
}

.login-link {
  color: #0088cc;
  text-decoration: none;
  font-weight: 600;
}

.login-link:last-of-type {
  color: #25d366;
}

.login-link:focus,
.login-link.focused {
  outline: 2px solid #ffffff !important;
  padding: 2px 4px;
  border-radius: 4px;
}

.support-dot {
  color: #444444;
}

/* Footer Bar */
.login-footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  color: #444444;
  margin-top: 10px;
}

.footer-dot {
  color: #333333;
}

/* --- VISTA SUSCRIPCIÓN EXPIRADA --- */
.expired-view-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: radial-gradient(circle at 50% 30%, #201018 0%, #160a0f 50%, #080305 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.expired-card {
  background: linear-gradient(180deg, #24141c 0%, #1a0d14 100%);
  border: 1px solid #662233;
  border-radius: 16px;
  padding: 36px 44px;
  max-width: 540px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8);
}

.expired-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.3) 0%, transparent 70%);
  border: 1px solid rgba(229, 9, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
}

.expired-card h2 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.expired-desc {
  font-size: 13.5px;
  color: #cccccc;
  line-height: 18px;
  margin-bottom: 6px;
}

.expired-desc b {
  color: #e50914;
}

.expired-help {
  font-size: 11.5px;
  color: #888888;
  line-height: 16px;
  margin-bottom: 24px;
}

.expired-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

.expired-btn-primary {
  width: 100%;
  height: 48px;
  background: #e50914;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.expired-btn-primary:focus,
.expired-btn-primary.focused {
  background: #ff1c28 !important;
  outline: 3px solid #ffffff !important;
}

.expired-btn-secondary {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #dddddd;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.expired-btn-secondary:focus,
.expired-btn-secondary.focused {
  background: rgba(255, 255, 255, 0.2) !important;
  outline: 2px solid #ffffff !important;
}

.expired-support-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #777777;
}

.support-badge-telegram {
  background: #0088cc;
  color: #ffffff;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
}

.support-badge-telegram:focus {
  outline: 2px solid #ffffff;
}

/* --- MODAL INFO DE CUENTA --- */
.account-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 100000 !important;
  background: rgba(0, 0, 0, 0.8) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-modal-content {
  background: #181c24;
  border: 1px solid #2a3240;
  border-radius: 16px;
  padding: 24px 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.acc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.acc-modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.acc-modal-close-btn {
  background: transparent;
  border: none;
  color: #888888;
  font-size: 18px;
  cursor: pointer;
  outline: none;
  padding: 4px 8px;
}

.acc-modal-close-btn:focus,
.acc-modal-close-btn.focused {
  color: #ffffff;
  outline: 2px solid #ffffff !important;
  border-radius: 4px;
}

.acc-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.acc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.acc-label {
  font-size: 13px;
  color: #888899;
}

.acc-val {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

.acc-val.highlight-green {
  color: #00ff88;
}

.acc-val.text-muted {
  font-size: 11px;
  color: #666677;
}

.acc-btn-logout {
  width: 100%;
  height: 44px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
  border-radius: 10px;
  color: #ff6666;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.acc-btn-logout:focus,
.acc-btn-logout.focused,
.acc-btn-logout:hover {
  background: #e50914 !important;
  color: #ffffff !important;
  outline: 2px solid #ffffff !important;
}

/* Responsive adjustment for Mobile / Smaller screens */
@media (max-width: 860px) {
  .login-split-layout {
    flex-direction: column;
    gap: 20px;
  }
  .login-left-col {
    display: none; /* Emphasize login on small screens */
  }
  .login-right-col {
    max-width: 100%;
    width: 100%;
  }
  .login-view-container {
    padding: 16px;
  }
}

/* ════════════════════════════════════════════════════════════════
   SECCIONES DEL MENÚ (FILTROS, CATEGORÍAS, CURSOS, ALARMA, RADIO, ENTRENAR, NUTRICIÓN)
   ════════════════════════════════════════════════════════════════ */

.menu-section-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0d0d14;
  z-index: 50;
  overflow-y: auto;
  padding: 30px 40px;
  box-sizing: border-box;
}

.menu-section-view.hidden {
  display: none !important;
}

.menu-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-volver-section {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-badge {
  font-size: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
}

.subsection-title {
  font-size: 16px;
  font-weight: 700;
  color: #aaaacc;
  margin-bottom: 14px;
}

/* Enfoque universal D-Pad en secciones */
.nav-item-section.focused,
.nav-item-section:focus {
  outline: 3px solid #00ff88 !important;
  outline-offset: 2px !important;
  transform: scale(1.03) !important;
  /* box-shadow glow removed for TV */
  z-index: 5;
}

/* --- FILTROS --- */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.platform-card {
  background: #141420;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  outline: none;
}

.platform-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.platform-arrow {
  font-size: 12px;
  color: #8888aa;
}

.genres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.genre-card {
  background: #141420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.genre-icon {
  font-size: 26px;
}

.genre-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #e0e0ee;
}

/* --- CATEGORÍAS --- */
.categorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.cat-card {
  background: #141422;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  outline: none;
}

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

.cat-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.cat-desc {
  font-size: 12px;
  color: #8888aa;
  margin: 0;
  line-height: 15px;
}

/* --- CURSOS --- */
.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.curso-card {
  background: #141422;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  outline: none;
}

.curso-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.curso-icon {
  font-size: 28px;
}

.curso-tag {
  background: rgba(0, 217, 255, 0.15);
  color: #00d9ff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.curso-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.curso-desc {
  font-size: 12px;
  color: #8888aa;
  margin: 0 0 12px 0;
  line-height: 16px;
}

.curso-meta {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: #bbbbdd;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

/* --- ALARMA & RELOJ --- */
.alarma-view-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.big-clock-card {
  background: #141424;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px 50px;
  text-align: center;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
}

.clock-time {
  font-size: 64px;
  font-weight: 900;
  color: #00ff88;
  letter-spacing: 4px;
  font-family: monospace;
}

.clock-date {
  font-size: 16px;
  color: #ccccdd;
  margin-top: 8px;
  text-transform: capitalize;
}

.weather-pill {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.06);
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  color: #ffcc00;
}

.alarm-controls-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 800px;
}

.alarm-card {
  background: #141420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  outline: none;
}

.alarm-card .alarm-icon {
  font-size: 28px;
  margin-bottom: 6px;
  display: block;
}

.alarm-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.alarm-card p {
  font-size: 11px;
  color: #8888aa;
  margin: 0;
}

.sleep-status {
  font-size: 14px;
  color: #00ff88;
  font-weight: 700;
  margin-top: 10px;
}

/* --- RADIO ONLINE --- */
.radio-view-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.radio-player-bar {
  background: #161626;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.radio-playing-info {
  display: flex;
  align-items: center;
  gap: 18px;
}

.radio-playing-info h4 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.radio-playing-info p {
  font-size: 13px;
  color: #8888aa;
  margin: 0;
}

.btn-radio-play {
  padding: 12px 24px;
  background: #e50914;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
}

.radio-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  width: 24px;
}

.radio-equalizer span {
  width: 4px;
  height: 6px;
  background: #00ff88;
  border-radius: 2px;
}

.radio-equalizer.playing span:nth-child(1) { animation: eqBar 0.8s infinite ease-in-out; }
.radio-equalizer.playing span:nth-child(2) { animation: eqBar 1.1s infinite ease-in-out; }
.radio-equalizer.playing span:nth-child(3) { animation: eqBar 0.7s infinite ease-in-out; }
.radio-equalizer.playing span:nth-child(4) { animation: eqBar 1.3s infinite ease-in-out; }

@keyframes eqBar {
  0%, 100% { height: 4px; }
  50% { height: 22px; }
}

.radios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.radio-station-card {
  background: #141420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  outline: none;
}

.radio-station-card.active-station {
  border-color: #00ff88 !important;
  background: rgba(0, 255, 136, 0.1) !important;
}

.radio-card-freq {
  font-size: 11px;
  font-weight: 800;
  color: #00d9ff;
}

.radio-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 4px 0 2px 0;
}

.radio-card-genre {
  font-size: 11.5px;
  color: #8888aa;
}

/* --- ENTRENAR & FITNESS --- */
.workout-timer-box {
  background: #161628;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.workout-timer-display {
  font-size: 54px;
  font-weight: 900;
  color: #ff3366;
  font-family: monospace;
}

.workout-timer-state {
  font-size: 15px;
  font-weight: 700;
  color: #e50914;
  margin-top: 4px;
}

.workout-timer-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.btn-workout-ctrl {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.rutinas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.rutina-card {
  background: #141420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  outline: none;
}

.rutina-emoji {
  font-size: 28px;
}

.rutina-info h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.rutina-info p {
  font-size: 11.5px;
  color: #8888aa;
  margin: 0 0 8px 0;
  line-height: 15px;
}

.rutina-tags {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #00d9ff;
  font-weight: 600;
}

/* --- NUTRICIÓN --- */
.nutricion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.nutricion-card {
  background: #141422;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  outline: none;
}

.nutri-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.nutri-emoji {
  font-size: 28px;
}

.nutri-cal {
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 700;
}

.nutri-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.nutri-macros {
  font-size: 11.5px;
  color: #00d9ff;
  font-weight: 600;
  margin-bottom: 8px;
}

.nutri-desc {
  font-size: 12px;
  color: #8888aa;
  margin: 0;
  line-height: 16px;
}

/* Estructura del reproductor modal de peliculas */
.movie-player-container, 
#movie-player-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #000000 !important;
  z-index: 999999 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.movie-player-container iframe,
.movie-player-container video {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  object-fit: contain !important;
}
