.i18n-language-switcher {
  position: relative;
  z-index: 90;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: 14px;
  color: #fff;
  font-family: Inter, "OPPO Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.i18n-language-button {
  display: inline-flex;
  min-width: 72px;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 0 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .015em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.i18n-language-button > svg:first-child {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.i18n-language-chevron {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform .18s ease;
}

.i18n-language-button:hover {
  border-color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 22px rgba(0, 0, 0, .18);
}

.i18n-language-button:active {
  transform: translateY(1px);
  background: rgba(255, 255, 255, .11);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2);
}

.i18n-language-button:focus-visible,
.i18n-language-menu button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.i18n-language-button:disabled,
.i18n-language-switcher.is-loading .i18n-language-button {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .44);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.i18n-language-switcher.is-open .i18n-language-button {
  border-color: rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .18);
}

.i18n-language-switcher.is-open .i18n-language-chevron {
  transform: rotate(180deg);
}

.i18n-language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: max-content;
  min-width: 206px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(30, 34, 40, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  color: #17191c;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  transform-origin: top right;
  animation: i18n-menu-in .16s cubic-bezier(.22, 1, .36, 1);
}

.i18n-language-menu[hidden] {
  display: none;
}

.i18n-language-menu button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #34383e;
  padding: 0 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.i18n-language-menu button:hover {
  background: #f0f0f1;
  color: #08090a;
}

.i18n-language-menu button:active {
  background: #e6e7e8;
  transform: scale(.99);
}

.i18n-language-menu button:focus-visible {
  outline-color: #4c525a;
  outline-offset: -2px;
}

.i18n-language-menu button:disabled {
  background: transparent;
  color: #a7abb0;
  cursor: not-allowed;
  transform: none;
}

.i18n-language-menu button.is-active {
  background: #e9eaeb;
  color: #090a0b;
  font-weight: 800;
}

.i18n-language-check {
  width: 16px;
  flex: 0 0 16px;
  color: #17191c;
  font-size: 13px;
  opacity: 0;
  text-align: center;
}

.i18n-language-menu button.is-active .i18n-language-check {
  opacity: 1;
}

.i18n-language-switcher.is-floating {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 350;
  margin: 0;
}

.i18n-language-switcher.is-floating .i18n-language-button {
  border-color: rgba(255, 255, 255, .28);
  background: #08090a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}

.topbar .theme-toggle { margin-left: auto; }
.topbar .i18n-language-switcher { margin-left: 0; }
.topbar .i18n-language-button {
  border-color: rgba(31, 35, 40, .22);
  background: rgba(31, 35, 40, .06);
  color: #24272c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}
.topbar .i18n-language-button:hover,
.topbar .i18n-language-switcher.is-open .i18n-language-button {
  border-color: rgba(31, 35, 40, .42);
  background: rgba(31, 35, 40, .11);
  color: #08090a;
}
.topbar .i18n-language-button:focus-visible { outline-color: #3f464f; }

html[data-theme="dark"] .topbar .i18n-language-button {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  color: #f5f5f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .topbar .i18n-language-button:hover,
html[data-theme="dark"] .topbar .i18n-language-switcher.is-open .i18n-language-button {
  border-color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
html[data-theme="dark"] .topbar .i18n-language-button:focus-visible { outline-color: #fff; }

html[data-locale="en"] .mw-window::before { content: "Live product UI"; }
html[data-locale="zh-CN"] .mw-window::before { content: "实时产品界面"; }
html[data-locale="zh-Hant"] .mw-window::before { content: "即時產品介面"; }

html[data-locale="en"] :is(.nav-links, .site-nav .nav-links) { gap: 24px; }
html[data-locale="en"] :is(.nav-links a, .nav-link-button, .nav-auth-trigger) {
  font-size: 13.5px;
  letter-spacing: 0;
}
html[data-locale="en"] .haolo-auth-menu { min-width: 252px; }

@keyframes i18n-menu-in {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-color-scheme: dark) {
  .i18n-language-menu {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(25, 26, 29, .98);
    color: #f5f5f6;
    box-shadow: 0 20px 58px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .08);
  }
  .i18n-language-menu button { color: #d7d9dc; }
  .i18n-language-menu button:hover { background: #303237; color: #fff; }
  .i18n-language-menu button:active { background: #25272b; }
  .i18n-language-menu button:focus-visible { outline-color: #fff; }
  .i18n-language-menu button:disabled { color: #676b72; }
  .i18n-language-menu button.is-active { background: #383a3f; color: #fff; }
  .i18n-language-check { color: #fff; }
}

html[data-theme="dark"] .i18n-language-menu {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(25, 26, 29, .98);
  color: #f5f5f6;
  box-shadow: 0 20px 58px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .i18n-language-menu button { color: #d7d9dc; }
html[data-theme="dark"] .i18n-language-menu button:hover { background: #303237; color: #fff; }
html[data-theme="dark"] .i18n-language-menu button:active { background: #25272b; }
html[data-theme="dark"] .i18n-language-menu button:focus-visible { outline-color: #fff; }
html[data-theme="dark"] .i18n-language-menu button:disabled { color: #676b72; }
html[data-theme="dark"] .i18n-language-menu button.is-active { background: #383a3f; color: #fff; }
html[data-theme="dark"] .i18n-language-check { color: #fff; }

html[data-theme="light"] .i18n-language-menu {
  border-color: rgba(30, 34, 40, .14);
  background: rgba(255, 255, 255, .98);
  color: #17191c;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .92);
}
html[data-theme="light"] .i18n-language-menu button { color: #34383e; }
html[data-theme="light"] .i18n-language-menu button:hover { background: #f0f0f1; color: #08090a; }
html[data-theme="light"] .i18n-language-menu button:active { background: #e6e7e8; }
html[data-theme="light"] .i18n-language-menu button:focus-visible { outline-color: #4c525a; }
html[data-theme="light"] .i18n-language-menu button:disabled { color: #a7abb0; }
html[data-theme="light"] .i18n-language-menu button.is-active { background: #e9eaeb; color: #090a0b; }
html[data-theme="light"] .i18n-language-check { color: #17191c; }

@media (max-width: 1040px) {
  .i18n-language-switcher { margin-left: auto; }
  .site-nav-inner .nav-actions + .i18n-language-switcher,
  .nav-wrap .download-btn + .i18n-language-switcher { margin-left: 8px; }
}

@media (max-width: 640px) {
  .i18n-language-switcher { margin-left: auto; }
  .i18n-language-button {
    min-width: 64px;
    height: 34px;
    gap: 5px;
    padding: 0 9px;
  }
  .i18n-language-button > svg:first-child { width: 16px; height: 16px; }
  .i18n-language-menu { top: calc(100% + 8px); min-width: 194px; }
  .i18n-language-switcher.is-floating { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .i18n-language-button,
  .i18n-language-chevron,
  .i18n-language-menu,
  .i18n-language-menu button {
    animation: none;
    transition: none;
  }
}
