.top-menubar {
    /* Change width to account for sidebar */
    width: calc(100% - 80px); 
    height: 24px;
    position: fixed;
    top: 0;
    left: 80px; 
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    z-index: 9999;
    overflow: visible;
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    outline: 0.75px rgba(0, 0, 0, 0.05) solid;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
}

/* Ensure it expands back to full width on mobile if sidebar is hidden */
@media screen and (max-width: 1023px) {
    .top-menubar {
        width: 100%;
        left: 0;
    }
}
.menubar-bg {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.60);
    z-index: -1;
}

[data-theme="dark"] .menubar-bg {
    background: rgba(30, 30, 30, 0.60);
}

/* Left Section */
.menubar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 0 10px;
}

.menu-item {
    font-size: 12px;
    font-weight: 480;
    color: #1B1C1D;
    cursor: default;
    padding: 0 2px;
    position: relative;
}

.menu-item.bold { font-weight: 700; }
.menu-item:active, .menu-item.selected {
    background-color: #2176EB;
    color: white !important;
}

.dropdown-trigger {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    z-index: 10000;

    overflow: visible;
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);

    border-radius: 0 0 6px 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);

    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

[data-theme="dark"] .dropdown-menu {
    border-color: rgba(255, 255, 255, 0.1);
}

.menu-bg {
    position: absolute;
    inset: 0;
    background: rgba(243, 243, 243, 0.4); 
    z-index: -1;
    pointer-events: none;
}

[data-theme="dark"] .menu-bg {
    background: rgba(30, 30, 30, 0.4);
}


.dropdown-item {
    position: relative;
    z-index: 1;
    padding: 8px 12px;
    font-size: 12px;
    color: #1B1C1D;
    text-decoration: none;
    display: block;
}

.dropdown-item:hover {
    background-color: rgba(33, 118, 235, 0.1);
}

[data-theme="dark"] .dropdown-item {
    color: #FFFFFF;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(33, 118, 235, 0.2);
}


.divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 4px 0;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .divider {
    background: rgba(255, 255, 255, 0.1);
}
/* Right Section */
.menubar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.status-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-string {
    font-size: 12px;
    color: #1B1C1D;
}

.lang-indicator {
    width: 23px;
    height: 20px;
    background: #2176EB;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lang-box {
    width: 14px;
    height: 14px;
    background: #1B1C1D;
    border-radius: 3px;
    color: #2176EB;
    font-size: 12px;
    font-family: 'SF Pro Rounded', sans-serif;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-icon-btn {
    background: none;
    border: none;
    padding: 0;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}


.menu-icon-btn:active {
    background-color: #2176EB;
}

/* Theme Switching */
[data-theme="dark"] .menu-item,
[data-theme="dark"] .time-string {
    color: #FFFFFF;
}
