/* [AWAL FILE] assets/css/style.css */
:root {
    --primary-color: #ff0055;
    --dark-bg: #1a1a1a;
    --sidebar-width: 250px;
    --header-height: 60px;
    --text-color: #e0e0e0;
}

body {
    background-color: #121212;
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ============================
   1. HEADER & NAVIGATION
   ============================ */
header {
    background-color: var(--dark-bg);
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #333;
    box-sizing: border-box;
    justify-content: space-between;
}

.header-left { display: flex; align-items: center; }
.logo { font-weight: bold; font-size: 1.2rem; color: var(--primary-color); margin-left: 15px; text-decoration: none; }
.hamburger { cursor: pointer; font-size: 1.5rem; background: none; border: none; color: white; }

/* Search Bar */
.search-container { position: relative; width: 40%; max-width: 500px; }
.search-input { width: 100%; padding: 8px 15px; border-radius: 20px; border: 1px solid #444; background: #222; color: white; box-sizing: border-box; }
.search-results { position: absolute; top: 100%; left: 0; width: 100%; background: #222; border: 1px solid #333; display: none; z-index: 1001; max-height: 300px; overflow-y: auto; }
.search-item { padding: 10px; border-bottom: 1px solid #333; display: flex; align-items: center; cursor: pointer; }
.search-item:hover { background: #333; }
.search-item img { width: 40px; height: 40px; object-fit: cover; margin-right: 10px; border-radius: 4px; }

/* Header Right (FIX JARAK IKON) */
.header-right { 
    display: flex; 
    align-items: center; 
    gap: 20px; /* Memberi jarak antara Search, Lonceng, dan Profil */
}

/* Notif & Profile Wrappers */
.notif-menu, .profile-menu { 
    position: relative; 
    cursor: pointer; 
    display: flex;
    align-items: center;
}

.notif-icon { 
    position: relative; 
    font-size: 1.2rem;
    color: #ccc; 
    transition: 0.3s;
}
.notif-icon:hover { color: white; }

.badge { 
    position: absolute; 
    top: -8px; 
    right: -8px; 
    background: red; 
    color: white; 
    font-size: 0.65rem; 
    padding: 2px 5px; 
    border-radius: 50%; 
    border: 2px solid var(--dark-bg);
}

/* Dropdowns General Style */
.profile-dropdown, .notif-dropdown {
    position: absolute; 
    right: 0; 
    top: 50px; /* Turunkan sedikit agar tidak nempel header */
    background: #222; 
    border: 1px solid #333; 
    width: 200px;
    display: none; 
    flex-direction: column; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
    border-radius: 5px; 
    z-index: 1002;
    overflow: hidden;
}

/* Spesifik Notif Dropdown (Lebih Lebar) */
.notif-dropdown { 
    width: 300px; 
    right: -10px; 
}

.profile-dropdown.active, .notif-dropdown.active { display: flex; }

.profile-dropdown a, .notif-item-drop { 
    padding: 12px 15px; 
    text-decoration: none; 
    color: #ccc; 
    border-bottom: 1px solid #333; 
    display: block; 
    font-size: 0.9rem;
}
.profile-dropdown a:hover, .notif-item-drop:hover { background: #333; color: white; }

.notif-header { 
    padding: 10px 15px; 
    border-bottom: 1px solid #333; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #2a2a2a; 
    font-size: 0.9rem; 
    font-weight: bold;
}
.notif-header a { font-size: 0.8rem; color: var(--primary-color); text-decoration: none; }
.notif-item-drop.unread { background: #2a2222; border-left: 3px solid var(--primary-color); }
.notif-text { font-size: 0.85rem; margin-bottom: 3px; line-height: 1.4; }
.notif-time { font-size: 0.7rem; color: #666; }


/* ============================
   2. SIDEBAR
   ============================ */
.sidebar {
    position: fixed; left: -250px; top: var(--header-height); width: var(--sidebar-width); height: calc(100% - var(--header-height));
    background: var(--dark-bg); transition: 0.3s; z-index: 999; padding-top: 20px; border-right: 1px solid #333; overflow-y: auto;
}
.sidebar.active { left: 0; }
.sidebar a { display: block; padding: 15px 20px; color: #bbb; text-decoration: none; font-size: 1rem; }
.sidebar a:hover { background: #333; color: white; border-left: 4px solid var(--primary-color); }
.sidebar .ad-container { width: 100%; overflow: hidden; box-sizing: border-box; display: flex; justify-content: center; }
.sidebar .ad-container iframe, .sidebar .ad-container img, .sidebar .ad-container div { max-width: 100% !important; height: auto !important; }


/* ============================
   3. MAIN CONTENT & COMPONENTS
   ============================ */
.main-content { margin-top: var(--header-height); padding: 20px; transition: 0.3s; }

/* Grid Cerita/Komik */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.content-card {
    background: #222; border-radius: 8px; overflow: hidden; transition: transform 0.2s; text-decoration: none; color: white; display: block; position: relative;
}
.content-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(255,0,85,0.2); }
.card-thumb { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.card-info { padding: 10px; }
.card-title { font-size: 0.9rem; font-weight: bold; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 0.75rem; color: #888; display: flex; justify-content: space-between; }
.badge-type { position: absolute; top: 5px; right: 5px; background: var(--primary-color); color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }


/* Video Trending (Shorts) */
.video-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.video-card {
    aspect-ratio: 9 / 16; background: #000; border-radius: 10px; overflow: hidden; position: relative; width: 100%;
    max-width: 220px !important; 
}
.video-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: 0.3s; }
.video-card:hover img { transform: scale(1.05); opacity: 0.6; }


/* ============================
   4. RESPONSIVE (MOBILE)
   ============================ */
@media (min-width: 768px) {
    .sidebar { left: 0; }
    .sidebar.collapsed { left: -250px; }
    .main-content { margin-left: var(--sidebar-width); }
    .main-content.expanded { margin-left: 0; }
}

@media (max-width: 768px) {
    .main-content { margin-left: 0; padding-top: 10px; }
    .sidebar { left: -250px; } .sidebar.active { left: 0; }
    
    /* Fix Search Bar Mobile */
    .search-container { display: none; }
    .search-container.show { display: block !important; position: absolute; top: 60px; left: 0; right: 0; width: 100%; background: var(--dark-bg); padding: 10px; box-shadow: 0 5px 5px rgba(0,0,0,0.5); box-sizing: border-box; }
    .search-input { width: 100%; max-width: 100%; box-sizing: border-box; }
    
    /* Fix Notifikasi Offside di HP */
    .notif-dropdown { 
        right: -60px; /* Geser ke kiri agar masuk layar */
        width: 280px; /* Kecilkan sedikit lebarnya */
    }

    /* Video Horizontal Scroll di HP */
    .video-grid-wrapper {
        display: flex; overflow-x: auto; gap: 10px; padding-bottom: 15px; scroll-snap-type: x mandatory;
        -ms-overflow-style: none; scrollbar-width: none;
    }
    .video-grid-wrapper::-webkit-scrollbar { display: none; }
    .video-card { min-width: 140px; max-width: 140px !important; scroll-snap-align: start; }
}

/* Style untuk Placeholder Iklan (Hardcode Phase) */
.ad-slot {
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 20px auto; /* Jarak atas bawah */
    overflow: hidden;
}

/* Ukuran standar Iklan Display (Contoh) */
.ad-leaderboard { width: 100%; max-width: 728px; height: 90px; }
.ad-rectangle { width: 100%; max-width: 300px; height: 250px; }
.ad-mobile { width: 100%; max-width: 320px; height: 50px; }
/* [AKHIR FILE] */