:root {
    --primary: #2ecc71;
    --bg: #0b0b0b;
    --card: #181818;
    --text: #ffffff;
    --font: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #222;
}

.logo { font-size: 1rem; font-weight: 800; letter-spacing: 0.5px; }
.logo span { color: var(--primary); }
.icon-btn { background: none; border: none; color: white; font-size: 1.1rem; cursor: pointer; }

/* Search Overlay */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 1000;
}
.search-header { display: flex; align-items: center; padding: 10px; border-bottom: 1px solid #333; }
#searchInput { flex: 1; background: none; border: none; color: white; font-size: 0.9rem; padding: 10px; outline: none; }

/* Genre Bar */
.genre-container {
    display: flex;
    overflow-x: auto;
    padding: 8px 5%;
    gap: 6px;
    background: #000;
    scrollbar-width: none;
}
.genre-container::-webkit-scrollbar { display: none; }
.genre-btn {
    background: #1a1a1a; border: 1px solid #333; color: #777;
    padding: 5px 12px; border-radius: 15px; font-size: 0.7rem; white-space: nowrap;
    cursor: pointer;
}
.genre-btn.active { background: var(--primary); color: #000; border-color: var(--primary); font-weight: bold; }

/* Grid System - 3 Kolom Mobile */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
}

@media (min-width: 1024px) {
    .movie-grid { grid-template-columns: repeat(6, 1fr); gap: 20px; padding: 20px 5%; }
}

.movie-card { background: var(--card); border-radius: 6px; overflow: hidden; border: 1px solid #222; cursor: pointer; }
.movie-card img { width: 100%; height: 150px; object-fit: cover; }
@media (min-width: 1024px) { .movie-card img { height: 260px; } }

.movie-info { padding: 6px; }
.movie-info h3 { margin: 0; font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-info span { font-size: 0.6rem; color: var(--primary); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 15px; padding: 20px 0; }
.page-btn {
    background: #222; border: 1px solid var(--primary); color: var(--primary);
    padding: 6px 12px; border-radius: 4px; font-size: 0.75rem; cursor: pointer;
}
.page-btn:disabled { border-color: #333; color: #444; cursor: not-allowed; }
#pageInfo { font-size: 0.75rem; color: #666; }

/* Modal Player (Fix Terpotong di Desktop) */
.modal { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.95); 
    z-index: 2000; 
    padding: 20px;
}

.modal-content { 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
    max-width: 900px; 
    margin: 0 auto; 
    background: #111; 
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile full screen modal */
@media (max-width: 768px) {
    .modal { padding: 0; }
    .modal-content { height: 100%; border-radius: 0; top: 0; transform: none; }
}

.close-modal {
    position: absolute; right: 15px; top: 15px; color: white; background: rgba(0,0,0,0.5);
    border: none; border-radius: 50%; width: 35px; height: 35px; z-index: 10; cursor: pointer;
}

.video-wrapper { width: 100%; background: #000; }
.video-container { width: 100%; position: relative; padding-bottom: 56.25%; }
.video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.modal-info { padding: 20px; background: #111; border-top: 1px solid #222; }
.modal-info h2 { font-size: 1rem; margin: 0; }
.modal-info p { font-size: 0.7rem; color: #555; margin-top: 5px; }

footer { text-align: center; padding: 20px; font-size: 0.7rem; opacity: 0.5; }
