/* tv.css — extracted from tv.php */
/* --- PREVENT HORIZONTAL SCROLL --- */
    body {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    * {
        box-sizing: border-box;
    }
    
    /* --- HERO --- */
    #hero-viewport {
        height: 180px; position: relative; overflow: hidden;
        display: flex; justify-content: center; align-items: center;
        color: white; text-align: center; background: #000; 
        border-bottom: 3px solid var(--accent);
        width: 100%;
    }
    .hero-layer {
        position: absolute; 
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%; height: 100%;
        background-size: cover; 
        background-position: center; 
        z-index: 1;
    }
    .hero-overlay { 
        position: absolute; 
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%; height: 100%; 
        background: rgba(0,0,0,0.5); 
        z-index: 2; 
    }
    .hero-text-container { position: relative; z-index: 3; padding: 0 20px; max-width: 100%; }
    .sub-hero-h1 { 
        font-size: 1.6rem; margin: 0; 
        text-transform: none; 
        letter-spacing: 0; 
        font-weight: 800; 
    }
    .sub-hero-p { font-size: 0.88rem; opacity: 0.85; margin-top: 5px; }

    /* --- SEARCH BAR --- */
    .tv-container { 
        max-width: 1100px; 
        margin: 16px auto; 
        padding: 0 15px; 
        box-sizing: border-box;
        width: 100%;
    }
    
    .search-container {
        position: sticky; top: 0; z-index: 100; 
        background: white; padding: 12px 0 8px; 
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 30px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .search-wrapper {
        position: relative; 
        max-width: 600px; 
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    .search-icon {
        position: absolute; left: 18px; top: 50%; 
        transform: translateY(-50%); color: #94a3b8;
        font-size: 1.1rem; pointer-events: none;
    }
    
    .search-input {
        width: 100%; 
        padding: 16px 50px 16px 50px; 
        border: 2px solid #e2e8f0; 
        border-radius: 12px; 
        font-size: 1rem; 
        transition: border-color 0.2s;
        outline: none;
        box-sizing: border-box;
        max-width: 100%;
    }
    
    .search-input:focus { border-color: #3498db; }
    
    .clear-btn {
        position: absolute; right: 18px; top: 50%;
        transform: translateY(-50%); 
        background: #e2e8f0; border: none;
        width: 24px; height: 24px; border-radius: 50%;
        cursor: pointer; display: none;
        align-items: center; justify-content: center;
        color: #64748b; font-size: 0.9rem;
    }
    
    .clear-btn.show { display: flex; }
    .clear-btn:hover { background: #cbd5e1; }
    
    .search-hint {
        margin-top: 10px; font-size: 0.85rem; 
        color: #64748b; text-align: center;
    }
    
    .search-hint span {
        color: #3498db; cursor: pointer; 
        text-decoration: underline;
    }
    
    .search-hint span:hover { color: #2980b9; }

    /* --- GUIDE SECTIONS --- */
    .guide-section {
        margin-bottom: 40px;
    }
    
    .guide-header {
        display: flex; align-items: center; 
        justify-content: space-between;
        padding: 15px 20px; border-radius: 12px;
        color: white; font-weight: 800;
        margin-bottom: 15px; font-size: 1.05rem;
    }
    
    .guide-title {
        display: flex; align-items: center; gap: 10px;
    }
    
    .channel-count {
        background: rgba(255,255,255,0.2);
        padding: 4px 12px; border-radius: 20px;
        font-size: 0.8rem; font-weight: 700;
    }

    /* --- CHANNEL GRID --- */
    .channels-grid { 
        display: grid; 
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
        gap: 15px; 
    }

    .channel-tile {
        background: white; border: 1px solid #e2e8f0; 
        border-radius: 10px; overflow: hidden; 
        transition: all 0.2s; cursor: pointer;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .channel-tile:hover { 
        transform: translateY(-3px); 
        box-shadow: 0 6px 15px rgba(0,0,0,0.1);
        border-color: var(--primary); 
    }

    .tile-main {
        display: flex; 
        align-items: center; 
        justify-content: space-between;
        padding: 14px 16px; 
        min-height: 65px;
        gap: 12px;
    }
    
    .logo-box { 
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .logo-box img { 
        max-height: 42px; 
        max-width: 100%;
        width: auto;
        object-fit: contain; 
    }
    
    .channel-number {
        border: 2px solid var(--primary); 
        color: var(--primary); 
        padding: 4px 10px;
        border-radius: 6px; 
        font-weight: 900; 
        font-size: 0.85rem; 
        background: #f0f7ff;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tile-footer {
        background: #f8fafc; border-top: 1px solid #e2e8f0; 
        padding: 10px 12px;
    }
    
    .channel-name {
        font-size: 0.8rem; font-weight: 800; 
        text-transform: uppercase; color: #334155;
        margin-bottom: 6px;
    }
    
    .category-badges {
        display: flex; flex-wrap: wrap; gap: 4px;
    }
    
    .badge {
        display: inline-block; padding: 3px 8px;
        border-radius: 10px; font-size: 0.65rem;
        font-weight: 700; text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .badge-sports { background: #d1fae5; color: #065f46; }
    .badge-news { background: #fee2e2; color: #991b1b; }
    .badge-local { background: #dbeafe; color: #1e40af; }
    .badge-entertainment { background: #f3e8ff; color: #6b21a8; }
    .badge-movies { background: #fef3c7; color: #92400e; }
    .badge-kids { background: #fce7f3; color: #9f1239; }
    .badge-sub { 
        background: white; color: #64748b; 
        border: 1px solid #e2e8f0; 
    }

    /* --- NO RESULTS --- */
    .no-results {
        text-align: center; padding: 30px 20px;
        color: #94a3b8;
    }
    
    .no-results i { 
        font-size: 4rem; color: #cbd5e1; 
        margin-bottom: 20px; 
    }
    
    .no-results h3 { 
        color: #64748b; margin-bottom: 10px; 
    }
    
    .no-results ul {
        text-align: left; max-width: 400px;
        margin: 20px auto; color: #64748b;
    }

    /* --- MOBILE --- */
    @media (max-width: 600px) {
        .tv-container { 
            padding: 0 10px; 
            max-width: 100%;
            width: 100%;
            overflow-x: hidden;
        }
        .search-container { 
            padding: 15px 0; 
            margin-bottom: 20px;
            margin-left: 0;
            margin-right: 0;
            width: 100%;
            max-width: 100%;
        }
        .search-wrapper {
            padding: 0 10px;
            max-width: 100%;
            width: 100%;
        }
        .search-input { 
            padding: 14px 40px; 
            font-size: 0.95rem;
            width: 100%;
            max-width: 100%;
        }
        .search-icon {
            left: 28px;
        }
        .clear-btn {
            right: 28px;
        }
        .search-hint { 
            font-size: 0.75rem;
            padding: 0 10px;
        }
        .channels-grid { 
            grid-template-columns: repeat(2, 1fr); 
            gap: 10px; 
        }
        .tile-main { 
            padding: 10px 12px; 
            min-height: 55px;
            gap: 8px;
        }
        .logo-box {
            min-width: 60px;
        }
        .logo-box img { 
            max-height: 32px;
            max-width: 100%;
        }
        .channel-number { 
            font-size: 0.75rem; 
            padding: 3px 8px; 
        }
        .channel-name { 
            font-size: 0.7rem; 
        }
        .guide-header { 
            font-size: 0.9rem; 
            padding: 12px 15px; 
            flex-wrap: wrap;
        }
        .guide-title {
            font-size: 0.85rem;
        }
        .channel-count {
            font-size: 0.7rem;
        }
        .sub-hero-h1 {
            font-size: 1.5rem;
            letter-spacing: 2px;
        }
        .sub-hero-p {
            font-size: 0.9rem;
        }
    }
