* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: #f2f2f2;
  color: #1d1d1f;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* 内容最大宽度 1260；小于 1340 时左右各留 40 */
.wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0;
}

/* ---------- Header ---------- */

.site-header {
  padding-top: 36px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

/* Logo 一行：左 Logo，右语言切换开关 */
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-switch {
  display: flex;
  align-items: center;
  background: #e5e5e8;
  border-radius: 9px;
  padding: 3px;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  color: #86868b;
  padding: 7px 16px;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-btn:hover {
  color: #1d1d1f;
}

.lang-btn.active {
  background: #fff;
  color: #1d1d1f;
  font-weight: 600;
}

/* 标题 / 副标题 与下载按钮位于第二行 */
.headline-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 68px;
  margin-bottom: 70px;
}

.headline-text {
  min-width: 0;
}

.app-title {
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

.app-subtitle {
  margin-top: 5px;
  font-size: clamp(13px, 1.3vw, 16px);
  color: #6e6e73;
  line-height: 1.5;
}

.download-link {
  margin-left: auto;
}

.download-link img {
  height: 40px;
  width: auto;
}

/* ---------- Hero（App 展示图，按剩余高度自适应缩放） ---------- */

.hero {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
}

/* 从图片中间往下的白色背景层 */
.white-area {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  bottom: 0;
  background: #fff;
}

/* hero 内的内容容器：用来撑高并垂直居中展示图 */
.hero .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  container-type: inline-size;
}

.banner-row {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  height: min(100%, 49cqw);
  list-style: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.banner {
  position: relative;
  line-height: 0;
  flex-shrink: 0;
}

.banner img {
  height: 100%;
  width: auto;
  max-width: none;
}

.banner.center {
  height: 100%;
}

.banner.inner {
  height: 82%;
}

.banner.outer {
  height: 66%;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #fff;
  padding: 28px 0 32px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
}

.copyright {
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.6;
}

.footer-links a {
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #1d1d1f;
}

/* ---------- 页面宽度小于 1340：内容左右各留 40（白底区域不内缩） ---------- */

@media (max-width: 1339px) {
  .wrap {
    padding: 0 40px;
  }
}

/* ---------- 小屏幕进一步收紧 ---------- */

@media (max-width: 640px) {
  .site-header {
    padding-top: 24px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .lang-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .site-footer {
    padding: 24px 0 24px;
  }
}

/* 高度不足时压缩纵向留白，保证不滚动 */
@media (max-height: 700px) {
  .site-header {
    padding-top: 20px;
  }

  .site-footer {
    padding: 18px 0 20px;
  }
}

/* ============================================================
   移动端专用布局（<=767px），PC 宽屏布局保持不变
   ============================================================ */

.mobile {
  display: none;
}

@media (max-width: 767px) {
  html,
  body {
    height: auto;
  }

  body {
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* 隐藏桌面版三段布局 */
  .site-header,
  .hero,
  .site-footer {
    display: none;
  }

  .mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
  }

  /* 顶行：语言开关靠右 */
  .m-top {
    display: flex;
    justify-content: flex-end;
    padding: 20px 20px 0;
  }

  /* Logo 居中 */
  .m-logo {
    width: 92px;
    height: 92px;
    border-radius: 21px;
    object-fit: cover;
    align-self: center;
    margin-top: 30px;
  }

  /* 标题 / 描述居中 */
  .m-title {
    text-align: center;
    margin-top: 22px;
    font-size: clamp(28px, 8vw, 36px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.5px;
  }

  .m-subtitle {
    text-align: center;
    margin-top: 8px;
    font-size: 15px;
    color: #6e6e73;
    line-height: 1.5;
    padding: 0 30px;
  }

  /* 下载按钮居中 */
  .m-download {
    display: flex;
    justify-content: center;
    margin-top: 24px;
  }

  .m-download .download-link {
    margin-left: 0;
  }

  .m-download .download-link img {
    height: 40px;
    width: auto;
  }

  /* 四个链接一行 */
  .m-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
    margin-top: 30px;
    font-size: 12px;
    color: #6e6e73;
    white-space: nowrap;
  }

  .m-links a:hover {
    color: #1d1d1f;
  }

  /* 白底区：图片轮播 + 备案 + 版权 */
  .m-white {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 42px;
    background: #fff;
    padding: 46px 0 40px;
  }

  .carousel {
    width: 100%;
  }

  .c-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
  }

  .c-slide {
    position: absolute;
    top: 0;
    left: 0;
    will-change: left, top, width;
  }

  .c-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 423 / 862;
    max-width: none;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
  }

  /* 上一张 / 下一张按钮 */
  .c-nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 44px;
    margin-top: 18px;
  }

  .c-nav {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #1d1d1f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.15s ease;
  }

  .c-nav svg {
    width: 20px;
    height: 20px;
  }

  .c-nav:active {
    background: #f0f0f2;
    transform: scale(0.92);
  }

  .m-icp {
    margin-top: 34px;
    font-size: 12px;
    color: #6e6e73;
  }

  .m-copyright {
    margin-top: 12px;
    padding: 0 20px;
    font-size: 12px;
    color: #6e6e73;
    text-align: center;
    line-height: 1.6;
  }
}
