/*
 * NeoTV+ Premium Production CSS
 * Design: High-End Dark Cinematic
 */
:root {
    /* Color Palette */
    --p-bg: #000000;
    --p-bg-gradient: linear-gradient(180deg, #000000 0%, #050505 100%);
    --p-bg-accent: rgba(255, 255, 255, 0.05);
    --p-accent: #de00ff;
    --p-accent-glow: rgba(222, 0, 255, 0.4);
    --p-text: #ffffff;
    --p-text-muted: #888888;
    --p-glass: rgba(255, 255, 255, 0.03);
    --p-glass-border: rgba(255, 255, 255, 0.08);
    --p-accent-gradient: linear-gradient(135deg, #de00ff 0%, #8a00ff 100%);

    /* Dimensions */
    --header-h: 80px;
    --side-padding: 4rem;
    --card-radius: 12px;

    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

html,
body {
    height: 100% !important;
    height: 100vh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    background-color: var(--p-bg);
    color: var(--p-text);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    display: block;
    width: 100vw;
}

/* Improve touch scrolling on mobile */
@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
    }

    * {
        -webkit-tap-highlight-color: rgba(222, 0, 255, 0.1);
    }
}

/* Main App Layout - Ultra Strict Lock */
/* Main App Layout */
.app-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--p-bg-gradient);
    z-index: 100;
}

.app-sidebar {
    width: 260px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    border-right: 1px solid var(--p-glass-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 1000;
    position: relative;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
    position: relative;
    height: 100vh;
    min-width: 0;
}


/* Ensure footer is visible when placed inside the app-main section */
.app-footer {
    display: block;
}

.sidebar-logo {
    padding: 2.5rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--p-accent);
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

.sidebar-logo img {
    width: 120px;
    height: auto;
    display: block;
}

.sidebar-label {
    padding: 0 2.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--p-text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.6;
}

.cat-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem;
    display: block;
}


