:root {
    --red: #E50914;
    --red-hover: #f40612;
    --bg: #000000;
    --surface: #141414;
    --text: #ffffff;
    --muted: #b3b3b3;
    --dim: #808080;
    --nav-h: 68px;
    --bottom-nav-h: 62px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.screen-boot {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.screen-boot.hidden { display: none !important; }

.boot-inner { text-align: center; }

.boot-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
}

.boot-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: boot-spin 0.75s linear infinite;
}

@keyframes boot-spin {
    to { transform: rotate(360deg); }
}

.brand { color: var(--red); }

/* ===== LOGIN ===== */
#screen-login { min-height: 100vh; position: relative; }

.login-bg {
    position: fixed; inset: 0;
    background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.88)),
        url('https://picsum.photos/1920/1080?random=99') center/cover no-repeat;
    transition: opacity 1s ease;
}

.login-wrap {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-box {
    width: 100%; max-width: 450px;
    padding: 3rem 3rem 2.5rem;
    background: rgba(0,0,0,.82);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0,0,0,.5);
    backdrop-filter: blur(8px);
}

.logo-lg { font-size: 2rem; font-weight: 800; margin-bottom: 1.75rem; letter-spacing: .02em; }
.login-box h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1.75rem; }

.login-box input {
    width: 100%; padding: 1rem;
    margin-bottom: 1rem;
    background: #333; border: 1px solid rgba(255,255,255,.06); border-radius: 10px;
    color: #fff; font-size: 1rem;
    text-align: center;
    transition: border-color .2s;
}

.login-box input:focus {
    outline: none;
    border-color: rgba(229, 9, 20, .5);
}

.login-box input::placeholder { color: #8c8c8c; }

.btn-red {
    width: 100%; padding: 1rem;
    margin-top: .5rem;
    background: var(--red); border: none; border-radius: 10px;
    color: #fff; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: background .2s, transform .15s;
}

.btn-red:hover { background: var(--red-hover); transform: scale(1.01); }

.login-box .btn-red + .btn-red {
    margin-top: .65rem;
}

/* ===== PERFILES ===== */
#screen-profiles {
    min-height: 100vh;
    position: relative;
}

.profiles-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #2a1020 0%, #120810 35%, #000 100%);
}

.profiles-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 3rem;
    text-align: center;
}

.profiles-brand {
    max-width: 420px;
    margin-bottom: 2rem;
}

.profiles-shield {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    color: #fff;
    background: radial-gradient(circle at 30% 30%, rgba(229, 9, 20, .35), transparent 60%);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, .55), 0 0 32px rgba(229, 9, 20, .25);
}

.profiles-title {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 800;
    margin-bottom: .65rem;
    letter-spacing: .01em;
}

.profiles-subtitle {
    color: var(--muted);
    font-size: 1.05rem;
}

.profiles-shield.hidden { display: none; }

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
    width: 100%;
    max-width: 420px;
    justify-items: center;
    margin-top: 0.5rem;
}

.profile-card {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
    width: 100%;
    max-width: 108px;
    transition: transform .2s;
}

.profile-card:hover { transform: scale(1.05); }
.profile-card:active { transform: scale(.98); }

.profile-avatar-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #333;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

.profile-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-lock-badge {
    position: absolute;
    left: 6px;
    bottom: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.profile-lock-badge svg { width: 14px; height: 14px; }

.profile-name {
    margin-top: .55rem;
    font-size: .95rem;
    font-weight: 500;
    color: var(--muted);
    transition: color .2s;
}

.profile-card:hover .profile-name { color: #fff; }

.profiles-error {
    margin-top: 1.25rem;
    color: #ff6b6b;
    font-size: .9rem;
}

.profile-pin-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

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

.profile-pin-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(4px);
}

.profile-pin-sheet {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 2rem 1.75rem 1.75rem;
    background: rgba(20, 20, 20, .96);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .6);
}

.profile-pin-avatar {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: .85rem;
}

.profile-pin-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.profile-pin-hint {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 1.1rem;
}

.profile-pin-field {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: .75rem;
}

.profile-pin-field input {
    width: 100%;
    box-sizing: border-box;
    padding: .95rem 3.25rem .95rem 1rem;
    background: #333;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .35em;
    text-align: center;
}

.profile-pin-field input:focus {
    outline: none;
    border-color: rgba(229, 9, 20, .5);
}

.profile-pin-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.profile-pin-toggle:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.profile-pin-submit {
    margin-top: .5rem;
}

.profile-pin-cancel {
    margin-top: .85rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: .95rem;
    cursor: pointer;
    padding: .5rem;
}

.profile-pin-cancel:hover { color: #fff; }

@media (min-width: 480px) {
    .profiles-grid {
        max-width: 420px;
        gap: 1.5rem 1.25rem;
    }
    .profile-card { max-width: 120px; }
}

.quick-connect-panel {
    margin-top: 1rem;
    padding-top: .25rem;
    text-align: center;
}

.quick-connect-panel.hidden { display: none; }

.qc-label {
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: .5rem;
}

.quick-connect-code {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: .45em;
    padding-left: .45em;
    color: #fff;
    margin: .25rem 0 .75rem;
}

.qc-status {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.75rem;
    padding: .65rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .9);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.profiles-quick-connect:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .28);
}

.quick-connect-approve-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.quick-connect-approve-modal.hidden { display: none !important; }

.quick-connect-approve-sheet {
    position: relative;
    z-index: 2;
    max-width: 22rem;
}

.quick-connect-approve-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 .75rem;
    text-align: center;
}

.quick-connect-approve-hint {
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.45;
    text-align: center;
    margin: 0 0 1.25rem;
}

.qc-approve-success {
    color: #6ee7a0;
    font-size: .85rem;
    text-align: center;
    margin: 0 0 .75rem;
}

.renewal-contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

.renewal-contact-sheet {
    position: relative;
    z-index: 2;
    max-width: 22rem;
    text-align: center;
}

.renewal-contact-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 .75rem;
}

.renewal-contact-vigencia {
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.45;
    margin: 0 0 1rem;
}

.renewal-contact-label {
    color: var(--muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 .25rem;
}

.renewal-contact-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 .75rem;
}

.renewal-contact-instructions {
    color: rgba(255, 255, 255, .82);
    font-size: .85rem;
    line-height: 1.45;
    margin: 0 0 1rem;
    white-space: pre-wrap;
}

