/* Navbar Styles */
/* Netflix-style fixed TOP navigation bar (desktop).
   Sits at top:32px so it clears the 32px Electron custom titlebar; on the web the
   titlebar is hidden but the 32px offset is harmless and matches .main-content. */
.navbar {
    position: fixed;
    top: 32px;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--nav-height, 64px);
    display: flex;
    align-items: center;
    gap: var(--sp-4, 16px);
    padding: 0 var(--sp-6, 24px);
    background: linear-gradient(180deg, rgba(11, 11, 15, 0.96) 0%, rgba(11, 11, 15, 0.74) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    z-index: var(--z-nav, 1000);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    transition: background var(--dur-med, 0.25s) var(--ease-out, ease);
}

.navbar::-webkit-scrollbar { display: none; }

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-2, 8px);
    flex-shrink: 0;
    height: auto;
    margin: 0;
    padding: 0;
    position: relative;
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--accent, #E5A94F);
    filter: drop-shadow(0 0 8px var(--accent-glow, rgba(229, 169, 79, 0.4)));
    transition: transform var(--dur-fast, 0.15s) var(--ease-out, ease);
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-name-nav {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-hi, #fff);
    white-space: nowrap;
    /* always visible in the top bar (no hover-expand) */
    opacity: 1;
    transform: none;
}

.navbar:hover .brand-icon {
    transform: scale(1.06);
}

.navbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-1, 4px);
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.navbar-menu::-webkit-scrollbar { display: none; }

.nav-item {
    width: auto;
    padding: 0;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-2, 8px);
    padding: var(--sp-2, 8px) var(--sp-3, 12px);
    background: transparent;
    border: none;
    color: var(--text-med, rgba(255, 255, 255, 0.72));
    cursor: pointer;
    transition: color var(--dur-fast, 0.15s) var(--ease-out, ease),
                background var(--dur-fast, 0.15s) var(--ease-out, ease);
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
    text-align: left;
    border-radius: var(--r-md, 10px);
    position: relative;
}

.nav-btn:hover {
    background: var(--accent-tint-08, rgba(229, 169, 79, 0.08));
    color: var(--text-hi, #fff);
    transform: none;
}

.nav-item.active .nav-btn {
    background: var(--accent-tint-16, rgba(229, 169, 79, 0.16));
    color: var(--text-hi, #fff);
    box-shadow: none;
}

.nav-item.active .nav-btn::before {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -2px;
    top: auto;
    height: 3px;
    width: auto;
    background: var(--accent, #E5A94F);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 0 10px var(--accent-glow, rgba(229, 169, 79, 0.6));
}

.nav-icon {
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--dur-fast, 0.15s) var(--ease-out, ease);
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.nav-btn:hover .nav-icon {
    transform: scale(1.08);
}

.nav-label {
    white-space: nowrap;
    /* always visible in the top bar */
    opacity: 1;
    transform: none;
}

/* Context Menu - Enhanced */
.context-menu {
    position: fixed;
    background: rgba(11, 11, 15, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(229, 169, 79, 0.3);
    border-radius: 16px;
    padding: 12px 0;
    min-width: 260px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    animation: menuFadeIn 0.2s ease-out;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.context-menu-header {
    padding: 8px 20px 15px;
    font-size: 0.85rem;
    color: var(--accent, #E5A94F);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(229, 169, 79, 0.1);
    margin-bottom: 8px;
}

.context-menu-list {
    list-style: none;
    max-height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(229, 169, 79, 0.3) transparent;
}

.context-menu-list::-webkit-scrollbar {
    width: 4px;
}

.context-menu-list::-webkit-scrollbar-thumb {
    background: rgba(229, 169, 79, 0.3);
    border-radius: 10px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(240, 187, 104, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.context-menu-item:hover {
    background: rgba(229, 169, 79, 0.15);
    color: var(--text-hi);
}

.context-menu-icon {
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.context-menu-item:hover .context-menu-icon {
    opacity: 1;
}

.context-menu-icon svg {
    width: 18px;
    height: 18px;
}

.context-menu-label {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.context-menu-check {
    font-size: 1.1rem;
    color: var(--accent, #E5A94F);
    min-width: 20px;
    text-align: right;
    text-shadow: 0 0 8px rgba(229, 169, 79, 0.5);
}

@media (max-width: 768px) {
    .navbar {
        left: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 70px !important;
        max-height: 70px !important;
        border-radius: 20px 20px 0 0 !important;
        border-width: 1px 0 0 0 !important;
        border-color: rgba(229, 169, 79, 0.2) !important;
        padding: 5px 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        background: rgba(11, 11, 15, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5) !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important; /* Firefox */
        z-index: 10000 !important;
    }
    
    .navbar::-webkit-scrollbar {
        display: none !important; /* Safari/Chrome */
    }
    
    .navbar:hover {
        width: 100% !important;
        background: rgba(11, 11, 15, 0.95) !important;
        border-color: rgba(229, 169, 79, 0.2) !important;
    }

    .navbar-brand {
        display: none !important;
    }

    .navbar-menu {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        display: flex !important;
        width: auto !important;
        gap: 5px !important;
        padding: 0 15px !important;
        height: 100% !important;
    }

    .nav-item {
        width: auto !important;
        padding: 0 !important;
        display: inline-flex !important;
        flex-shrink: 0 !important;
    }

    .nav-item[style*="display: none"] {
        display: none !important;
    }

    .nav-btn {
        width: auto !important;
        padding: 6px 12px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        border-radius: 12px !important;
        color: rgba(240, 187, 104, 0.7) !important;
        text-align: center !important;
        position: relative !important;
    }

    .nav-btn:hover {
        transform: none !important;
        background: rgba(229, 169, 79, 0.1) !important;
        color: var(--text-hi) !important;
    }

    .nav-label {
        font-size: 0.72rem !important;
        font-weight: 500 !important;
        opacity: 1 !important;
        transform: none !important;
        display: block !important;
    }

    .nav-icon {
        min-width: 22px !important;
        height: 22px !important;
    }

    .nav-icon svg {
        width: 20px !important;
        height: 20px !important;
    }

    .nav-item.active .nav-btn::before {
        content: '' !important;
        position: absolute !important;
        left: 20% !important;
        right: 20% !important;
        top: 0 !important;
        bottom: auto !important;
        height: 3px !important;
        width: 60% !important;
        background: var(--accent, #E5A94F) !important;
        border-radius: 0 0 4px 4px !important;
        box-shadow: 0 0 10px var(--accent, #E5A94F) !important;
    }

    .main-content {
        padding-left: 0 !important;
        padding-top: 0 !important; /* nav is a bottom bar on mobile — no top clearance */
        padding-bottom: 85px !important;
    }
}
