:root {
    --red: #E50914;
    --bg: #000000;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 15px; 
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    background: var(--bg); 
    color: white; 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
    margin: 0; 
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* ==========================================================================
   MAIN CONTAINER & PLAYER
   ========================================================================== */
.container { 
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    position: relative;
}

#player-container { 
    position: absolute; 
    inset: 0; 
    background: #000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 100%;
    height: 100%;
}

#jw-player-element { 
    width: 100% !important; 
    height: 100% !important; 
    z-index: 1; 
}

/* ==========================================================================
   AUTO-HIDE SIDEBAR (PINALITAN ANG HOVER NG ACTIVE CLASS)
   ========================================================================== */
.sidebar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidebar-collapsed-width);
    background: rgba(0, 0, 0, 0.1); 
    backdrop-filter: blur(15px);
    z-index: 2147483647 !important; 
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
    
    overflow-x: hidden !important;
    overflow-y: auto !important;
    
    display: flex;
    flex-direction: column;
    padding: 30px 0;
    
    border: none !important;
    border-right: 0.5px solid rgba(255, 255, 255, 0.05) !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;

    -ms-overflow-style: none !important;  
    scrollbar-width: none !important;     
}

.sidebar::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    display: none !important;
    background: transparent !important;
}

.sidebar::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-thumb {
    background: transparent !important;
    display: none !important;
    border: none !important;
}

/* KONTROLADO NG CLASS ANG PAGBUKA */
.sidebar.active {
    width: var(--sidebar-width);
    background: rgba(10, 10, 10, 0.95); 
    
    border: none !important;
    border-right: 0.5px solid rgba(255, 255, 255, 0.12) !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* SIDEBAR LOGO */
.sidebar .logo {
    color: var(--red);
    font-size: 22px;
    font-weight: bold;
    padding: 0 25px;
    margin-bottom: 25px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.sidebar.active .logo {
    opacity: 1;
}

.sidebar .logo span { 
    color: white; 
}

/* ==========================================================================
   SEARCH BAR DESIGN
   ========================================================================== */
.search-container {
    padding: 0 25px;
    margin-bottom: 20px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.sidebar.active .search-container {
    opacity: 1;
}

#search-bar {
    width: 100%;
    padding: 10px 12px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: white;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

#search-bar:focus {
    border-color: var(--red);
    background: #1a1a1a;
}

#search-bar::placeholder {
    color: #555;
    font-size: 12px;
}

/* ==========================================================================
   SIDEBAR HEADER & MENU LINKS
   ========================================================================== */
.sidebar-header {
    font-size: 11px;
    color: #555;
    letter-spacing: 2px;
    font-weight: bold;
    padding: 0 25px;
    margin-bottom: 15px;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
}

.sidebar.active .sidebar-header {
    opacity: 1;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.nav-links li {
    width: 100%;
}

.nav-links li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    padding: 16px 25px;
    white-space: nowrap;
    transition: all 0.2s;
    border: none !important;
    outline: none !important;
}

.nav-links li a:focus,
.nav-links li a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05); 
}

.nav-links li a:active {
    background: rgba(229, 9, 20, 0.8); 
    color: white;
}

.ch-title {
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   INVISIBLE AUTOPLAY OVERLAY & MODALS
   ========================================================================== */
#autoplay-trigger {
    position: absolute;
    inset: 0;
    background: transparent; 
    z-index: 2147483646; 
    cursor: pointer;
}

/* Naka-position absolute para lumitaw sa ibabaw ng player kahit fullscreen mode */
.modal { 
    display: none; 
    position: absolute; 
    inset: 0; 
    background: rgba(0,0,0,0.9); 
    backdrop-filter: blur(10px);
    z-index: 2147483647 !important; 
    align-items: center; 
    justify-content: center; 
}

.modal-content { 
    background: #050505; 
    padding: 40px; 
    border-radius: 4px; 
    width: 90%; 
    max-width: 360px; 
    text-align: center; 
    border: 0.5px solid rgba(255, 255, 255, 0.1) !important; 
}

.modal-content h3 {
    margin-top: 0;
    font-size: 18px;
    letter-spacing: 1px;
}

.category-list { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    margin: 25px 0; 
}

.category-btn { 
    background: #111; 
    color: white; 
    border: 0.5px solid rgba(255, 255, 255, 0.05) !important; 
    padding: 16px; 
    cursor: pointer; 
    font-weight: bold; 
    outline: none;
    transition: all 0.3s;
}

.category-btn:focus, .category-btn:hover { 
    background: var(--red); 
    border-color: rgba(255, 255, 255, 0.2) !important; 
}

.close-modal { 
    background: none; 
    color: #555; 
    border: none; 
    cursor: pointer; 
    text-decoration: none; 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
