/* =====================================================================
   DOWNLOAD PAGE — Mobile-first (xs < 576px)
   ===================================================================== */

:root {
  --dl-bg: #e2eaf3;
  --dl-card-bg: #ffffff;
  --dl-blue: #26a7fe;
  --dl-green: #02cb64;
  --dl-orange: #ff8026;
  --dl-t-1: #000000e5;
  --dl-t-2: #000000b2;
  --dl-t-3: #00000080;
  --dl-title: #132a3f;
  --dl-blur-blue: #1c80ee;
  --dl-border: #e0e0e0;
}

.download-page {
  background: #ffffff;
  font-family: Figtree, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimHei, Arial, Helvetica, sans-serif;
}

/* =====================================================================
   PRODUCTS SECTION
   ===================================================================== */
.download-products {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-products-bg {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  border-radius: 20px;
  background-color: #ffffff;
  padding-bottom: 58px;
  overflow: hidden;
  background-image: url(../images/common/review-bg.svg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Background decorative ellipses */
.d-bg-ellipse {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.d-bg-ellipse-blue {
  opacity: 0.3;
  top: -852px;
  left: -331px;
  background: var(--dl-blur-blue);
  width: 910px;
  height: 910px;
  filter: blur(250px);
}

.d-bg-ellipse-blue2,
.d-bg-ellipse-blue3,
.d-bg-ellipse-white {
  display: none;
}

.download-products-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 22px;
  padding: 0 20px;
  gap: 40px;
}

.download-products-title {
  align-self: stretch;
  text-align: center;
  font-size: 52px;
  font-weight: 700;
  line-height: 52px;
  letter-spacing: 0;
  color: var(--dl-title);
  margin: 0;
}

/* =====================================================================
   PRODUCT GRID
   ===================================================================== */
.download-product-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

/* =====================================================================
   PRODUCT CARD
   ===================================================================== */
.d-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  border-radius: 20px;
  background: var(--dl-card-bg);
  padding: 40px 20px;
  gap: 30px;
}

.d-card-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 148px;
  height: 34px;
}

.d-card-badge-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 148px;
  height: 4px;
}

.d-card-badge-body {
  position: absolute;
  top: 0;
  left: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px;
  width: 142px;
  height: 34px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.d-card-badge-text {
  font-size: 17px;
  font-weight: 800;
  line-height: 24px;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow: 0px 1px 1px #00000040;
  white-space: nowrap;
}

.d-card-badge-android {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  column-gap: 4px;
  border-radius: 20px 0;
  padding: 0 12px 0 10px;
  width: 152px;
  height: 32px;
  background: linear-gradient(180deg, #fa6d18 0%, #ff985b 100%);
  font-size: 14px;
  font-weight: 800;
  font-style: italic;
  line-height: 20px;
  color: #ffffff;
  white-space: nowrap;
}

.d-card-badge-android-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.d-card-star {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  padding: 3px 5px 5px;
  width: 32px;
  height: 32px;
  overflow: hidden;
}

.d-card-star img {
  width: 21px;
  height: 24px;
}

.d-card-icon {
  flex-shrink: 0;
  border-radius: 50%;
  width: 80px;
  height: 80px;
}

.d-card-title {
  flex-shrink: 0;
  align-self: stretch;
  text-align: center;
  font-size: 25px;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: 0;
  color: var(--dl-t-1);
  margin: 0;
}

.d-card-desc {
  flex-shrink: 0;
  align-self: stretch;
  text-align: center;
  font-size: 16px;
  line-height: 29px;
  letter-spacing: 0;
  color: var(--dl-t-2);
  margin: 0;
  padding: 10px;
}

/* =====================================================================
   CARD BUTTONS
   ===================================================================== */
.d-card-btns {
  display: flex;
  align-self: stretch;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.d-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  border-radius: 999px;
  padding: 10px 36px;
  height: 58px;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0;
  color: #ffffff;
  text-decoration: none;
  /* 不再铺满：固定 240px，内容超出时按 max-content 撑开 */
  flex: 0 0 auto;
  width: 240px;
  min-width: max-content;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.d-btn:hover {
  opacity: 0.9;
  color: #ffffff;
}

.d-btn img {
  width: 24px;
  height: 24px;
}

.d-btn-blue {
  background: var(--dl-blue);
}

.d-btn-green {
  background: var(--dl-green);
}

/* =====================================================================
   PRODUCTS BOTTOM DIVIDER
   ===================================================================== */
.download-products-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
  padding: 0 20px;
  width: 100%;
}

.d-bottom-divider {
  display: block;
  width: 100%;
  height: 35px;
}

/* =====================================================================
   IMAGE 10 — Separator between products and all-products
   ===================================================================== */
.download-products-image10 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  width: 100%;
  z-index: 2;
  transform: translateY(-50%);
}

.d-image10 {
  border-radius: 20px;
  width: 100%;
  max-width: 1440px;
  min-height: 60px;
}

/* 宽图(2880×230) / 窄图(992×288) 二选一：≥992 用宽图，<992 换成窄图 */
.d-image10--small {
  display: none;
}

@media (max-width: 991.98px) {
  .download-products-image10 {
    transform: translateY(-20%);
  }

  .d-image10 {
    display: none;
  }

  .d-image10--small {
    display: block;
  }
}

/* =====================================================================
   ALL PRODUCTS SECTION
   ===================================================================== */
.download-all-products {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  gap: 40px;
}

.d-all-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  gap: 20px;
}

