/* === 基础重置 === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #f5f7fa; color: #333; line-height: 1.6;
  min-height: 100vh; overflow-x: hidden;
}

/* === 页面容器 === */
.page { display: none; min-height: 100vh; }
.page.active { display: flex; }
.page-content {
  width: 100%; max-width: 420px; margin: 0 auto;
  padding: 24px 20px 40px; display: flex; flex-direction: column;
}

/* === 欢迎页 === */
.welcome { align-items: center; justify-content: center; text-align: center; }
.logo { font-size: 64px; margin-bottom: 16px; }
.welcome h1 { font-size: 28px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.subtitle { color: #666; font-size: 15px; margin-bottom: 32px; }
.features { margin-bottom: 40px; }
.feature-item { padding: 8px 0; font-size: 15px; color: #444; }
.disclaimer { margin-top: 16px; font-size: 12px; color: #999; }

/* === 按钮 === */
.btn-primary {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2); color: #fff;
  font-size: 17px; font-weight: 600; cursor: pointer;
  transition: opacity .2s, transform .1s; -webkit-tap-highlight-color: transparent;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; pointer-events: none; }
.btn-primary.btn-sm { width: auto; padding: 10px 20px; font-size: 15px; }
.btn-secondary {
  padding: 14px 24px; border: 1.5px solid #ddd; border-radius: 12px;
  background: #fff; color: #666; font-size: 15px; cursor: pointer;
}
.btn-outline {
  width: 100%; padding: 14px; border: 1.5px solid #667eea; border-radius: 12px;
  background: transparent; color: #667eea; font-size: 16px; font-weight: 600; cursor: pointer;
}

/* === 步骤头部 === */
.step-header { margin-bottom: 24px; }
.step-tag {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  background: #eef0ff; color: #667eea; font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.step-header h2 { font-size: 22px; color: #1a1a2e; margin-bottom: 6px; }
.hint { font-size: 14px; color: #888; }

/* === 血压分型 === */
.bp-type-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.bp-type-card {
  padding: 16px; border: 2px solid #e8e8e8; border-radius: 12px;
  background: #fff; cursor: pointer; transition: border-color .2s, background .2s;
}
.bp-type-card.selected { border-color: #667eea; background: #f5f3ff; }
.bp-type-card .type-label { font-size: 16px; font-weight: 600; color: #333; }
.bp-type-card .type-desc { font-size: 13px; color: #888; margin-top: 4px; }

/* === 血压输入 === */
.bp-input-group { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.bp-field label { display: block; font-size: 14px; font-weight: 600; color: #555; margin-bottom: 8px; }
.bp-input-row { display: flex; align-items: center; gap: 8px; }
.bp-input-row input {
  flex: 1; padding: 14px; border: 2px solid #e8e8e8; border-radius: 12px;
  font-size: 20px; font-weight: 600; text-align: center; outline: none;
  -moz-appearance: textfield;
}
.bp-input-row input::-webkit-outer-spin-button,
.bp-input-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bp-input-row input:focus { border-color: #667eea; }
.bp-unit { font-size: 14px; color: #999; white-space: nowrap; }
.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px;
  border-radius: 12px; background: #f9f9ff; margin-bottom: 20px; cursor: pointer;
  font-size: 14px; color: #555; line-height: 1.5;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: #667eea;
}
.bp-result-tag {
  text-align: center; padding: 10px 16px; border-radius: 10px;
  background: #eef0ff; color: #4a3d8f; font-size: 14px; font-weight: 600; margin-bottom: 16px;
}

/* === 基础信息 === */
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 15px; font-weight: 600; color: #555; margin-bottom: 10px; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option-chip {
  padding: 12px; border: 2px solid #e8e8e8; border-radius: 10px;
  background: #fff; text-align: center; font-size: 15px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.option-chip.selected { border-color: #667eea; background: #f5f3ff; color: #667eea; font-weight: 600; }

/* === 问卷页 === */
.progress-bar {
  height: 6px; background: #e8e8e8; border-radius: 3px; margin-bottom: 20px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px; transition: width .3s ease;
}
.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dim-tag {
  padding: 4px 10px; border-radius: 16px; font-size: 12px; font-weight: 600;
  background: #eef0ff; color: #667eea;
}
.q-counter { font-size: 13px; color: #999; }
#q-text { font-size: 18px; color: #1a1a2e; margin-bottom: 20px; line-height: 1.5; }
.options-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.option-item {
  padding: 14px 16px; border: 2px solid #e8e8e8; border-radius: 12px;
  background: #fff; font-size: 15px; color: #444; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.option-item.selected { border-color: #667eea; background: #f5f3ff; color: #4a3d8f; font-weight: 500; }
.q-nav { display: flex; gap: 12px; }
.q-nav .btn-primary { flex: 1; }
.q-nav .btn-secondary { flex: 0 0 auto; }

/* === 结果页 === */
.results { padding-top: 32px; }
.results h2 { font-size: 22px; text-align: center; color: #1a1a2e; margin-bottom: 8px; }
.bp-summary {
  text-align: center; font-size: 15px; color: #666; margin-bottom: 16px;
}
.bp-val { font-size: 22px; font-weight: 700; color: #e74c3c; }
#dim-ranking { margin: 16px 0; }
.rank-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.rank-icon { font-size: 24px; }
.rank-info { flex: 1; }
.rank-name { font-size: 15px; font-weight: 600; color: #333; }
.rank-bar-bg {
  height: 8px; background: #e8e8e8; border-radius: 4px; margin-top: 6px; overflow: hidden;
}
.rank-bar {
  height: 100%; border-radius: 4px; transition: width .8s ease;
}
.rank-score { font-size: 14px; font-weight: 700; min-width: 40px; text-align: right; }

#free-analysis { margin: 20px 0; }
.analysis-card {
  padding: 16px; border-radius: 12px; background: #fff;
  border-left: 4px solid #667eea; margin-bottom: 12px;
}
.analysis-card h4 { font-size: 15px; color: #667eea; margin-bottom: 8px; }
.analysis-card p { font-size: 14px; color: #555; line-height: 1.6; }

/* === 报告引导区 === */
.report-cta {
  margin: 24px 0; padding: 24px 20px; border-radius: 16px;
  background: linear-gradient(135deg, #eef0ff, #f5f3ff); text-align: center;
  border: 2px solid #d5d9f2;
}
.cta-icon { font-size: 40px; margin-bottom: 8px; }
.report-cta h3 { font-size: 17px; color: #333; margin-bottom: 12px; line-height: 1.5; }
.report-id {
  display: inline-block; padding: 10px 24px; border-radius: 10px;
  background: #fff; font-size: 18px; color: #333; margin-bottom: 14px;
  border: 1.5px dashed #667eea;
}
.report-id span { font-weight: 800; color: #667eea; font-size: 24px; letter-spacing: 2px; }
.report-cta > p { font-size: 14px; color: #888; line-height: 1.6; }

/* === 付费内容 === */
.hidden { display: none; }
.paid-card {
  padding: 16px; border-radius: 12px; background: #fff;
  border: 1px solid #e8e8e8; margin-bottom: 12px;
}
.paid-card h4 { font-size: 15px; color: #333; margin-bottom: 8px; }
.paid-card ul { padding-left: 18px; }
.paid-card li { font-size: 14px; color: #555; line-height: 1.8; }

/* === 分享区 === */
.share-section { margin-top: 24px; padding-bottom: 40px; }

/* === 颜色工具 === */
.score-good { color: #27ae60; }
.score-warn { color: #f39c12; }
.score-bad { color: #e74c3c; }
.bar-good { background: #27ae60; }
.bar-warn { background: #f39c12; }
.bar-bad { background: #e74c3c; }

/* === 类型组合标签 === */
.type-combo {
  text-align: center; padding: 12px 16px; border-radius: 10px;
  background: #fff3e0; color: #e65100; font-size: 14px; margin: 16px 0;
  border: 1.5px solid #ffcc80;
}
.type-combo strong { font-weight: 700; }

/* === 共性方案卡片 === */
.common-plan-card {
  padding: 20px; border-radius: 12px; background: #fff;
  border: 2px solid #667eea; margin-bottom: 20px;
}
.common-plan-card h4 {
  font-size: 16px; color: #667eea; margin-bottom: 6px; font-weight: 700;
}
.common-subtitle {
  font-size: 13px; color: #888; margin-bottom: 16px;
}
.common-items {
  display: flex; flex-direction: column; gap: 14px;
}
.common-item {
  padding: 14px; border-radius: 10px; background: #f9f9ff;
  border-left: 3px solid #667eea;
}
.common-item-name {
  font-size: 15px; font-weight: 700; color: #333; margin-bottom: 4px;
}
.common-item-dosage {
  font-size: 13px; color: #667eea; margin-bottom: 4px;
}
.common-item-effect {
  font-size: 13px; color: #555; margin-bottom: 4px;
}
.common-item-time {
  font-size: 12px; color: #999;
}

/* === 分析卡片增强样式 === */
.analysis-card p strong {
  color: #e74c3c; font-weight: 700;
}
