/* ==========================================================================
   BETTIX TV 4K - ULTRA PREMIUM CINEMA THEME
   ========================================================================== */

:root {
    --bg-main: #07090e;
    --bg-surface: #0e121b;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-hover: rgba(28, 38, 58, 0.9);
    --bg-glass: rgba(15, 23, 42, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-cyan: rgba(0, 229, 255, 0.3);
    
    --primary: #00e5ff;
    --primary-glow: rgba(0, 229, 255, 0.35);
    --primary-dark: #00b4d8;
    --accent: #ff007f;
    --gold: #ffd166;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-cinema: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 229, 255, 0.1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 72px;
    padding: 0 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(8, 11, 19, 0.75);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid rgba(0, 229, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-header.scrolled {
    background: rgba(6, 8, 14, 0.95);
    border-bottom: 1px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}
.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #0b1329, #102a45);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    box-shadow: 0 0 15px var(--primary-glow);
    transition: var(--transition-fast);
}
.brand-logo:hover .brand-icon {
    transform: scale(1.05);
    box-shadow: 0 0 22px var(--primary);
}
.brand-text {
    display: flex;
    flex-direction: column;
}
.brand-main {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    line-height: 1.1;
}
.brand-sub {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}
.nav-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.nav-btn i {
    font-size: 0.9rem;
}
.nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}
.nav-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.22) 0%, rgba(139, 92, 246, 0.18) 100%);
    border: 1px solid rgba(0, 229, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

/* Header Right: Search & Badges */
.search-box {
    position: relative;
    width: 280px;
    display: flex;
    align-items: center;
}
.search-box .search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    padding: 9px 36px 9px 38px;
    border-radius: 30px;
    color: #fff;
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition-fast);
}
.search-box input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    width: 320px;
}
.btn-clear {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
}

.vip-badge {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.2), rgba(255, 107, 107, 0.2));
    border: 1px solid rgba(255, 209, 102, 0.5);
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.2);
}

.btn-account {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}
.btn-account:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

/* ==========================================================================
   MAIN CONTENT & TABS
   ========================================================================== */
.app-main {
    flex: 1;
    position: relative;
}

.content-section {
    display: none;
    padding: 24px 32px 48px;
    animation: fadeIn 0.3s ease;
}
.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   LIVE TV SUITE
   ========================================================================== */
.live-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    min-height: calc(100vh - 120px);
}

/* Left Sidebar Categories */
.live-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px 14px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 96px;
}
.sidebar-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 14px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cat-item {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-fast);
}
.cat-item i {
    width: 20px;
    color: var(--text-dim);
    transition: var(--transition-fast);
}
.cat-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.cat-item:hover i {
    color: var(--primary);
}
.cat-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.18), transparent);
    border-left: 3px solid var(--primary);
    font-weight: 600;
}
.cat-item.active i {
    color: var(--primary);
}
.cat-item .badge {
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--text-dim);
}

/* Center Player & Channel Explorer */
.live-player-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cinema Player Wrapper */
.player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 600px;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-cinema);
}
.player-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Player Overlay UI */
.player-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 25%, transparent 65%, rgba(0, 0, 0, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
}

.player-wrapper:hover .player-overlay,
.player-wrapper.paused .player-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* User idle in fullscreen or normal mode -> auto-hide all bars & cursor */
.player-wrapper.user-idle:not(.paused) {
    cursor: none;
}

.player-wrapper.user-idle:not(.paused) .player-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Center play/pause icon: only visible when paused */
.player-wrapper:not(.paused) .overlay-center {
    opacity: 0;
    pointer-events: none;
}
.player-wrapper.paused .overlay-center {
    opacity: 1;
    pointer-events: auto;
}

.overlay-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.now-playing-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.live-tag {
    color: #ff334b;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.live-tag i {
    font-size: 0.55rem;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}
.now-playing-info h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.now-playing-cat {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.quality-badge {
    background: rgba(0, 229, 255, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 0 10px var(--primary-glow);
}

.overlay-center {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.play-icon-big {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.5);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-fast);
}
.overlay-center:hover .play-icon-big {
    transform: scale(1.15);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
}

.overlay-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ctrl-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-fast);
}
.ctrl-btn:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-glow);
}

.volume-slider-box {
    width: 90px;
}
.volume-slider-box input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

.live-indicator {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 51, 75, 0.25);
    border: 1px solid #ff334b;
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.live-indicator .pulse {
    color: #ff334b;
    font-size: 0.5rem;
}