.d-all-title {
  align-self: stretch;
  text-align: center;
  font-size: 48px;
  font-weight: 700;
  line-height: 67px;
  letter-spacing: 0;
  color: var(--dl-t-1);
  margin: 0;
}

/* Tabs */
.d-all-tabs {
  display: flex;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

.d-tab {
  flex-shrink: 0;
  padding: 13px 0;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--dl-t-2);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.d-tab-active {
  color: var(--dl-blue);
  font-weight: 700;
  border-bottom-color: var(--dl-blue);
}

/* Category */
.d-all-category {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  gap: 20px;
}

.d-category-title {
  align-self: stretch;
  text-align: center;
  font-size: 36px;
  font-weight: 600;
  line-height: 50px;
  letter-spacing: 0;
  color: var(--dl-t-1);
  margin: 0;
}

/* Detail Cards */
.d-detail-cards {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  gap: 40px;
}

.d-detail-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}

.d-detail-platforms {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 4px;
  width: 148px;
  height: 34px;
}

.d-detail-platforms img {
  width: 148px;
  height: 34px;
}
.d-detail-platforms span {
  position: absolute;
  color: #fff;
}

.d-detail-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  z-index: 1;
  margin-top: -30px;
  border: 1px solid var(--dl-border);
  border-radius: 20px;
  background: #ffffff;
  padding: 31px 23px 23px;
  gap: 20px;
}

.d-detail-card-wrap:not(:has(.d-detail-platforms)) .d-detail-card {
  margin-top: 4px;
}

.d-detail-top {
  display: flex;
  align-items: center;
  align-self: stretch;
  column-gap: 12px;
}

.d-detail-icon {
  flex-shrink: 0;
  outline: 2px solid #ffffff80;
  border-radius: 50%;
  width: 72px;
  height: 72px;
}

.d-detail-icons-dual {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
}

.d-detail-icons-dual .d-detail-icon {
  z-index: 2;
}

.d-detail-icons-dual .d-detail-icon-overlap {
  z-index: 1;
  margin-left: -24px;
}

.d-detail-name {
  display: flex;
  flex-direction: column;
  width: calc(100% - 84px);
  min-width: 0;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}

.d-detail-icons-dual+.d-detail-name {
  width: calc(100% - 132px);
}

.d-detail-brand {
  align-self: stretch;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0;
  color: var(--dl-t-2);
}

.d-detail-product {
  align-self: stretch;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 0;
  color: var(--dl-t-1);
  width: auto;
}

/* 描述与其下方的版本/体积行合成一组, 避免被 .d-detail-card 的 gap 撑开 */
.d-detail-text {
  align-self: stretch;
}

.d-detail-desc {
  align-self: stretch;
  font-size: 16px;
  font-weight: 500;
  line-height: 31px;
  letter-spacing: 0;
  color: var(--dl-t-2);
  margin: 0;
}

/* 描述下方的版本/体积信息行, 与 .d-detail-desc 同字号同色 */
.d-detail-info {
  align-self: stretch;
  font-size: 16px;
  font-weight: 500;
  line-height: 31px;
  letter-spacing: 0;
  color: var(--dl-t-2);
  margin: 0;
}

.d-ver a {
  color: var(--dl-blue);
}

/* 版本号/体积随平台联动：默认显示 Win, 切到 Mac/Android 时显示对应版本
   状态类 is-mac/is-android 由 JS 挂在共同祖先 .d-detail-card 上
   (版本号与体积在 .d-detail-info 内, 是 .d-detail-actions 的兄弟节点) */
.d-mac-version,
.d-android-version,
.d-mac-size,
.d-android-size {
  display: none;
}