.renewal-contact-email {
    font-size: .85rem;
    margin: 0 0 1rem;
}

.renewal-contact-email a {
    color: #7eb8ff;
}

.renewal-contact-wa {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    margin-bottom: .75rem;
    box-sizing: border-box;
}

.renewal-contact-wa--inline {
    margin-top: .75rem;
}

.login-renewal-panel {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    text-align: center;
}

.login-renewal-panel.hidden { display: none !important; }

.login-renewal-panel .renewal-contact-label {
    margin-top: .5rem;
}

.qc-status {
    color: #46d369;
    font-size: .85rem;
    margin-bottom: .75rem;
}

.qc-status.is-error { color: #e87c7c; }

.btn-quick-connect-cancel {
    background: none;
    border: none;
    color: var(--muted);
    font-size: .85rem;
    cursor: pointer;
    text-decoration: underline;
}

.error { color: #e87c7c; margin-top: 1rem; font-size: .875rem; text-align: center; }

/* ===== NAVBAR (PC) ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--nav-h);
    background: var(--bg);
    transition: background .3s;
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.navbar.over-hero:not(.scrolled) {
    background: linear-gradient(180deg, rgba(0,0,0,.9) 0%, transparent 100%);
}

.navbar.scrolled { background: var(--bg); }

.navbar-inner {
    max-width: 1400px; margin: 0 auto;
    height: 100%; padding: 0 4%;
    display: flex; align-items: center; gap: 2rem;
}

.logo-sm {
    font-size: 1.35rem; font-weight: 800;
    letter-spacing: .04em; flex-shrink: 0;
    cursor: pointer;
}

.logo-sm:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
    border-radius: 4px;
}

.nav-desktop { display: flex; gap: 1.25rem; flex: 1; }

.nav-link {
    background: none; border: none;
    color: var(--muted); font-size: .875rem;
    cursor: pointer; transition: color .2s;
    padding: .25rem 0;
}

.nav-link:hover, .nav-link.active { color: var(--text); font-weight: 500; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.nav-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    max-width: min(100vw - 8rem, 22rem);
    padding: 0.55rem 0.95rem 0.55rem 1.1rem;
    border: 1px solid rgba(229, 9, 20, 0.55);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(28, 28, 28, 0.98) 0%, rgba(14, 14, 14, 0.98) 100%);
    color: #fff;
    cursor: pointer;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-account-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.28rem;
    min-width: 0;
    line-height: 1.25;
    text-align: left;
}

.nav-account-profile {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.nav-account-profile.is-empty {
    display: none;
}

.nav-account-trigger-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    padding-left: 0.85rem;
    margin-left: 0.15rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-account-trigger-icon {
    opacity: 0.92;
}

.nav-account-trigger-chevron {
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.nav-account-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(229, 9, 20, 0.85);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.45),
        0 0 18px rgba(229, 9, 20, 0.12);
}

.nav-account-trigger:active {
    transform: translateY(0);
}

.nav-account-trigger:focus-visible {
    outline: 2px solid rgba(229, 9, 20, 0.65);
    outline-offset: 2px;
}

.nav-account-menu.is-open .nav-account-trigger {
    border-color: rgba(229, 9, 20, 0.9);
    background: linear-gradient(180deg, rgba(36, 36, 36, 0.98) 0%, rgba(18, 18, 18, 0.98) 100%);
}

.nav-account-menu.is-open .nav-account-trigger-chevron {
    transform: rotate(180deg);
}

.nav-account-menu {
    position: relative;
}

.nav-account-dropdown {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0;
    min-width: 11.5rem;
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid rgba(229, 9, 20, 0.45);
    background: linear-gradient(180deg, #1f1f1f 0%, #121212 100%);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    z-index: 1200;
}

.nav-account-dropdown.hidden {
    display: none;
}

.nav-account-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-account-dropdown-item:hover,
.nav-account-dropdown-item:focus-visible {
    background: rgba(229, 9, 20, 0.18);
    outline: none;
}

.nav-account-dropdown-item--danger:hover,
.nav-account-dropdown-item--danger:focus-visible {
    background: rgba(229, 9, 20, 0.28);
    color: #ffb4b4;
}

.user-vigencia {
    font-size: .75rem;
    font-weight: 600;
    color: #46d369;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.user-vigencia.is-warning { color: #f5c518; }

.user-vigencia.is-expired { color: #e87c7c; }

.user-vigencia.hidden { display: none; }

.btn-icon {
    background: none; border: none; color: var(--text);
    cursor: pointer; padding: .35rem; opacity: .85;
}

.btn-icon:hover { opacity: 1; }

/* ===== MAIN ===== */
.main-content {
    padding-top: 0;
    padding-bottom: calc(var(--bottom-nav-h) + 1rem);
}

.main-content.below-nav {
    padding-top: var(--nav-h);
}

.main-content.below-nav .catalog-rows {
    padding-top: 0;
}

/* Películas / series: scroll de página (evita doble barra que no mueve el grid) */
body.vn-tab-movies,
body.vn-tab-series,
body.vn-tab-live,
body.vn-tab-downloads {
    overflow-x: hidden;
    overflow-y: visible;
    min-height: 100vh;
    height: auto;
}

body.vn-tab-movies #library-ribbons:not(.hidden),
body.vn-tab-series #library-ribbons:not(.hidden) {
    position: sticky;
    top: var(--nav-h);
    z-index: 40;
    background: linear-gradient(180deg, var(--bg) 82%, rgba(0, 0, 0, 0));
    padding-bottom: 0.65rem;
}

#screen-catalog:not(.hidden) {
    min-height: 100vh;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 56vw; max-height: 80vh; min-height: 280px;
    margin-bottom: -4rem;
}

.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center top;
}

.hero-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(77deg, rgba(0,0,0,.85) 25%, transparent 65%),
                linear-gradient(to top, var(--bg) 0%, transparent 50%),
                linear-gradient(to right, rgba(0,0,0,.3), transparent 40%);
}

.hero-content {
    position: absolute; bottom: 22%; left: 4%; max-width: 520px; z-index: 2;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    font-weight: 800; line-height: 1.05;
    margin-bottom: .75rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,.8);
}

.hero-meta {
    display: flex; gap: .75rem; flex-wrap: wrap;
    font-size: .875rem; color: var(--muted); margin-bottom: .75rem;
}