/* Resolution Dropdown */
.dropdown {
    position: relative;
}
.btn-dropdown {
    width: auto;
    padding: 0 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 8px;
}
.dropdown-menu {
    display: none;
    position: absolute;
    bottom: 50px;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 6px;
    min-width: 150px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
}
.dropdown.active .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dropdown-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}
.dropdown-item:hover, .dropdown-item.active {
    color: #fff;
    background: rgba(0, 229, 255, 0.15);
    font-weight: 600;
}

/* Player Loader */
.player-loader {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 20;
}
.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 229, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Channel Browser & Grid */
.channel-browser {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.browser-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.browser-header-left h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}
.browser-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-filter-active {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-dim);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}
.btn-filter-active:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.btn-filter-active.active {
    background: rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.4);
    color: #00e676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}
.btn-refresh-sources {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-dim);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-refresh-sources:hover {
    background: rgba(0, 229, 255, 0.15);
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(45deg);
}
.btn-refresh-sources.spinning {
    animation: spin 1s linear infinite;
}
.channel-counter {
    font-size: 0.85rem;
    color: var(--text-dim);
}

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

/* Channel Card */
.channel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}
.channel-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-cyan);
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.15);
}
.channel-card.active {
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.12);
    box-shadow: 0 0 20px var(--primary-glow);
}
.channel-logo-wrap {
    width: 68px;
    height: 68px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.channel-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.channel-name {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}
.channel-category-tag {
    font-size: 0.72rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.badge-mirror {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 229, 255, 0.15);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.badge-live-viewers {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ff5252;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}
.badge-live-viewers i {
    color: #ff5252;
    font-size: 0.6rem;
}
.badge-status-online {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: #00e676;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.badge-status-online i {
    font-size: 0.4rem;
}
.live-viewers-badge {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 82, 82, 0.4);
    color: #ff5252;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.movie-views-tag {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #ffb74d;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 183, 77, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.vod-views-pill {
    background: rgba(255, 112, 67, 0.15);
    border: 1px solid rgba(255, 112, 67, 0.4);
    color: #ff7043;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-fav:hover, .btn-fav.active {
    color: var(--accent);
    transform: scale(1.2);
}

/* ==========================================================================
   VOD HERO & RAILS
   ========================================================================== */
.vod-hero {
    position: relative;
    height: 520px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 44px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 229, 255, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}
.vod-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 25%;
    filter: brightness(0.72) saturate(1.15);
    transition: background-image 0.6s ease-in-out;
}
.vod-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(6, 8, 14, 0.98) 0%, rgba(6, 8, 14, 0.82) 45%, rgba(6, 8, 14, 0.2) 75%, transparent 100%),
                linear-gradient(0deg, rgba(6, 8, 14, 1) 0%, rgba(6, 8, 14, 0.3) 30%, transparent 60%);
    z-index: 1;
}
.vod-hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 0 52px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeIn 0.4s ease-out;
}
.hero-top-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.hero-badge-top10 {
    background: linear-gradient(135deg, #ff007f 0%, #ff5252 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
    display: flex;
    align-items: center;
    gap: 6px;
}
.hero-platform-tag {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 4px 10px;
    border-radius: 6px;
}
.hero-rating-badge {
    background: rgba(255, 193, 7, 0.18);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffc107;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.08;
    color: #fff;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.95);
}
.hero-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.hero-meta-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.hero-meta-pill.quality-4k {
    color: var(--primary);
    border-color: var(--border-cyan);
    background: rgba(0, 229, 255, 0.1);
}
.hero-desc {
    font-size: 0.96rem;
    color: #b0bec5;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}
.btn-hero-play {
    background: linear-gradient(135deg, var(--primary) 0%, #00b0ff 100%);
    color: #000;
    border: none;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 30px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-hero-play:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 0 35px var(--primary);
}
.btn-hero-info {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px 26px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-hero-info:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #fff;
    transform: translateY(-2px);
}
.hero-carousel-nav {
    position: absolute;
    bottom: 24px;
    right: 36px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
.hero-dot.active {
    width: 28px;
    border-radius: 6px;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* VOD Rails & Movie Cards (Netflix Style Micro-Expansion) */
.vod-rail {
    margin-bottom: 40px;
}
.rail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.rail-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}
.rail-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 22px;
}

.movie-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.movie-card:hover {
    transform: translateY(-10px) scale(1.04);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 229, 255, 0.3);
    z-index: 10;
}
.movie-poster-box {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #0d111a;
    overflow: hidden;
}
.movie-poster-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.movie-card:hover .movie-poster-box img {
    transform: scale(1.1);
}
.movie-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7, 9, 14, 0.95) 0%, rgba(7, 9, 14, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.movie-card:hover .movie-hover-overlay {
    opacity: 1;
}
.btn-quick-play-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(0.85);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.movie-card:hover .btn-quick-play-circle {
    transform: scale(1.05);
}
.movie-badge-top {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    z-index: 2;
}
.movie-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.4) 100%);
}
.movie-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}
.movie-meta-sub {
    font-size: 0.78rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

/* ==========================================================================
   BUTTONS & COMMON UI
   ========================================================================== */
.btn-primary {
    background: var(--primary);
    color: #050b14;
    border: none;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: var(--transition-fast);
}
.btn-primary:hover {
    background: #fff;
    transform: scale(1.04);
    box-shadow: 0 6px 25px rgba(0, 229, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--border-glass);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}
.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-cyan);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px var(--primary-glow);
    position: relative;
    max-width: 500px;
    width: 100%;
    padding: 36px;
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

