/* H5 网页端样式 —— 延续小程序橙色品牌 #F0763B，纯色无渐变 */

:root {
  --brand: #F0763B;
  --brand-hover: #D85A30;
  --brand-soft: #FBE9E1;
  --accent: #3B82F6;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --text: #111827;
  --text-2: #6B7280;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(17, 24, 39, .06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }

/* 顶栏 */
.h5-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.h5-header-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.h5-logo { font-size: 22px; }
.h5-brand { font-size: 17px; font-weight: 600; }

/* 主体 */
.h5-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* 解析卡片 */
.parse-title { font-size: 22px; font-weight: 700; }
.parse-sub { color: var(--text-2); font-size: 14px; margin: 4px 0 16px; }

.input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.url-input {
  flex: 1;
  height: 48px;
  padding: 0 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}
.url-input:focus { border-color: var(--brand); }
.paste-btn {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}
.paste-btn:active { background: #f3f4f6; }

.parse-btn {
  width: 100%;
  height: 52px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.parse-btn:active { background: var(--brand-hover); }
.parse-btn:disabled { background: #f3b290; cursor: not-allowed; }

.notice { color: var(--text-2); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* 加载 */
.loading { text-align: center; color: var(--text-2); padding: 32px; }
.spinner {
  width: 36px; height: 36px;
  margin: 0 auto 12px;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 结果 */
.result { display: flex; flex-direction: column; gap: 16px; }
.result-card { overflow: hidden; }
.cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
}
.result-info { padding: 12px 0 4px; }
.result-title { font-size: 16px; font-weight: 600; word-break: break-all; }
.result-meta { color: var(--text-2); font-size: 13px; margin-top: 4px; }

.result-actions { display: flex; gap: 10px; margin-top: 12px; }
.btn {
  flex: 1;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-hover); }
.btn-secondary { background: var(--brand-soft); color: var(--brand); }
.btn-secondary:active { background: #f7d9c9; }

/* 图集 */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.image-item { position: relative; border-radius: 8px; overflow: hidden; }
.image-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
}
.image-item a {
  position: absolute;
  right: 6px; bottom: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
}

/* 引导提示 */
.guide-tip {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}

/* 小程序引流 */
.mini-card { display: flex; gap: 16px; align-items: center; }
.mini-qr { flex-shrink: 0; width: 88px; height: 88px; }
.mini-qr img { width: 100%; height: 100%; display: block; border-radius: 8px; }
.qr-fallback {
  width: 100%; height: 100%;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.mini-text h3 { font-size: 16px; font-weight: 600; }
.mini-text p { color: var(--text-2); font-size: 13px; margin-top: 4px; }

/* 平台 */
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.platform-list { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-item {
  background: #f3f4f6;
  color: var(--text);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 20px;
}

/* 页脚 */
.h5-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  text-align: center;
  color: var(--text-2);
  font-size: 12px;
}
.footer-links { margin-top: 8px; }
.footer-links a { color: var(--text-2); }

/* 工具类 */
.hidden { display: none !important; }

/* 错误提示 toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, .85);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 100;
  max-width: 80%;
  text-align: center;
}

/* ============ 广告引流页 ============ */
/* Hero 区 */
.hero { text-align: center; padding: 32px 20px; }
.hero-title { font-size: 26px; font-weight: 700; }
.hero-sub { color: var(--brand); font-size: 15px; font-weight: 600; margin-top: 6px; }
.hero-desc { color: var(--text-2); font-size: 14px; margin-top: 10px; }

.hero-qr {
  width: 168px; height: 168px;
  margin: 24px auto 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.hero-qr img { width: 100%; height: 100%; display: block; }
.hero-qr .qr-fallback {
  width: 100%; height: 100%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-cta { font-size: 17px; font-weight: 700; margin-top: 14px; }
.hero-note { color: var(--text-2); font-size: 13px; margin-top: 4px; }

/* 功能亮点 */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feature {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 12px;
  text-align: center;
}
.feature-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.feature h3 { font-size: 14px; font-weight: 600; }
.feature p { color: var(--text-2); font-size: 12px; margin-top: 6px; line-height: 1.5; }

/* 为什么用小程序 */
.why-list { list-style: none; padding: 0; }
.why-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.why-list li:last-child { border-bottom: none; }

/* 小屏适配 */
@media (max-width: 400px) {
  .features { grid-template-columns: 1fr; }
  .feature { display: flex; align-items: center; gap: 12px; text-align: left; }
  .feature-icon { margin-bottom: 0; flex-shrink: 0; }
}