.cat-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    color: var(--p-text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.cat-item.active {
    color: #fff;
    background: var(--p-accent-gradient);
    box-shadow: 0 4px 15px var(--p-accent-glow);
}

.cat-icon {
    margin-right: 1.2rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.cat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Top Section: Dashboard Header (Player + Info Side-by-Side) */
.dashboard-top {
    width: 100%;
    margin-top: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--p-glass-border);
    flex-shrink: 0;
}

.top-content-inner {

    display: flex;
    padding: 1.5rem 2rem;
    /* Compact padding for more EPG space */
    gap: 1.5rem;
    align-items: flex-start;
}

.player-column {
    flex: 0 0 58%;
    /* Adjusted player width for 58/42 split */
}

.info-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-top-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.active-logo-wrap {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.active-header-text {
    flex: 1;
}

.active-header-text h2 {
    font-size: 1.92rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: 0;
    line-height: 1.1;
}

.player-container-v3 {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Premium Player Loading Overlay */
.player-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 200;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.player-loading-overlay.is-hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.p-loading-content {
    text-align: center;
}

.p-loading-name {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.p-loading-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.p-loading-status {
    color: var(--p-accent);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.p-loading-status::after {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid var(--p-accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Unmute Button Positioned at Top Right */
.player-unmute-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 300;
    background: var(--p-accent-gradient);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px var(--p-accent-glow);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    animation: unmutePulse 2s infinite;
}

@keyframes unmutePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 10px var(--p-accent-glow);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 30px var(--p-accent-glow);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 10px var(--p-accent-glow);
    }
}

.player-unmute-btn:hover {
    transform: scale(1.1);
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Bottom Section: EPG Content Area */
.epg-content-bottom {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
    min-width: 0 !important;
    background: transparent;
}



.active-meta-badges {
    display: flex;
    gap: 0.75rem;
}

.badge-cat,
.badge-genre {
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-size: 0.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-cat {
    background: var(--p-accent-gradient);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-genre {
    background: rgba(255, 255, 255, 0.1);
    color: var(--p-text-muted);
}

.active-program-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 12px;
}

.card-label {
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--p-accent);
    margin-bottom: 0.5rem;
    letter-spacing: 1.5px;
}

.active-program-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.active-program-card p {
    font-size: 0.9rem;
    color: var(--p-text-muted);
    line-height: 1.5;
}

.active-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.active-tag {
    background: rgba(222, 0, 255, 0.1);
    color: var(--p-accent);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(222, 0, 255, 0.2);
}

/* Ad Slot Styling - Auto Height for Images */
.ad-banner-slot {
    width: 100% !important;
    height: auto !important;
    /* AUTO HEIGHT - Images adjust naturally */
    min-height: auto !important;
    margin-top: 0.75rem;
    display: block !important;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden !important;
    position: relative;
}

/* Allow inner elements to auto-adjust */
.ad-banner-slot *,
.ad-banner-slot ins,
.ad-banner-slot iframe,
.ad-banner-slot img,
.ad-banner-slot .adsbygoogle,
.ad-banner-slot div {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
}

.side-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--p-text-muted);
    opacity: 0.5;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}

/* Active Row Highlighting */
.epg-row.is-playing {
    background: rgba(222, 0, 255, 0.04);
    border-left: 4px solid var(--p-accent);
    box-shadow: 0 0 20px rgba(222, 0, 255, 0.1);
}

.epg-row.is-playing .ch-name {
    color: var(--p-accent);
}

.player-container-v3:hover .player-overlay-info {
    opacity: 0.2;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--p-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.ch-info-spacer {
    position: sticky;
    left: 0;
    z-index: 11;
}

.hero-player-v2 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    aspect-ratio: 16/9;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: var(--header-h);
    min-height: auto;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--p-accent);
    letter-spacing: -1px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    filter: brightness(0.6) contrast(1.1);
}

.hero-content {
    max-width: 800px;
    z-index: 10;
}

.hero-tag {
    display: inline-block;
    background: var(--p-accent);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #fff 40%, #888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--p-text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background: #fff;
    color: #000;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid var(--p-glass-border);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Content container */
.livetv-container {
    padding-top: 0;
    /* Headings handle their own */
}

.content-rows {
    padding: 2rem var(--side-padding);
    background: var(--p-bg);
}

.channel-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* EPG Grid System - Balanced Layout */
.guide-section {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--p-glass-border);
}

/* Desktop EPG Header Labels */
.epg-header-labels {
    display: flex;
    background: #000;
    border-bottom: 2px solid rgba(222, 0, 255, 0.3);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 60;
}

.label-ch {
    width: 324px;
    padding: 0 1rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--p-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-prog {
    flex: 1;
    padding: 0 1rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.epg-grid-container {
    flex: 1 !important;
    display: block !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: relative !important;
}


.epg-row {
    display: flex !important;
    height: 60px !important;
    min-height: 60px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    opacity: 1 !important;
    visibility: visible !important;
}

.epg-row:hover {
    background: rgba(222, 0, 255, 0.05);
}

.ch-info {
    width: 324px;
    flex-shrink: 0;
    background: #000;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    position: sticky;
    left: 0;
    z-index: 50;
    border-right: 1px solid var(--p-glass-border);
}

.ch-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 1rem;
    object-fit: contain;
    background: var(--p-bg-accent);
    padding: 4px;
}

.ch-name-wrap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ch-name {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}

.ch-view-more {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--p-text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.ch-view-more:hover {
    opacity: 1;
    text-decoration: underline;
}

.ch-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Consolidated mini-play button used in listings */
.btn-play-mini {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(222, 0, 255, 0.3);
}

.btn-play-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 0, 255, 0.5);
    filter: brightness(1.2);
}

.ch-tag {
    background: var(--p-accent);
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.ch-genre {
    color: var(--p-text-muted);
    text-transform: uppercase;
    font-size: 0.55rem;
}

.programs-container {
    display: flex;
    white-space: nowrap;
    flex: 1;
}

.prog-block {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0.8rem 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.prog-block:hover {
    background: rgba(255, 255, 255, 0.05);
}

.prog-block.active {
    background: linear-gradient(90deg, rgba(222, 0, 255, 0.1), transparent);
    border-left: 2px solid var(--p-accent);
}

.prog-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: #fff;
}

.prog-time {
    font-size: 0.75rem;
    color: var(--p-text-muted);
    font-weight: 600;
}

.now-indicator {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--p-accent);
    z-index: 20;
    box-shadow: 0 0 10px var(--p-accent);
}

/* Category Rows */
.category-row {
    margin-bottom: 4rem;
    padding: 0 var(--side-padding);
}

.row-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.row-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

/* Horizontal Scroll Container */
.channel-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.channel-carousel::-webkit-scrollbar {
    display: none;
}

.channel-card-new {
    flex: 0 0 260px;
    background: var(--p-bg-accent);
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--p-glass-border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    cursor: pointer;
}

.channel-card-new:hover {
    transform: scale(1.05);
    border-color: var(--p-accent);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.card-thumb {
    width: 100%;
    height: 140px;
    position: relative;
    background: #121214;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    /* Reduced padding for maximum visibility */
    object-fit: contain;
    padding: 8px;
}

.card-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.channel-card-new:hover .card-play-overlay {
    opacity: 1;
}

.card-content {
    padding: 1.25rem;
}

.card-category {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--p-accent);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* EPG Simple Info */
.epg-mini {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
}

.epg-current {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.epg-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.epg-progress-fill {
    height: 100%;
    background: var(--p-accent);
    width: 0%;
    transition: width 1s linear;
}

.epg-next {
    font-size: 0.75rem;
    color: var(--p-text-muted);
}

/* Player Overlay (SPA style) */
.player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--p-bg);
    z-index: 3000;
    display: none;
    flex-direction: column;
}

.player-overlay.active {
    display: flex;
}

.player-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem;
    border-bottom: 1px solid var(--p-glass-border);
}

.close-player {
    font-size: 2rem;
    cursor: pointer;
}

.main-player-v2 {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ==========================================================================
   SLEEK INTEGRATED VIDEO.JS UI
   ========================================================================== */
.vjs-tech {
    outline: none;
}

.video-js .vjs-control-bar {
    background: rgba(15, 15, 20, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    height: 32px !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    bottom: 15px !important;
    left: 15px !important;
    right: 15px !important;
    width: calc(100% - 30px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.video-js.vjs-user-inactive.vjs-playing .vjs-control-bar {
    opacity: 0 !important;
    transform: translateY(10px) !important;
}

.video-js:hover .vjs-control-bar {
    background: rgba(15, 15, 20, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.video-js .vjs-progress-control {
    display: none !important;
}

.video-js .vjs-play-progress {
    background: var(--p-accent) !important;
}

.video-js .vjs-play-progress::before {
    display: block !important;
    font-size: 11px !important;
    top: -4px !important;
}

.video-js .vjs-load-progress {
    background: rgba(255, 255, 255, 0.2) !important;
}

.video-js .vjs-big-play-button {
    background: var(--p-accent-gradient) !important;
    width: 45px !important;
    height: 45px !important;
    line-height: 45px !important;
    border: none !important;
    border-radius: 50% !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 0 25px var(--p-accent-glow) !important;
    opacity: 0.8 !important;
}

.video-js:hover .vjs-big-play-button {
    scale: 1.15 !important;
    opacity: 1 !important;
}

.video-js .vjs-big-play-button .vjs-icon-placeholder::before {
    font-size: 1.6rem !important;
}

/* Minimal Icons */
.vjs-button>.vjs-icon-placeholder::before {
    font-size: 1.1rem !important;
    line-height: 32px !important;
}

.video-js .vjs-fullscreen-control {
    margin-left: auto !important;
    order: 99 !important;
}

.vjs-quality-button {
    order: 98 !important;
}

.video-js .vjs-volume-panel {
    margin-right: 15px !important;
}

.video-js .vjs-live-display {
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-size: 0.7rem !important;
    display: flex !important;
    align-items: center !important;
    line-height: 32px !important;
}

.vjs-quality-button .vjs-icon-placeholder::before {
    content: "HD" !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    top: 50%;
    transform: translateY(-50%);
    height: auto;
}

.vjs-quality-menu {
    background: rgba(10, 10, 12, 0.9) !important;
    backdrop-filter: blur(30px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9) !important;
}

.vjs-quality-menu .vjs-menu-item {
    padding: 0.75rem 1.5rem !important;
    font-weight: 700 !important;
}

.vjs-quality-menu .vjs-menu-item:hover,
.vjs-quality-menu .vjs-menu-item.vjs-selected {
    background: rgba(222, 0, 255, 0.2) !important;
    color: var(--p-accent) !important;
}

.player-container-v3 {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

@keyframes unmutePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 10px var(--p-accent-glow);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 30px var(--p-accent-glow);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 10px var(--p-accent-glow);
    }
}


/* Consolidated details layout */
.player-details-v2 {
    height: 300px;
    background: var(--p-bg-accent);
    padding: 2rem 4rem;
    border-top: 1px solid var(--p-glass-border);
}

/* Loading States */
.shimmer {
    background: linear-gradient(90deg, #1a1a1e 25%, #2a2a2e 50%, #1a1a1e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Footer */
.site-footer {
    padding: 4rem var(--side-padding);
    background: #050505;
    text-align: center;
    border-top: 1px solid var(--p-glass-border);
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    :root {
        --side-padding: 2rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .top-content-inner {
        flex-direction: column;
        padding: 2rem 1.5rem;
    }

    .player-column {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .info-column {
        flex: 1 1 100%;
    }

    .epg-row {
        height: auto;
        min-height: 75px;
    }

    .ch-info {
        width: 240px;
    }
}

/* Tablet Portrait & Large Phones (768px and below) */
@media (max-width: 768px) {
    :root {
        --side-padding: 1.5rem;
        --header-h: 60px;
    }



    /* Ensure header stays on top */
    .mobile-header {
        z-index: 1000 !important;
    }

    /* Mobile Header with Logo and Hamburger */
    .mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--p-glass-border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        z-index: 2001;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .mobile-header-logo {
        height: 35px;
        width: auto;
        object-fit: contain;
    }

    /* UNLOCK SCROLLING ON MOBILE */
    html,
    body {
        height: auto !important;
        overflow: visible !important;
        position: relative !important;
    }

    .app-wrapper {
        height: auto !important;
        min-height: 100vh !important;
        display: block !important;
        overflow: visible !important;
    }

    .app-main {
        padding-top: 60px !important;
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        min-height: 100vh !important;
    }

    .mobile-header-text {
        font-family: var(--font-heading);
        font-size: 1.4rem;
        font-weight: 900;
        color: var(--p-accent);
        letter-spacing: -1px;
    }

    /* Mobile Sidebar Toggle - Pure Black, High Layer */
    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0 !important;
        /* Move to top to cover everything */
        height: 100vh !important;
        width: 260px;
        z-index: 5000 !important;
        /* Extremely high layer */
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: #000000 !important;
        opacity: 1 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: none !important;
    }

    .app-sidebar * {
        opacity: 1 !important;
    }

    .app-sidebar.mobile-open {

        left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.8);
    }

    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        position: relative;
        top: auto;
        left: auto;
        z-index: auto;
        width: 44px;
        height: 44px;
        background: transparent;
        backdrop-filter: none;
        border: 1px solid var(--p-glass-border);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle:hover {
        background: rgba(222, 0, 255, 0.2);
        border-color: var(--p-accent);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: #fff;
        position: relative;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle span::before,
    .mobile-menu-toggle span::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background: #fff;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle span::before {
        top: -6px;
    }

    .mobile-menu-toggle span::after {
        bottom: -6px;
    }

    .mobile-menu-toggle.active span {
        background: transparent;
    }

    .mobile-menu-toggle.active span::before {
        top: 0;
        transform: rotate(45deg);
    }

    .mobile-menu-toggle.active span::after {
        bottom: 0;
        transform: rotate(-45deg);
    }

    /* Mobile Overlay */
    .mobile-overlay {
        position: fixed;
        top: 60px;
        /* Below mobile header */
        left: 0;
        width: 100vw;
        height: calc(100vh - 60px);
        background: rgba(0, 0, 0, 0.8);
        z-index: 1998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-overlay.active {
        pointer-events: all;
    }

    .mobile-logo-link {
        text-decoration: none;
        color: inherit;
        display: flex;
        align-items: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section {
        height: 60vh;
        min-height: 400px;
    }

    .channel-card-new {
        flex: 0 0 280px;
    }

    /* EPG Grid Mobile Optimization */
    .ch-info {
        width: 168px !important;
        padding: 0 0.8rem !important;
        flex-shrink: 0 !important;
        display: flex !important;
        background: #000 !important;
        /* Ensure logo area is solid */
        position: sticky !important;
        left: 0 !important;
        z-index: 5 !important;
        opacity: 1 !important;
    }

    .ch-logo {
        width: 53px;
        /* Increased by 20% (44 -> 53) */
        height: 53px;
        margin-right: 0.8rem;
    }

    .ch-name {
        font-size: 0.7rem !important;
        /* INCREASED */
        font-weight: 800 !important;
        line-height: 1.2;
        white-space: normal !important;
        /* Allow wrapping */
        overflow: visible !important;
        /* Show all text */
        text-overflow: clip !important;
        /* No ellipsis */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        /* Limit to 2 lines if very long */
        -webkit-box-orient: vertical;
    }

    .ch-meta {
        font-size: 0.55rem;
        /* Slightly larger */
    }

    .prog-block {
        padding: 0.8rem;
        /* Reduced from 1rem (20% decrease) */
    }

    .prog-title {
        font-size: 0.68rem;
        /* Reduced from 0.85rem (20% decrease) */
    }

    .prog-time {
        font-size: 0.56rem;
        /* Reduced from 0.7rem (20% decrease) */
    }

    /* EPG Row Height - Reduced for more visible channels */
    .epg-row {
        height: 60px !important;
        min-height: 60px !important;
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }



    /* Footer - REMOVED FOR MOBILE AS REQUESTED */
    .app-footer {
        display: none !important;
    }

    .footer-wrap {
        gap: 1rem;
        /* Reduced spacing */
    }

    .footer-nav-wrap ul {
        gap: 0.75rem;
        /* Reduced spacing */
    }

    .footer-nav-wrap ul a {
        font-size: 0.6rem !important;
        /* Smaller text */
        padding: 0.25rem 0;
    }

    .footer-copyright {
        font-size: 0.5rem !important;
        /* Smaller text */
        margin: 0;
    }

    .footer-apps {
        transform: scale(0.6);
        /* Smaller app badges */
        margin: -0.5rem;
    }

    .app-btn img {
        height: 28px !important;
        /* Smaller badges */
    }

    /* Touch Targets - Minimum 44x44px */
    .cat-item {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }

    /* CRITICAL: Player Visibility on Mobile - INCREASED BY 10% */
    /* CRITICAL: Player Visibility on Mobile - Sticky + 10% Bigger */
    /* Dashboard Content Padding for Mobile Header */
    .app-main {
        padding-top: 60px !important;
    }

    .dashboard-top {
        padding: 0 !important;
    }

    /* EPG CONTENT VISIBILITY FIX */
    .epg-content-bottom {
        display: block !important;
        overflow: visible !important;
        min-height: 500px;
        padding-top: 20px;
    }

    .guide-section {
        display: block !important;
        overflow: visible !important;
        height: auto !important;
    }

    .epg-grid-container {
        display: block !important;
        overflow: visible !important;
        height: auto !important;
    }

    /* Player Column on Mobile - Remove sticky to prevent overlap */
    .player-column {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        background: #000;
        margin-bottom: 1rem !important;
        z-index: 10;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }

    .player-container-v3 {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
        min-height: 200px !important;
        max-height: 400px !important;
        border-radius: 0;
        /* Full width edge to edge looks better on mobile */
    }

    .player-container-v3 video,
    .player-container-v3 .video-js {
        width: 100% !important;
        height: 100% !important;
    }

    /* Ensure video element is visible */
    #livetvPlayerV2 {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9;
        background: #000;
    }

    /* Reduce info column spacing - 30% COMPACT */
    .info-column {
        gap: 0.3rem !important;
        padding: 0 var(--side-padding) 0.5rem !important;
    }

    .info-top-row {
        gap: 0.5rem !important;
        margin-bottom: 0.2rem !important;
    }

    .active-program-card {
        padding: 0.4rem !important;
        border-radius: 8px !important;
    }

    .active-program-card h3 {
        font-size: 0.75rem !important;
        margin-bottom: 0.2rem !important;
    }

    .card-label {
        font-size: 0.4rem !important;
        margin-bottom: 0.2rem !important;
    }

    .prog-progress-wrap {
        padding: 0.6rem !important;
        margin: 0.4rem 0 !important;
    }

    .epg-header-labels {
        display: none !important;
    }
}


/* Medium Phones (480px and below) */
@media (max-width: 480px) {
    :root {
        --side-padding: 1rem;
    }

    .sidebar-logo {
        padding: 2rem 1.5rem;
        font-size: 1.5rem;
    }

    .sidebar-logo img {
        width: 100px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .channel-card-new {
        flex: 0 0 240px;
    }

    .row-title {
        font-size: 1.5rem;
    }

    /* EPG Ultra Compact - Wider channel info for visibility */
    .ch-info {
        width: 156px !important;
        padding: 0 0.6rem !important;
        flex-shrink: 0 !important;
        display: flex !important;
        background: #000 !important;
        position: sticky !important;
        left: 0 !important;
        z-index: 5 !important;
        opacity: 1 !important;
    }

    .ch-logo {
        width: 46px;
        /* Increased by 20% (38 -> 46) */
        height: 46px;
        margin-right: 0.5rem;
    }

    .ch-name {
        font-size: 1rem;
        /* INCREASED */
        font-weight: 700;
        white-space: normal !important;
        /* Allow wrapping */
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .ch-view-more {
        font-size: 0.5rem;
    }

    .prog-block {
        padding: 0.6rem;
        /* Reduced from 0.75rem (20% decrease) */
    }

    .prog-title {
        font-size: 0.64rem;
        /* Reduced from 0.8rem (20% decrease) */
    }

    .prog-time {
        font-size: 0.52rem;
        /* Reduced from 0.65rem (20% decrease) */
    }

    /* EPG Row Height - Compact for more channels */
    .epg-row {
        height: 55px !important;
        /* Even more compact on small phones */
        min-height: 55px !important;
    }



    /* Footer - REMOVED FOR MOBILE AS REQUESTED */
    .app-footer {
        display: none !important;
    }

    .footer-wrap {
        gap: 0.75rem;
    }

    .footer-nav-wrap ul a {
        font-size: 0.55rem !important;
    }

    .footer-copyright {
        font-size: 0.45rem !important;
    }

    /* Footer Mobile */
    .footer-wrap {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-nav-wrap ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-copyright {
        font-size: 0.55rem;
    }

    /* Progress Tracker Mobile */
    .prog-timer {
        font-size: 0.65rem;
        gap: 0.5rem;
    }

    .prog-percentage {
        font-size: 0.65rem;
        padding: 1px 6px;
    }

    /* Single Channel Mobile Adjustments */
    .top-content-inner {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .info-top-row {
        gap: 1rem;
    }

    .active-logo-wrap {
        width: 48px;
        /* Increased by 20% */
        height: 48px;
    }

    .active-header-text h2 {
        font-size: 0.88rem;
        /* Reduced from 1.1rem (20% decrease) */
    }

    /* Player visibility on small phones - INCREASED BY 10% */
    .player-column {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        order: -1;
        /* Ensure player appears first */
    }

    .player-container-v3 {
        width: 100% !important;
        min-height: 198px !important;
        /* Increased from 180px (10% increase) */
        max-height: 385px !important;
        /* Increased from 350px (10% increase) */
        margin-bottom: 1rem;
    }

    #livetvPlayerV2 {
        min-height: 198px !important;
        /* Increased from 180px (10% increase) */
    }

    .similar-channels-grid .ch-info {
        width: 120px !important;
        background: #0d0d0f !important;
    }

    .similar-channels-grid .epg-programs {
        padding-left: 0.5rem !important;
    }

    .similar-channels-grid .prog-title {
        font-size: 0.8rem !important;
    }

    .similar-channels-grid .btn-play-mini {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.55rem !important;
    }
}

/* Small Phones (360px and below) */
@media (max-width: 360px) {
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .ch-info {
        width: 120px !important;
        /* Increased for better visibility */
    }

    .ch-logo {
        width: 24px;
        /* Reduced from 30px (20% decrease) */
        height: 24px;
    }

    .channel-card-new {
        flex: 0 0 200px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    /* Critical: Player visibility on very small screens - INCREASED BY 10% */
    .player-column {
        flex: 1 1 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .player-container-v3 {
        width: 100% !important;
        min-height: 176px !important;
        /* Increased from 160px (10% increase) */
        max-height: 330px !important;
        /* Increased from 300px (10% increase) */
        border-radius: 4px;
    }

    #livetvPlayerV2 {
        width: 100% !important;
        min-height: 176px !important;
        /* Increased from 160px (10% increase) */
    }

    .top-content-inner {
        padding: 1rem 0.75rem;
        gap: 1rem;
    }
}

/* Ad Banner Slot - Policy Compliant (No borders/highlights) */


.ch-tag-inline {
    display: inline-block;
    background: var(--p-accent-gradient);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- PREMIUM APP FOOTER --- */
.app-footer {
    padding: 0.5rem 2rem;
    /* Ultra compact */
    background: #000;
    border-top: 1px solid var(--p-glass-border);
    position: relative;
    z-index: 10;
}

.footer-wrap {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    /* Single line */
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* Footer Menu Styling */
.footer-nav-wrap ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-nav-wrap ul a {
    color: var(--p-text);
    text-decoration: none;
    font-size: 0.7rem;
    /* Smaller for single line */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    /* Increased visibility */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-nav-wrap ul a:hover {
    opacity: 1;
    color: var(--p-accent);
}

/* App Buttons Section */
.footer-apps {
    transform: scale(0.75);
    margin-right: -1rem;
}

.app-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-btn img {
    height: 32px;
    width: auto;
    filter: grayscale(0.2) brightness(0.9);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 1;
    /* Increased visibility */
}

.app-btn:hover img {
    filter: grayscale(0) brightness(1.2);
    transform: translateY(-2px) scale(1.05);
    opacity: 1;
}

/* Copyright Text */
.footer-copyright {
    color: var(--p-text-muted);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    opacity: 0.5;
    /* Increased from 0.25 */
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .footer-wrap {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.5rem 0;
    }
}

@media (max-width: 768px) {
    .app-footer {
        padding: 2rem 1.5rem;
    }

    .footer-nav-wrap ul {
        gap: 1.25rem;
    }

    .app-buttons {
        gap: 0.75rem;
        flex-direction: row;
        /* Keep on one line for better horizontal space */
    }
}

/* Progress Tracker */
.prog-progress-wrap {
    margin: 0.75rem 0;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--p-glass-border);
}

.prog-timer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    /* Prevent collision */
    margin-bottom: 0.8rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.prog-percentage {
    color: var(--p-accent);
    background: rgba(222, 0, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.time-elapsed {
    opacity: 0.7;
    font-weight: 600;
}

.time-left {
    color: var(--p-text-muted);
}

.prog-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.prog-progress-fill {
    height: 100%;
    background: var(--p-accent-gradient);
    width: 0%;
    transition: width 1s linear;
    box-shadow: 0 0 10px var(--p-accent-glow);
}

/* Error Handling: API Down / Broken TV */
.api-error-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 9999;
}

.tv-static-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-radial-gradient(#000 0 0.0001%, #fff 0 0.0002%) 50% 0/2500px 2500px,
        repeating-conic-gradient(#000 0 0.0001%, #fff 0 0.0002%) 60% 50%/2500px 2500px;
    background-blend-mode: difference;
    animation: tv-shift .2s infinite alternate;
    opacity: 0.15;
}

@keyframes tv-shift {
    100% {
        background-position: 50% 0, 60% 50%;
    }
}

.error-content-glass {
    position: relative;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5rem;
    border-radius: 40px;
    text-align: center;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9), inset 0 0 40px rgba(222, 0, 255, 0.05);
}

.tv-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px var(--p-accent));
}

.error-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: #fff;
    letter-spacing: -2px;
}

.error-text {
    font-size: 1.4rem;
    color: var(--p-text-muted);
    margin-bottom: 3rem;
    line-height: 1.4;
}

.system-badge {
    background: rgba(255, 59, 48, 0.1);
    border-left: 4px solid #ff3b30;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    max-width: 100%;
}

.system-badge code {
    color: #ff6b6b;
    font-family: monospace;
    font-size: 1rem;
    word-break: break-all;
}

.error-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn-retry {
    background: var(--p-accent-gradient);
    color: #fff;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-retry:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--p-accent-glow);
}

.btn-config {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid var(--p-glass-border);
}

/* Stream Error Overlay on Player */
.player-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    text-align: center;
    padding: 2rem;
    pointer-events: none;
    /* Let clicks pass to player if needed, but we overlay */
}

.p-error-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://media.giphy.com/media/oEI9uWUqWMrBK/giphy.gif');
    background-size: cover;
    opacity: 0.05;
    mix-blend-mode: screen;
}

.p-error-msg {
    position: relative;
    max-width: 450px;
}

.p-error-msg h4 {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.p-error-msg p {
    color: var(--p-text-muted);
    font-size: 1.1rem;
    line-height: 1.4;
}

/* --- Single Channel Page Layout Fixes --- */
.sc-wrapper .site-header {
    display: none !important;
}

/* Spacing for listing areas */
.listing-section {
    margin-bottom: 2rem;
}

/* ==========================================================================
   APP LOADER & SHIMMER EFFECTS
   ========================================================================== */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 80000;
    /* REDUCED to stay below sidebar/header */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.app-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--p-accent);
    margin-bottom: 2rem;
    letter-spacing: -2px;
    animation: loaderPulse 2s infinite ease-in-out;
}

.loader-logo img {
    height: 60px;
    width: auto;
}

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

.loader-progress {
    width: 40%;
    height: 100%;
    background: var(--p-accent-gradient);
    border-radius: 10px;
    animation: loaderProgress 1.5s infinite ease-in-out;
}

@keyframes loaderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 0px var(--p-accent));
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
        filter: drop-shadow(0 0 20px var(--p-accent));
    }
}

@keyframes loaderProgress {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(250%);
    }
}

/* SHIMMER EFFECT */
.shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmerEffect 1.5s infinite;
}

@keyframes shimmerEffect {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer-row {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.shimmer-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin-right: 1rem;
    flex-shrink: 0;
}

.shimmer-text-wrap {
    flex: 1;
}

.shimmer-title {
    width: 168px;
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 6px;
}

.shimmer-meta {
    width: 80px;
    height: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.shimmer-prog {
    width: 200px;
    height: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    margin-left: 2rem;
}

/* MOBILE APP HEADER - HIDDEN BY DEFAULT */
.mobile-app-header {
    display: none;
}

/* 3. MOBILE HORIZONTAL CATEGORY BAR - HIDDEN ON DESKTOP */

.mobile-cat-nav-wrapper {
    display: none !important;
}


/* --- RE-APPLYING FINAL MOBILE OVERRIDES (Just in case) --- */
@media (max-width: 768px) {
    .shimmer-row {
        height: 65px;
    }

    .shimmer-prog {
        display: none;
    }

    .shimmer-title {
        width: 120px;
    }
}

@media (max-width: 768px) {

    /* 1. NEW MOBILE APP HEADER */
    .mobile-app-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0.6rem 1.25rem !important;
        background: #000 !important;
        border-bottom: 1px solid var(--p-glass-border) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
        width: 100% !important;
        position: relative !important;
        z-index: 5001 !important;
    }


    .mobile-logo-side {
        display: flex !important;
        align-items: center !important;
    }

    .mobile-logo-link-wrap {
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
        line-height: 1 !important;
    }


    .mobile-main-logo {
        height: 32px !important;
        width: auto !important;
        object-fit: contain !important;
    }

    .mobile-text-logo {
        font-family: var(--font-heading) !important;
        font-size: 1.4rem !important;
        font-weight: 900 !important;
        color: var(--p-accent) !important;
        letter-spacing: -1px !important;
    }

    .mobile-action-side {
        display: flex !important;
        align-items: center !important;
    }

    .playstore-badge-link {
        display: flex !important;
        align-items: center !important;
        line-height: 1 !important;
    }

    .playstore-icon {
        height: 30px !important;
        width: auto !important;
    }


    /* 2. HIDE OLD MOBILE MENU COMPONENTS */
    .mobile-header,
    .mobile-menu-toggle,
    .mobile-overlay,
    .app-sidebar {
        display: none !important;
        visibility: hidden !important;
    }


    /* 2. ADJUST MAIN CONTENT FOR TOP BAR */
    .app-main {
        padding-top: 0 !important;
        /* Remove mobile header spacing */
    }

    /* 3. MOBILE HORIZONTAL CATEGORY BAR */
    .mobile-cat-nav-wrapper {
        display: block !important;
        background: #000 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 5000 !important;
        border-bottom: 2px solid #dc60ef80 !important;
        padding: 0.4rem 0 0.75rem !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8) !important;
    }

    .mobile-cat-label {
        font-size: 0.7rem !important;
        font-weight: 800 !important;
        color: var(--p-text-muted) !important;
        text-transform: uppercase !important;
        letter-spacing: 1.5px !important;
        padding: 0 1.25rem 0.5rem !important;
        opacity: 0.8 !important;
    }


    .mobile-cat-nav {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 1rem !important;
        gap: 0.75rem !important;
        scrollbar-width: none;
        /* Firefox */
    }

    .mobile-cat-nav::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .mobile-cat-nav .cat-item {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        background: #1a1a1a !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: #ffffff !important;
        padding: 0.6rem 1.25rem !important;
        border-radius: 50px !important;
        text-decoration: none !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        transition: all 0.3s ease !important;
    }

    .mobile-cat-nav .cat-item.active {
        background: var(--p-accent-gradient) !important;
        border-color: transparent !important;
        box-shadow: 0 0 15px var(--p-accent-glow) !important;
    }

    .mobile-cat-nav .cat-item .mobile-cat-img {
        width: 20px !important;
        height: 20px !important;
        object-fit: contain !important;
        margin-right: 0.5rem !important;
    }

    /* 4. UNLOCK GLOBAL SCROLLING */
    html,
    body {
        height: auto !important;
        overflow: visible !important;
        overflow-x: hidden !important;
        position: relative !important;
    }

    .app-wrapper {
        position: relative !important;
        display: block !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
        z-index: 1 !important;
    }

    /* 5. EPG / LISTING VISIBILITY */
    .epg-content-bottom,
    .guide-section,
    .epg-grid-container {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        position: relative !important;
        padding-bottom: 50px !important;
    }

    #epgRows {
        display: block !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .ch-info {
        position: sticky !important;
        left: 0 !important;
        background: #000 !important;
        z-index: 10 !important;
        width: 168px !important;
        opacity: 1 !important;
        flex-shrink: 0 !important;
    }

    .epg-row {
        display: flex !important;
        min-height: 65px !important;
        background: #0a0a0c !important;
    }

    /* 6. PLAYER COLUMN TWEAKS */
    .player-column {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
    }

    .dashboard-top {
        height: auto !important;
        display: block !important;
    }

    .top-content-inner {
        display: block !important;
        padding: 0 !important;
    }

    /* 7. MODERN SC-GRID MOBILE FIXES */
    .sc-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .sc-card-info {
        padding: 0.75rem !important;
    }

    .sc-card-title {
        font-size: 0.85rem !important;
    }

    .sc-card-prog {
        font-size: 0.7rem !important;
    }

    .sc-card-media {
        aspect-ratio: 4/3 !important;
    }

    .sc-card-media img {
        padding: 0.75rem !important;
        border-radius: 14px !important;
    }
}

/* ==========================================================================
   SC-GRID: MODERN SIMILAR CHANNELS GRID (DESKTOP)
   ========================================================================== */
.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

.sc-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--p-glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
    display: flex;
    flex-direction: column;
}

.sc-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-8px);
    border-color: var(--p-accent);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.sc-card-media {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.sc-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.8rem;
    border-radius: 14px;
    transition: transform 0.6s ease;
}

.sc-card:hover .sc-card-media img {
    transform: scale(1.1);
}

.sc-card-overlay {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    background: rgba(222, 0, 255, 0.25);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.sc-card:hover .sc-card-overlay {
    opacity: 1;
}

.play-icon {
    width: 40px;
    height: 40px;
    background: var(--p-accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sc-card:hover .play-icon {
    transform: scale(1);
}

.sc-card-info {
    padding: 0.8rem;
}

.sc-card-title {
    font-weight: 800;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-card-prog {
    font-size: 0.75rem;
    color: var(--p-text-muted);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--p-text-muted);
}

.sc-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--p-accent);
    text-transform: uppercase;
}

.sc-live-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}
/* Footer Country & Region Display */
.footer-region {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.country-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.country-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--p-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .footer-region {
        margin-top: 15px;
    }
}
