/* 助力分享拿权益 H5 - 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --violet-light: #e2d1c3;
  --violet: #8b5e3c;
  --violet-deep: #5c3a21;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --bg: #e2d1c3;
  --card: #ffffff;
  --text: #1f2937;
  --text-sub: #6b7280;
  --red: #e8485b;
}

html, body { background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%); background-attachment: fixed; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); }

.page { max-width: 750px; margin: 0 auto; padding-bottom: 24px; }

/* ---------- 模块1: 轮播图 ---------- */
.banner { position: relative; width: 100%; aspect-ratio: 750/360; overflow: hidden; background: #f3e6d8; }
.banner-track { display: flex; width: 100%; height: 100%; transition: transform 0.4s ease; }
.banner-track img { width: 100%; height: 100%; flex-shrink: 0; object-fit: cover; }
.banner-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.banner-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.6); transition: all 0.3s; }
.banner-dots span.active { width: 18px; border-radius: 4px; background: #fff; }

/* ---------- 模块2: 核心互动区 ---------- */
.interact-box { margin: 12px; background: var(--card); border-radius: 16px; padding: 24px 20px; box-shadow: 0 4px 20px rgba(139,94,60,0.08); text-align: center; }

.label-tip { font-size: 14px; color: var(--text-sub); margin-bottom: 12px; }
.person-name { font-size: 20px; font-weight: 700; }
.person-product { font-size: 14px; color: var(--violet); margin-top: 6px; padding: 2px 12px; background: #f3e6d8; border-radius: 20px; display: inline-block; }

.meter-wrap { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 18px 0; }
.meter-big { font-size: 72px; font-weight: 800; line-height: 1; background: linear-gradient(180deg, var(--violet) 0%, var(--violet-deep) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.meter-unit { font-size: 18px; color: var(--text-sub); }

/* 数字特效 */
@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.meter-big.bump { animation: bump 0.9s cubic-bezier(0.22, 1, 0.36, 1); -webkit-text-fill-color: var(--gold); }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.5); color: var(--gold); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.meter-big.bounce-in { animation: bounceIn 0.8s ease; }

.btn-box { margin-top: 16px; }
.primary-btn { display: block; width: 75%; max-width: 240px; margin: 0 auto; height: 38px; border: none; border-radius: 20px; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--violet-light) 0%, var(--violet) 50%, var(--violet-deep) 100%); box-shadow: 0 6px 16px rgba(139,94,60,0.35); cursor: pointer; }
.primary-btn:active { transform: scale(0.97); }
#redeemBtn { font-size: 15px; }
.ghost-btn { display: block; width: 75%; max-width: 240px; margin: 10px auto 0; height: 35px; border: 1.5px solid var(--violet); border-radius: 18px; font-size: 12px; font-weight: 600; color: var(--violet); background: #fff; cursor: pointer; }
.full-tip { margin-top: 14px; font-size: 15px; color: var(--gold); font-weight: 600; }

/* 状态B 表单 */
.form-row { text-align: left; margin-bottom: 14px; }
.form-label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.red { color: var(--red); }
.optional { color: var(--text-sub); font-weight: 400; font-size: 12px; }
.form-select { width: 100%; height: 46px; border: 1px solid #e2d1c3; border-radius: 10px; padding: 0 12px; font-size: 16px; background: #faf6f1; color: var(--text); appearance: auto; }
.nickname-row { display: flex; align-items: center; gap: 8px; }
.nickname-input { flex: 1; min-width: 0; }
.nickname-btn { flex-shrink: 0; padding: 0 14px; height: 46px; border: 1.5px solid var(--violet); border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--violet); background: #fff; cursor: pointer; white-space: nowrap; }
.nickname-btn:active { transform: scale(0.97); }
.rule-text { text-align: left; font-size: 13px; line-height: 1.7; color: var(--text-sub); background: #faf6f1; border-radius: 10px; padding: 12px; margin-bottom: 6px; }

/* 状态C 分享引导 */
.share-guide { margin-top: 14px; font-size: 13px; color: var(--text-sub); }

/* ---------- 模块3: 进度条 ---------- */
.progress-box { margin: 12px; background: var(--card); border-radius: 16px; padding: 18px 20px; box-shadow: 0 4px 20px rgba(139,94,60,0.08); }
.progress-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-label { font-size: 14px; font-weight: 600; }
.progress-pct { font-size: 14px; font-weight: 700; color: var(--violet); }
.progress-bar { height: 14px; border-radius: 8px; background: #f3e6d8; overflow: hidden; }
.progress-inner { height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--violet-light), var(--violet-deep)); transition: width 0.6s ease; }
.progress-inner.gold { background: linear-gradient(90deg, var(--gold-light), var(--gold)); }

/* ---------- 模块4: 参与者 ---------- */
.participants-box { margin: 12px; background: var(--card); border-radius: 16px; padding: 18px 20px; box-shadow: 0 4px 20px rgba(139,94,60,0.08); }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.participant-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f3e6d8; }
.participant-item:last-child { border-bottom: none; }
.p-rank { width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; font-size: 13px; font-weight: 700; color: #fff; background: #8b5e3c; margin-right: 10px; flex-shrink: 0; }
.p-rank.top { background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.p-name { flex: 1; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-product { font-size: 12px; color: var(--violet); margin-right: 10px; }
.p-meter { font-size: 16px; font-weight: 800; color: var(--violet); }
.empty-tip { text-align: center; color: var(--text-sub); font-size: 14px; padding: 16px 0; }
.more-btn { text-align: center; margin-top: 12px; font-size: 14px; color: var(--violet); font-weight: 600; cursor: pointer; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { width: 84%; max-width: 340px; background: #fff; border-radius: 16px; padding: 22px; text-align: center; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.modal-body { font-size: 15px; line-height: 1.6; color: var(--text); }
.modal-btn { width: 100%; height: 44px; border: none; border-radius: 22px; font-size: 16px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--violet-light), var(--violet-deep)); cursor: pointer; margin-top: 16px; }

/* 兑奖弹窗内容 */
.redeem-name { font-size: 16px; font-weight: 700; }
.redeem-product { font-size: 13px; color: var(--violet); margin: 4px 0 12px; }
.redeem-meter { font-size: 14px; font-weight: 700; color: var(--violet); margin: 0 0 12px; }
.redeem-code { font-size: 32px; font-weight: 800; letter-spacing: 4px; color: var(--red); }
.redeem-code-label { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.redeem-qrcode { display: block; width: 160px; height: 160px; margin: 8px auto 8px; border-radius: 8px; }
.redeem-tip { font-size: 16px; color: var(--text-sub); }

/* ---------- 分享引导层(箭头指向右上角···) ---------- */
.share-guide-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.62);
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 52px 22px 0 0;
}
.share-guide-arrow {
  width: 0; height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 28px solid #fff;
  margin-right: 20px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  animation: guide-bounce 1.2s ease-in-out infinite;
}
@keyframes guide-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.share-guide-text {
  margin-top: 14px;
  max-width: 270px;
  background: #fff; color: var(--text);
  font-size: 15px; line-height: 1.7; font-weight: 600;
  padding: 14px 16px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}
