/* Sidebar CSS */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--app-bg);
}

.sidebar-container {
    width: 300px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--app-bg);
    z-index: 1000;
    padding: 1rem 0;
    display: none;
    /* Hidden by default (mobile), shown on desktop */
}

/* Show sidebar on desktop */
@media (min-width: 768px) {
    .sidebar-container {
        display: flex;
        flex-direction: column;
    }

    .main-content {
        margin-left: 300px;
        /* Offset content */
        width: calc(100% - 300px);
        min-height: 100vh;
        position: relative;
        background-color: var(--app-bg);
    }

    /* Fix Layout Overflow caused by dashboard.css 100vw/100vh settings */
    .main-content .dashboard-container {
        width: 100% !important;
        height: 100vh;
        /* Keep height but strict width */
        position: relative;
    }

    /* Ensure feed screen fits */
    .main-content .feed-screen {
        width: 100% !important;
    }

    /* Adjust floating elements position on desktop (no bottom nav) */
    .main-content .right-sidebar,
    .main-content .bottom-info {
        bottom: 20px !important;
    }
}

/* Sidebar Logo Area */
.sidebar-header {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    align-items: center;
}

.sidebar-logo {
    height: 60px;
    object-fit: contain;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 0.5rem;
    gap: 0.25rem;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--app-grey);
    /* Default grey */
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--app-white);
}

.sidebar-item.active {
    color: var(--app-white);
    /* Active white or primary */
    font-weight: 600;
}

/* Optional: Active indicator line or background */
.sidebar-item.active i {
    color: #ff0050;
    /* TikTok/App Primary Accent */
}

.sidebar-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 24px;
    text-align: center;
}

.sidebar-item span {
    font-family: 'Outfit', sans-serif;
}

/* Special Button Style for Create/Upload */
/* Matches the create-btn-bg gradient from bottom nav but sidebar style */
.sidebar-upload-btn,
.sidebar-upload-btn:hover {
    margin-top: 1rem;
    background: var(--app-primary);
    color: white !important;
    justify-content: center;
    border: none;
}

/* Mobile: Hide sidebar, Main content full width */
@media (max-width: 767.98px) {
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-bottom: 60px;
        /* Space for bottom nav */
    }
}

/* Force Full Width (Logged Out State) */
body.no-sidebar .main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

body.no-sidebar .sidebar-container {
    display: none !important;
}