
#menu-btn {
  position:       fixed;
  top:            1.25rem;
  left:           1.25rem;
  z-index:        101;
  width:          40px;
  height:         40px;
  background:     var(--surface);
  border:         1px solid var(--border);
  border-radius:  var(--radius-sm);
  cursor:         pointer;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  justify-content: center;
  gap:            5px;
  transition:     background 0.15s;
}

#menu-btn:hover { background: rgba(255, 255, 255, 0.08); }


.bar {
  width:         18px;
  height:        2px;
  background:    var(--text);
  border-radius: 2px;
  transition:    transform 0.25s, opacity 0.25s;
}


#menu-btn.open .bar:nth-child(1) { transform: translateY(7px)  rotate( 45deg); }
#menu-btn.open .bar:nth-child(2) { opacity: 0; }
#menu-btn.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


#overlay {
  position:       fixed;
  inset:          0;
  background:     rgba(0, 0, 0, 0.5);
  z-index:        99;
  opacity:        0;
  pointer-events: none;
  transition:     opacity 0.3s;
}

#overlay.show {
  opacity:        1;
  pointer-events: all;
}


#sidebar {
  position:       fixed;
  top:            0;
  left:           0;
  width:          var(--sidebar-w);
  height:         100vh;
  background:     var(--surface);
  border-right:   1px solid var(--border);
  z-index:        100;
  display:        flex;
  flex-direction: column;
  
  transform:      translateX(calc(-1 * var(--sidebar-w)));
  transition:     transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.open { transform: translateX(0); }


.sidebar-header {
  padding:       1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-family:    var(--font-pixel);
  font-size:      8px;
  color:          var(--yellow);
  line-height:    2;
  letter-spacing: 1px;
}

.sidebar-logo span { color: var(--accent); }


.sidebar-nav {
  flex:           1;
  padding:        1rem 0.75rem;
  display:        flex;
  flex-direction: column;
  gap:            4px;
}

.nav-item {
  display:        flex;
  align-items:    center;
  gap:            12px;
  padding:        0.75rem 1rem;
  border-radius:  var(--radius-sm);
  cursor:         pointer;
  border:         1px solid transparent;
  transition:     background 0.15s, border-color 0.15s;
  user-select:    none;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.05); }

.nav-item.active {
  background:   rgba(255, 214, 10, 0.08);
  border-color: rgba(255, 214, 10, 0.2);
}


.nav-icon {
  width:           36px;
  height:          36px;
  border-radius:   var(--radius-sm);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       18px;
  flex-shrink:     0;
}

.nav-item.active     .nav-icon { background: rgba(255, 214, 10, 0.15); }
.nav-item:not(.active) .nav-icon { background: rgba(255, 255, 255, 0.05); }

.nav-text { flex: 1; }

.nav-title {
  font-size:   14px;
  font-weight: 600;
  color:       var(--text);
}

.nav-item.active .nav-title { color: var(--yellow); }

.nav-sub {
  font-size:  11px;
  color:      var(--muted);
  margin-top: 1px;
}


.nav-badge {
  font-size:     10px;
  font-weight:   700;
  padding:       2px 7px;
  border-radius: var(--radius-pill);
  background:    rgba(255, 214, 10, 0.15);
  color:         var(--yellow);
  display:       none;
}

.nav-item.active .nav-badge { display: block; }


.sidebar-footer {
  padding:     1rem 1.25rem;
  border-top:  1px solid var(--border);
  font-size:   11px;
  color:       var(--muted);
  line-height: 1.6;
}