/* VOD Modal Card */
.vod-modal-card {
    max-width: 860px;
    max-height: 88vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
    scrollbar-width: thin;
}
.vod-modal-card::-webkit-scrollbar {
    width: 6px;
}
.vod-modal-card::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.35);
    border-radius: 4px;
}
.vod-modal-content {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
}
.vod-modal-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-glass);
}
.vod-modal-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vod-modal-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.vod-modal-info h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
}
.vod-modal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--text-dim);
}
.badge-accent {
    background: rgba(0, 229, 255, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.vod-synopsis {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.resolution-selector-box {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.resolution-selector-box h4 {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.resolution-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.res-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}
.res-pill:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.15);
}
.res-pill.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.season-episode-controls {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}
.select-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.select-group label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
}
.vod-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}
.vod-select:focus {
    border-color: var(--primary);
}
.vod-select option {
    background: #0e1420;
    color: #fff;
}

.vod-modal-actions {
    display: flex;
    gap: 14px;
    margin-top: 14px;
}

/* ==========================================================================
   CINEMA PLAYER MODAL (STREAMBERT EMBED ENGINE)
   ========================================================================== */
.cinema-modal-card {
    max-width: 1100px;
    width: 95vw;
    height: 85vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cinema-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 12px;
}
.cinema-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cinema-title-box h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}
.cinema-servers-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cinema-server-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}
.cinema-server-btn:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.15);
}
.cinema-server-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}
.cinema-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cinema-close {
    position: static;
}
.cinema-frame-wrapper {
    flex: 1;
    width: 100%;
    min-height: 0; /* Allow flex shrink properly */
    background: #000;
    border-radius: var(--radius-md);
    overflow: visible; /* Don't clip player controls */
    position: relative;
    border: 1px solid rgba(0, 229, 255, 0.2);
}
.cinema-frame-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    display: block;
    border-radius: var(--radius-md);
}
/* Native Video Player in Cinema Modal */
.cinema-frame-wrapper video {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: #000;
    border-radius: var(--radius-md);
    display: block;
}
.cinema-frame-wrapper video::-webkit-media-controls {
    z-index: 100;
}
/* Fullscreen button for iframe providers */
.cinema-fullscreen-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}
.cinema-fullscreen-btn:hover {
    background: rgba(0, 229, 255, 0.3);
    border-color: var(--accent);
    transform: scale(1.1);
}
/* Fullscreen state */
.cinema-frame-wrapper:fullscreen,
.cinema-frame-wrapper:-webkit-full-screen {
    border-radius: 0;
    border: none;
}
.cinema-frame-wrapper:fullscreen iframe,
.cinema-frame-wrapper:-webkit-full-screen iframe {
    border-radius: 0;
    min-height: 100vh;
}
.cinema-frame-wrapper:fullscreen .cinema-fullscreen-btn,
.cinema-frame-wrapper:-webkit-full-screen .cinema-fullscreen-btn {
    bottom: 24px;
    right: 24px;
}
.cinema-quality {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 20;
}
.quality-btn {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}
.quality-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.15);
}
.quality-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* Subtitle Selector */
.cinema-subtitles {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
}
.subtitle-toggle-btn {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 5px;
}
.subtitle-toggle-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.15);
}
.subtitle-toggle-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}
.subtitle-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.subtitle-option {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.subtitle-option:hover {
    background: rgba(0, 229, 255, 0.15);
    color: #fff;
}
.subtitle-option.active {
    background: var(--primary);
    color: #000;
    font-weight: 700;
}

/* Audio Language Selector */
.cinema-audio {
    position: absolute;
    top: 12px;
    left: 100px;
    z-index: 20;
}
.cinema-subtitles.hidden ~ .cinema-audio {
    left: 12px;
}
.audio-toggle-btn {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 5px;
}
.audio-toggle-btn:hover {
    border-color: var(--gold);
    background: rgba(255, 209, 102, 0.15);
}
.audio-toggle-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}
.audio-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.audio-option {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.audio-option:hover {
    background: rgba(255, 209, 102, 0.15);
    color: #fff;
}
.audio-option.active {
    background: var(--gold);
    color: #000;
    font-weight: 700;
}

/* Login Modal */
.login-header {
    text-align: center;
    margin-bottom: 24px;
}
.brand-logo.centered {
    justify-content: center;
    margin-bottom: 16px;
}
.login-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 6px;
}
.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.input-group input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}
.input-group input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px var(--primary-glow);
}
.login-alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: rgba(255, 51, 75, 0.15);
    border: 1px solid #ff334b;
    color: #ff6b7d;
}
.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ==========================================================================
   GLOBAL SEARCH DROPDOWN & GENRE FILTER CHIPS
   ========================================================================== */