.hero-meta .match { color: #46d369; font-weight: 600; }
.hero-desc {
    font-size: .95rem; line-height: 1.4; color: #ddd;
    margin-bottom: 1.25rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.btn-play {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .6rem 1.75rem;
    background: #fff; color: #000; border: none; border-radius: 4px;
    font-size: 1.05rem; font-weight: 700; cursor: pointer;
    transition: transform 0.15s ease, opacity .2s;
}

.btn-play:active {
    transform: scale(0.97);
}

.btn-play:hover { opacity: .85; }

.btn-play svg { width: 24px; height: 24px; }

.btn-info {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.5rem;
    background: rgba(109,109,110,.7); color: #fff; border: none; border-radius: 4px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.btn-ripple .ripple-wave {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(229, 9, 20, 0.55) 0%,
        rgba(229, 9, 20, 0.28) 45%,
        rgba(229, 9, 20, 0) 72%
    );
    transform: scale(0);
    opacity: 1;
    animation: btn-ripple-wave 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    pointer-events: none;
    z-index: 5;
    will-change: transform, opacity;
}

@keyframes btn-ripple-wave {
    0% {
        transform: scale(0);
        opacity: 0.95;
    }
    100% {
        transform: scale(3.4);
        opacity: 0;
    }
}

.btn-info:hover { background: rgba(109,109,110,.5); }

/* ===== LIBRARY RIBBONS ===== */
.library-ribbons {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .5rem 4% 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.library-ribbons::-webkit-scrollbar {
    height: 6px;
}

.library-ribbons::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.library-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.06);
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, border-color .2s, transform .15s;
}

.library-chip:hover {
    background: rgba(255,255,255,.12);
    transform: translateY(-1px);
}

.library-chip.active {
    background: var(--red);
    border-color: var(--red);
}

.library-chip .count {
    font-size: .72rem;
    font-weight: 500;
    color: var(--muted);
    background: rgba(0,0,0,.25);
    padding: .1rem .45rem;
    border-radius: 999px;
}

.library-chip.active .count {
    color: #fff;
    background: rgba(0,0,0,.2);
}

.row-title-link {
    cursor: pointer;
    transition: color .2s;
}

.row-title-link:hover { color: var(--red); }

/* ===== ROWS / CAROUSEL ===== */
.catalog-rows { padding: 0 0 2rem; }

.row { margin-bottom: 2.5rem; }

.row-title {
    font-size: 1.25rem; font-weight: 700;
    padding: 0 4%; margin-bottom: .75rem;
}

.row-scroll {
    display: flex; gap: .5rem;
    overflow-x: auto; overflow-y: hidden;
    padding: 0 4% 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.row-scroll::-webkit-scrollbar { display: none; }

/* Top 10 Netflix style */
.row-top10 { margin-bottom: 3rem; }

.row-scroll-top10 {
    align-items: flex-end;
    padding-bottom: 1.5rem;
}

.row-carousel {
    position: relative;
}

.row-carousel-btn {
    position: absolute;
    top: 0;
    bottom: 1.5rem;
    z-index: 12;
    width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    background: transparent;
    padding: 0;
}

.row-carousel:hover .row-carousel-btn:not(:disabled) {
    opacity: 1;
}

.row-carousel-btn:disabled {
    opacity: 0 !important;
    pointer-events: none;
}

.row-carousel-prev {
    left: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 15%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
    padding-left: 0.35rem;
}

.row-carousel-next {
    right: 0;
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.92) 15%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
    padding-right: 0.35rem;
}

.row-carousel-btn svg {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
}

.row-carousel-top10 .row-carousel-btn {
    bottom: 1.5rem;
}

.top10-card {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    scroll-snap-align: start;
    position: relative;
}

.top10-num {
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 800;
    line-height: .85;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255,255,255,.35);
    margin-right: -.35rem;
    margin-bottom: .15rem;
    user-select: none;
    flex-shrink: 0;
}

.top10-card .poster-card {
    width: clamp(110px, 16vw, 200px);
    margin-left: -.25rem;
    position: relative;
    z-index: 2;
}

.top10-card:hover .poster-card {
    transform: scale(1.08);
}

/* Poster card (vertical) */
.poster-card {
    flex: 0 0 auto;
    width: clamp(120px, 18vw, 220px);
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform .25s ease, z-index 0s;
    position: relative;
}

.poster-card:hover { transform: scale(1.08); z-index: 2; }

.poster-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface);
}

.poster-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--surface);
}

.poster-card-meta {
    padding: .45rem .15rem 0;
    min-width: 0;
}

