    /* ==========================================================================
       1. RESET & GLOBAL
       ========================================================================== */
    :root {
        --bg-dark: #050505;       
        --bg-card: #0f1219;       
        --border-color: #1e293b;  
        --accent: #00f2ff;      
        --text-main: #e2e8f0;
        --text-muted: #94a3b8;
         --sidebar-width: clamp(380px, 25vw, 500px); 
    }

    * { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
    
    /* PENTING: Scroll body dimatikan total, kita scroll per elemen */
    body, html { 
        margin: 0; padding: 0; 
        background-color: var(--bg-dark); color: var(--text-main); 
        font-family: 'Teko', sans-serif; 
        height: 100%; 
        width: 100%;
        overflow: hidden; 
        overscroll-behavior: none; /* Mencegah tarik-tarik browser (refresh pull) */
    }

    /* Layout Wrapper */
    #main-wrapper { 
        width: 100%; 
        height: 100%; 
        display: flex; 
        flex-direction: column; /* Default Mobile */
        background: #000;
    }

    /* Styling Scrollbar Desktop */
    ::-webkit-scrollbar { width: 0px; height: 0px; }
    ::-webkit-scrollbar-track { background: var(--bg-dark); }
    ::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

    /* ==========================================================================
       2. PLAYER AREA
       ========================================================================== */
    .video-container {
        background: #000;
        position: relative;
        z-index: 10;
        /* Ukuran diatur di Media Query */
    }
    
    .video-container .section, 
    .video-container .widget, 
    .video-container .widget-content {
        height: 100%; margin: 0; padding: 0; border: none;
    }

    .video-wrapper { 
        width: 100%; height: 100%; position: relative; 
    }

    #single-view, #video-iframe, #video-placeholder {
        position: absolute; top: 0; left: 0; 
        width: 100%; height: 100%; 
        border: 0; object-fit: contain; 
    }
    #video-placeholder { z-index: 1; object-fit: cover; }
    #video-iframe { z-index: 10; background: #000; }

  /* Countdown */