.search-box-wrapper {
    position: relative;
}
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 460px;
    max-height: 540px;
    background: rgba(11, 15, 25, 0.97);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 229, 255, 0.15);
    z-index: 1000;
    overflow-y: auto;
    animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.search-results-inner {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.search-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.search-group-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}
.search-result-item:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.3);
    transform: translateX(4px);
}
.search-item-thumb {
    width: 44px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    background: #111;
    flex-shrink: 0;
}
.search-item-thumb.channel-thumb {
    height: 44px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
}
.search-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.search-item-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.search-item-badge {
    background: rgba(0, 229, 255, 0.15);
    color: var(--primary);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-weight: 700;
}
.search-empty-state {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.search-empty-state i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--primary);
}

/* VOD Genre Filter Chips */
.vod-genre-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0 20px 0;
    margin-bottom: 10px;
    scrollbar-width: none;
}
.vod-genre-filter-bar::-webkit-scrollbar {
    display: none;
}
.genre-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.genre-chip:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}
.genre-chip.active {
    background: linear-gradient(135deg, var(--primary) 0%, #00b4d8 100%);
    border-color: transparent;
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-2px);
}

/* Enhanced Glow for VOD Movie/Series Cards */
.movie-card, .vod-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
    border: 1px solid var(--border-glass);
}
.movie-card:hover, .vod-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 229, 255, 0.25);
    z-index: 10;
}

/* ==========================================================================
   PRO FEATURES: CONTINUE WATCHING, IN-PLAYER EPISODES, AUTO-NEXT & EPG
   ========================================================================== */

/* 1. Continue Watching Rail */
.continue-watching-rail {
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.btn-clear-history {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-clear-history:hover {
    color: #ff334b;
    border-color: #ff334b;
    background: rgba(255, 51, 75, 0.1);
}
.continue-watching-card {
    position: relative;
}
.card-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 5;
}
.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #00e676 100%);
    box-shadow: 0 0 8px var(--primary-glow);
    border-radius: 0 2px 2px 0;
}
.time-remaining-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 5;
}

/* 2. In-Player Episode Controls */
.cinema-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cinema-ctrl-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}
.cinema-ctrl-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
.cinema-next-ep-btn {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(0, 229, 255, 0.4);
    color: var(--primary);
}
/* Netflix / Apple TV Style Episodes Side Drawer */
.cinema-episodes-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 90%;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-cyan);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.92);
    z-index: 150;
    display: flex;
    flex-direction: column;
    animation: slideInDrawer 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.episodes-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.episodes-drawer-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.episodes-drawer-title-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.btn-close-episodes {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-close-episodes:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.08);
}

.episodes-drawer-season-bar {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    background: rgba(0, 0, 0, 0.3);
}

.episodes-drawer-season-bar::-webkit-scrollbar {
    height: 4px;
}
.episodes-drawer-season-bar::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 4px;
}

.season-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.season-tab-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    color: #fff;
    border-color: var(--border-cyan);
}

.season-tab-btn.active {
    background: var(--primary);
    color: #000;
    font-weight: 700;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.episodes-drawer-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
}

.episodes-drawer-list::-webkit-scrollbar {
    width: 5px;
}
.episodes-drawer-list::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 4px;
}

.drawer-ep-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.drawer-ep-card:hover {
    background: rgba(0, 229, 255, 0.12);
    border-color: var(--border-cyan);
    transform: translateX(-4px);
}

.drawer-ep-card.active {
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.drawer-ep-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dim);
    min-width: 28px;
    text-align: center;
}

.drawer-ep-card.active .drawer-ep-num {
    color: var(--primary);
}

.drawer-ep-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.drawer-ep-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-ep-meta {
    font-size: 0.72rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-ep-badge-playing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.72rem;
}

/* 3. Auto-Next Overlay with Countdown */
.cinema-next-overlay {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 50;
    animation: fadeInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
.next-overlay-card {
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-cyan);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 229, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 280px;
    text-align: center;
}
.next-badge {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
}
.next-countdown-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}
.next-overlay-card h4 {
    font-size: 0.95rem;
    color: #fff;
    margin: 0;
}
.next-overlay-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}
.next-overlay-actions button {
    flex: 1;
    padding: 8px;
    font-size: 0.8rem;
}

