/* ==========================================================================
   UU加速器 · 增量样式
   —— 官网样式（base/home/download/help.css）为原样移植，本文件只包含
      本站新增的少量能力：双语切换、帮助页搜索与折叠、提示条等
   ========================================================================== */

/* ---------- 1. 中英双语 ---------- */
html[data-lang="zh"] .i18n-en {
  display: none !important;
}

html[data-lang="en"] .i18n-zh {
  display: none !important;
}

html[data-lang="en"] .i18n-en {
  display: inline !important;
}

html[data-lang="zh"] .i18n-zh {
  display: inline !important;
}

html[data-lang="en"] .part-desc,
html[data-lang="en"] .help-item,
html[data-lang="en"] .footer-bd a {
  letter-spacing: 0;
}

/* ---------- 2. 导航语言下拉 ---------- */
.nav-sidebar .languages-box {
  position: relative;
  right: auto;
  min-width: 0;
  margin-right: 0.26667rem;
  display: flex;
  align-items: center;
}

.nav-sidebar .languages-box .sub-item {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.nav-sidebar .languages-box .sub-nav {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  margin-top: 0.10667rem;
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.13333rem);
  transition: all 0.25s ease;
}

.nav-sidebar .languages-box:hover .sub-nav,
.nav-sidebar .languages-box.is-open .sub-nav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-sidebar .languages-box .sub-nav a {
  color: #fff;
  display: block;
  font-size: 0.18667rem;
  font-weight: 400;
  line-height: 0.25333rem;
  padding: 0.13333rem 0.21333rem;
  transition: 0.3s ease;
}

.nav-sidebar .languages-box .sub-nav a:hover {
  background: rgba(0, 210, 196, 0.16);
}

.nav-sidebar .languages-box .sub-nav a.actived {
  color: #00d2c4;
}

/* ---------- 3. 首屏下载按钮对齐 ---------- */
.part-01 .btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* ---------- 4. 帮助页：搜索 / 折叠 / 空状态 ---------- */
.help-search {
  position: relative;
  max-width: 10.66667rem;
  margin: 0 auto 0.53333rem;
}

.help-search input {
  width: 100%;
  height: 0.8rem;
  padding: 0 0.8rem 0 0.8rem;
  border-radius: 0.10667rem;
  border: 1px solid rgba(47, 47, 48, 0.12);
  background: #fff;
  color: #09090a;
  font-size: 0.24rem;
  outline: none;
  transition: border-color 0.25s ease;
}

.help-search input:focus {
  border-color: #00d2c4;
}

.help-search__icon {
  position: absolute;
  left: 0.32rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.32rem;
  height: 0.32rem;
  color: rgba(47, 47, 48, 0.4);
  pointer-events: none;
}

.help-search__clear {
  position: absolute;
  right: 0.26rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.32rem;
  height: 0.32rem;
  border: 0;
  background: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.help-search__clear svg {
  width: 0.2rem;
  height: 0.2rem;
  color: rgba(47, 47, 48, 0.45);
}

.help-search.has-value .help-search__clear {
  display: flex;
}

.help-item {
  cursor: pointer;
}

.help-item.is-open {
  color: #00d2c4;
}

.help-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: #fff;
  border: 1px solid rgba(47, 47, 48, 0.1);
  border-top: 0;
  border-radius: 0 0 0.10667rem 0.10667rem;
  margin-top: -0.10667rem;
}

.help-answer p {
  font-size: 0.21333rem;
  line-height: 0.37333rem;
  color: rgba(47, 47, 48, 0.75);
  padding: 0.16rem 0.37333rem 0.24rem;
}

.help-section:not(.is-expanded) .is-extra {
  display: none;
}

.help-more {
  border: 0;
  background: none;
  cursor: pointer;
}

.help-empty {
  text-align: center;
  padding: 1.6rem 0;
  color: rgba(47, 47, 48, 0.5);
  font-size: 0.24rem;
}

/* ---------- 5. 提示条 ---------- */
.toast {
  background: rgba(9, 9, 10, 0.92);
  border: 1px solid rgba(0, 210, 196, 0.35);
  border-radius: 0.10667rem;
  bottom: 1.6rem;
  color: #fff;
  font-size: 0.24rem;
  left: 50%;
  line-height: 0.4rem;
  padding: 0 0.53333rem;
  position: fixed;
  transform: translate(-50%, 1.33333rem);
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 6. 通用隐藏 ---------- */
.is-hidden {
  display: none !important;
}

/* ---------- 6.1 弹窗显示（对齐官网 jQuery .show() 的行为） ---------- */
.contact-popup.show,
.download-popup.show,
.top-bar__more.show {
  display: flex;
  opacity: 1;
}

/* ---------- 7. 下载页二维码占位 ---------- */
.download-item-qrcode {
  display: block;
  width: 1.6rem;
  margin-right: 0.26667rem;
  position: relative;
}

.download-item-qrcode img,
.download-popup__qrcode img {
  width: 100%;
  display: block;
}

.qr-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  border: 1px dashed rgba(0, 210, 196, 0.45);
  border-radius: 0.10667rem;
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 210, 196, 0.08) 0 8px,
    rgba(0, 210, 196, 0.16) 8px 16px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.2rem;
  color: rgba(0, 210, 196, 0.75);
}

/* ---------- 8. 移动端语言切换 ---------- */
@media only screen and (max-width: 768px) {
  .nav-sidebar .languages-box {
    display: none;
  }

  .top-bar__item--lang {
    flex-direction: column;
    align-items: flex-start;
  }

  .lang-row {
    display: flex;
    gap: 0.21333rem;
    padding: 0 0.21333rem 0.26667rem;
    width: 100%;
  }

  .lang-row button {
    flex: 1;
    height: 0.64rem;
    border: 1px solid hsla(0, 0%, 100%, 0.25);
    border-radius: 0.10667rem;
    color: #fff;
    font-size: 0.18667rem;
    background: transparent;
    cursor: pointer;
  }

  .lang-row button.actived {
    border-color: #00d2c4;
    color: #00d2c4;
  }
}