.poster-card-title {
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poster-card-rating {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-top: .2rem;
    font-size: .72rem;
    font-weight: 600;
    color: #f5c518;
}

.poster-card-rating.is-empty {
    color: var(--muted);
}

.poster-card-rating .rating-star {
    width: .85rem;
    height: .85rem;
    flex-shrink: 0;
}

.poster-card-rating .rating-value {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.poster-card-rating.is-empty .rating-value {
    color: var(--muted);
}

/* ===== LIVE TV (listas, carpetas, canales) ===== */
.live-hub {
    padding: 1.25rem 4% 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.live-section-title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.live-section-sub {
    margin: 0 0 1.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.live-playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.live-playlist-tile {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.live-playlist-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(229, 9, 20, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.live-playlist-tile-visual {
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.25) 0%, rgba(0, 0, 0, 0.2) 55%, rgba(255, 255, 255, 0.04) 100%);
}

.live-playlist-tile-visual svg {
    width: 3rem;
    height: 3rem;
    opacity: 0.9;
    color: #fff;
}

.live-playlist-tile-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.live-playlist-tile-body {
    padding: 0.85rem 1rem 1rem;
}

.live-playlist-tile-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.live-playlist-tile-count {
    font-size: 0.8rem;
    color: var(--muted);
}

.live-playlist-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1.35rem;
    padding-bottom: 0.25rem;
    border-bottom: none;
}

.live-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem 0.5rem 0.85rem;
    border: 1px solid rgba(229, 9, 20, 0.85);
    border-radius: 999px;
    background: linear-gradient(180deg, #1a1a1a 0%, #101010 100%);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(229, 9, 20, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.live-back-btn-icon {
    font-size: 1.05rem;
    line-height: 1;
    opacity: 0.95;
}

.live-back-btn:hover {
    transform: translateY(-2px);
    border-color: #ff1a1a;
    background: linear-gradient(180deg, #222 0%, #141414 100%);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.45),
        0 0 16px rgba(229, 9, 20, 0.2);
}

.live-back-btn:active {
    transform: translateY(0);
}

.live-back-btn:focus-visible {
    outline: 2px solid rgba(229, 9, 20, 0.65);
    outline-offset: 2px;
}

.live-playlist-title {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.15rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    border: 1px solid var(--red, #e50914);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.22) 0%, rgba(20, 20, 20, 0.95) 55%, #121212 100%);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    text-transform: none;
}

.live-folder-shell {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 768px) {
    .live-folder-shell {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.live-folder-nav {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 0.85rem 1rem 1rem;
    background: linear-gradient(165deg, rgba(28, 28, 28, 0.95) 0%, rgba(14, 14, 14, 0.98) 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-height: min(72vh, 560px);
    position: sticky;
    top: 5.5rem;
}

.live-folder-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
    margin-right: -0.15rem;
    flex: 1;
    min-height: 0;
}

.live-folder-list::-webkit-scrollbar {
    width: 6px;
}

.live-folder-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

.live-folder-list::-webkit-scrollbar-thumb:hover {
    background: rgba(229, 9, 20, 0.45);
}

@media (max-width: 768px) {
    .live-folder-nav {
        position: static;
        max-height: none;
        padding: 0.75rem;
    }

    .live-folder-nav:not(.live-folder-nav--sheet) .live-folder-list {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.35rem;
        scrollbar-width: none;
    }

    .live-folder-nav:not(.live-folder-nav--sheet) .live-folder-list::-webkit-scrollbar {
        display: none;
    }
}

.live-folder-nav--sheet {
    display: none;
}

@media (min-width: 769px) {
    .live-folder-shell:has(.live-folder-nav--sheet) {
        grid-template-columns: 1fr;
    }

    .live-folder-picker-btn {
        display: none !important;
    }

    .live-folder-sheet-backdrop {
        display: none !important;
    }

    .live-folder-main:has(.live-folder-picker-btn) .live-folder-current {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .live-folder-nav--sheet {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1300;
        max-height: min(88vh, 720px);
        margin: 0;
        border-radius: 18px 18px 0 0;
        transform: translateY(105%);
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
        padding: 0 0 calc(0.85rem + env(safe-area-inset-bottom, 0px));
        top: auto;
    }

    .live-folder-nav--sheet.is-open {
        transform: translateY(0);
    }

    .live-folder-nav--sheet .live-folder-nav-label {
        display: none;
    }

    .live-folder-nav--sheet .live-folder-search-wrap {
        display: block;
        padding: 0 1rem 0.5rem;
        margin: 0;
    }

    .live-folder-nav--sheet .live-folder-list {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: min(52vh, 420px);
        padding: 0 0.65rem;
        -webkit-overflow-scrolling: touch;
    }

    .live-folder-nav--sheet .live-folder-btn {
        width: 100%;
        max-width: none;
        border-radius: 10px;
        padding: 0.65rem 0.75rem;
        align-items: flex-start;
        border: 1px solid transparent;
        background: rgba(255, 255, 255, 0.03);
    }

    .live-folder-nav--sheet .live-folder-btn-name {
        -webkit-line-clamp: 2;
        font-size: 0.86rem;
    }

    .live-folder-nav--sheet .live-folder-btn-count {
        display: block;
    }

    .live-folder-nav--sheet .live-folder-btn.active {
        box-shadow: inset 3px 0 0 var(--red, #e50914);
    }
}

.live-folder-sheet-head {
    display: none;
}

@media (max-width: 768px) {
    .live-folder-nav--sheet .live-folder-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 1rem 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        margin-bottom: 0.5rem;
    }
}

.live-folder-sheet-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.live-folder-sheet-close {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.live-folder-sheet-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .live-folder-sheet-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1250;
        background: rgba(0, 0, 0, 0.72);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
    }

    .live-folder-sheet-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    body.live-folder-sheet-open {
        overflow: hidden;
    }
}

.live-folder-picker-btn {
    display: none;
}

@media (max-width: 768px) {
    .live-folder-picker-btn {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        margin: 0 0 1rem;
        padding: 0.85rem 1rem;
        border-radius: 12px;
        border: 1px solid rgba(229, 9, 20, 0.45);
        background: linear-gradient(135deg, rgba(229, 9, 20, 0.18) 0%, rgba(20, 20, 20, 0.95) 100%);
        color: #fff;
        text-align: left;
        cursor: pointer;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    }

    .live-folder-main:has(.live-folder-picker-btn) .live-folder-current {
        display: none;
    }

    .live-folder-picker-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 10px;
        background: rgba(229, 9, 20, 0.35);
        flex-shrink: 0;
    }

    .live-folder-picker-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .live-folder-picker-text {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        min-width: 0;
        flex: 1;
    }

    .live-folder-picker-label {
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: rgba(255, 255, 255, 0.5);
    }

    .live-folder-picker-name {
        font-size: 0.92rem;
        font-weight: 700;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .live-folder-picker-meta {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.45);
    }

    .live-folder-picker-chevron {
        font-size: 1.1rem;
        opacity: 0.7;
        flex-shrink: 0;
    }
}

.live-folder-nav-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 0.15rem 0.35rem;
}

@media (max-width: 768px) {
    .live-folder-nav-label {
        display: block;
        font-size: 0.65rem;
    }

    .live-folder-search-wrap {
        display: none;
    }
}

.live-folder-search-wrap {
    margin-bottom: 0.15rem;
}

.live-folder-search {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem 0.55rem 2.15rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E")
        no-repeat 0.65rem center,
        rgba(0, 0, 0, 0.35);
    color: #f5f5f5;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.live-folder-search::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.live-folder-search:focus {
    border-color: rgba(229, 9, 20, 0.55);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
}

@media (max-width: 768px) {
    .live-folder-search-wrap {
        display: none;
    }

    .live-folder-nav--sheet .live-folder-search-wrap {
        display: block;
    }
}

.live-folder-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    color: #a3a3a3;
    padding: 0.6rem 0.65rem 0.6rem 0.55rem;
    border-radius: 10px;
    font-size: inherit;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.15s ease;
    flex-shrink: 0;
    position: relative;
}

.live-folder-btn.is-hidden {
    display: none;
}

.live-folder-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
    margin-top: 0.05rem;
    transition: background 0.18s, color 0.18s;
}

.live-folder-btn-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.live-folder-btn-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.live-folder-btn-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    color: inherit;
    word-break: break-word;
}

.live-folder-btn-count {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.38);
    letter-spacing: 0.02em;
}

.live-folder-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.06);
}