/* 4. Player Toast Notification */
.cinema-toast {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 15, 25, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 60;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px var(--primary-glow);
    animation: toastPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cinema-toast i {
    color: var(--primary);
}
@keyframes toastPop {
    from { opacity: 0; transform: translate(-50%, -15px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 5. Live TV EPG Program Schedule */
.channel-epg-box {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.channel-epg-title {
    font-size: 0.72rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}
.channel-epg-title i {
    color: #00e676;
    font-size: 0.4rem;
}
}
.channel-epg-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}
.channel-epg-fill {
    height: 100%;
    background: linear-gradient(90deg, #00e676 0%, var(--primary) 100%);
    border-radius: 2px;
}

/* 6. Header Shortcuts Button */
.btn-shortcuts-header {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-dim);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.95rem;
}
.btn-shortcuts-header:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-2px);
}

/* 7. Floating Mini-Player Dock (PiP Mode) */
.floating-mini-player {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 340px;
    background: rgba(11, 15, 25, 0.94);
    backdrop-filter: blur(25px);
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    border-radius: 16px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 240, 255, 0.25);
    animation: miniPlayerSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}
.floating-mini-player:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 35px var(--primary-glow);
    transform: scale(1.02);
}
@keyframes miniPlayerSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.mini-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(6, 8, 14, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mini-player-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 190px;
    overflow: hidden;
}
.mini-player-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mini-player-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-player-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn-mini-action {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-dim);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.btn-mini-action:hover {
    background: var(--primary);
    color: #06080e;
}
.mini-player-body {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}
.mini-player-body video,
.mini-player-body iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 8. Keyboard Shortcuts Modal */
.shortcuts-modal-card {
    max-width: 520px;
    padding: 30px;
    text-align: center;
}
.shortcuts-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.shortcuts-header p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: left;
}
.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #e2e8f0;
}
.key-badge {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: var(--primary);
    font-family: monospace;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    min-width: 32px;
    text-align: center;
}

/* 9. Volume & Status HUD Overlay */
.volume-hud {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(11, 15, 25, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary);
    border-radius: 30px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px var(--primary-glow);
    animation: hudPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.volume-hud i {
    color: var(--primary);
    font-size: 1rem;
}
.volume-hud-bar {
    width: 90px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}
.volume-hud-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f0ff, #7928ca);
    border-radius: 3px;
    transition: width 0.15s ease;
}
#volumeHudPercent {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    min-width: 38px;
}
@keyframes hudPop {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 10. Smart TV / D-Pad Remote Focus Glow */
.dpad-focused,
.nav-btn:focus-visible,
.channel-card:focus-visible,
.movie-card:focus-visible,
.cat-item:focus-visible,
.ctrl-btn:focus-visible {
    outline: 2.5px solid var(--primary) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 20px var(--primary-glow) !important;
    transform: scale(1.04) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* 11. Cinema Speed Control */
.cinema-speed-control {
    position: relative;
}
.cinema-speed-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 70;
    min-width: 130px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.2s ease;
}
.speed-option {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.speed-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.speed-option.active {
    background: rgba(0, 240, 255, 0.18);
    color: var(--primary);
    font-weight: 700;
}

/* 13. Ambient Glow Effect */
.ambient-glow-canvas {
    position: absolute;
    top: -8%;
    left: -8%;
    width: 116%;
    height: 116%;
    pointer-events: none;
    z-index: 0;
    filter: blur(55px) brightness(1.35) saturate(1.45);
    opacity: 0.6;
    transition: opacity 0.5s ease;
}
.ambient-glow-canvas.ambient-off {
    opacity: 0 !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .live-layout {
        grid-template-columns: 1fr;
    }
    .live-sidebar {
        position: static;
        max-height: none;
    }
    .vod-modal-content {
        grid-template-columns: 1fr;
    }
    .vod-modal-poster {
        max-height: 250px;
    }
    .search-results-dropdown {
        width: 90vw;
        right: -40px;
    }
    .cinema-next-overlay {
        bottom: 20px;
        right: 20px;
    }
    .floating-mini-player {
        width: 280px;
        bottom: 16px;
        right: 16px;
    }
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
}

/* 14. Multi-Criteria Filter Bar (ZonaLatam / Netflix style) */
.vod-filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(13, 17, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin: 20px 0 10px 0;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.vod-filter-top-row {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.vod-filter-top-row::-webkit-scrollbar {
    height: 4px;
}
.vod-filter-top-row::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 4px;
}

.vod-filter-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.filter-control-item:hover,
.filter-control-item:focus-within {
    border-color: rgba(0, 229, 255, 0.4);
    background: rgba(0, 229, 255, 0.06);
}

.filter-control-item label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-control-item label i {
    color: var(--primary);
}

.vod-filter-select {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
}

.vod-filter-select option {
    background: #111622;
    color: #fff;
    padding: 8px;
}

.btn-reset-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-left: auto;
}

.btn-reset-filters:hover {
    background: rgba(255, 51, 75, 0.15);
    color: #ff334b;
    border-color: rgba(255, 51, 75, 0.4);
    transform: translateY(-1px);
}

.filter-results-counter {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(0, 229, 255, 0.1);
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 229, 255, 0.25);
    white-space: nowrap;
}

/* 15. Enriched Details: Rating Badge, Gallery & Cast */
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, rgba(255, 180, 0, 0.25), rgba(255, 120, 0, 0.15));
    border: 1px solid rgba(255, 180, 0, 0.5);
    color: #ffc107;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(255, 193, 7, 0.2);
}

