/* YouTube-style Sidebar CSS */
.youtube-sidebar {
    position: fixed;
    top: 60px; /* Adjust based on header height */
    left: 0;
    height: calc(100vh - 60px);
    background-color: #0f0f0f;
    color: #fff;
    z-index: 1000;
    transition: width 0.2s ease;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    width: 72px; /* Start collapsed by default */
}

.youtube-sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Collapsed state */
.youtube-sidebar.collapsed {
    width: 72px;
}

/* Expanded state */
.youtube-sidebar.expanded {
    width: 240px;
}

/* Toggle button */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main content adjustment */
.main-content {
    transition: margin-left 0.2s ease;
    margin-left: 72px; /* Start with collapsed sidebar margin */
}

.main-content.sidebar-collapsed {
    margin-left: 72px;
}

.main-content.sidebar-expanded {
    margin-left: 240px;
}

/* Menu items */
.youtube-sidebar-item {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 40px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.1s ease;
    position: relative;
}

.youtube-sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.youtube-sidebar-item.active {
    background-color: rgba(255, 255, 255, 0.15);
}

.youtube-sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #ff0000;
}

.youtube-sidebar-icon {
    width: 24px;
    height: 24px;
    margin-right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.youtube-sidebar-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.1s ease;
}

/* Collapsed state adjustments */
.youtube-sidebar.collapsed .youtube-sidebar-item {
    padding: 0 24px;
    justify-content: center;
    flex-direction: column;
    height: 74px;
}

.youtube-sidebar.collapsed .youtube-sidebar-icon {
    margin-right: 0;
    margin-bottom: 6px;
}

.youtube-sidebar.collapsed .youtube-sidebar-text {
    font-size: 10px;
    line-height: 12px;
    text-align: center;
    max-width: 64px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Categories/Dividers */
.youtube-sidebar-category {
    padding: 8px 24px 4px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
}

.youtube-sidebar.collapsed .youtube-sidebar-category {
    display: none;
}

.youtube-sidebar-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

.youtube-sidebar.collapsed .youtube-sidebar-divider {
    margin: 12px 12px;
}

/* Mission section */
.youtube-sidebar-mission {
    padding: 12px 24px;
    font-size: 13px;
    line-height: 18px;
    color: #aaa;
}

.youtube-sidebar.collapsed .youtube-sidebar-mission {
    display: none;
}

/* Social icons */
.youtube-sidebar-social {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 12px 24px;
}

.youtube-sidebar.collapsed .youtube-sidebar-social {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.social-icon {
    color: #aaa;
    font-size: 18px;
    transition: color 0.2s ease;
}

.social-icon:hover {
    color: #fff;
    text-decoration: none;
}

/* Notification badge */
.notification-badge {
    background-color: #ff0000;
    color: #000;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    display: inline-block;
    min-width: 16px;
    text-align: center;
}

.youtube-sidebar.collapsed .notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    margin-left: 0;
}

/* Passport status colors */
.passport-status-green { color: #00ff00; }
.passport-status-yellow { color: #ffff00; }
.passport-status-red { color: #ff0000; }

/* Mobile responsive */
@media (max-width: 768px) {
    .youtube-sidebar {
        width: 240px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    
    .youtube-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .youtube-sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.sidebar-collapsed,
    .main-content.sidebar-expanded {
        margin-left: 0;
    }
    
    /* Overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

/* Smooth scrollbar for better UX */
.youtube-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.youtube-sidebar::-webkit-scrollbar {
    width: 8px;
}

.youtube-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.youtube-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.youtube-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}