/* ============================================================ */
/* STYLE CSS FINAL - FIXED LAYOUT & ADS                         */
/* ============================================================ */

/* 1. RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    background-color: #080808; 
    color: #e5e5e5; 
    font-family: Arial, sans-serif; 
    padding-bottom: 120px; /* Jarak bawah agar iklan sticky tidak nutup konten */
    font-size: 14px; 
    line-height: 1.5; 
}
a { text-decoration: none; color: inherit; transition: 0.2s; }
iframe { border: none; overflow: hidden; } /* Hapus border bawaan iframe */

/* 2. LAYOUT UTAMA */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Navbar */
.navbar { 
    background: #000; 
    border-bottom: 1px solid #222; 
    padding: 15px 0; 
    text-align: center; 
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.brand { 
    color: #e50914; font-weight: 900; font-size: 24px; text-transform: uppercase; 
}

/* 3. ZONA IKLAN (PERBAIKAN UTAMA) */
.ad-zone {
    width: 100%;
    display: flex;
    justify-content: center; /* Iklan otomatis di tengah */
    align-items: center;
    padding: 20px 0;
    background: #0f0f0f;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #1a1a1a;
}

/* 4. GRID SYSTEM */
.movie-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 20px; 
    padding: 10px 0; 
}
@media (max-width: 600px) {
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
}

/* 5. KARTU FILM */
.card { 
    background-color: #141414; border: 1px solid #222; border-radius: 8px; 
    overflow: hidden; position: relative; display: block; 
    transition: transform 0.2s;
}
.card:hover { 
    transform: translateY(-5px); border-color: #e50914; 
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.3); z-index: 10; 
}

/* 6. GAMBAR (LANDSCAPE + FRAME) */
.poster-box { 
    position: relative; width: 100%; 
    padding-top: 50%; /* Landscape Mode */
    background: #000; overflow: hidden; 
}
.poster-img { 
    position: absolute; 
    width: 90%; height: 90%; /* Frame Effect */
    top: 5%; left: 5%; 
    object-fit: cover; object-position: center top; 
    border-radius: 4px; box-shadow: 0 0 10px rgba(0,0,0,0.8);
    transition: transform 0.4s ease; 
}
.card:hover .poster-img { transform: scale(1.05); }

.durasi { 
    position: absolute; top: 12%; right: 8%; 
    background: #e50914; color: #fff; font-size: 10px; padding: 2px 6px; 
    border-radius: 3px; font-weight: bold; z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.poster-overlay {
    position: absolute; bottom: 5%; left: 5%; width: 90%; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    pointer-events: none; border-radius: 0 0 4px 4px;
}

/* 7. TEXT INFO */
.section-title { 
    border-left: 4px solid #e50914; padding-left: 15px; margin-bottom: 20px; 
    font-size: 18px; font-weight: bold; color: #fff;
}
.info { padding: 12px; }
.title { 
    font-size: 14px; font-weight: bold; margin-bottom: 5px; color: #fff; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.meta { font-size: 11px; color: #888; display: flex; justify-content: space-between; }

/* 8. PAGINATION */
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 40px 0; }
.btn { background: #222; color: #fff; padding: 10px 20px; border-radius: 4px; border: 1px solid #333; }
.btn:hover { background: #e50914; border-color: #e50914; }
.page-info { color: #666; font-size: 12px; }

/* 9. STICKY ADS (PERBAIKAN AGAR RAPI) */
.sticky-ads { 
    position: fixed; 
    bottom: 0; left: 0; 
    width: 100%; 
    background: #000; 
    border-top: 1px solid #333; 
    z-index: 9999; /* Pastikan paling atas */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

.sticky-ads button {
    position: absolute;
    top: -25px;
    right: 10px;
    background: #e50914;
    color: white;
    border: none;
    font-size: 10px;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
}

.ad-content {
    width: 100%;
    display: flex;
    justify-content: center;
}