@font-face {
  font-family: DynaPuff;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/dynapuff-700.woff2") format("woff2");
}

:root {
  --green: #35f28a;
  --green-bright: #75ffad;
  --green-deep: #0ca85a;
  --panel: rgba(5, 8, 7, 0.97);
  --line: rgba(53, 242, 138, 0.2);
  --text: #f4f7f5;
  --muted: #839089;
  --menu-row-height: 34px;
  --menu-page-size: 9;
  --menu-content-padding: 5px;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: transparent !important;
}

body {
  display: flex;
  align-items: center;
  padding-left: clamp(20px, 3vw, 58px);
  user-select: none;
  pointer-events: none;
}

.menu-shell {
  width: min(380px, calc(100vw - 32px));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.58);
  opacity: 0;
  transform: translateX(-24px) scale(0.985);
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.2,.8,.2,1);
}

.menu-shell.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.menu-shell[hidden] {
  display: none !important;
}

html:not(.menu-anim) .menu-shell {
  transition: none;
}

.brand-banner {
  position: relative;
  height: 112px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(117, 255, 173, 0.7);
  border-bottom: 0;
  background:
    linear-gradient(115deg, rgba(5, 18, 12, .96), rgba(8, 50, 28, .92)),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.03) 14px 15px);
}

.brand-banner::after {
  content: "";
  position: absolute;
  inset: auto -10% -48px 25%;
  height: 94px;
  border: 1px solid rgba(53, 242, 138, .18);
  transform: skewX(-28deg);
}

.brand-mark {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border: 2px solid var(--green);
  transform: rotate(45deg);
  box-shadow: inset 0 0 24px rgba(53, 242, 138, .16), 0 0 22px rgba(53, 242, 138, .08);
}

.mark-cut {
  position: absolute;
  inset: 16px 9px;
  border-left: 12px solid var(--green);
  border-bottom: 12px solid var(--green);
}

.mark-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  right: 9px;
  top: 9px;
  background: var(--green-bright);
  box-shadow: 0 0 12px var(--green);
}

.brand-copy { z-index: 1; display: flex; align-items: center; }
.brand-copy strong {
  font-family: DynaPuff, "Microsoft YaHei UI", "Trebuchet MS", sans-serif;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .28);
}

.menu-panel {
  position: relative;
  height: 390px;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-left: 1px solid rgba(53, 242, 138, .28);
  border-right: 1px solid rgba(53, 242, 138, .12);
  border-bottom: 1px solid rgba(53, 242, 138, .18);
  background: var(--panel);
}

.menu-panel::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 30px;
  bottom: 32px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(var(--green), var(--green-deep));
  box-shadow: 0 0 12px rgba(53, 242, 138, .55);
}

