@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root { --bg: #0b0f19; --card: #161d2f; --primary: #ffb400; --border: #2d3748; --text: #f8fafc; }
body { background: var(--bg); color: var(--text); font-family: 'Roboto', sans-serif; margin: 0; line-height: 1.5; }

.container { max-width: 95%; margin: 0 auto; padding: 0 15px; }
@media (min-width: 1400px) { .container { max-width: 1400px; } }

/* Navbar */
.navbar { background: var(--card); padding: 12px 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 99; }
.nav-content { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.logo { font-size: 24px; font-weight: 700; text-decoration: none; color: #fff; letter-spacing: 0.5px; }
.logo span { color: var(--primary); }
.menu-desktop { display: flex; gap: 18px; align-items: center; }
.menu-desktop a, .dropbtn { color: #cbd5e1; text-decoration: none; font-size: 15px; font-weight: 500; background: none; border: none; cursor: pointer; padding: 5px; font-family: 'Roboto', sans-serif; }
.menu-desktop a:hover, .dropbtn:hover { color: var(--primary); }

a:focus, button:focus, input:focus { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown:hover .dropdown-content, 
.dropdown:focus-within .dropdown-content,
.dropdown-content.show { 
    display: grid; 
}
.years-grid { grid-template-columns: repeat(4, 1fr); }
.dropdown:hover .dropdown-content, .dropdown:focus-within .dropdown-content { display: grid; }
.dropdown-content a { padding: 8px; font-size: 14px; color: #94a3b8; border-radius: 4px; }
.dropdown-content a:hover { background: var(--border); color: #fff; }

/* Grid Danh sách phim */
.list-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin-top: 20px; }
@media (min-width: 768px) { .list-container { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; } }

.film-item { display: flex; flex-direction: column; gap: 10px; }
.film-link { position: relative; display: block; width: 100%; border-radius: 8px; overflow: hidden; }
.film-link img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; transition: transform 0.3s; }
.film-link:hover img { transform: scale(1.05); }
.badge-ep { position: absolute; top: 8px; left: 8px; background: rgba(220, 38, 38, 0.95); color: #fff; padding: 4px 8px; font-size: 12px; font-weight: 500; border-radius: 4px; }

.film-info { padding: 4px 0; }
.film-info .name { display: block; color: var(--primary); font-weight: 500; font-size: 16px; margin-bottom: 4px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-info .sub-name { color: #94a3b8; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-meta { margin-top: 6px; font-size: 13px; color: #64748b; }

/* Chi tiết phim */
.player-container { margin-bottom: 30px; border-radius: 8px; overflow: hidden; background: #000; width: 100%; aspect-ratio: 16/9; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.player-container iframe { width: 100%; height: 100%; }

.film-detail-box { display: flex; gap: 30px; background: var(--card); padding: 25px; border-radius: 8px; flex-wrap: wrap; border: 1px solid var(--border); }
.detail-thumb { width: 220px; max-width: 100%; border-radius: 8px; object-fit: cover; aspect-ratio: 2/3; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.detail-info { flex: 1; min-width: 280px; }
.detail-info h1 { color: var(--primary); margin: 0 0 5px 0; font-size: 28px; line-height: 1.2; }
.detail-info h2 { color: #94a3b8; font-size: 16px; margin: 0 0 20px 0; font-weight: 400; }
.meta-data p { margin: 8px 0; color: #cbd5e1; font-size: 15px; }
.meta-data strong { color: #fff; min-width: 100px; display: inline-block; }
.content-data h3 { color: #fff; font-size: 18px; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-top: 25px; }
.content-data p { color: #cbd5e1; font-size: 15px; line-height: 1.7; margin-top: 15px; text-align: justify; }

.eps-container { margin-top: 30px; background: var(--card); padding: 25px; border-radius: 8px; border: 1px solid var(--border); }
.eps-container h3 { color: var(--primary); margin: 0 0 15px 0; font-size: 18px; }
.eps-list { display: flex; flex-wrap: wrap; gap: 10px; }
.eps-list button { background: #1e293b; color: #e2e8f0; border: 1px solid var(--border); padding: 10px 18px; border-radius: 4px; cursor: pointer; font-size: 15px; font-family: 'Roboto', sans-serif; transition: 0.2s; font-weight: 500; }
.eps-list button:hover, .eps-list button:focus { background: var(--primary); color: #000; border-color: var(--primary); }

.btn-back { display: inline-block; color: #fff; text-decoration: none; padding: 12px 25px; background: #334155; border-radius: 6px; font-weight: 500; transition: 0.2s; }
.btn-back:hover { background: #475569; }

/* Phân trang & Search */
.search-box { background: #1e293b; border-radius: 20px; padding: 4px 15px; display: flex; align-items: center; border: 1px solid var(--border); }
.search-box input { background: none; border: none; color: #fff; outline: none; padding: 8px; width: 220px; font-family: 'Roboto', sans-serif; font-size: 14px; }
.search-box button { background: none; border: none; color: #94a3b8; cursor: pointer; padding: 5px 10px; }
.search-box button:hover { color: var(--primary); }

.pagination-info { text-align: center; margin-top: 30px; color: #94a3b8; font-size: 14px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 15px 0 50px 0; flex-wrap: wrap; }
.pagination a, .pagination span.dots { padding: 8px 14px; background: #1e293b; color: #cbd5e1; border: 1px solid var(--border); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 6px; transition: 0.2s; }
.pagination a.active { background: var(--primary); color: #000; border-color: var(--primary); }
.pagination a:hover:not(.active) { background: #334155; color: #fff; }

/* Mobile */
@media (max-width: 900px) { 
    .nav-content { flex-direction: column; align-items: flex-start; }
    .search-box { width: 100%; box-sizing: border-box; }
    .search-box input { width: 100%; }
    .menu-desktop { width: 100%; overflow-x: auto; padding-bottom: 10px; white-space: nowrap; }
    .dropdown-content { position: fixed; left: 15px; right: 15px; width: auto; max-height: 60vh; overflow-y: auto;}
    .detail-info h1 { font-size: 22px; }
}
/* --- CHÈN THÊM VÀO CUỐI FILE STYLE.CSS HIỆN TẠI CỦA BẠN --- */

/* Thanh Lọc Phim */
.filter-section { margin-top: 20px; display: block; }
.filter-wrapper { 
    display: flex; align-items: center; gap: 12px; background: #1e293b; 
    padding: 12px 20px; border-radius: 8px; flex-wrap: wrap; 
    border: 1px solid #334155; 
}
.filter-label { color: #fff; font-weight: 500; font-size: 15px; margin-right: 5px; }
.filter-wrapper select { 
    background: #0f172a; color: #cbd5e1; border: 1px solid #334155; 
    padding: 10px 14px; border-radius: 6px; font-family: 'Roboto', sans-serif; 
    font-size: 14px; outline: none; cursor: pointer; flex: 1; min-width: 140px;
    appearance: none; /* Xoá mũi tên mặc định để giao diện sạch hơn */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23cbd5e1%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
}
.filter-wrapper select:focus { border-color: #ffb400; }
#btn-filter { 
    background: #22c55e; color: #fff; border: none; padding: 10px 24px; 
    border-radius: 6px; font-weight: 500; font-size: 15px; cursor: pointer; 
    transition: 0.2s; font-family: 'Roboto', sans-serif;
}
#btn-filter:hover { background: #16a34a; }

@media (max-width: 900px) {
    .filter-wrapper { flex-direction: column; align-items: stretch; }
    .filter-wrapper select { width: 100%; }
}