.d-detail-card.is-mac .d-win-version,
.d-detail-card.is-android .d-win-version,
.d-detail-card.is-mac .d-win-size,
.d-detail-card.is-android .d-win-size {
  display: none;
}

.d-detail-card.is-mac .d-mac-version,
.d-detail-card.is-mac .d-mac-size {
  display: inline;
}

.d-detail-card.is-android .d-android-version,
.d-detail-card.is-android .d-android-size {
  display: inline;
}

/* Android 未单独提供版本号时, 回退显示 Win 版本 */
.d-detail-card.is-android:not(:has(.d-android-version)) .d-win-version {
  display: inline;
}

.d-detail-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  gap: 16px;
}

.d-detail-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* 详情卡按钮为两行: "Try It Free" + 系统/平台小字, 因此比顶部卡片按钮高 */
.d-detail-btns .d-btn {
  align-self: auto;
  height: 68px;
}

.d-btn-text {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 2px;
}

.d-btn-os {
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

/* btn-text-switch-to-mac 四态（图标用背景图随状态切换）
   默认黑图标+深色文字 / 悬停蓝色 / 按下深蓝 / 禁用灰色 */
.d-switch-link {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  column-gap: 4px;
  font-family: Barlow, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimHei, Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
  letter-spacing: 0;
  color: #000000e5;
  text-decoration: none;
  /* 已由 <a> 改成 <span>, 手型光标要自己给 */
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
}

.d-switch-link::before {
  content: "";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("../images/download/mac-black.svg");
}

.d-switch-link:hover {
  color: #26a7fe;
}

.d-switch-link:hover::before {
  background-image: url("../images/download/mac-black-hover.svg");
}

.d-switch-link:active {
  color: #1e86ca;
}

.d-switch-link:active::before {
  background-image: url("../images/download/mac-black-pressed.svg");
}

.d-switch-link.is-disabled,
.d-switch-link:disabled {
  color: #00000080;
  pointer-events: none;
}

.d-switch-link.is-disabled::before,
.d-switch-link:disabled::before {
  background-image: url("../images/download/mac-black-disabled.svg");
}

/* Switch to Win */
.d-switch-link-win::before {
  background-image: url("../images/common/win-dark.svg");
}

.d-switch-link-win:hover::before,
.d-switch-link-win:active::before {
  background-image: url("../images/common/win-blue.svg");
}

/* Switch to Android */
.d-switch-link--android::before {
  background-image: url("../images/download/switch-android.svg");
}

.d-switch-link--android:hover::before {
  background-image: url("../images/download/switch-android-hover.svg");
}

.d-switch-link--android:active::before {
  background-image: url("../images/download/switch-android-pressed.svg");
}

.d-switch-link--android.is-disabled::before,
.d-switch-link--android:disabled::before {
  background-image: url("../images/download/switch-android-disabled.svg");
}

.d-switch-links {
  display: inline-flex;
  align-self: stretch;
  align-items: flex-start;
  column-gap: 24px;
  justify-content: center;
}

/* ============ OS 平台切换（默认 Win 激活）
   同一 .d-detail-actions 内有多个平台的下载按钮(.d-btn-win/.d-btn-mac/.d-btn-android)
   与 Switch 链接(.d-switch-link-win/.d-switch-link-mac/.d-switch-link-android)。
   默认只显示 Win 按钮、隐藏“Switch to Win”；JS 在容器上加 .is-mac / .is-android 切换 ============ */
.d-detail-actions .d-btn-mac,
.d-detail-actions .d-btn-android {
  display: none;
}

.d-detail-actions .d-switch-link-win {
  display: none;
}

/* Mac 激活 */
.d-detail-actions.is-mac .d-btn-win,
.d-detail-actions.is-mac .d-btn-android {
  display: none;
}

.d-detail-actions.is-mac .d-btn-mac {
  display: flex;
}

.d-detail-actions.is-mac .d-switch-link-mac {
  display: none;
}

.d-detail-actions.is-mac .d-switch-link-win {
  display: inline-flex;
}

/* Android 激活（仅 3 平台卡片） */
.d-detail-actions.is-android .d-btn-win,
.d-detail-actions.is-android .d-btn-mac {
  display: none;
}

.d-detail-actions.is-android .d-btn-android {
  display: flex;
}

.d-detail-actions.is-android .d-switch-link-android {
  display: none;
}

.d-detail-actions.is-android .d-switch-link-win,
.d-detail-actions.is-android .d-switch-link-mac {
  display: inline-flex;
}

/* =====================================================================
   TRUST BADGES
   ===================================================================== */
.download-trust {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  padding: 0 20px 100px;
  gap: 10px;
}

.d-trust-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  border-radius: 40px;
  background: #26a7fe14;
  padding: 40px 20px;
  gap: 20px;
}