.section-heading {
  flex: 0 0 30px;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 12px 0 13px;
  color: var(--green);
  border-bottom: 1px solid rgba(53, 242, 138, .08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.menu-list {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 5px 6px 5px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(53, 242, 138, .35) transparent;
}

.menu-list::-webkit-scrollbar { width: 4px; }
.menu-list::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(53, 242, 138, .35);
}

.menu-item {
  position: relative;
  width: 100%;
  height: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: #dce2de;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.menu-item.has-icon {
  grid-template-columns: 30px 1fr auto;
  padding: 0 10px;
}

.menu-item:hover { color: #fff; background: rgba(255,255,255,.025); }

.menu-item.is-active {
  color: #fff !important;
  border: 1px solid var(--green) !important;
  background: linear-gradient(90deg, rgba(25, 111, 63, .78), rgba(12, 35, 23, .82)) !important;
  box-shadow: inset 3px 0 0 var(--green), 0 0 16px rgba(53, 242, 138, .12);
}

.menu-item.is-active:hover {
  color: #fff !important;
  border: 1px solid var(--green) !important;
  background: linear-gradient(90deg, rgba(25, 111, 63, .78), rgba(12, 35, 23, .82)) !important;
}

.item-icon { display: grid; place-items: center; color: #f4f7f5; }
.item-icon svg { width: 18px; height: 18px; display: block; }
.menu-item.is-active .item-icon { color: var(--green-bright); }
.item-label { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.item-meta { color: var(--muted); font-size: 10px; font-weight: 700; }
.item-arrow {
  width: 7px;
  height: 7px;
  border-right: 2px solid #dce4df;
  border-top: 2px solid #dce4df;
  transform: rotate(45deg);
  margin-right: 3px;
}
.menu-item.is-active .item-arrow { border-color: var(--green); }

.toggle {
  width: 30px;
  height: 16px;
  padding: 2px;
  border-radius: 12px;
  background: #2d3531;
}
.toggle::after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8b948f;
  transition: transform 140ms ease;
}
.toggle.is-on { background: rgba(53, 242, 138, .3); }
.toggle.is-on::after {
  transform: translateX(14px);
  background: var(--green);
  box-shadow: 0 0 7px rgba(53, 242, 138, .8);
}

.menu-footer {
  flex: 0 0 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 13px;
  margin-top: auto;
  color: #7c8981;
  font-size: 9px;
  font-weight: 600;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.mini-mark { color: var(--green); font-size: 14px; font-weight: 800; font-style: italic; }
.divider { width: 1px; height: 11px; background: #364139; }
.footer-brand b { color: #d5ddd8; }
.page-count { display: flex; gap: 3px; font-size: 10px; }
.page-count b { color: var(--green); }

.notify-stack {
  position: fixed;
  top: clamp(16px, 3vh, 28px);
  right: clamp(16px, 2.5vw, 28px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(320px, calc(100vw - 32px));
  pointer-events: none;
}

.notify {
  overflow: hidden;
  border: 1px solid rgba(53, 242, 138, .35);
  border-radius: 4px;
  background: rgba(5, 14, 9, .94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.2,.8,.2,1);
}

.notify.is-show {
  opacity: 1;
  transform: translateX(0);
}

.notify.is-hide {
  opacity: 0;
  transform: translateX(18px);
}

.notify-body {
  padding: 10px 12px 11px;
  min-width: 0;
}

.notify-title {
  display: block;
  margin-bottom: 3px;
  color: var(--green-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.notify-message {
  color: #e8f3ec;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.notify.is-warn { border-color: rgba(255, 211, 106, .4); }
.notify.is-warn .notify-title { color: #ffd36a; }
.notify.is-error { border-color: rgba(255, 123, 123, .4); }
.notify.is-error .notify-title { color: #ff8f8f; }

@media (max-width: 600px), (max-height: 680px) {
  body { padding-left: 16px; }
  .menu-shell { transform-origin: left center; scale: .92; }
}

.command-bar[hidden] { display: none !important; }

.notify.is-success { border-color: rgba(53, 242, 138, .5); }
.notify.is-success .notify-title { color: var(--green-bright); }

.menu-item.is-disabled { opacity: 0.45; }
.menu-item--split { grid-template-columns: 1fr auto; }
.menu-item.has-icon.menu-item--split { grid-template-columns: 30px 1fr auto; }
.item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-meta { white-space: nowrap; }
.menu-item.is-active .item-meta { color: var(--green-bright); }
.item-meta.is-ok { color: var(--green); }
.item-meta.is-bad { color: #ff8f8f; }
.item-trail { display: inline-flex; align-items: center; gap: 8px; }

.menu-item.has-bar {
  grid-template-columns: 1fr auto auto;
  gap: 10px;
}

.inline-speed-wrap {
  display: flex;
  align-items: center;
  width: 48px;
  flex-shrink: 0;
  justify-self: end;
}
.inline-speed-bar {
  display: block;
  width: 48px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.inline-speed-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--green);
  border-radius: 2px;
}

.kb-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  pointer-events: none;
}
.kb-overlay[hidden] { display: none !important; }
.kb-card {
  min-width: 300px;
  padding: 18px 20px;
  background: rgba(5, 14, 9, .96);
  border: 1px solid rgba(53, 242, 138, .35);
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  text-align: center;
}
.kb-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-bright);
  margin-bottom: 14px;
  letter-spacing: 0.06em;
}
.kb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(53, 242, 138, .16);
}
.kb-label { font-size: 11px; color: var(--muted); }
.kb-key {
  min-width: 64px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.kb-key.active {
  color: #fff;
  background: rgba(53, 242, 138, .18);
  border-color: var(--green);
}

html:not(.menu-anim) .menu-item,
html:not(.menu-anim) .notify,
html:not(.menu-anim) .toggle::after {
  transition: none;
}
