.top-nav {
    width: auto;
    max-width: 95%;
    margin: 0 auto;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
    font-family: 'Poppins', sans-serif;
    overflow: visible; /* Pastikan dropdown tidak terpotong */
}

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

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: inherit;
    padding: 6px 10px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.nav-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Search Bar Styles */
.search-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    max-width: 40%;
}

#liveSearchInput {
    width: 100%;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#liveSearchInput:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #5b61ff;
    box-shadow: 0 0 10px rgba(91, 97, 255, 0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-primary, #1a1a1a); /* Gunakan bg-primary agar solid */
    border-radius: 10px;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    display: none;
    z-index: 1000;
    border: 1px solid rgba(128, 128, 128, 0.2);
    backdrop-filter: blur(10px);
}

.search-results.active {
    display: block;
}

.search-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.search-card:last-child {
    border-bottom: none;
}

.search-card:hover {
    background: rgba(128, 128, 128, 0.1);
}

.search-title {
    font-size: 14px;
    font-weight: 500;
}

.search-icon-img {
    width: 32px;
    height: 32px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
}

.search-icon-wrapper {
    width: 32px;
    height: 32px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-wrapper .icon {
    transform: scale(0.24); /* Sedikit lebih kecil agar pas */
    transform-origin: center;
    flex-shrink: 0;
}

/* Hamburger Menu Default (Hidden on Desktop) */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    padding: 5px;
    z-index: 101;
}

@media (max-width: 768px) {
    .search-container {
        width: 150px;
    }

    .hamburger-menu {
        display: block;
    }


    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 100px;
        background: #ffffff29; /* Mengikuti tema */
        flex-direction: column;
        padding: 15px;
        box-shadow: -5px 5px 15px rgba(0,0,0,0.2);
        border-radius: 0 0 0 15px;
        gap: 10px;
        align-items: flex-start;
        border: 1px solid rgba(128, 128, 128, 0.1);
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-btn {
        width: 100%;
        text-align: left;
        padding: 10px;
        border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    }

    .nav-btn:last-child {
        border-bottom: none;
    }
    
    #theme-toggle {
        justify-content: flex-start;
        border-radius: 5px;
    }
}