.d-trust-item {
  display: flex;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  column-gap: 8px;
}

.d-trust-icon {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  overflow: hidden;
}

.d-trust-text {
  flex-grow: 1;
  font-size: 20px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 0;
  color: var(--dl-t-1);
}

/* =====================================================================
   sm (≥ 576px)
   ===================================================================== */
@media (min-width: 576px) {
  .d-all-tabs {
    flex-direction: row;
  }

  .download-products-bg {
    padding-bottom: 61px;
  }

  .d-card-btns {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }
}

/* =====================================================================
   md (≥ 768px)
   ===================================================================== */
@media (min-width: 768px) {
  .download-products-bg {
    padding-bottom: 69px;
  }

  .d-bg-ellipse-white {
    display: block;
    position: absolute;
    top: 231px;
    right: -294px;
    opacity: 0.3;
    border-radius: 50%;
    background: #ffffff;
    width: 476px;
    height: 476px;
    filter: blur(250px);
  }

  .d-btn {
    padding: 10px 20px;
  }

  .d-detail-cards {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 20px;
  }

  .d-detail-card-wrap {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }

  .d-trust-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }

  .d-trust-item {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

/* =====================================================================
   lg (≥ 992px)
   ===================================================================== */
@media (min-width: 992px) {
  .download-product-grid {
    flex-direction: row;
  }

  .d-product-card {
    flex: 1;
  }

  .d-card-btns {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .d-detail-card-wrap {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }

  .download-products-bg {
    padding-bottom: 0;
  }

  .d-bg-ellipse-blue2 {
    display: block;
    position: absolute;
    top: 160px;
    left: 305px;
    opacity: 0.5;
    border-radius: 50%;
    background: var(--dl-blur-blue);
    width: 910px;
    height: 910px;
    filter: blur(250px);
  }

  .d-bg-ellipse-white {
    top: 231px;
    left: 586px;
    right: auto;
  }

  .download-products-inner {
    padding: 80px 40px;
  }

  .download-products-title {
    font-size: 60px;
    line-height: 60px;
  }

  .d-btn {
    padding: 10px 36px;
  }

  .download-products-bottom {
    padding: 0 40px;
  }

  .download-all-products {
    padding: 100px 40px;
  }

  .d-detail-cards {
    gap: 40px;
  }

  .download-trust {
    padding: 0 40px 100px;
  }
}

/* =====================================================================
   xl (≥ 1200px)
   ===================================================================== */
@media (min-width: 1200px) {
  .d-bg-ellipse-blue3 {
    display: block;
    position: absolute;
    top: 231px;
    left: 586px;
    opacity: 0.3;
    border-radius: 50%;
    background: #ffffff;
    width: 476px;
    height: 476px;
    filter: blur(250px);
  }

  .d-product-card {
    max-width: 360px;
    padding: 40px 32px;
  }

  .d-card-icon {
    width: 120px;
    height: 120px;
  }

  .d-detail-card-wrap {
    flex: 0 0 calc(33.333% - 27px);
    max-width: calc(33.333% - 27px);
  }

  .d-trust-inner {
    flex-wrap: nowrap;
  }

  .d-trust-item {
    flex: 1;
    max-width: none;
  }
}

/* =====================================================================
   xxl (≥ 1440px)
   ===================================================================== */
@media (min-width: 1440px) {
  .d-product-card {
    padding: 40px 40px;
    max-width: 427px;
  }
}

/* =====================================================================
   xxxl (≥ 1920px)
   ===================================================================== */
@media (min-width: 1600px) {
  .download-products-inner {
    padding: 80px 240px;
  }

  .download-products-bottom {
    padding: 0 240px;
  }

  .download-all-products {
    padding: 100px 240px;
  }

  .download-trust {
    padding: 0 240px 100px;
  }
}

@media (min-width: 1920px) {
  .download-product-grid {
    gap: 80px;
  }
  .download-products-inner {
    padding: 80px 320px;
  }

  .download-products-bottom {
    padding: 0 320px;
  }

  .download-all-products {
    padding: 100px 320px;
  }

  .download-trust {
    padding: 0 320px 100px;
  }
}

/* Mobile (<420px): hero title font-size 48px */
@media (max-width: 420px) {
  .download-products-title {
    font-size: 48px;
  }
}