.vod-modal-extra {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

.vod-gallery-box,
.vod-cast-box {
    width: 100%;
    overflow: hidden;
}

.vod-gallery-box h4,
.vod-cast-box h4 {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.vod-gallery-box h4 i,
.vod-cast-box h4 i {
    color: var(--primary);
}

.vod-gallery-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    width: 100%;
    scrollbar-width: thin;
}
.vod-gallery-grid::-webkit-scrollbar {
    height: 5px;
}
.vod-gallery-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.35);
    border-radius: 4px;
}

.gallery-thumb {
    flex: 0 0 160px;
    width: 160px;
    height: 90px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.25s ease;
    background: #0d1117;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumb:hover {
    border-color: var(--primary);
    transform: scale(1.04);
    box-shadow: 0 6px 16px rgba(0, 229, 255, 0.3);
}

.gallery-thumb:hover img {
    transform: scale(1.08);
}

.vod-cast-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    width: 100%;
    scrollbar-width: thin;
}
.vod-cast-row::-webkit-scrollbar {
    height: 5px;
}
.vod-cast-row::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.35);
    border-radius: 4px;
}

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 76px;
    flex-shrink: 0;
    gap: 5px;
}

.cast-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 229, 255, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    background: #1a1e29;
}

.cast-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cast-character {
    font-size: 0.65rem;
    color: var(--text-dim);
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 16. Smart TV / D-Pad Remote Spatial Navigation Focus */
.spatial-focus,
[data-focusable="true"]:focus-visible,
button:focus-visible,
select:focus-visible,
.channel-card:focus-visible,
.vod-card:focus-visible {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.8), 0 8px 24px rgba(0, 229, 255, 0.45) !important;
    transform: scale(1.04) translateY(-2px) !important;
    z-index: 50 !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.channel-card.spatial-focus,
.vod-card.spatial-focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.9), 0 12px 30px rgba(0, 229, 255, 0.55) !important;
    transform: scale(1.05) translateY(-4px) !important;
}