.live-folder-btn:hover .live-folder-btn-icon {
    background: rgba(229, 9, 20, 0.15);
    color: #ff6b6b;
}

.live-folder-btn.active {
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.22) 0%, rgba(229, 9, 20, 0.06) 100%);
    color: #fff;
    border-color: rgba(229, 9, 20, 0.35);
    box-shadow: inset 3px 0 0 var(--red, #e50914);
}

.live-folder-btn.active .live-folder-btn-icon {
    background: rgba(229, 9, 20, 0.35);
    color: #fff;
}

.live-folder-btn.active .live-folder-btn-count {
    color: rgba(255, 200, 200, 0.75);
}

@media (max-width: 768px) {
    .live-folder-btn {
        width: auto;
        max-width: 220px;
        padding: 0.5rem 0.85rem;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.04);
        align-items: center;
    }

    .live-folder-btn-icon {
        width: 1.5rem;
        height: 1.5rem;
        margin-top: 0;
    }

    .live-folder-btn-name {
        -webkit-line-clamp: 1;
        font-size: 0.8rem;
    }

    .live-folder-btn-count {
        display: none;
    }

    .live-folder-btn.active {
        box-shadow: none;
        background: rgba(229, 9, 20, 0.25);
        border-color: rgba(229, 9, 20, 0.5);
    }
}

.live-folder-main {
    min-width: 0;
}

.live-folder-current {
    margin: 0 0 1.25rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-folder-current-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.live-folder-current-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(229, 9, 20, 0.35), rgba(80, 0, 0, 0.4));
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.25);
}

.live-folder-current-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.live-folder-current-text {
    min-width: 0;
}

.live-folder-current-title {
    margin: 0;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #fff;
    word-break: break-word;
}

.live-folder-current-meta {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
}

.live-channel-more-wrap {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
}

.live-channel-more-btn {
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
    border-color: rgba(229, 9, 20, 0.45) !important;
    color: #fff !important;
    background: rgba(229, 9, 20, 0.12) !important;
    transition: background 0.2s, transform 0.15s;
}

.live-channel-more-btn:hover:not(:disabled) {
    background: rgba(229, 9, 20, 0.28) !important;
    transform: translateY(-1px);
}

.live-channel-loading {
    padding: 0.5rem 0 1rem;
}

.live-channel-skeleton-grid {
    display: block;
    min-height: 220px;
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.1) 37%,
        rgba(255, 255, 255, 0.04) 63%
    );
    background-size: 400% 100%;
    animation: live-channel-shimmer 1.1s ease infinite;
}

@keyframes live-channel-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.live-channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.85rem 1rem;
    padding-bottom: 2rem;
}

@media (min-width: 1200px) {
    .live-channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
        gap: 1rem 1.15rem;
    }
}

.live-channel-tile {
    cursor: pointer;
    box-sizing: border-box;
    border: 1px solid var(--red, #e50914);
    border-radius: 12px;
    background: linear-gradient(180deg, #1c1c1c 0%, #121212 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.35),
        0 10px 22px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(229, 9, 20, 0.12);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
    transform: translateY(0);
}

.live-channel-tile:hover {
    transform: translateY(-5px);
    border-color: #ff1a1a;
    box-shadow:
        0 8px 12px rgba(0, 0, 0, 0.4),
        0 18px 36px rgba(0, 0, 0, 0.55),
        0 0 20px rgba(229, 9, 20, 0.22),
        0 0 0 1px rgba(229, 9, 20, 0.35);
}

.live-channel-tile:hover .live-channel-play {
    opacity: 1;
}

.live-channel-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1f1f1f;
    flex-shrink: 0;
}

.live-channel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.live-channel-thumb img.live-channel-logo {
    object-fit: contain;
    padding: 0.4rem;
    background: radial-gradient(circle at 50% 50%, #2a2a2a 0%, #121212 100%);
}

.live-channel-thumb img.live-channel-logo.is-broken {
    display: none;
}

.live-channel-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2a2a2a, #141414);
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.35);
}

.live-channel-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s;
}

.live-channel-play svg {
    width: 2.75rem;
    height: 2.75rem;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.live-channel-name {
    margin: 0;
    padding: 0.5rem 0.45rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(229, 9, 20, 0.55);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
    flex: 1;
}

.live-channel-folder {
    margin: 0;
    padding: 0 0.45rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Live card (horizontal row / home) */
.live-card {
    flex: 0 0 auto;
    width: clamp(200px, 28vw, 320px);
    scroll-snap-align: start;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .25s;
}

.live-card:hover { transform: scale(1.05); }

.live-card img {
    width: 100%; aspect-ratio: 16/9;
    object-fit: cover; display: block;
    background: var(--surface);
}

.live-badge {
    position: absolute; top: .5rem; left: .5rem;
    background: var(--red); color: #fff;
    font-size: .62rem; font-weight: 700;
    padding: .22rem .5rem; border-radius: 6px;
    letter-spacing: .06em;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.live-card-wrap { position: relative; }

.live-playlist-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    color: #fff;
}

.live-category-tabs {
    display: none;
}

.btn-text-link {
    background: none;
    border: none;
    color: #fff;
    opacity: 0.85;
    cursor: pointer;
    padding: 0.35rem 0;
    font-size: 0.9rem;
}

.btn-text-link:hover { opacity: 1; text-decoration: underline; }

.live-group-row .live-channel-grid {
    padding-bottom: 0.5rem;
}

.live-group-row {
    margin-bottom: 2rem;
}

.live-group-row .row-title {
    padding: 0 0 0.75rem;
    font-size: 1rem;
}

/* Grid mode (películas/series tab) */
.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .5rem;
    padding: 0 4% 2rem;
    min-height: 2rem;
}

.content-library-section {
    padding-bottom: 0.5rem;
}

.grid-heading {
    font-size: 1.35rem;
    font-weight: 700;
    padding: 0 4% 1rem;
}

.grid-view .poster-card {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.empty-state {
    text-align: center; color: var(--muted);
    padding: 4rem 2rem; font-size: 1rem;
}

.loading { text-align: center; padding: 3rem; color: var(--muted); }

/* ===== MODAL SERIE ===== */
.modal { position: fixed; inset: 0; z-index: 200; }

.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.7);
}

