/* ==========================================================================
   新天地 APP 下载落地页 — 公共样式
   纯 HTML+CSS+JS，无框架。蓝青色系品牌调、移动优先。
   按钮全部改为占位图（img/btn-*.png），宽度自适应、图片等比缩放。
   配色：#D4ECF4 #BBE1FB #0E8DE1 #00ACF4>#00A1F5
   ========================================================================== */

:root {
  --blue: #0E8DE1;              /* 深蓝：标题/强调 */
  --cyan1: #00ACF4;            /* 主青（渐变左） */
  --cyan2: #00A1F5;            /* 主青（渐变右） */
  --cyan-grad: linear-gradient(90deg, #00ACF4 0%, #00A1F5 100%);  /* 步骤圆圈横向渐变 */
  --bg-lt: #D4ECF4;            /* 极浅青 */
  --bg-blue: #BBE1FB;          /* 浅蓝 */
  --page-bg: #eaf5fb;
  --text: #143a52;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--page-bg);
}

/* 页面容器：手机宽度居中，桌面预览时不至于铺满 */
.wrap {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, #eaf6fc 0%, #d9eefa 100%);
  position: relative;
  overflow-x: hidden;
}

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

/* 图片按钮：本身就是占位图，点击区 = 图片。宽度由容器控制，高度等比自适应 */
.btn-img {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}
.btn-img:active { transform: translateY(1px) scale(.99); filter: brightness(.96); }

/* ============ 首页 index ============ */
.home-hero { width: 100%; }
.home-actions { padding: 14px 41px 28px; }
.home-actions .row { display: flex; gap: 12px; margin-bottom: 12px; }
.home-actions .row .btn-img { flex: 1; width: auto; min-width: 0; }   /* 两个并排按钮各占一半，min-width:0 允许收缩 */

/* ============ 下载横幅（苹果顶栏 / 安卓底部，共用）============
   整条横幅是一张占位图(930x150，含左LOGO+标题+右"防拦截下载"按钮)，
   左右贴边、方角、整图点击即防拦截下载。用户后续整张替换。 */
.topbar .bar {
  display: block; width: 100%; cursor: pointer;   /* 整条横幅一张图，通栏贴边 */
}

/* 主视觉 */
.hero-img { width: 100%; }

/* 下载按钮区（苹果页） */
.dl-block { padding: 16px; }
.dl-block .btn-img { margin-bottom: 12px; max-height: 43px; object-fit: contain; }

/* 首页三个按钮高度约束：限高 50px，不用 contain 以保持上下行宽度一致对齐 */
.home-actions .btn-img {
  max-height: 50px;
}

/* 教程分节标题：文字左右各一个占位小图标（sec-icon.png，用户可替换） */
.sec-title {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 18px; font-weight: 700; color: var(--blue);
  padding: 18px 10px 6px;
}
.sec-title .sec-icon { width: 22px; height: 22px; flex: none; }

/* 教程步骤（竖排，苹果/安卓共用步骤圆圈）
   步骤①②③④圆圈：#00ACF4→#00A1F5 从左到右渐变 */
.steps { padding: 6px 16px 24px; }
.step { margin-bottom: 18px; }
.step .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--cyan-grad); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.step .tx { font-size: 15px; font-weight: 600; }
.step img { width: 100%; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }

/* ============ 安卓页 ============ */
/* 4 机型整体图(240x290)：选中亮彩色，未选中 CSS 灰化熄灭 */
.phone-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding: 16px;
}
.phone-tabs .tab {
  cursor: pointer;
  transition: transform .15s, filter .15s, opacity .15s;
  filter: grayscale(100%);          /* 默认灰色（彩色熄灭） */
  opacity: .6;
}
.phone-tabs .tab img { width: 100%; }
.phone-tabs .tab.active {
  filter: none;                      /* 选中：恢复亮彩色 */
  opacity: 1;
  transform: translateY(-2px);
}

.install-card {
  background: #fff; margin: 0 16px; border-radius: 18px; padding: 18px 16px 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.install-card h3 { text-align: center; font-size: 18px; margin-bottom: 14px; color: var(--text); }
.install-card .a-step { margin-bottom: 16px; }
.install-card .a-step .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.install-card .a-step .tx { font-size: 14px; color: #555; font-weight: 600; }
.install-card .a-step img { width: 100%; border-radius: 12px; }

/* 安卓底部下载横幅：整条一张图，通栏贴边、整图点击防拦截（与顶栏同结构） */
.dl-banner { margin: 20px 0 12px; }
.dl-banner .bar { display: block; width: 100%; cursor: pointer; }

.dl-lines { display: flex; gap: 10px; padding: 4px 16px 30px; }
.dl-lines .btn-img { flex: 1; min-width: 0; }   /* min-width:0 允许 3 个并排收缩不溢出 */

/* 浮动客服（除首页外所有页：右侧紧贴边，尺寸 305x109 等比）
   圆角已烤进 PNG（左侧胶囊、右侧直角贴边）；此处不再加 border-radius，
   阴影用 drop-shadow 贴合图片实际形状（否则矩形 box-shadow 会在透明圆角处露出直角halo）。 */
.kf-float {
  position: fixed; right: 0; top: 42%; z-index: 30;
  width: 122px;                      /* 305x109 等比缩放到手机合适宽度 */
  cursor: pointer;
  filter: drop-shadow(0 3px 8px rgba(14,141,225,.35));
}

/* ============ 下载线路选择弹层 ============ */
.mask {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.5); align-items: flex-end;
}
.mask.show { display: flex; }
.sheet {
  width: 100%; max-width: 480px; margin: 0 auto;
  background: #fff; border-radius: 20px 20px 0 0; padding: 10px 0 20px;
  animation: rise .22s ease;
}
@keyframes rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet .line {
  display: block; text-align: center; padding: 16px; font-size: 17px;
  color: var(--blue); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid #eaf3fa;
}
.sheet .line.main { color: var(--cyan1); font-weight: 700; }
.sheet .tip { text-align: center; font-size: 12px; color: #999; padding: 14px 16px 4px; }
.sheet .cancel { display: block; text-align: center; padding: 14px; color: #999; font-size: 16px; cursor: pointer; }