.nav-item.spatial-focus {
    background: rgba(0, 229, 255, 0.25) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   17. MASTER MOBILE-FIRST DESIGN SYSTEM (Smartphones & Tablets)
   Clean 2-Row Header, Apple TV Hero, Netflix Rails & Glassmorphic Bottom Nav
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Default Desktop Elements */
.mobile-bottom-nav {
    display: none;
}
.btn-mobile-search {
    display: none;
}
.mobile-nav-strip {
    display: none;
}
.mobile-live-categories {
    display: none;
}
.header-main-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ─── Tablet Breakpoint (<= 1024px) ─── */
@media (max-width: 1024px) {
    .live-layout {
        grid-template-columns: 220px 1fr;
        gap: 16px;
    }
    .vod-hero {
        min-height: 380px;
        max-height: 460px;
    }
    .vod-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}

/* ─── Mobile Smartphone Breakpoint (<= 768px) ─── */
@media (max-width: 768px) {
    /* 1. Base Layout & Content Viewport */
    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .app-main {
        padding: 0 0 76px 0 !important; /* Space for Bottom Nav Bar */
    }

    /* 2. Top App Header — 2-Row Architecture (Zero Collision) */
    .app-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        height: auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        background: rgba(9, 13, 21, 0.96);
        backdrop-filter: blur(28px);
        -webkit-backdrop-filter: blur(28px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

    /* Row 1: Brand Logo + Actions */
    .header-main-row {
        height: 52px;
        padding: 0 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }

    .brand-logo {
        gap: 8px;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .brand-main {
        font-size: 1.15rem;
        letter-spacing: 0.5px;
    }

    .brand-sub {
        font-size: 0.65rem;
    }

    /* Hide desktop nav inside row 1 */
    .desktop-nav-links {
        display: none !important;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .btn-mobile-search {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .btn-mobile-search:active {
        transform: scale(0.92);
        background: rgba(0, 229, 255, 0.2);
        color: var(--primary);
    }

    .btn-shortcuts-header,
    .vip-badge {
        display: none !important;
    }

    .btn-account {
        padding: 5px 8px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
    }

    .btn-account span {
        display: none;
    }

    /* Expandable Search Bar on Mobile */
    .search-box-wrapper {
        display: none;
        width: 100%;
        padding: 6px 14px 10px;
        background: rgba(9, 13, 21, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .search-box-wrapper.mobile-open {
        display: block;
        animation: searchSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .search-box {
        width: 100%;
        height: 38px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(0, 229, 255, 0.35);
        border-radius: 10px;
    }

    /* Row 2: Mobile Swipeable Category Strip */
    .mobile-nav-strip {
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 12px 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
    }

    .mobile-nav-strip::-webkit-scrollbar {
        display: none;
    }

    .mobile-nav-pill {
        padding: 5px 12px;
        font-size: 0.8rem;
        font-weight: 600;
        border-radius: 16px;
        background: transparent;
        color: var(--text-muted);
        border: 1px solid transparent;
        flex-shrink: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 5px;
        transition: all 0.2s ease;
    }

    .mobile-nav-pill.active {
        background: rgba(0, 229, 255, 0.15);
        color: var(--primary);
        border-color: rgba(0, 229, 255, 0.35);
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
    }

    /* 3. Hero Carousel Mobile (Clean Apple TV+ Style) */
    .vod-hero {
        margin: 10px 12px 16px;
        border-radius: 16px;
        min-height: 320px;
        max-height: 360px;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
        position: relative;
    }

    .vod-hero-overlay {
        background: linear-gradient(180deg, rgba(9, 13, 21, 0.1) 0%, rgba(9, 13, 21, 0.75) 60%, rgba(9, 13, 21, 0.98) 100%);
    }

    .vod-hero-content {
        padding: 16px 14px 18px;
        max-width: 100%;
    }

    .hero-top-badges {
        gap: 6px;
        margin-bottom: 6px;
    }

    .hero-badge-top10 {
        font-size: 0.65rem;
        padding: 2px 7px;
        background: rgba(239, 68, 68, 0.25);
        border: 1px solid rgba(239, 68, 68, 0.5);
    }

    .hero-platform-tag {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .hero-rating-badge {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .hero-title {
        font-size: 1.45rem;
        font-weight: 800;
        margin-bottom: 6px;
        line-height: 1.15;
    }

    /* Compact Hero Meta */
    .hero-meta-row {
        gap: 5px;
        margin-bottom: 8px;
    }

    .hero-meta-pill {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .hero-meta-pill:not(.quality-4k):not(#heroViewsTag) {
        display: none; /* Keep hero clean by hiding redundant pills on mobile */
    }

    .hero-desc {
        font-size: 0.76rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 12px;
        color: var(--text-muted);
    }

    .hero-actions {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .btn-hero-play {
        flex: 1.2;
        height: 38px;
        padding: 0 14px;
        font-size: 0.84rem;
        font-weight: 700;
        border-radius: 10px;
        justify-content: center;
    }

    .btn-hero-info {
        flex: 1;
        height: 38px;
        padding: 0 12px;
        font-size: 0.82rem;
        border-radius: 10px;
        justify-content: center;
        background: rgba(255, 255, 255, 0.12);
    }

    .hero-carousel-nav {
        bottom: 8px;
        right: 12px;
    }

    .hero-dot {
        width: 5px;
        height: 5px;
    }

    .hero-dot.active {
        width: 14px;
    }

    /* 4. Live TV Layout Mobile */
    .live-layout {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0;
    }

    .live-sidebar {
        display: none !important;
    }

    .player-wrapper {
        border-radius: 0;
        aspect-ratio: 16 / 9;
        max-height: 42vh;
        border-left: none;
        border-right: none;
        background: #000;
    }

    /* Horizontal Category Chips for Mobile Live TV */
    .mobile-live-categories {
        display: block;
        width: 100%;
        padding: 6px 12px 2px;
    }

    .mobile-category-chips {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .mobile-category-chips::-webkit-scrollbar {
        display: none;
    }

    .mobile-cat-chip {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 5px 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
        color: var(--text-muted);
        font-size: 0.76rem;
        font-weight: 500;
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-cat-chip.active {
        background: rgba(0, 229, 255, 0.16);
        border-color: var(--primary);
        color: #fff;
        font-weight: 600;
    }

    .mobile-cat-chip .badge {
        font-size: 0.65rem;
        background: rgba(0, 0, 0, 0.4);
        padding: 1px 5px;
        border-radius: 8px;
        color: var(--text-dim);
    }

    .channel-browser {
        padding: 0 10px;
    }

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

    .browser-header-left h3 {
        font-size: 1rem;
        font-weight: 700;
    }

    .browser-header-left .channel-counter {
        font-size: 0.72rem;
    }

    .btn-filter-active {
        padding: 4px 10px;
        font-size: 0.72rem;
        border-radius: 12px;
    }

    /* 5. Sleek 2-Column Channel Cards (Zero Overlap) */
    .channel-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .channel-card {
        background: rgba(15, 20, 32, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 14px;
        padding: 9px 8px 7px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        position: relative;
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .channel-card:active {
        transform: scale(0.97);
        border-color: var(--primary);
    }

    .channel-card.active {
        border-color: var(--primary);
        background: rgba(0, 229, 255, 0.08);
        box-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
    }

    .channel-card-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .channel-card .badge-live-viewers {
        font-size: 0.65rem;
        font-weight: 600;
        color: #00e5ff;
        background: rgba(0, 229, 255, 0.12);
        border: 1px solid rgba(0, 229, 255, 0.25);
        border-radius: 6px;
        padding: 1px 5px;
        display: flex;
        align-items: center;
        gap: 3px;
    }

    .channel-card-actions {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .channel-card .btn-fav {
        background: transparent;
        border: none;
        color: var(--text-dim);
        font-size: 0.85rem;
        padding: 2px;
        cursor: pointer;
    }

    .channel-card .btn-fav.active {
        color: #ef4444;
    }

    .channel-card .badge-mirror {
        font-size: 0.62rem;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 4px;
        padding: 1px 4px;
        color: var(--text-dim);
    }

    /* Channel Logo in Center */
    .channel-logo-wrap {
        width: 48px;
        height: 48px;
        margin: 2px auto;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
    }

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

    .channel-card-body {
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .channel-card .channel-name {
        font-size: 0.8rem;
        font-weight: 700;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .channel-card .channel-category-tag {
        font-size: 0.62rem;
        font-weight: 600;
        color: var(--text-dim);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .channel-card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 4px;
        margin-top: 1px;
        font-size: 0.64rem;
        width: 100%;
    }

    .channel-card-footer .channel-epg-title {
        color: var(--text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 85px;
        font-size: 0.63rem;
        display: flex;
        align-items: center;
        gap: 3px;
    }

    .channel-card-footer .channel-epg-title i {
        font-size: 0.5rem;
        color: var(--primary);
    }

    .channel-card-footer .badge-status-online {
        color: #10b981;
        font-size: 0.62rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 3px;
    }

    .channel-card-footer .badge-status-online i {
        font-size: 0.45rem;
    }

    /* 6. VOD Content Rails & Posters (Netflix Mobile Style) */
    .vod-rail {
        margin-bottom: 18px;
    }

    .rail-header {
        padding: 0 12px;
        margin-bottom: 8px;
    }

    .rail-header h2,
    .rail-header h3 {
        font-size: 1.05rem;
        font-weight: 700;
    }

    .vod-shelves,
    .vod-rail-content {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 10px;
        padding: 2px 12px 10px;
    }

    .movie-card,
    .vod-card {
        flex: 0 0 118px;
        width: 118px;
        scroll-snap-align: start;
        border-radius: 12px;
    }

    .movie-poster,
    .vod-card-poster {
        aspect-ratio: 2 / 3;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .movie-card-info h4,
    .vod-card-title {
        font-size: 0.76rem;
        font-weight: 600;
        line-height: 1.2;
        margin-top: 5px;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .movie-meta,
    .vod-card-meta {
        font-size: 0.68rem;
    }

    /* 7. Bottom Navigation Bar (Glassmorphism & Safe Area) */
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        height: 58px;
        background: rgba(9, 13, 21, 0.94);
        backdrop-filter: blur(28px);
        -webkit-backdrop-filter: blur(28px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0 6px max(4px, env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: transparent;
        border: none;
        color: var(--text-dim);
        cursor: pointer;
        padding: 4px 6px;
        flex: 1;
        transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-icon {
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.18s ease;
    }

    .bottom-nav-label {
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.2px;
        transition: all 0.18s ease;
    }

    .bottom-nav-item:active {
        transform: scale(0.88);
    }

    .bottom-nav-item.active {
        color: var(--primary);
    }

    .bottom-nav-item.active .bottom-nav-icon {
        transform: translateY(-2px);
        text-shadow: 0 0 10px var(--primary-glow);
    }
}