.modal-sheet {
    position: absolute;
    background: var(--surface);
    overflow-y: auto;
    max-height: 92vh;
}

.modal-close {
    position: absolute; top: 1rem; right: 1rem; z-index: 10;
    width: 36px; height: 36px;
    background: var(--bg); border: none; border-radius: 50%;
    color: #fff; font-size: 1rem; cursor: pointer;
}

.modal-hero {
    height: 200px;
    background-size: cover; background-position: center;
    position: relative;
}

.modal-hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(transparent 30%, var(--surface));
}

.modal-content { padding: 0 1.5rem 2rem; margin-top: -3rem; position: relative; z-index: 1; }

.modal-content h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: .35rem; }

.series-ep-count { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }

.season-heading {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 1.25rem 0 .5rem;
}

.btn-play-full {
    width: 100%; padding: .85rem;
    background: var(--red); border: none; border-radius: 4px;
    color: #fff; font-size: 1rem; font-weight: 700;
    cursor: pointer; margin-bottom: 1.5rem;
}

.episode-row {
    display: flex; gap: .75rem; align-items: center;
    padding: .85rem 0;
    border-bottom: 1px solid #333;
    cursor: pointer;
}

.episode-row:hover { background: rgba(255,255,255,.05); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }

.ep-num {
    font-size: 1.25rem; font-weight: 700; color: var(--dim);
    min-width: 1.5rem; text-align: center;
}

.ep-info h4 { font-size: .95rem; font-weight: 600; margin-bottom: .2rem; }
.ep-info p { font-size: .8rem; color: var(--muted); }

/* ===== PLAYER ===== */
#screen-player { background: #000; min-height: 100vh; }

.player-screen { min-height: 100vh; display: flex; flex-direction: column; }

.player-back {
    position: fixed; top: 1rem; left: 1rem; z-index: 50;
    background: rgba(0,0,0,.6); border: none; border-radius: 50%;
    width: 44px; height: 44px;
    color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.player-video-wrap {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: #000; padding: 3.5rem 0 1rem;
    position: relative;
}

.player-loading {
    position: absolute;
    inset: 3.5rem 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2;
    pointer-events: none;
    padding: 1rem;
    text-align: center;
}

.player-loading.hidden { display: none; }

.player-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--red, #e50914);
    border-radius: 50%;
    animation: player-spin 0.9s linear infinite;
}

.player-loading p {
    color: #fff;
    font-size: 0.95rem;
    max-width: 320px;
    line-height: 1.45;
}

.player-live-fail {
    position: absolute;
    inset: 3.5rem 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.88);
    z-index: 3;
    padding: 1.5rem;
    text-align: center;
}

.player-live-fail.hidden { display: none; }

.player-live-fail-emoji {
    font-size: 3rem;
    line-height: 1;
    margin: 0;
}

.player-live-fail-text {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    max-width: 280px;
    line-height: 1.45;
    margin: 0;
}

.player-live-fail-btn {
    margin-top: 0.5rem;
    min-width: 200px;
}

@keyframes player-spin {
    to { transform: rotate(360deg); }
}

#video {
    width: 100%; max-width: 1200px;
    max-height: calc(100vh - 180px);
    min-height: 220px;
    background: #000;
    object-fit: contain;
}

/* Sin menú ⋮ del navegador (evita descarga / PiP desde controles nativos) */
#video::-webkit-media-controls-overflow-button {
    display: none !important;
}

#video::-webkit-media-controls-download-button {
    display: none !important;
}

#video:not(.vn-native-controls)::-webkit-media-controls {
    display: none !important;
}

#video:not(.vn-native-controls)::-webkit-media-controls-enclosure {
    display: none !important;
}

.player-floating-controls {
    position: relative;
    right: auto;
    bottom: auto;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    pointer-events: auto;
    flex-shrink: 0;
    max-width: min(100%, 20rem);
}

.player-floating-controls.hidden {
    display: none !important;
}

.player-custom-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    padding: 0 0.65rem 0.45rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 35%, rgba(0, 0, 0, 0.92) 100%);
    pointer-events: none;
}

.player-custom-bar.hidden {
    display: none !important;
}

.player-custom-bar > * {
    pointer-events: auto;
}

.player-custom-progress-wrap {
    position: relative;
    height: 4px;
    margin: 0 0 0.5rem;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.player-custom-progress-played {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: var(--primary, #e50914);
    transition: width 0.15s linear;
}

.player-custom-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.25rem;
}

.player-custom-spacer {
    flex: 1 1 auto;
    min-width: 0.25rem;
}

.player-ctl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.player-ctl-btn:hover,
.player-ctl-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.player-ctl-time {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    min-width: 7.5rem;
}

.player-ctl-icon.hidden {
    display: none !important;
}

#video.vn-native-controls {
    /* live TV: controles nativos del navegador */
}

.player-audio-dropdown {
    position: relative;
    pointer-events: auto;
}

.player-audio-dropdown.hidden {
    display: none !important;
}

.player-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.35rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.35rem;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.player-lang-btn:hover,
.player-lang-btn:focus-visible {
    background: rgba(20, 20, 20, 0.92);
    border-color: rgba(255, 255, 255, 0.45);
    outline: none;
}

.player-lang-btn[aria-expanded='true'] {
    background: rgba(229, 9, 20, 0.88);
    border-color: rgba(229, 9, 20, 0.95);
}

.player-lang-btn__text {
    letter-spacing: 0.02em;
}

.player-lang-btn--download {
    border-color: rgba(229, 9, 20, 0.45);
}

.player-offline-sheet .player-offline-quality-label {
    display: block;
    margin: 0.75rem 0 0.35rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.player-offline-quality-select {
    width: 100%;
    margin-bottom: 0.65rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
}

.player-offline-quota {
    margin: 0 0 0.85rem;
}

.player-offline-progress {
    width: 100%;
    height: 0.55rem;
    margin: 0.75rem 0;
    accent-color: #e50914;
}

.player-offline-error {
    color: #ff6b6b;
    font-size: 0.88rem;
    margin: 0.65rem 0 0;
}

.player-offline-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 0.5rem;
}

.downloads-hub {
    padding: 0.75rem 0.85rem 1.5rem;
}

.downloads-hub-note {
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 1rem;
    max-width: 36rem;
}

