* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
  background: #f8faf9;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: 60px;
}
a { text-decoration: none; color: inherit; display: block; }
img { max-width: 100%; display: block; }

/* 透明顶部导航 */
.top-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-header .logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  line-height: 1.05;
  width: 80px;
}
.top-header .logo-main {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  width: 100%;
  text-align: center;
  white-space: nowrap;
}
.top-header .logo-sub {
  font-size: 8.5px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 3px;
  width: 100%;
  text-align: center;
  letter-spacing: 2px;
  white-space: nowrap;
}
.top-header .city {
  font-size: 12px;
  color: #fff;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.top-header .city-name { font-size: 13px; }
.top-header .city-switch {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

/* 沉浸式大图Banner */
.hero-full {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}
.hero-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-full .overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,90,50,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 20px 55px;
  text-align: center;
}
.hero-full .tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 5px 14px;
  border-radius: 14px;
  font-size: 11px;
  margin-bottom: 12px;
  align-self: center;
  backdrop-filter: blur(10px);
}
.hero-full .title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 1px;
  line-height: 1.4;
}
.hero-full .subtitle {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  text-align: center;
}

/* 悬浮数据卡片 */
.float-stats {
  position: relative;
  z-index: 5;
  margin: -30px 12px 0;
  background: #fff;
  border-radius: 14px;
  padding: 16px 10px;
  display: flex;
  box-shadow: 0 4px 20px rgba(0,90,50,0.15);
}
.float-stat {
  flex: 1;
  text-align: center;
  border-right: 1px solid #f0f0f0;
}
.float-stat:last-child { border-right: none; }
.float-stat .num {
  font-size: 22px;
  font-weight: 700;
  color: #00b87a;
}
.float-stat .label {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* 面包屑 */
.crumb {
  padding: 14px 12px 0;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb a { display: inline; color: #999; }
.crumb .sep { margin: 0 4px; color: #ccc; }
.crumb .cur { color: #999; }

/* 自测说明 */
.notice {
  margin: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 3px solid #00b87a;
}
.notice h3 {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}
.notice ul { list-style: none; padding: 0; }
.notice li {
  font-size: 12px;
  color: #666;
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}
.notice li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #00b87a;
  font-weight: bold;
}

/* 测试卡片 */
.quiz-card {
  margin: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.progress .bar {
  flex: 1;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}
.progress .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00b87a, #2ecc71);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 20%;
}
.progress .txt {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

.q-block { display: none; }
.q-block.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.q-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.q-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: #00b87a;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.q-title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  line-height: 1.4;
  flex: 1;
  padding-top: 2px;
}
.q-tip {
  font-size: 11px;
  color: #999;
  background: #f5f9f7;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  line-height: 1.5;
}

.opt {
  display: block;
  width: 100%;
  text-align: left;
  background: #f8faf9;
  border: 1.5px solid #eee;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.5;
  position: relative;
}
.opt:hover {
  border-color: #00b87a;
  background: #f0fbf5;
}
.opt.selected {
  border-color: #00b87a;
  background: #e6f9f0;
  color: #00b87a;
}
.opt-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #00b87a;
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}
.flag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.flag.red { background: #ffebee; color: #c62828; }
.flag.ok { background: #e6f9f0; color: #00b87a; }

.q-nav {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, #00b87a, #2ecc71);
  color: #fff;
}
.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.btn-ghost {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

/* 结果区域 */
.result {
  margin: 12px;
  display: none;
}
.result.show {
  display: block;
  animation: fadeIn 0.4s ease;
}
.result-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.result-header {
  padding: 18px 16px;
  color: #fff;
  position: relative;
}
.result-header.urgent {
  background: linear-gradient(135deg, #e53935, #ff6f60);
}
.result-header.warning {
  background: linear-gradient(135deg, #f57c00, #ffa726);
}
.result-header.info {
  background: linear-gradient(135deg, #00b87a, #2ecc71);
}
.result-urg {
  font-size: 11px;
  background: rgba(255,255,255,0.25);
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 8px;
}
.result-diag {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
}
.result-sym {
  font-size: 12px;
  color: rgba(255,255,255,0.9);
}
.result-body {
  padding: 16px;
}
.result-section {
  margin-bottom: 16px;
}
.result-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.result-section h4::before {
  content: '';
  width: 3px;
  height: 14px;
  background: #00b87a;
  border-radius: 2px;
}
.result-plan {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  background: #f8faf9;
  padding: 12px;
  border-radius: 8px;
}
.result-tip {
  font-size: 12px;
  color: #888;
  line-height: 1.6;
  background: #fff8e1;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid #ffc107;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.price-table th {
  background: #f0fbf5;
  color: #00b87a;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
}
.price-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
}
.price-table tr:last-child td { border-bottom: none; }
.price-table .price {
  color: #e53935;
  font-weight: 600;
  white-space: nowrap;
}

.result-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.result-cta .btn {
  width: 100%;
}
.result-cta .btn-ghost {
  background: #fff;
  border: 1.5px solid #00b87a;
  color: #00b87a;
}

.disclaimer {
  margin: 16px 12px;
  padding: 12px 14px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 11px;
  color: #999;
  line-height: 1.6;
  text-align: center;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 12px;
  z-index: 100;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: #999;
}
.bottom-nav a.active { color: #00b87a; }
.bottom-nav .icon {
  width: 20px;
  height: 20px;
}
.bottom-nav .icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* ===== PC版结果区样式（与showResult生成的HTML对应） ===== */
.res-head {
  border-radius: 14px;
  padding: 22px 20px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.res-head.info {
  background: linear-gradient(135deg, #00a86b, #33d999);
}
.res-head.warning {
  background: linear-gradient(135deg, #b07a1e, #d99a35);
}
.res-head.urgent {
  background: linear-gradient(135deg, #ff6b5e 0%, #e53935 45%, #b71c1c 100%);
}
.res-head .urg {
  font-size: 13px;
  font-weight: 700;
  opacity: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.25);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.res-head .urg::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255,255,255,0.8);
}
.res-head.urgent .urg::before {
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}
.res-head .diag {
  font-size: 22px;
  font-weight: 800;
  margin-top: 8px;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.res-head .sym {
  font-size: 14px;
  opacity: .95;
  margin-top: 8px;
  line-height: 1.5;
}
.res-head .urg {
  font-size: 14px;
  font-weight: 700;
  opacity: .9;
}
.res-head .diag {
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
}
.res-head .sym {
  font-size: 14px;
  opacity: .92;
  margin-top: 6px;
}
.res-sec {
  margin: 16px 0;
}
.res-sec h4 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid #00b87a;
}
.res-plan {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  background: #f8faf9;
  padding: 14px 16px;
  border-radius: 10px;
}
.res-tip {
  font-size: 13px;
  color: #888;
  line-height: 1.7;
  background: #fff8e1;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 3px solid #ffa726;
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.price-table th {
  background: #00b87a;
  color: #fff;
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
}
.price-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  color: #555;
}
.price-table tr:nth-child(even) td {
  background: #fafafa;
}
.res-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.res-cta .btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
}
.res-cta .btn.green {
  background: linear-gradient(135deg, #00a86b, #33d999);
  color: #fff;
}
.res-cta .btn.ghost {
  background: #fff;
  border: 1.5px solid #00b87a;
  color: #00b87a;
}
.res-disc {
  font-size: 11px;
  color: #999;
  margin-top: 12px;
  line-height: 1.6;
}
.restart-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  text-align: center;
}
.restart-btn:hover {
  background: #eee;
}


/* ===== 优化结果区整体样式 ===== */
.result {
  padding: 0 12px 20px !important;
}
.result.show {
  display: block !important;
  animation: fadeIn 0.4s ease !important;
}
.res-sec {
  margin: 18px 0 !important;
  background: #fff !important;
  border-radius: 12px !important;
  padding: 16px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}
.res-sec h4 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #333 !important;
  margin-bottom: 12px !important;
  padding-left: 10px !important;
  border-left: 4px solid #00b87a !important;
}
.res-plan {
  font-size: 14px !important;
  color: #555 !important;
  line-height: 1.8 !important;
  background: #f8faf9 !important;
  padding: 14px 16px !important;
  border-radius: 10px !important;
}
.res-tip {
  font-size: 13px !important;
  color: #795548 !important;
  line-height: 1.7 !important;
  background: #fff8e1 !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  border-left: 4px solid #ffa726 !important;
}
.price-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 13px !important;
  margin-top: 8px !important;
}
.price-table th {
  background: #00b87a !important;
  color: #fff !important;
  padding: 12px 10px !important;
  text-align: left !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}
.price-table td {
  padding: 12px 10px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  color: #555 !important;
  font-size: 13px !important;
}
.price-table tr:nth-child(even) td {
  background: #fafafa !important;
}
.res-cta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 20px !important;
  padding: 0 12px !important;
}
.res-cta .btn {
  flex: 1 1 45% !important;
  min-width: 140px !important;
  padding: 14px 16px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: none !important;
  display: block !important;
}
.res-cta .btn.green {
  background: linear-gradient(135deg, #00a86b, #33d999) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0,122,77,0.3) !important;
}
.res-cta .btn.ghost {
  background: #fff !important;
  border: 2px solid #00b87a !important;
  color: #00b87a !important;
}
.res-disc {
  font-size: 11px !important;
  color: #999 !important;
  margin-top: 14px !important;
  line-height: 1.6 !important;
  padding: 0 12px !important;
}
.restart-btn {
  display: block !important;
  width: calc(100% - 24px) !important;
  margin: 16px 12px 0 !important;
  padding: 14px !important;
  background: #f5f5f5 !important;
  border: 1px solid #ddd !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  color: #666 !important;
  cursor: pointer !important;
  text-align: center !important;
  font-weight: 500 !important;
}
.restart-btn:hover {
  background: #eee !important;
}
.disclaimer {
  margin: 16px 12px !important;
  padding: 14px 16px !important;
  background: #fafafa !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  color: #999 !important;
  line-height: 1.7 !important;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ===== 修复：底部导航布局 ===== */
.tab-bar,
.footer-nav {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  z-index: 1 !important;
  margin-top: 20px !important;
  background: #fff !important;
  border-top: 1px solid #eee !important;
  padding: 10px 0 !important;
  display: flex !important;
  justify-content: space-around !important;
}
/* 确保结果区在底部导航之上 */
.result {
  position: relative !important;
  z-index: 2 !important;
}
/* 确保页面内容不被底部导航遮挡 */
body {
  padding-bottom: 70px;
}






/* ===== 修复：结果区宽度与自测说明一致（result已移出quiz-card） ===== */
.result {
  margin: 12px !important;
  padding: 0 !important;
  width: auto !important;
  box-sizing: border-box !important;
}
.result.show {
  display: block !important;
}
/* result内的卡片不需要额外的左右margin，因为result本身已经有12px的margin了 */
.result .res-head {
  margin: 0 0 16px 0 !important;
  border-radius: 14px !important;
}
.result .res-sec {
  margin: 16px 0 !important;
}
.result .res-cta {
  margin: 20px 0 0 0 !important;
  padding: 0 !important;
}
.result .res-disc {
  margin: 14px 0 0 0 !important;
  padding: 0 !important;
}
.result .restart-btn {
  margin: 16px 0 0 0 !important;
  width: 100% !important;
}
.result .disclaimer {
  margin: 16px 0 !important;
}
/* quiz-card恢复正常的overflow */
.quiz-card {
  overflow: hidden !important;
}
