@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background-color: #050505; color: #fff; padding-bottom: 70px; /* Space for mobile nav */ }
a { text-decoration: none; color: inherit; }

/* Header & Navigation */
header { padding: 20px 40px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { height: 50px; }
.logo-text { font-size: 28px; font-weight: 900; letter-spacing: 2px; }

.main-menu { display: flex; gap: 30px; font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.main-menu a:hover { color: #ccc; }

.search-box { position: relative; }
.search-box input { background: #1a1a1a; border: none; padding: 10px 40px 10px 15px; border-radius: 5px; color: #fff; width: 250px; }
.search-box i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #888; }

.sub-menu { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; font-size: 14px; font-weight: 700; margin-bottom: 30px; }
.sub-menu a.highlight { color: #ff3333; }

/* Grid Layout */
.grid-container { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; padding: 0 40px; }
.video-card { display: flex; flex-direction: column; cursor: pointer; }
.thumbnail { position: relative; aspect-ratio: 2/3; background: #222; overflow: hidden; border-radius: 4px; }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.meta-badges { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; font-size: 12px; font-weight: bold; text-shadow: 1px 1px 2px #000; }
.video-title { font-size: 12px; text-align: center; margin-top: 8px; color: #ccc; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer & Pagination */
footer { display: flex; justify-content: space-between; align-items: center; padding: 40px; margin-top: 40px; border-top: 1px solid #222; }
.pagination { display: flex; gap: 8px; align-items: center; }
.pagination a { padding: 5px 10px; border: 1px solid #444; border-radius: 20px; font-size: 12px; }
.pagination a.active { background: #fff; color: #000; }
.share-btn { border: 1px solid #fff; padding: 8px 15px; border-radius: 20px; font-size: 14px; }

/* Mobile Bottom Menu */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; padding: 15px; justify-content: space-around; align-items: center; z-index: 1000; color: #000; font-size: 24px; }

/* Lightbox Modal */
.lightbox-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); z-index: 2000; justify-content: center; align-items: center; }
.lightbox-content { background: #1a1a1a; padding: 20px; border-radius: 8px; width: 80%; max-width: 300px; text-align: center; border: 1px solid #333; }
.lightbox-content h3 { margin-top: 0; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; font-size: 18px; }
.lightbox-cats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; max-height: 50vh; overflow-y: auto; }
.lightbox-cats a { background: #333; padding: 12px; border-radius: 4px; font-weight: bold; font-size: 14px; }
.lightbox-cats a:hover { background: #ff3333; }
.lightbox-content button { background: #fff; color: #000; border: none; padding: 12px 20px; border-radius: 4px; font-weight: bold; cursor: pointer; width: 100%; font-size: 14px; }

/* Responsive Overrides */
@media (max-width: 900px) {
    .grid-container { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 10px; }
    header { padding: 15px 10px; }
    
    /* Layout fix: Logo Left, Search Right */
    .top-bar { flex-direction: row; align-items: center; gap: 15px; }
    .logo-area img, .logo-area i { height: 35px; font-size: 30px !important; }
    .logo-text { font-size: 18px; }
    .search-box { flex: 1; max-width: 180px; }
    .search-box input { width: 100%; padding: 8px 30px 8px 10px; font-size: 12px; }
    
    /* Hide desktop elements */
    .main-menu, .share-btn, .sub-menu { display: none; }
    
    footer { flex-direction: column; gap: 20px; padding: 20px 10px; }
    .mobile-nav { display: flex; }
}