/* Navbar Styles */
.navbar {
    position: fixed;
    left: 20px;
    top: 32px; /* Start below titlebar */
    width: 68px;
    height: calc(100vh - 64px); /* Account for titlebar and bottom padding */
    max-height: calc(100vh - 64px);
    background: rgba(15, 8, 32, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.3s ease,
                border 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 15px 0;
}

/* Unique Navbar Scrollbar (Slider) */
.navbar::-webkit-scrollbar {
    width: 4px;
    display: block; /* Show it but make it pretty */
}

.navbar::-webkit-scrollbar-track {
    background: transparent;
    margin: 20px 0;
}

.navbar::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, transparent, #8b5cf6, transparent);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar:hover::-webkit-scrollbar-thumb {
    opacity: 1;
}

.navbar:hover {
    width: 220px;
    background: rgba(15, 8, 32, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    height: 50px;
    margin-bottom: 20px;
    position: relative;
    gap: 15px;
}

.brand-icon {
    font-size: 1.6rem;
    color: #8b5cf6;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
    transition: transform 0.3s ease;
    min-width: 26px;
    display: flex;
    justify-content: center;
}

.brand-name-nav {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: linear-gradient(to right, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar:hover .brand-name-nav {
    opacity: 1;
    transform: translateX(0);
}

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

.navbar-menu {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.nav-item {
    width: 100%;
    padding: 0 10px;
}

.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: transparent;
    border: none;
    color: rgba(167, 139, 250, 0.7);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.nav-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #fff;
    transform: translateX(5px);
}

.nav-item.active .nav-btn {
    background: rgba(139, 92, 246, 0.25);
    color: #fff;
    box-shadow: inset 0 0 10px rgba(139, 92, 246, 0.2);
}

.nav-item.active .nav-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 4px;
    background: #8b5cf6;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px #8b5cf6;
}

.nav-icon {
    min-width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

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

.nav-label {
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.navbar:hover .nav-label {
    opacity: 1;
    transform: translateX(0);
}

/* Context Menu - Enhanced */
.context-menu {
    position: fixed;
    background: rgba(15, 8, 32, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(139, 92, 246, 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: #8b5cf6;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    margin-bottom: 8px;
}

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

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

.context-menu-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}

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

.context-menu-item:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #fff;
}

.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: #8b5cf6;
    min-width: 20px;
    text-align: right;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

@media (max-width: 768px) {
    .navbar {
        left: 10px;
        width: 60px;
    }
    
    .navbar:hover {
        width: 180px;
    }
}
