/* =============================================================
 * wcs.html 落地页样式（微信搜一搜渠道，独立维护）
 * 设计：移动优先，≥992px 切换为左右两栏横向布局。
 *   - 左栏：品牌 Banner + 失信风险扫描
 *   - 右栏：为什么选择我们 + 查询表单卡片（页面视觉重心）
 * 主题色由页面通过 --theme 注入。
 * ============================================================= */

/* ---------- 主题变量 ---------- */
:root {
  --border: #dfe3ea;
  --text: #333;
  --text-sub: #999;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --card-bg: #fff;
  --card-shadow: 0 6px 20px rgba(31, 45, 61, .06);
  --card-shadow-hover: 0 12px 28px rgba(31, 45, 61, .12);
}

/* ---------- 基础重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.5;
  background: #fff;
}
.hide { display: none !important; }

/* ---------- 布局容器（移动端：单列居中） ---------- */
.page {
  max-width: 480px;
  margin: 0 auto;
}
/* 移动端 main-card 不做卡片化，仅作透明包裹 */
.main-card { display: contents; }

/* ---------- 品牌头部（点阵世界地图背景图） ---------- */
.hero {
  text-align: center;
  padding: 20px 20px 15px;

    background:
    url("./img/bg.png") center top / 100% auto no-repeat,
    linear-gradient(180deg, #f2f6fc, #ffffff);

}
.hero .slogan-img {
  display: block;
  margin: 0 auto;
  width: 92%;
  max-width: 460px;
  height: auto;
}
.hero .brand-img {
  display: block;
  margin: 0 auto;
  width: 86%;
  max-width: 400px;
  height: auto;
}

/* ---------- 查询表单 ---------- */
.form-wrap { padding: 0 20px 10px; }
.form-title { display: none; }              /* 移动端隐藏，PC 端显示 */

.field {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s;
}
.field:focus-within { border-color: var(--theme); }
.field .ico {
  display: inline-flex;
  margin-right: 10px;
  font-size: 18px;
  color: #b6bdc9;
}
.field .ico img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.field input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
}
.field .btn-code {
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 6px;
  background: var(--theme);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.field .btn-code:disabled { opacity: .55; cursor: not-allowed; }

/* ===== 滑动拼图验证弹层 ===== */
.slider-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 998; /* 低于 .toast(999)，提示语可浮在弹层之上 */
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-mask.hide { display: none; }
.slider-box {
  width: 322px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 11px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.slider-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}
.slider-close { cursor: pointer; color: #999; font-size: 22px; line-height: 1; padding: 0 4px; }
.slider-puzzle {
  position: relative;
  width: 300px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: #e9edf3;
}
.puzzle-bg { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.puzzle-piece {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  user-select: none;
  -webkit-user-drag: none;
}
.slider-track {
  position: relative;
  width: 300px;
  height: 40px;
  margin-top: 12px;
  background: #f2f4f8;
  border: 1px solid #e3e8ef;
  border-radius: 20px;
}
.slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: rgba(47, 119, 240, .25);
  border-radius: 20px;
}
.slider-thumb {
  position: absolute;
  left: 0;
  top: -1px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: grab;
  touch-action: none; /* 移动端拖动不触发页面滚动 */
  user-select: none;
  z-index: 2;
}
.slider-hint {
  position: absolute;
  width: 100%;
  text-align: center;
  line-height: 40px;
  font-size: 13px;
  color: #98a1ad;
  pointer-events: none;
  transition: opacity .3s;
}

.agreement {
  display: flex;
  align-items: flex-start;
  margin: 4px 2px 16px;
  font-size: 13px;
  color: #666;
}
.agreement input { flex-shrink: 0; margin-right: 6px; margin-top: 3px; }
.agreement a { color: var(--theme); text-decoration: none; }
.agreement.notice { color: #888; }

.btn-primary {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--theme);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-primary:active { opacity: .88; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.quick-links {
  display: flex;
  justify-content: space-around;
  padding: 16px 40px 4px;
}
.quick-links a {
  color: var(--theme);
  font-size: 15px;
  text-decoration: none;
}

/* ---------- 通用分节标题 ---------- */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}
.section-title::before,
.section-title::after {
  content: '';
  width: 30px;
  height: 1px;
  background: #d8dde5;
}

/* ---------- 失信风险九宫格 ---------- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 20px;
}
.icon-grid .item { text-align: center; }
.icon-grid .item .circle img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.icon-grid .item .name {
  font-size: 13px;
  color: #555;
}

/* ---------- 为什么选择我们 ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 16px;
  padding: 0 30px;
}
.why-grid .item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.why-grid .item .ic {
  display: inline-flex;
  flex-shrink: 0;
  font-size: 26px;
  color: var(--theme);
}
.why-grid .item .ic img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.why-grid .item .t {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.why-grid .item .d {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-sub);
}

/* ---------- 底部说明（主题色区块） ---------- */
.footer {
  margin-top: 18px;
  padding: 26px 24px 34px;
  background: var(--theme);
  color: rgba(255, 255, 255, .92);
  text-align: center;
  font-size: 13px;
  line-height: 2;
}
.footer .copyright { margin-top: 8px; opacity: .85; }

/* ---------- 提示 toast ---------- */
.toast {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  display: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

/* =============================================================
 * PC 端（≥992px）：左右两栏横向布局
 * 特色区两块由 layout.js 搬运至 .hero / .form-wrap 内部。
 * ============================================================= */
@media (min-width: 992px) {
  body { background: #eef2f8; }

  /* 整页背景 + 垂直居中主卡片、页脚 */
  .page {
    max-width: none;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: url('img/pc_bg.jpg') center / cover no-repeat fixed;
  }

  /* 居中悬浮主卡片：左右两栏 */
  .main-card {
    display: flex;
    width: 100%;
    max-width: 1280px;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(31, 45, 61, .18);
  }

  /* ---- 左栏：品牌 Banner + 失信风险 ---- */
  .hero {
    flex: 1 1 46%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    /* background:
      url("./img/bg.png") center bottom / cover no-repeat,
      linear-gradient(160deg, #f3f7fd, #ffffff); */
    color: var(--text);
  }
  .hero-inner {
    width: 100%;
    max-width: 460px;
    text-align: center;
  }
  .hero .brand-img { max-width: 400px; }
  .hero .slogan-img { max-width: 400px; }

  #featRisk {
    width: 100%;
    max-width: 460px;
    margin-top: 32px;
  }

  /* ---- 右栏：为什么选择我们 + 查询表单 ---- */
  .form-wrap {
    flex: 1 1 54%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 56px;
    background: linear-gradient(180deg, #ffffff, #f8fafe);
  }
  #featWhy {
    width: 100%;
    max-width: 480px;
    margin-bottom: 24px;
  }

  #step1,
  #step2 {
    width: 100%;
    max-width: 480px;
  }
  .form-title {
    display: block;
    width: 100%;
    max-width: 480px;
    margin-bottom: 22px;
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #1a1a1a;
  }
  .field { height: 56px; }
  .btn-primary {
    height: 56px;
    font-size: 19px;
    background: linear-gradient(135deg, var(--theme), color-mix(in srgb, var(--theme) 78%, #000 22%));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--theme) 38%, transparent);
  }
  .quick-links {
    width: 100%;
    max-width: 480px;
    padding: 16px 20px 0;
  }

  /* ---- 分节标题（两个特色区通用） ---- */
  .section-title {
    margin: 0 0 16px;
    font-size: 18px;
  }
  .section-title::before,
  .section-title::after { width: 34px; }

  /* ---- 特色卡片：通用外观 + hover ---- */
  .icon-grid .item,
  .why-grid .item {
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: transform .2s, box-shadow .2s;
  }
  .icon-grid .item:hover,
  .why-grid .item:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
  }

  /* 失信风险九宫格：3 列 */
  .icon-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0;
  }
  .icon-grid .item { padding: 16px 6px; }
  .icon-grid .item .circle img { width: 28px; height: 28px; }
  .icon-grid .item .name { margin-top: 6px; font-size: 13px; }

  /* 为什么选择我们：2 列横向卡片 */
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0;
  }
  .why-grid .item {
    flex-direction: row;
    gap: 10px;
    padding: 14px 12px;
    text-align: left;
  }
  .why-grid .item .ic img { width: 28px; height: 28px; }
  .why-grid .item .t { font-size: 14px; }
  .why-grid .item .d { font-size: 11px; }

  /* 特色容器在 PC 端两块内容已被搬出，留空 */
  .features {
    margin: 0;
    padding: 0;
  }

  /* ---- 底部说明：主卡片下方，透明居中 ---- */
  .footer {
    width: 100%;
    max-width: 1040px;
    margin: 24px 0 0;
    padding: 0;
    background: none;
    color: #8894a8;
    font-size: 13px;
    line-height: 1.9;
  }
  .footer .copyright { margin-top: 6px; }
}

/* =============================================================
 * 超宽屏（≥1400px）：放大主卡片与图标
 * ============================================================= */
@media (min-width: 1400px) {
  .main-card { max-width: 1160px; }
  .footer { max-width: 1160px; }
  .hero .brand-img,
  .hero .slogan-img { max-width: 360px; }
  .icon-grid .item .circle img { width: 38px; height: 38px; }
}
