/* ===== 问卷诱饵 / QQ 登录页 共用样式 ===== */
:root {
  --qq-blue: #12b7f5;
  --qq-blue-dark: #0a9bd8;
  --qq-bg: #eef3f7;
  --text: #1f2329;
  --sub: #8a9099;
  --line: #e6eaef;
  --danger: #f0483e;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--qq-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.wrap, .login-wrap, .done-wrap { width: 100%; max-width: 480px; }
img, svg, video, canvas { max-width: 100%; }
p, div, span, td, th, li, h1, h2, h3 { overflow-wrap: break-word; word-break: break-word; }

.wrap { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #fff; display: flex; flex-direction: column; }

/* ---- 顶栏 ---- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  background: #fff; position: sticky; top: 0; z-index: 9;
}
.logo { width: 26px; height: 26px; flex: 0 0 26px; }
.topbar .ttl { font-size: 15px; font-weight: 600; }
.topbar .badge {
  margin-left: auto; font-size: 11px; color: var(--qq-blue);
  background: rgba(18,183,245,.1); padding: 2px 8px; border-radius: 20px;
}

/* ---- 进度 ---- */
.progress { height: 3px; background: var(--line); position: relative; overflow: hidden; }
.progress > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #12b7f5, #4dd0ff);
  transition: width .28s ease;
}

/* ---- 内容 ---- */
.content { flex: 1; padding: 22px 20px 14px; }
.q-num { font-size: 12px; color: var(--sub); letter-spacing: .06em; margin-bottom: 6px; }
.q-title { font-size: 17px; font-weight: 600; line-height: 1.5; margin-bottom: 18px; }
.q-title em { font-style: normal; color: var(--danger); margin-left: 3px; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fafbfc; cursor: pointer; transition: all .16s ease; font-size: 15px;
}
.opt:active { transform: scale(.988); }
.opt.sel { border-color: var(--qq-blue); background: rgba(18,183,245,.07); }
.opt .dot {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%;
  border: 1.5px solid #c9d0d8; position: relative; transition: all .16s;
}
.opt.sel .dot { border-color: var(--qq-blue); border-width: 5px; }
.opt .box {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 4px;
  border: 1.5px solid #c9d0d8; position: relative; transition: all .16s;
}
.opt.sel .box { background: var(--qq-blue); border-color: var(--qq-blue); }
.opt.sel .box:after {
  content: ""; position: absolute; left: 5px; top: 1px;
  width: 5px; height: 10px; border: 2px solid #fff;
  border-top: 0; border-left: 0; transform: rotate(42deg);
}

input[type=text], input[type=tel], input[type=password] {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; outline: none; background: #fafbfc;
  font-family: inherit; transition: border-color .16s;
}
input:focus { border-color: var(--qq-blue); background: #fff; }
input::placeholder { color: #b6bdc6; }

/* ---- 底部按钮 ---- */
.footbar { padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.btn {
  display: block; width: 100%; padding: 14px; border: 0; border-radius: 26px;
  background: linear-gradient(135deg, #16b8f6, #0a9bd8); color: #fff;
  font-size: 16px; font-weight: 600; font-family: inherit; cursor: pointer;
  box-shadow: 0 6px 18px rgba(18,183,245,.32); transition: filter .15s, transform .1s;
}
.btn:active { transform: scale(.985); filter: brightness(.96); }
.btn[disabled] { opacity: .55; box-shadow: none; cursor: not-allowed; }
.btn.ghost {
  background: #fff; color: var(--qq-blue); border: 1px solid var(--qq-blue);
  box-shadow: none; margin-top: 10px;
}
.tip { text-align: center; font-size: 12px; color: var(--sub); margin-top: 12px; line-height: 1.6; }

/* ---- 步骤切换 ---- */
.step { display: none; }
.step.on { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== QQ 登录页 ===== */
.login-wrap { max-width: 420px; margin: 0 auto; min-height: 100vh; background: #fff; }

.qq-head {
  padding: 34px 0 10px; text-align: center;
  background: linear-gradient(180deg, #f3fbff, #fff);
}
.qq-penguin {
  width: 66px; height: 80px; margin: 2px auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.qq-penguin img {
  width: 100%; height: 100%; display: block;
  object-fit: contain;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.qq-head h1 { font-size: 19px; margin: 0 0 4px; font-weight: 600; }
.qq-head p { margin: 0; font-size: 12.5px; color: var(--sub); }

.tabs { display: flex; gap: 26px; padding: 18px 26px 0; border-bottom: 1px solid var(--line); }
.tabs > div {
  padding: 0 0 11px; font-size: 14.5px; color: var(--sub);
  cursor: pointer; position: relative; font-weight: 500;
}
.tabs > div.on { color: var(--text); font-weight: 600; }
.tabs > div.on:after {
  content: ""; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 22px; height: 2.5px; background: var(--qq-blue); border-radius: 2px;
}

.form { padding: 22px 26px 8px; }
.field { position: relative; margin-bottom: 14px; }
.field .clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; border-radius: 50%; background: #d6dbe1; color: #fff;
  font-size: 12px; line-height: 17px; text-align: center; cursor: pointer; display: none;
}
.field.has .clear { display: block; }
.field .eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--sub); cursor: pointer; user-select: none;
}
.field input { padding-right: 42px; }

.row-opt { display: flex; align-items: center; font-size: 12.5px; color: var(--sub); margin: 4px 0 18px; }
.row-opt label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.row-opt a { margin-left: auto; color: var(--qq-blue); text-decoration: none; }
.row-opt input[type=checkbox] { accent-color: var(--qq-blue); width: 14px; height: 14px; }

.login-actions { padding: 0 26px calc(24px + env(safe-area-inset-bottom)); }
.login-actions .btn { border-radius: 24px; }
.login-actions .sub-links {
  display: flex; justify-content: center; gap: 22px;
  margin-top: 18px; font-size: 12.5px; color: var(--sub);
}
.login-actions .sub-links a { color: var(--sub); text-decoration: none; }

.err {
  display: none; font-size: 12.5px; color: var(--danger);
  background: #fff2f1; border-radius: 8px; padding: 9px 12px; margin: 0 0 14px;
}
.err.on { display: block; }

/* 扫码 */
.qr-pane { display: none; padding: 26px; text-align: center; }
.qr-pane.on { display: block; }
.qr-box {
  width: 200px; height: 200px; margin: 0 auto 16px; padding: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.qr-box img { width: 100%; height: 100%; display: block; border-radius: 4px; }
.qr-box .mask {
  position: absolute; inset: 0; background: rgba(255,255,255,.94);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 13px; color: var(--sub); gap: 10px; padding: 12px;
  text-align: center; line-height: 1.6;
}
.qr-box .mask.on { display: flex; }
.qr-box .mask .mini {
  font-size: 12.5px; color: #fff; background: var(--qq-blue);
  padding: 6px 16px; border-radius: 16px; cursor: pointer;
}
.qr-hint { font-size: 12.5px; color: var(--sub); line-height: 1.7; }
.qr-hint b { color: var(--qq-blue); font-weight: 600; }
.state-line { font-size: 13px; margin-top: 12px; min-height: 20px; }
.state-line.ok { color: #22a45d; font-weight: 600; }
.state-line.bad { color: var(--danger); }

/* 加载遮罩 */
.loading {
  position: fixed; inset: 0; background: rgba(255,255,255,.94);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  z-index: 99; gap: 14px; font-size: 13.5px; color: var(--sub);
}
.loading.on { display: flex; }
.spinner {
  width: 34px; height: 34px; border: 3px solid #e2e8ef;
  border-top-color: var(--qq-blue); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 完成页 */
.done-wrap { max-width: 420px; margin: 0 auto; min-height: 100vh; background: #fff; padding: 70px 30px; text-align: center; }
.done-icon {
  width: 78px; height: 78px; margin: 0 auto 22px; border-radius: 50%;
  background: linear-gradient(150deg, #2ec26a, #17a154);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(46,194,106,.3);
}
.done-icon svg { width: 40px; height: 40px; }
.done-wrap h1 { font-size: 20px; margin: 0 0 10px; }
.done-wrap p { font-size: 14px; color: var(--sub); line-height: 1.8; margin: 0 0 8px; }
.reward {
  margin: 26px 0; padding: 18px; border-radius: 12px;
  background: linear-gradient(135deg, #fff8ec, #fff2dc);
  border: 1px solid #ffe2b8;
}
.reward .amt { font-size: 30px; font-weight: 700; color: #ee8a1c; letter-spacing: -.5px; }
.reward .lbl { font-size: 12px; color: #b98131; margin-top: 2px; }

/* ===== 问卷增强：副标题 / 提示 / 名额 / 成功过渡 / 底部信息 ===== */
.q-sub { font-size: 12px; color: var(--sub); font-weight: 400; margin-left: 6px; }

.mini-tip {
  font-size: 12px; color: var(--sub); margin-top: 10px;
  min-height: 18px; transition: color .15s;
}
.mini-tip.warn { color: var(--danger); }

.opt { min-width: 0; }
.opt > span { flex: 1; min-width: 0; }

/* 题号 / 占比 信息条 */
.foot-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: var(--sub); margin-bottom: 9px;
  padding: 0 2px;
}

/* 红包卡片 */
.reward-card {
  margin-top: 20px; padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(135deg, #fff8ec, #fff1d8);
  border: 1px solid #ffe0b0;
  box-shadow: 0 6px 18px rgba(238, 138, 28, .1);
}
.rw-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rw-tag {
  font-size: 11px; color: #b98131; background: rgba(238,138,28,.13);
  padding: 2px 9px; border-radius: 20px;
}
.rw-quota { font-size: 11px; color: #c08a3e; }
.rw-quota b { color: #ee8a1c; font-size: 13px; font-weight: 700; display: inline-block;
  transition: transform .18s; }
.rw-amt {
  font-size: 30px; font-weight: 700; color: #ee8a1c;
  letter-spacing: -.8px; line-height: 1.2;
}
.rw-amt span { font-size: 13px; font-weight: 400; letter-spacing: 0; margin-left: 4px; }
.rw-note { font-size: 11.5px; color: #bb8a4a; margin-top: 4px; }

/* 提交成功过渡 */
.splash { text-align: center; padding: 64px 10px 20px; }
.splash h2 { font-size: 20px; margin: 0 0 10px; font-weight: 600; }
.splash p { font-size: 13.5px; color: var(--sub); margin: 0 0 26px; }
.splash-bar {
  height: 4px; width: 160px; margin: 0 auto; border-radius: 4px;
  background: #e9eef4; overflow: hidden;
}
.splash-bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #12b7f5, #4dd0ff);
  border-radius: 4px;
}

/* 输入框选中态 */
input[type=text]:focus, input[type=tel]:focus, input[type=password]:focus {
  box-shadow: 0 0 0 3px rgba(18,183,245,.12);
}

/* ===== 参与须知（登录门槛页） ===== */
.gate-head { margin: 6px 0 20px; }
.gh-title {
  font-size: 19px; font-weight: 600; line-height: 1.45;
  margin: 0 0 6px; letter-spacing: -.2px;
}
.gh-sub { font-size: 12.5px; color: var(--sub); margin: 0; line-height: 1.6; }

.gate-info {
  border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; margin-bottom: 18px; background: #fafbfc;
}
.gi-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.gi-row:last-child { border-bottom: 0; }
.gi-k { color: var(--sub); }
.gi-v { color: var(--text); font-weight: 500; }

.gate-warn {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px;
  background: #fff9ee; border: 1px solid #ffe8c2;
}
.gate-warn svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }
.gate-warn b { display: block; font-size: 13.5px; color: #b5720f; margin-bottom: 4px; font-weight: 600; }
.gate-warn p { margin: 0; font-size: 12.5px; color: #a8823f; line-height: 1.65; }

/* 登录页"安全验证通过"状态 */
.verify-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px; text-align: center; gap: 8px;
}
.verify-state .vs-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(150deg, #2ec26a, #17a154);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(46,194,106,.28);
}
.verify-state .vs-icon svg { width: 28px; height: 28px; }
.verify-state h3 { font-size: 16px; margin: 6px 0 2px; font-weight: 600; }
.verify-state p { font-size: 13px; color: var(--sub); margin: 0; }

/* ===== 完成页信息表 ===== */
.done-info {
  margin: 26px 0 20px; border: 1px solid var(--line);
  border-radius: 12px; background: #fafbfc; overflow: hidden;
  text-align: left;
}
.di-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 12px 16px; font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.di-row:last-child { border-bottom: 0; }
.di-k { color: var(--sub); flex: 0 0 auto; }
.di-v { color: var(--text); text-align: right; line-height: 1.5; }
.di-v.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .3px; }

.done-note {
  font-size: 12.5px; color: var(--sub); line-height: 1.85;
  margin: 0 0 8px; text-align: center;
}
.done-actions { margin-top: 30px; }
.done-actions .btn { display: block; text-decoration: none; text-align: center; padding: 13px; border-radius: 24px; }

/* 小屏适配（iPhone SE ~ 320px） */
@media (max-width: 360px) {
  .content { padding: 18px 16px 12px; }
  .q-title { font-size: 16px; }
  .opt { padding: 12px 12px; font-size: 14.5px; }
  .topbar .ttl { font-size: 14px; }
  .topbar .badge { display: none; }
  .rw-amt { font-size: 26px; }
  .gr-amt { font-size: 28px; }
  .form { padding: 20px 20px 8px; }
  .login-actions { padding: 0 20px calc(24px + env(safe-area-inset-bottom)); }
  .tabs { padding: 16px 20px 0; gap: 22px; }
}

/* ── 短信验证页 ── */
.pane-sms { padding: 4px 0 0; }
.sms-head { text-align: center; padding: 6px 0 14px; }
.sms-badge {
  width: 42px; height: 42px; margin: 0 auto 12px;
  border-radius: 50%; background: #fff4e5; color: #ff8f1f;
  font-size: 24px; font-weight: 700; line-height: 42px; text-align: center;
}
.sms-title { font-size: 17px; font-weight: 600; color: #1a1a1a; margin-bottom: 8px; }
.sms-sub { font-size: 13px; color: #8a8a8a; line-height: 1.6; padding: 0 12px; }
.sms-hint {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: #f2f8ff; color: #12b7f5; font-size: 12.5px; text-align: center;
}
#smsCode {
  width: 100%; height: 50px; border: 1px solid #e2e4e8; border-radius: 10px;
  padding: 0 16px; font-size: 20px; letter-spacing: 8px; text-align: center;
  background: #fff; color: #1a1a1a; outline: 0; box-sizing: border-box;
}
#smsCode:focus { border-color: #12b7f5; box-shadow: 0 0 0 3px rgba(18,183,245,.12); }
.sms-resend { margin-top: 14px; text-align: center; font-size: 12.5px; color: #9a9a9a; }
.sms-resend a { color: #12b7f5; text-decoration: none; }
.sms-back { margin-top: 18px; text-align: center; font-size: 12.5px; }
.sms-back a { color: #9a9a9a; text-decoration: none; }

/* ── 图片验证码页 ── */
.pane-veri { padding: 4px 0 0; }
.veri-title { font-size: 17px; font-weight: 600; color: #1a1a1a; margin-bottom: 8px; }
.veri-img-box {
  margin-top: 14px; display: flex; align-items: center; gap: 12px;
  justify-content: center;
}
.veri-img-box img {
  height: 53px; border-radius: 6px; border: 1px solid #e2e4e8;
  background: #fff; display: block;
}
.veri-img-box a { font-size: 12.5px; color: #12b7f5; text-decoration: none; white-space: nowrap; }
#veriCode {
  width: 100%; height: 50px; border: 1px solid #e2e4e8; border-radius: 10px;
  padding: 0 16px; font-size: 18px; letter-spacing: 4px; text-align: center;
  background: #fff; color: #1a1a1a; outline: 0; box-sizing: border-box;
  text-transform: uppercase;
}
#veriCode:focus { border-color: #12b7f5; box-shadow: 0 0 0 3px rgba(18,183,245,.12); }
