/* 全站统一主导航：同一组入口、同一间距、同一选中样式 */
.nav-links {
  gap: 15px;
  font-size: 13.5px;
  color: #354454;
}
.nav-links a {
  position: relative;
  color: #354454;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  padding: 0 0 8px;
  text-decoration: none;
}
.nav-links a:hover {
  color: #0b2e52;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #0b2e52;
  border-radius: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}
.nav-links a.active {
  color: #0b2e52;
  font-weight: 700;
}
@media (min-width: 981px) {
  .header .container.nav,
  .site-head .container.nav {
    width: 100%;
    max-width: none;
    padding-left: 24px;
    padding-right: 24px;
  }
  .nav { gap: 16px; }
  .brand { flex: 0 0 auto; }
  .brand img.brand-cursive { max-width: 185px; }
  /* 中间导航占满 logo 与右侧操作区之间的全部空间，逐项均匀分布 */
  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: space-evenly;
    gap: 0;
    font-size: 13px;
  }
  .nav-links a { font-size: 13px; padding-left: 4px; padding-right: 4px; }
  .nav-links .nav-more-toggle { font-size: 13px; }
  .nav-actions { flex: 0 0 auto; gap: 8px; }
  .nav-actions .menu-toggle { display: none !important; }
  .nav-actions .xj-icon-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; font-size: 13px; }
  .nav-actions .btn { height: 34px; min-height: 34px; padding: 0 8px; font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
  .xj-nav-nick { max-width: 76px; font-size: 13px; }
  .xj-nav-bell { width: 28px; height: 34px; }
}

@media (min-width: 981px) and (max-width: 1200px) {
  .nav-links { gap: 3px; font-size: 11px; }
  .nav-links a { font-size: 11px; padding-left: 3px; padding-right: 3px; }
  .nav-links .nav-more-toggle,
  .nav-links .nav-more-menu a { font-size: 11px; }
  .nav-actions { gap: 5px; }
  .nav-actions .xj-nav-nick { display: none; }
  .nav-actions .xj-icon-btn { width: 32px; height: 32px; min-height: 32px; }
  .nav-actions .btn { padding: 0 7px; font-size: 11px; }
  .brand img.brand-cursive { max-width: 150px; }
}

@media (max-width: 980px) {
  .nav-actions .xj-userbox { display: none; }
  .brand { flex: 0 0 auto; }
  .brand img.brand-cursive { max-width: 140px; }
}

@media (max-width: 640px) {
  .brand img.brand-cursive { max-width: 110px; }
}

/* 英文导航收纳：次要入口收进 More 下拉，避免英文长词把操作区顶出视口 */
.nav-more {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-links .nav-more-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 0 8px;
  border: 0;
  background: transparent;
  color: #354454;
  font: inherit;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.nav-links .nav-more-toggle:hover,
.nav-more.is-current .nav-more-toggle {
  color: #0b2e52;
}
.nav-more.is-current .nav-more-toggle {
  font-weight: 700;
}
.nav-links .nav-more-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #0b2e52;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav-links .nav-more-toggle:hover::after,
.nav-more.is-current .nav-more-toggle::after,
.nav-links .nav-more-toggle[aria-expanded="true"]::after {
  transform: scaleX(1);
}
.nav-more-toggle svg {
  opacity: .65;
  transition: transform .18s ease;
}
.nav-links .nav-more-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.nav-more-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 130;
  display: none;
  min-width: 172px;
  padding: 6px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(11, 46, 82, .12);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(10, 42, 74, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-more.open .nav-more-menu {
  display: block;
}
.nav-links .nav-more-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: #354454;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links .nav-more-menu a::after {
  display: none;
}
.nav-links .nav-more-menu a:hover {
  color: #0b2e52;
  background: rgba(11, 46, 82, .06);
}
.nav-links .nav-more-menu a.active {
  color: #0b2e52;
  font-weight: 700;
  background: rgba(11, 46, 82, .05);
}

:root[data-theme="dark"] .nav-links .nav-more-toggle {
  color: var(--ink, #e6eef8);
}
:root[data-theme="dark"] .nav-links .nav-more-toggle:hover,
:root[data-theme="dark"] .nav-more.is-current .nav-more-toggle {
  color: #ffffff;
}
:root[data-theme="dark"] .nav-links .nav-more-toggle::after {
  background: #dcecff;
}
:root[data-theme="dark"] .nav-more-menu {
  background: rgba(16, 30, 46, .97);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .5);
}
:root[data-theme="dark"] .nav-links .nav-more-menu a {
  color: #dbe8f6;
}
:root[data-theme="dark"] .nav-links .nav-more-menu a:hover,
:root[data-theme="dark"] .nav-links .nav-more-menu a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, .08);
}


/* 夜间导航统一浅蓝色 */
:root[data-theme="dark"] .nav-links a,
:root[data-theme="dark"] .nav-links a.active,
:root[data-theme="dark"] .nav-links .nav-more-toggle,
:root[data-theme="dark"] .nav-links .nav-more.is-current .nav-more-toggle,
:root[data-theme="dark"] .nav-links .nav-more-menu a,
:root[data-theme="dark"] .nav-links .nav-more-menu a:hover,
:root[data-theme="dark"] .nav-links .nav-more-menu a.active,
:root[data-theme="dark"] .mobile-menu a {
  color: #7fcaff;
}
:root[data-theme="dark"] .nav-links .nav-more-toggle::after,
:root[data-theme="dark"] .nav-links .nav-more-toggle[aria-expanded="true"]::after,
:root[data-theme="dark"] .nav-links a.active::after,
:root[data-theme="dark"] .nav-links a:hover::after {
  background-color: #7fcaff;
}

.xj-footer {
  background: linear-gradient(180deg,
    var(--paper, #fbfaf5) 0px,
    #0d2347 18px,
    #000 100%) !important;
  background-color: transparent !important;
  border-top: 0 !important;
  padding: 0 !important;
}
