/* C-DRAMAFLIX PREMIUM STYLE 
    Version: 2.0 (Mobile Optimized)
    Format: Expanded
*/

:root {
    --primary: #e50914;
    --primary-hover: #ff0a16;
    --bg-dark: #080808;
    --card-bg: #121212;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --nav-bg: rgba(0, 0, 0, 0.95);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    /* Memberikan ruang agar konten tidak tertutup Bottom Nav di HP */
    padding-bottom: 80px; 
}

/* --- TOP NAVIGATION (STICKY) --- */
nav {
    background-color: var(--nav-bg);
    padding: 10px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    gap: 15px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}

.logo span {
    color: var(--primary);
}

.search-box {
    display: flex;
    background-color: #1a1a1a;
    border-radius: 25px;
    padding: 2px 15px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #333;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    padding: 8px;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
}

/* --- PLAYER SECTION (CLEAN) --- */
.player-wrapper {
    width: 100%;
    background-color: #000;
    overflow: hidden;
}

.player-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.welcome-overlay {
    text-align: center;
    color: #888;
}

.play-btn-anim {
    width: 60px;
    height: 60px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    margin: 0 auto 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(229, 9, 20, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

/* --- INFO SECTION (PISAH DARI PLAYER AGAR TIDAK BENTROK) --- */
.info-section {
    padding: 15px 5%;
    background-color: var(--bg-dark);
    border-bottom: 1px solid #1a1a1a;
}

#playing-title {
    font-size: 18px;
    font-weight: 700;
    margin: 5px 0 15px 0;
    line-height: 1.4;
}

.status-live {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-live i {
    font-size: 8px;
    color: #00ff00;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons button {
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- GRID & CARDS (9:16) --- */
.container {
    padding: 20px 5%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #1a1a1a;
}

.img-box {
    width: 100%;
    aspect-ratio: 9 / 16;
    position: relative;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-hd {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    font-size: 9px;
    padding: 3px 6px;
    font-weight: bold;
    border-radius: 3px;
}

.info {
    padding: 10px;
}

.info h3 {
    font-size: 13px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- GENRE FILTER --- */
.genre-filter {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 15px 5%;
    scrollbar-width: none; /* Hilangkan scrollbar di Firefox */
}

.genre-filter::-webkit-scrollbar {
    display: none; /* Hilangkan scrollbar di Chrome/Safari */
}

.genre-filter button {
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 13px;
}

.genre-filter button.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* --- 1. NAV ATAS (KHUSUS HEADER) --- */
/* Pastikan ini hanya untuk header saja */
header nav {
    background-color: var(--nav-bg);
    padding: 10px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #222;
}

/* --- 2. NAV BAWAH (THE REAL BOTTOM NAV) --- */
/* Kita gunakan ID agar CSS-nya sangat kuat (Specific) */
#app-bottom-navigator {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 65px !important;
    background-color: #0f0f0f !important; /* Hitam Pekat */
    border-top: 1px solid #222;
    display: flex !important; /* Gunakan flex agar item sejajar */
    justify-content: space-around;
    align-items: center;
    z-index: 999999 !important; /* Di atas segalanya termasuk banner hosting */
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

/* Berikan jarak pada body agar konten tidak tertutup */
body {
    padding-bottom: 80px !important;
}

/* Style Item di dalam Nav Bawah */
#app-bottom-navigator .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    flex: 1;
    cursor: pointer;
}

#app-bottom-navigator .nav-item i {
    font-size: 18px;
    margin-bottom: 3px;
}

#app-bottom-navigator .nav-item span {
    font-size: 10px;
}

#app-bottom-navigator .nav-item.active {
    color: var(--primary); /* Warna merah brand */
}

/* Sembunyikan di Desktop */
@media (min-width: 769px) {
    #app-bottom-navigator {
        display: none !important;
    }
    body {
        padding-bottom: 0 !important;
    }
}


/* --- RESPONSIVE DESKTOP --- */
@media (min-width: 769px) {
    .mobile-bottom-nav { display: none !important; }
    body { padding-bottom: 0 !important; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 25px; }
}
