* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; color: #1f2937; line-height: 1.55; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; -webkit-font-smoothing: antialiased; }
body { padding: 16px 12px 40px; }

/* 顶部奖励横幅 */
.reward-banner { background: linear-gradient(135deg, #ffd166 0%, #ff8f3c 100%); color: #4a2400; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.12); position: relative; overflow: hidden; }
.reward-banner::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; background: rgba(255,255,255,.25); border-radius: 50%; }
.reward-banner h1 { font-size: 18px; margin-bottom: 4px; font-weight: 700; }
.reward-banner .amount { font-size: 26px; font-weight: 800; color: #b1300a; letter-spacing: 1px; }
.reward-banner p { font-size: 13px; margin-top: 4px; color: #5a3000; }

/* 卡片 */
.card { background: #fff; border-radius: 14px; padding: 18px 16px; margin-bottom: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.card h2 { font-size: 16px; color: #4f3ca8; margin-bottom: 6px; padding-left: 10px; border-left: 4px solid #764ba2; }
.card .desc { font-size: 12px; color: #6b7280; margin-bottom: 14px; padding-left: 10px; }

/* 题目 */
.q { margin-bottom: 18px; }
.q:last-child { margin-bottom: 0; }
.q-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: #1f2937; }
.q-title .req { color: #ef4444; margin-left: 2px; }
.q-hint { font-size: 12px; color: #9ca3af; margin-bottom: 8px; }

/* 选项 */
.options { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; padding: 11px 12px; border: 1.5px solid #e5e7eb; border-radius: 10px; background: #fff; font-size: 14px; cursor: pointer; transition: all .18s; user-select: none; position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .indicator { width: 18px; height: 18px; border: 1.5px solid #cbd5e1; border-radius: 50%; margin-right: 10px; flex-shrink: 0; position: relative; transition: all .18s; }
.opt.checkbox .indicator { border-radius: 4px; }
.opt.selected { border-color: #764ba2; background: #f5f0ff; }
.opt.selected .indicator { border-color: #764ba2; background: #764ba2; }
.opt.selected .indicator::after { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; background: #fff; border-radius: 50%; transform: translate(-50%, -50%); }
.opt.checkbox.selected .indicator::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(-50%, -65%) rotate(45deg); border-radius: 0; background: transparent; }
.opt.disabled { opacity: .5; cursor: not-allowed; }

/* 输入 */
input[type="text"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%; padding: 11px 12px; border: 1.5px solid #e5e7eb; border-radius: 10px; font-size: 14px; font-family: inherit; background: #fff; color: #1f2937; transition: all .18s; -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: #764ba2; box-shadow: 0 0 0 3px rgba(118,75,162,.12); }
textarea { min-height: 96px; resize: vertical; }

.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row select { flex: 1; }
.note-input { margin-top: 8px; }
.sub-q { margin-top: 14px; padding: 12px; border-radius: 10px; background: #faf7ff; border: 1px dashed #d1c4e9; }
.sub-q .q-title { font-size: 14px; }

/* 隐私授权 */
.consent { margin-top: 8px; }
.consent label { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 8px; background: #f8fafc; font-size: 13px; cursor: pointer; }
.consent label + label { margin-top: 6px; }
.consent input { margin-top: 3px; flex-shrink: 0; }
.consent a { color: #764ba2; }

/* 提交 */
.submit-area { padding: 0 4px; }
.submit-tip { text-align: center; color: #fff; font-size: 13px; margin-bottom: 10px; opacity: .9; }
button.submit { width: 100%; padding: 14px; background: linear-gradient(135deg, #ff7a18 0%, #ff3d3d 100%); color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; box-shadow: 0 8px 22px rgba(255,61,61,.35); cursor: pointer; }
button.submit:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
button.submit:active { transform: translateY(1px); }
.bottom-reward { text-align: center; margin-top: 12px; color: #fff; font-size: 13px; }
.bottom-reward strong { color: #ffd166; }

/* 错误/提示 */
.toast { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); padding: 10px 18px; background: rgba(0,0,0,.82); color: #fff; border-radius: 8px; font-size: 13px; z-index: 9999; max-width: 80%; text-align: center; }

/* 成功页 */
.success { background: #fff; border-radius: 14px; padding: 28px 20px; text-align: center; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.success .icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: #10b981; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.success h2 { color: #1f2937; margin-bottom: 8px; }
.success p { color: #6b7280; font-size: 14px; margin-bottom: 6px; }
.success .coupon-code { display: inline-block; margin: 14px 0 6px; padding: 10px 22px; border: 2px dashed #ff7a18; border-radius: 10px; background: #fff7ed; color: #c2410c; font-size: 18px; font-weight: 800; letter-spacing: 2px; }
.success .coupon-tip { color: #c2410c; font-size: 13px; margin-bottom: 14px; }
.success .home-btn { display: inline-block; padding: 10px 22px; background: #764ba2; color: #fff; border-radius: 10px; text-decoration: none; font-size: 14px; }

/* 感谢/隐私 */
.text-page { background: #fff; border-radius: 14px; padding: 24px 18px; box-shadow: 0 4px 18px rgba(0,0,0,.08); color: #374151; max-width: 720px; margin: 0 auto; }
.text-page h1 { font-size: 20px; color: #4f3ca8; margin-bottom: 14px; }
.text-page h2 { font-size: 16px; color: #1f2937; margin-top: 18px; margin-bottom: 6px; }
.text-page p { font-size: 14px; margin-bottom: 8px; line-height: 1.7; }
.text-page ul { padding-left: 22px; margin-bottom: 8px; }
.text-page li { font-size: 14px; line-height: 1.7; margin-bottom: 4px; }
.text-page a { color: #764ba2; }

/* 统计页（PC） */
.stats-shell { max-width: 1200px; margin: 0 auto; }
.stats-header { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.08); flex-wrap: wrap; gap: 10px; }
.stats-header h1 { font-size: 20px; color: #4f3ca8; }
.stats-header .actions button { padding: 8px 14px; border-radius: 8px; border: none; background: #764ba2; color: #fff; font-size: 13px; cursor: pointer; margin-left: 8px; }
.stats-header .actions button.secondary { background: #fff; color: #764ba2; border: 1.5px solid #764ba2; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.kpi .label { font-size: 12px; color: #6b7280; }
.kpi .value { font-size: 24px; font-weight: 700; color: #4f3ca8; margin-top: 4px; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; }
.chart-card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.chart-card h3 { font-size: 14px; color: #4f3ca8; margin-bottom: 10px; }
.chart-card .table { font-size: 13px; }
.chart-card .table .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.chart-card .table .row:last-child { border-bottom: none; }
.chart-card canvas { max-height: 320px; }

@media (max-width: 480px) {
  .reward-banner h1 { font-size: 16px; }
  .reward-banner .amount { font-size: 22px; }
  .card { padding: 16px 14px; }
  .q-title { font-size: 14px; }
}