#countdown-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* Menggunakan gambar sebagai latar belakang */
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
    url('https://eroxstv.xyz/bg/eroxstv.jpg'); 
    background-size: cover;
    background-position: center;
    z-index: 20;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 0px;
}

    .cd-box {
        background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
        padding: 20px 30px; border-radius: 12px; backdrop-filter: blur(10px);
        box-shadow: 0 0 30px rgba(0,0,0,0.5); max-width: 100%;
    }
    .cd-title { font-size: 20px; color: #94a3b8; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
    .cd-timer { font-size: 42px; color: #fff; font-weight: 100%; letter-spacing: 2px; text-shadow: 0 0 0px rgba(255,255,255,0.5); line-height: 1.2; }
    .cd-info { margin-top: 10px; color: var(--accent); font-size: 16px; }
    .match-ended .cd-timer { color: #ef4444; font-size: 36px; }
    .match-ended .cd-info { color: #fff; }


    /* ==========================================================================
       3. SIDEBAR (AREA SCROLL DIPERBAIKI)
       ========================================================================== */
    .sidebar {
        background: var(--bg-dark); 
        display: flex; flex-direction: column; 
        z-index: 50; 
        position: relative;
        overflow: hidden; 
        border-left: 1px solid var(--border-color);
        /* Flex properti diatur media query */
    }

    /* MENU TABS */
    .menu-container {
        display: flex; background: #0a0a0a; border-bottom: 0px solid #333;
        border-top: 0px solid #333;
        flex-shrink: 0; height: 45px; z-index: 80;
    }
    .menu-button {
        flex: 1; background: transparent; border: none; 
        color: #94a3b8; font-family: 'Teko', sans-serif; font-size: 16px; letter-spacing: 0.5px;
        cursor: pointer; transition: 0.2s; border-bottom: 2px solid transparent;
    }
    .menu-button.active { color: var(--accent); background: rgba(0, 242, 255, 0.05); border-bottom-color: var(--accent); text-shadow: 0 0 8px rgba(0, 242, 255, 0.4); }

    /* CONTENT AREA - INI YANG KITA PERBAIKI */
    #sidebar-content-area {
        flex: 1; /* Mengisi sisa ruang */
        position: relative; 
        background: var(--bg-dark);
        display: flex; 
        flex-direction: column;
        padding: 0 !important; 
        
        /* LOGIKA SCROLL BARU */
        overflow-y: auto; /* Scroll terjadi di sini */
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* Supaya smooth di iPhone */
        
        background-image: radial-gradient(circle at top right, #111827, #000);
    }

    .content-widget { 
        display: none; 
        padding: 0 !important; 
        margin: 0 !important; 
        width: 100% !important; 
        
        /* Biarkan konten memanjang ke bawah */
        height: auto; 
        min-height: 100%; 
        
        /* Padding bawah SANGAT PENTING agar item terakhir tidak ketutup footer */
        padding-bottom: 80px !important; 
    }
    
    .content-widget.active { display: block; animation: fadeUp 0.3s; }
    
    /* KHUSUS CHAT (HTML5) - JANGAN SCROLL PARENT */
    /* Kita gunakan trick CSS: jika #tab-HTML5 aktif, parent-nya kita matikan scrollnya via JS atau CSS trick */
    /* Tapi CSS only: kita bikin dia height 100% dan overflow hidden */
    #tab-HTML5 {
        height: 100% !important; 
        overflow: hidden !important; 
        padding-bottom: 50px !important;
        display: flex; flex-direction: column;
    }
    #tab-HTML5 iframe { width: 100%; height: 100%; border: none; flex: 1; }
    
    .section { margin: 0 !important; padding: 0 !important; }

    /* CHANNEL CARDS */
    #schedule-container { width: 100%; display: flex; flex-direction: column; }
    .schedule-msg-box { padding: 30px 20px; text-align: center; color: var(--text-muted); font-size: 16px; }


    .channel-card {
        display: flex; align-items: center; width: 100%; background: #0f1219; 
        border: none; border-bottom: 3px solid #1e293b; border-radius: 0 !important;
        padding: 15px 18px; margin: 0 !important; cursor: pointer; position: relative;
    }
    .channel-card:hover { background: #1a202c; }
    .ch-logo { width: 48px; height: 48px; margin-right: 14px; flex-shrink: 0; background: rgba(255,255,255,0.03); border-radius: 6px; padding: 4px; display:flex; align-items:center; justify-content:center;}
    .ch-logo img { width: 100%; height: 100%; object-fit: contain; }
    .ch-info { flex: 1; display: flex; flex-direction: column; justify-content: center; margin-right: 8px; min-width: 0; }
/* Container pembungkus agar liga dan tanggal sejajar */
.ch-match-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%; /* Sesuaikan dengan lebar wadah Anda */
}

/* Class asli Anda (fungsi ellipsis tetap aman) */
.ch-league {
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Class baru khusus untuk tanggal main */
.ch-date {
  font-size: 12px;
  color: #888; /* Silakan sesuaikan warna dengan tema Anda */
  font-weight: 400;
  white-space: nowrap; /* Mencegah tanggal turun ke baris baru */
  flex-shrink: 0; /* Memastikan tanggal tidak akan pernah terpotong/mengecil */
}

    .ch-name { font-size: 19px; font-weight: 600; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ch-status-badge {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px; /* Sedikit lebih melengkung agar estetik glass-nya dapet */
    text-align: center;
    min-width: 65px;
    flex-shrink: 0;
    /* Efek Glass Utama */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Status Live - Glass Red */
.status-live {
    background: rgba(239, 68, 68, 0.25); /* Transparan */
    color: #red;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulseLive 2s infinite;
}

/* Status Time - Glass Dark Blue */
.status-time {
    background: rgba(30, 41, 59, 0.4);
    color: #white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Status End - Glass Gray */
.status-end {
    background: rgba(51, 85, 105, 0.3);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

    @keyframes pulseLive { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

    .footer-sosmed {
        position: absolute; bottom: 0; left: 0; width: 100%;
        display: flex; height: 50px; z-index: 60;
        border-top: 1px solid #222; 
        background: rgba(5, 5, 5, 0.95); /* Sedikit transparan */
        backdrop-filter: blur(5px);
    }
    .btn-sosmed { flex: 1; border: none; font-family: 'Teko', sans-serif; font-size: 16px; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
    .btn-tele { background: #2a3648; } .btn-wa { background: #059669; } .btn-saweria { background: #d97706; }

    .channel-container { display: flex; align-items: center; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 10px; border-radius: 4px; box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.02), 0 1px 3px rgba(0, 0, 0, 0.6); width: 100%; box-sizing: border-box; margin-bottom: 2px; border: 1px solid rgba(59, 130, 246, 0.3); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; cursor: pointer; }
    .channel-container:hover { background: linear-gradient(135deg, rgba(29, 78, 216, 0.25) 0%, rgba(37, 99, 235, 0.25) 100%); }
    .logo-container { flex-shrink: 0; width: 80px; height: 55px; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(59, 130, 246, 0.2); }
    .logo { max-width: 100%; max-height: 100%; }
    .info-container { margin-left: 10px; }
    .channel-name { margin: 0; font-size: 16px; font-weight: bold; color: white; }
    .status { margin: 0; font-size: 14px; color: #f87171; }


    /* ==========================================================================
       4. RESPONSIVE LOGIC
       ========================================================================== */
    
     /* --- DESKTOP (Side by Side) --- */
    @media (min-width: 769px) {
        #main-wrapper {
            flex-direction: row; 
            align-items: flex-start; 
        }

        .video-container {
            flex: 1; 
            width: auto;
            aspect-ratio: 16 / 9; 
            height: auto; 
            border-right: 1px solid var(--border-color);
        }

        .sidebar {
            width: var(--sidebar-width); 
            height: 100vh; 
            flex-shrink: 0;
            overflow: hidden;
        }
    }


    /* --- MOBILE (Stacked) --- */
    @media (max-width: 768px) {
        #main-wrapper {
            flex-direction: column; 
        }

        .video-container {
            width: 100%;
            aspect-ratio: 16 / 9; 
            height: auto; 
            flex-shrink: 0; 
        }

        /* PERBAIKAN UTAMA: Sidebar mengisi sisa layar */
        .sidebar {
            width: 100%;
            flex: 1; 
            height: auto; 
            border-left: none;
            /* Pastikan tidak ada max-height yang membatasi */
            max-height: none; 
        }

        .cd-box { padding: 15px; width: 90%; }
        .cd-title { font-size: 14px; }
        .cd-timer { font-size: 32px; }
        .cd-info { font-size: 14px; }
        .channel-card { padding: 12px 14px; }
        .ch-name { font-size: 17px; }
        .ch-league { font-size: 13px; }
    }

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