.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.download-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.download-card-poster {
    width: 4.5rem;
    height: 6.5rem;
    object-fit: cover;
    border-radius: 0.35rem;
    flex-shrink: 0;
    background: #222;
}

.download-card-poster--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.35);
}

.download-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.download-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}

.download-card-meta {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.download-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.download-card-actions .btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}

.download-card-delete {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    text-decoration: underline;
    padding: 0.35rem 0.25rem;
}

.bottom-nav .bottom-item.hidden {
    display: none !important;
}

@media (max-width: 520px) {
    .player-lang-btn__text {
        font-size: 0.72rem;
    }
    .player-lang-btn {
        padding: 0.35rem 0.55rem;
        min-height: 2rem;
    }
}

.player-audio-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.45rem);
    top: auto;
    min-width: 11.5rem;
    max-width: min(16rem, 90vw);
    max-height: min(16rem, 50vh);
    overflow-y: auto;
    padding: 0.35rem 0;
    border-radius: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(18, 18, 18, 0.96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.player-audio-menu[hidden] {
    display: none !important;
}

.player-audio-menu__title {
    margin: 0;
    padding: 0.35rem 0.85rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.player-audio-menu__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: none;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.88rem;
    text-align: left;
    cursor: pointer;
}

.player-audio-menu__check {
    width: 1.1rem;
    flex-shrink: 0;
    color: var(--primary, #e50914);
    font-weight: 700;
}

.player-audio-menu__item:hover,
.player-audio-menu__item:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.player-audio-menu__item.is-active .player-audio-menu__label {
    font-weight: 600;
}

.player-info {
    padding: 1rem 4% 2rem;
    max-width: 1200px; margin: 0 auto; width: 100%;
}

.player-info h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
.player-info p { color: var(--muted); line-height: 1.5; font-size: .95rem; }

.quality-select {
    margin: .5rem 0 1rem;
    background: #333; border: 1px solid #555;
    color: #fff; padding: .4rem .75rem; border-radius: 4px;
}

/* ===== BOTTOM NAV (MÓVIL) ===== */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    height: var(--bottom-nav-h);
    background: var(--bg);
    border-top: 1px solid #222;
    justify-content: space-around; align-items: center;
}

.bottom-item {
    display: flex; flex-direction: column; align-items: center; gap: .2rem;
    background: none; border: none; color: var(--dim);
    font-size: .65rem; cursor: pointer; padding: .35rem .75rem;
}

.bottom-item.active { color: var(--text); }
.bottom-item svg { opacity: .9; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    :root {
        --nav-h: 48px;
    }

    .login-wrap { padding: 1rem; }

    .login-box {
        max-width: 300px;
        padding: 1.35rem 1.25rem 1.15rem;
        border-radius: 12px;
        background: rgba(0,0,0,.88);
    }

    .login-box .logo-lg {
        font-size: 1.35rem;
        margin-bottom: 0.85rem;
    }

    .login-box h2 {
        font-size: 1.15rem;
        margin-bottom: 1rem;
    }

    .login-box input {
        padding: 0.65rem 0.75rem;
        margin-bottom: 0.65rem;
        font-size: 0.875rem;
        border-radius: 8px;
    }

    .login-box .btn-red {
        padding: 0.7rem;
        font-size: 0.9rem;
        border-radius: 8px;
        margin-top: 0.25rem;
    }

    .login-box .error { margin-top: 0.65rem; font-size: 0.8rem; }

    .nav-desktop { display: none; }
    .nav-right {
        gap: 0.35rem;
        min-width: 0;
    }
    .nav-account-menu {
        min-width: 0;
        max-width: calc(100vw - 5.25rem);
    }
    .nav-account-trigger {
        gap: 0.4rem;
        padding: 0.28rem 0.45rem 0.28rem 0.55rem;
        border-radius: 9px;
        max-width: 100%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
    }
    .nav-account-trigger:hover {
        transform: none;
    }
    .nav-account-profile {
        font-size: 0.68rem;
        line-height: 1.15;
    }
    .nav-account-trigger-actions {
        padding-left: 0.38rem;
        margin-left: 0;
        gap: 0.12rem;
    }
    .nav-account-trigger-icon {
        width: 15px;
        height: 15px;
    }
    .nav-account-trigger-chevron {
        width: 11px;
        height: 11px;
    }
    .user-vigencia {
        font-size: 0.58rem;
        line-height: 1.15;
    }
    .nav-account-identity {
        gap: 0.1rem;
    }

    .navbar {
        height: 48px;
        background: #000 !important;
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .navbar.over-hero:not(.scrolled) {
        background: #000 !important;
    }

    .navbar-inner { padding: 0 0.65rem; gap: 0.5rem; }
    .logo-sm { font-size: 0.95rem; }

    .main-content.below-nav {
        padding-top: 48px;
    }

    .hero {
        height: auto;
        min-height: 0;
        margin-bottom: 0;
    }

    .hero.hero-mobile {
        padding: 0;
        display: block;
        background: #000;
    }

    .hero-mobile-stack {
        display: flex;
        flex-direction: column;
        background: #000;
    }

    .hero-mobile-banner-wrap {
        width: 100%;
        aspect-ratio: 16 / 10;
        max-height: 46vh;
        overflow: hidden;
        background: #0a0a0a;
    }

    .hero-mobile-banner-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 20%;
        display: block;
    }

    .hero-mobile-info {
        padding: 1rem 1rem 0.35rem;
        background: #000;
    }

    .hero-mobile-card,
    .hero-mobile-poster,
    .hero-mobile-overlay {
        display: none;
    }

    .hero.hero-desktop {
        margin-bottom: 0;
        padding: 0;
        height: auto;
        min-height: 0;
    }

    .hero.hero-desktop .hero-bg {
        position: relative;
        height: 46vw;
        min-height: 200px;
        max-height: 46vh;
    }

    .hero.hero-desktop .hero-gradient {
        display: none;
    }

    .hero.hero-desktop .hero-content {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        padding: 1rem;
        max-width: none;
    }

    .hero-mobile-title {
        font-size: 1.25rem;
        font-weight: 800;
        line-height: 1.15;
        text-align: left;
        margin-bottom: .45rem;
        text-transform: none;
        letter-spacing: .01em;
        text-shadow: none;
    }

    .hero-mobile-top10 {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: .45rem;
        font-size: .72rem;
        color: #ddd;
        margin-bottom: .75rem;
    }

    .top10-badge {
        background: var(--red);
        color: #fff;
        font-weight: 800;
        font-size: .62rem;
        padding: .15rem .35rem;
        letter-spacing: .04em;
    }

    .hero-mobile-actions {
        display: flex;
        justify-content: center;
        gap: .45rem;
        width: 100%;
    }

    .btn-play-mobile,
    .btn-list-mobile {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .4rem;
        padding: .5rem 1.25rem;
        border: none;
        border-radius: 4px;
        font-size: .82rem;
        font-weight: 700;
        cursor: pointer;
    }

    .btn-play-mobile {
        background: #fff;
        color: #000;
        width: min(78vw, 320px);
        min-width: 11.5rem;
        padding: .62rem 1.85rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
        transition: box-shadow 0.15s ease;
    }

    .btn-play-mobile:active {
        transform: none;
    }

    .btn-play-mobile svg {
        width: 18px;
        height: 18px;
    }

    .btn-list-mobile {
        background: rgba(109, 109, 110, .75);
        color: #fff;
    }

    .hero.hero-mobile + .catalog-rows {
        padding-top: 1rem;
    }

    .hero-content { bottom: 15%; left: 1rem; right: 1rem; max-width: none; }
    .hero-title { font-size: 1.5rem; text-align: center; }
    .hero-meta { justify-content: center; }
    .hero-desc { font-size: .85rem; -webkit-line-clamp: 2; text-align: center; }
    .hero-actions {
        gap: .5rem;
        justify-content: center;
    }
    .hero.hero-desktop .hero-content .btn-play {
        width: min(78vw, 320px);
        min-width: 11.5rem;
        padding: .62rem 1.85rem;
        font-size: .88rem;
    }
    .hero.hero-desktop .hero-content .btn-play svg {
        width: 18px;
        height: 18px;
    }
    .btn-play { padding: .5rem 1.25rem; font-size: .9rem; }
    .btn-info { display: none; }

    .library-ribbons { padding: .35rem 1rem .75rem; }

    .library-chip { font-size: .75rem; padding: .45rem .8rem; }

    .row-title { font-size: 1.05rem; padding: 0 1rem; }
    .row-scroll { padding: 0 1rem 1rem; gap: .35rem; }

    .row-carousel-btn {
        opacity: 0.92;
        width: 2.25rem;
    }

    .row-carousel-prev {
        padding-left: 0.15rem;
    }

    .row-carousel-next {
        padding-right: 0.15rem;
    }

    .row-scroll .poster-card { width: 110px; }
    .poster-card:hover { transform: none; }
    .poster-card-title { font-size: .68rem; }
    .poster-card-rating { font-size: .65rem; }
    .poster-card-rating .rating-star { width: .75rem; height: .75rem; }

    .live-card { width: 180px; }

    .live-hub {
        padding: 1rem 1rem 2.5rem;
    }

    .live-channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem 0.5rem;
    }

    .live-section-title {
        font-size: 1.35rem;
    }

    .live-playlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .live-playlist-tile:hover {
        transform: none;
    }

    .live-playlist-tile-body {
        padding: 0.55rem 0.6rem 0.7rem;
    }

    .live-playlist-tile-name {
        font-size: 0.82rem;
    }

    .live-playlist-tile-count {
        font-size: 0.68rem;
    }

    .live-playlist-tile-visual svg {
        width: 2rem;
        height: 2rem;
    }

    .live-playlist-tile-badge {
        top: 0.45rem;
        left: 0.45rem;
        font-size: 0.52rem;
        padding: 0.18rem 0.35rem;
    }

    .grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: .75rem 1rem 2rem;
        gap: .65rem .5rem;
        align-items: start;
    }

    .grid-view .poster-card-img {
        border-radius: 10px;
    }

    .grid-view .poster-card--movie .poster-card-img {
        border: 2.5px solid #f5c518;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    }

    .grid-view .poster-card--series .poster-card-img {
        border: 2.5px solid #3b9cff;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    }

    .grid-view .poster-card-meta {
        padding-top: .4rem;
        flex: 1;
    }

    .main-content { padding-bottom: calc(var(--bottom-nav-h) + .5rem); }

    .bottom-nav { display: flex; }

    .modal-sheet {
        bottom: 0; left: 0; right: 0;
        border-radius: 12px 12px 0 0;
        max-height: 88vh;
    }

    .player-video-wrap { padding: 2.5rem 0 0; }
    #video { max-height: calc(100vh - 140px); }

    .player-custom-bar {
        padding: 0 0.35rem 0.35rem;
    }

    .player-lang-btn {
        min-height: 2rem;
        padding: 0.28rem 0.5rem;
        font-size: 0.7rem;
    }

    .player-ctl-time {
        font-size: 0.72rem;
        min-width: 6.5rem;
    }

    #video:fullscreen,
    #video:-webkit-full-screen {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        max-width: 100vw;
        object-fit: contain;
        background: #000;
    }

    .player-video-wrap:fullscreen,
    .player-video-wrap:-webkit-full-screen {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        padding: 0;
        background: #000;
    }

    .player-video-wrap:fullscreen #video,
    .player-video-wrap:-webkit-full-screen #video {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
    }
    .player-info { padding: .75rem 1rem 1.5rem; }
    .player-info h1 { font-size: 1.15rem; }
}

@media (min-width: 769px) {
    .main-content { padding-bottom: 2rem; }

    .modal-sheet {
        top: 50%; left: 50%; transform: translate(-50%, -50%);
        width: 90%; max-width: 680px;
        border-radius: 8px;
    }

    .modal-hero { height: 280px; border-radius: 8px 8px 0 0; }
}

@media (min-width: 1200px) {
    .hero { max-height: 85vh; }
}

/* ===== PWA (standalone, offline, actualización) ===== */
html.vn-standalone body {
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

html.vn-pwa-boot .screen-boot {
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #000 70%);
}

.pwa-offline-bar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2500;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    padding: 0.55rem 1rem;
    padding-top: calc(0.55rem + env(safe-area-inset-top));
    font-size: 0.82rem;
    text-align: center;
    line-height: 1.35;
    background: #3d2200;
    color: #fff;
}

.pwa-resume-sheet {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.pwa-resume-inner {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: 12px;
    padding: 1.25rem 1rem 1rem;
    text-align: center;
}

.pwa-resume-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.pwa-resume-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
