/* ============================================================
   多语言切换器
   ============================================================ */
.lang-switch {
  position: relative;
  margin-left: auto;
  margin-right: 16px;
  flex: 0 0 auto;
}

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--radius-full, 999px);
  border: 1px solid rgba(255, 255, 255, .18);
  background: transparent;
  color: var(--text-muted, #a0b4c4);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .25s ease;
  line-height: 1;
}

.lang-current:hover,
.lang-switch.open .lang-current {
  color: #fff;
  border-color: var(--accent, #0095ef);
}

.lang-current svg {
  flex: 0 0 auto;
  opacity: .85;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--bg-dark2, #0a2a42);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .22s ease;
  z-index: 120;
}

.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu li {
  margin: 0;
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-muted, #a0b4c4);
  text-decoration: none;
  white-space: nowrap;
  transition: all .18s ease;
}

.lang-menu a::after {
  display: none;
}

.lang-menu a:hover {
  background: var(--bg-dark3, #123450);
  color: #fff;
}

.lang-menu .lang-code {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .5px;
  opacity: .65;
}

.lang-item.current-lang a {
  color: var(--accent, #0095ef);
}

.lang-item.current-lang .lang-code {
  opacity: 1;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 960px) {
  .lang-switch {
    margin-left: auto;
    margin-right: 10px;
  }

  .lang-current .lang-label,
  .lang-current span:not(.lang-code) {
    display: none;
  }

  .lang-current {
    padding: 8px 11px;
  }

  .lang-menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
  }

  .lang-switch.open .lang-menu {
    transform: translateX(-50%) translateY(0);
  }
}
