/* 移动端专用样式（独立于桌面样式）
 * 仅在窄屏下生效，不影响现有布局
 */

@media (max-width: 768px) {
  /* 全局基础：避免横向滚动，保证阅读体验 */
  html,
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  body {
    background-color: #050308;
  }

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

  /* 首页（index.html）移动布局 */
  body.home-page #main-header {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    margin: 0.75rem auto 0;
    width: 100% !important;
    max-width: calc(100% - 2rem) !important;
    border-radius: 999px;
  }

  body.home-page #home {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 2.5rem;
  }

  body.home-page #home .flex.flex-col.items-center.gap-5 {
    padding-inline: 1.25rem;
  }

  /* 首页各 section 改为自然流式堆叠，取消绝对定位 */
  body.home-page section,
  body.home-page #about,
  body.home-page #stats,
  body.home-page #faq,
  body.home-page footer {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  body.home-page #features {
    border-radius: 20px;
    padding-block: 2rem;
    padding-inline: 1.25rem;
  }

  /* CTA 区域（背景大图）在移动端居中显示内容 */
  body.home-page section[aria-label=""] > div,
  body.home-page section[aria-label=""] .flex.flex-col.w-full {
    max-width: 100%;
  }

  /* 首页 Hero 标题在移动端放小并允许多行 */
  body.home-page #home [data-i18n-key="hero.title"] {
    font-size: 1.6rem !important;
    line-height: 1.9rem !important;
    white-space: normal !important;
  }

  body.home-page #home [data-i18n-key="hero.subtitle"] {
    font-size: 1.25rem !important;
  }

  /* 首页 Footer 堆叠为单列 */
  body.home-page footer > div > div:first-child {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* 下载页（download.html）移动布局 */
  body.download-page main {
    padding-inline: 1.5rem;
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  body.download-page h1[data-i18n-key="download.title"] {
    font-size: 1.9rem;
    line-height: 2.2rem;
  }

  body.download-page [data-i18n-key="download.subtitle"] {
    font-size: 1.4rem;
  }

  body.download-page section.flex.flex-col.sm\:flex-row {
    width: 100%;
  }

  /* 法务页（会员 / 隐私 / 条款）统一移动版排版 */
  body.legal-page {
    background-color: #050308;
  }

  body.legal-page #main-header {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    margin: 0.75rem auto 0;
    width: 100% !important;
    max-width: calc(100% - 2rem) !important;
  }

  body.legal-page main {
    padding-top: 6rem;
    padding-bottom: 2.5rem;
  }

  body.legal-page article {
    max-width: 100% !important;
    margin-inline: 1rem !important;
    padding-inline: 1.25rem !important;
    padding-block: 1.5rem !important;
  }

  body.legal-page h1 {
    font-size: 1.6rem !important;
    line-height: 1.9rem !important;
  }

  body.legal-page h2 {
    font-size: 1.2rem !important;
    line-height: 1.6rem !important;
  }

  body.legal-page p {
    font-size: 0.95rem !important;
    line-height: 1.5rem !important;
  }

  /* 法务页 Footer 改为单列居中 */
  body.legal-page footer > div {
    padding-inline: 1.25rem;
  }

  body.legal-page footer > div > div:first-child {
    flex-direction: column;
    gap: 1.5rem;
    margin-left: 0 !important;
  }

  body.legal-page footer .footer-menu-column {
    width: 100%;
  }
}




