body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f3f4f6; /* Modern light gray background */
    color: #1f2937;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
    height: auto;
    min-height: 200px;
    max-height: 80vh; 
    width: 220px;
    background: #e1d7b3a6; /* Glassmorphism effect */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.4s;
    overflow-x: hidden;
    z-index: 1000;
}



.sidebar.state-collapsed {
    width: 65px;
}
.sidebar.state-collapsed .nav-item .text {
    opacity: 0;
    pointer-events: none;
}

.sidebar.state-minimized {
    width: 46px;
    min-height: 46px;
    height: 46px !important;
    border-radius: 23px;
    padding: 0;
}
.sidebar.state-minimized .nav-links,
.sidebar.state-minimized .hide-btn-container {
    display: none;
}
.sidebar.state-minimized .drag-handle {
    height: 46px;
    margin: 0;
    opacity: 1;
}

.nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Hide scrollbars (sliders) to keep UI clean */
.sidebar::-webkit-scrollbar,
.nav-links::-webkit-scrollbar {
    display: none;
}
.sidebar, .nav-links {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.hide-btn-container {
    margin-top: auto; 
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb; /* Modern Blue accent */
}

.nav-item svg, .nav-item img.icon {
    width: 24px;
    height: 24px;
    min-width: 24px; /* Prevents shrinking when collapsed */
    margin-right: 15px;
}

.nav-item .text {
    font-weight: 500;
    font-size: 15px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Anchored Right Styles */
.sidebar.anchored-right .nav-item {
    flex-direction: row-reverse;
}
.sidebar.anchored-right .nav-item .icon {
    margin-right: 0;
    margin-left: 15px;
}
.sidebar.anchored-right .nav-item .text {
    text-align: right;
}

.sidebar.collapsed .nav-item .text {
    opacity: 0;
    pointer-events: none;
}

.main-content {
    padding: 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .sidebar {
        left: 10px;
    }
}

/* Drag handle styles */
.drag-handle {
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    color: #4b5563;
    margin-bottom: 5px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}
.drag-handle:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}
.drag-handle:active {
    cursor: grabbing;
}
.drag-handle svg, .drag-handle img.icon {
    width: 24px;
    height: 24px;
}
