/* Vertical Sidebar for Desktop */
@media (min-width: 768px) {

    /* Hide the default horizontal navbar if it exists on desktop (logic handled in HTML mostly, but safety here) */
    .navbar.fixed-top {
        display: none !important;
    }

    body {
        /* Add padding to the left so content isn't covered by the collapsed sidebar */
        padding-left: 80px;
    }

    .vertical-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 80px;
        /* Collapsed width */
        background-color: var(--background-black, #141414);
        border-right: 1px solid #333;
        transition: width 0.3s ease;
        z-index: 1050;
        /* Above most content */
        display: flex;
        flex-direction: column;
        padding-top: 20px;
        overflow-x: hidden;
        white-space: nowrap;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .vertical-sidebar:hover {
        width: 270px;
        /* Expanded width */
        background-color: rgba(20, 20, 20, 0.98);
        /* Less transparent on hover */
    }

    /* Brand / Logo Section */
    .vertical-sidebar .sidebar-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        /* Centered icon when collapsed */
        padding: 0 10px;
        color: #E50914;
        text-decoration: none;
        height: 60px;
        margin-bottom: 20px;
        transition: all 0.3s ease;
    }

    .vertical-sidebar:hover .sidebar-brand {
        justify-content: flex-start;
        padding-left: 25px;
    }

    .vertical-sidebar .sidebar-brand i {
        font-size: 1.8rem;
        min-width: 40px;
        /* Fixed width for alignment */
        text-align: center;
    }

    .vertical-sidebar .sidebar-brand span.brand-text {
        display: none;
        margin-left: 10px;
        font-size: 1.4rem;
        font-weight: bold;
        text-transform: uppercase;
        color: #fff;
    }

    .vertical-sidebar:hover .sidebar-brand span.brand-text {
        display: inline-block;
        animation: fadeIn 0.3s ease-in;
    }

    /* Navigation Links */
    .vertical-sidebar .nav-list {
        list-style: none;
        padding: 0;
        width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .vertical-sidebar .nav-item {
        width: 100%;
    }

    .vertical-sidebar .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        /* Center icon */
        padding: 12px 10px;
        color: #b3b3b3;
        text-decoration: none;
        transition: all 0.2s;
        height: 50px;
        border-left: 3px solid transparent;
        /* Indicator on left */
    }

    .vertical-sidebar:hover .nav-link {
        justify-content: flex-start;
        padding-left: 25px;
    }

    .vertical-sidebar .nav-link i {
        font-size: 1.4rem;
        min-width: 40px;
        text-align: center;
    }

    .vertical-sidebar .nav-link span.link-text {
        display: none;
        margin-left: 15px;
        font-size: 1rem;
        font-weight: 500;
    }

    .vertical-sidebar:hover .nav-link span.link-text {
        display: inline-block;
        animation: fadeIn 0.3s ease-in;
    }

    .vertical-sidebar .nav-link:hover {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.05);
    }

    .vertical-sidebar .nav-link.active {
        color: #fff;
        border-left: 3px solid #E50914;
        /* Red line on left edge */
        background-color: rgba(229, 9, 20, 0.1);
        /* Subtle red background */
    }

    .vertical-sidebar .nav-link.active i {
        color: #E50914;
    }

    /* Bottom Section (User, Settings, etc) */
    .vertical-sidebar .sidebar-bottom {
        margin-top: auto;
        /* Push to bottom */
        width: 100%;
        padding-bottom: 20px;
        border-top: 1px solid #333;
        padding-top: 10px;
    }

    /* Search Trigger */
    .vertical-sidebar .search-trigger-btn {
        background: none;
        border: none;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 10px;
        color: #b3b3b3;
        cursor: pointer;
        transition: all 0.2s;
    }

    .vertical-sidebar:hover .search-trigger-btn {
        justify-content: flex-start;
        padding-left: 25px;
    }

    .vertical-sidebar .search-trigger-btn:hover {
        color: #fff;
    }

    .vertical-sidebar .search-trigger-btn i {
        font-size: 1.4rem;
        min-width: 40px;
        text-align: center;
    }

    .vertical-sidebar .search-trigger-btn span {
        display: none;
        margin-left: 15px;
        font-size: 1rem;
    }

    .vertical-sidebar:hover .search-trigger-btn span {
        display: inline-block;
        animation: fadeIn 0.3s ease-in;
    }

    /* User Profile */
    .vertical-sidebar .user-profile {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 10px;
        color: #b3b3b3;
        text-decoration: none;
    }

    .vertical-sidebar:hover .user-profile {
        justify-content: flex-start;
        padding-left: 25px;
    }

    .vertical-sidebar .user-profile img,
    .vertical-sidebar .user-profile i.fa-user-circle {
        font-size: 1.8rem;
        min-width: 40px;
        text-align: center;
        border-radius: 50%;
    }

    .vertical-sidebar .user-profile .user-info {
        display: none;
        margin-left: 15px;
        flex-direction: column;
    }

    .vertical-sidebar:hover .user-profile .user-info {
        display: flex;
        animation: fadeIn 0.3s ease-in;
    }

    .vertical-sidebar .user-profile:hover {
        color: #fff;
    }

    .username-text {
        font-size: 0.9rem;
        font-weight: bold;
        color: #fff;
    }

    .logout-text {
        font-size: 0.75rem;
        color: #E50914;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}

/* Mobile adjustments handled by default bootstrap classes or existing media queries */