:root {
      --menu-bg: #1a1a1a;
}

/* 🟢 Shrunk back to original sleek 160px width */
.menu-layer {
  width: 160px;
  background-color: var(--menu-bg);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom-right-radius: 24px;
}
.menu-layer.visible { transform: translateX(0); }
.menu-layer.backdrop { cursor: pointer; }

#menu-track {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.5); z-index: 20001;
    transform: none; display: none; border: none;
}
#menu-track.visible { display: block; }

#menu-interface {
  position: fixed;
  top: var(--header-h);
  bottom: var(--ad-h);
  left: 0;
  z-index: 99999;
  box-shadow: 4px 0 15px rgba(0,0,0,0.5);
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  background: var(--menu-bg) !important;
  transition: 0.5s;
  overflow: hidden;
}

@media (min-width: 769px) { #menu-interface { z-index: 100001 !important; } }
#menu-interface.about-active { background: var(--app-bg) !important; transition: 0.5s; }

/* 🟢 Tighter unified padding (16px) to fit the narrow menu */
.menu-scroll-container { flex: 1; overflow-y: auto; padding: 20px 16px; }

.menu-link {
    display: block; color: #aaa; text-decoration: none; padding: 8px 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.menu-link:hover { color: #cbc7c7; }

/* 🟢 Matches the scroll container padding for perfect vertical alignment */
.sidebar-footer-container {
    padding: 0 16px;
}

.sidebar-footer {
  margin-top: 15px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  flex-shrink: 0;
  padding-bottom: 20px;
}

.footer-primary { color: #aaa; font-size: 13px; text-decoration: none; display: inline-block; transition: color 0.2s; }
.footer-primary:hover { color: #cbc7c7; }

.footer-secondary {
    color: #444; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; text-decoration: none;
    display: block;
    line-height: 1.4;
    white-space: normal;
}

#menu-burger {
  background: transparent; border: none; width: 44px; height: 44px; color: white;
  font-size: 28px; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; z-index: 10001;
}
.burger-view { display: block; line-height: 1; }
.close-view { display: none; line-height: 1; }
#menu-burger.is-active .burger-view { display: none; }
#menu-burger.is-active .close-view { display: block; }

/* Menu Settings */
.menu-settings-section {
    padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); margin: 10px 0 0 0;
    display: none !important;
}
.menu-setting-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.setting-label { font-size: 13px; font-weight: 600; color: #aaa; }
.setting-help { font-size: 10px; color: #555; line-height: 1.3; margin: 0; }
.ios-switch { position: relative; display: inline-block; width: 34px; height: 18px; flex-shrink: 0; margin-left: 10px;}
.ios-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #333; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: seagreen; }
input:checked + .slider:before { transform: translateX(16px); }