/* ========================================
   移动端侧边菜单样式
   Mobile Side Menu
   ======================================== */

.Menu {
  width: 100%;
  height: 100%;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  transform: translateX(-100%);
  z-index: 990;
  background: #fff;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 60px 0 30px;
}

.Menu.active {
  transform: translateX(0);
}

/* 列表容器 */
.Menu ul.list {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* 列表项 */
.Menu ul.list li {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 500;
  color: #222;
  transition: background 0.2s ease;
}

.Menu ul.list li:active {
  background: rgba(0, 0, 0, 0.03);
}

/* 展开箭头 */
.Menu ul.list li i.fa {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  font-size: 14px;
  font-weight: bold;
  color: #999;
  border-radius: 50%;
}

.Menu ul.list li i.fa:active {
  background: rgba(0, 0, 0, 0.06);
}

/* 子菜单 */
.Menu ul.list li .child {
  margin-top: 10px;
  display: none;
  width: 100%;
}

.Menu ul.list li .child p {
  padding: 6px 0 6px 8px;
}

.Menu ul.list li .child a {
  display: block;
  padding: 8px 12px;
  color: #555;
  font-size: 14px;
  font-weight: 400;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.Menu ul.list li .child a:hover,
.Menu ul.list li .child a:active {
  background: rgba(0, 0, 0, 0.04);
  color: var(--gm-theme);
}

/* 展开状态 */
.Menu ul.list li.cur i.fa {
  transform: rotate(90deg);
}

/* 关闭按钮 */
.Menu .nav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
  z-index: 10;
}

.Menu .nav-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

/* 汉堡图标 */
.Menu .lines {
  width: 20px;
  height: 16px;
  position: relative;
  cursor: pointer;
}

.Menu .lines span {
  width: 100%;
  height: 2px;
  background: #222;
  position: absolute;
  left: 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.Menu .lines span.n1 {
  top: 0;
}

.Menu .lines span.n2 {
  top: 7px;
}

.Menu .lines span.n3 {
  top: 14px;
}

/* 关闭动画 */
.Menu .nav-btn.closes .lines span.n1 {
  top: 7px;
  transform: rotate(45deg);
}

.Menu .nav-btn.closes .lines span.n2 {
  opacity: 0;
  transform: scaleX(0);
}

.Menu .nav-btn.closes .lines span.n3 {
  top: 7px;
  transform: rotate(-45deg);
}

/* 菜单打开时，侧边工具栏下移 */
.Menu.active ~ .global-side-toolbar,
body:has(.Menu.active) .global-side-toolbar {
  transform: translateY(calc(-50% + 30px));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 菜单打开时，header-top 的 inner 内容变深色 */
html.nav-open .header.header-top nav ul li > a,
html.nav-open .header.header-top .index-search > a,
html.nav-open .header.header-top .change-language .change-language-title > .language-flag > a,
html.nav-open .header.header-top .flex .nav-btn,
html.nav-open .header.header-top .flex .nav-btn .nav-btn-icon {
  color: #222;
}

html.nav-open .header.header-top .flex .nav-btn .lines span {
  background: #222;
}

html.nav-open .header.header-top .change-language .change-language-title > .language-flag > a {
  border-color: rgba(0, 0, 0, 0.28);
}