
:root {
    --bg-color: #000000;
    --surface-color: #141414;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
    --text-color: #ffffff;
    --text-muted: #b3b3b3;
    --header-height: 70px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    height: var(--header-height);
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    transition: var(--transition);
}

header.scrolled {
    background: var(--bg-color);
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: 1px;
}

.search-container {
    flex: 0 1 400px;
    position: relative;
    margin: 0 20px;
}

.search-container input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid transparent;
    padding: 8px 15px 8px 40px;
    border-radius: 4px;
    color: white;
    outline: none;
    transition: var(--transition);
}

.search-container input:focus {
    background: rgba(255,255,255,0.2);
    border-color: var(--accent-color);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Hamburger Menu */
.hamburger {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--surface-color);
    z-index: 1000;
    padding: 100px 30px;
    transition: 0.5s;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.menu-overlay.active {
    right: 0;
}

.menu-overlay ul {
    list-style: none;
}

.menu-overlay ul li {
    margin-bottom: 25px;
}

.menu-overlay ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: var(--transition);
}

.menu-overlay ul li a:hover {
    color: var(--accent-color);
    padding-left: 10px;
}

/* Main Content */
main {
    margin-top: var(--header-height);
    padding: 40px 4%;
    min-height: 80vh;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tag {
    padding: 6px 15px;
    background: var(--surface-color);
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.tag.active, .tag:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px 15px;
}

.video-card {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.video-card:hover {
    transform: scale(1.05);
    z-index: 2;
}

.thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #222;
}

.thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.btn-page {
    padding: 8px 16px;
    background: var(--surface-color);
    border: 1px solid #333;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

.btn-page.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* Footer */
footer {
    padding: 60px 4% 30px;
    background: var(--bg-color);
    border-top: 1px solid #333;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    color: #555;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .search-container {
        display: none; /* Hide main search on mobile, can use a toggle later */
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .logo {
        font-size: 1.4rem;
    }
}
/* ==== FIX MOBILE & HAMBURGER MENU ==== */
.close-menu {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 3rem;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    z-index: 2000;
}
.menu-overlay.active .close-menu {
    display: block;
}
.close-menu:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 4%;
    }
    .search-container {
        display: block !important; /* Paksa muncul di HP */
        flex: 1 1 100%;
        order: 3;
        margin: 15px 0 5px 0;
    }
    main {
        margin-top: 140px; /* Dorong video ke bawah biar gak ketutup header */
    }
    .logo {
        font-size: 1.4rem;
    }
}
