/* 「你是哪只猫？」—— 暖色系可爱风 */

:root {
  --cream: #FFF6E5;
  --cream-2: #FFEFD1;
  --orange: #FF8C42;
  --orange-d: #F06A24;
  --peach: #FFB88C;
  --brown: #5D4037;
  --brown-soft: #8B6F5E;
  --white: #FFFFFF;
  --shadow: 0 8px 24px rgba(240, 106, 36, 0.14);
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 20% 15%, #FFE9C9 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, #FFDCC0 0%, transparent 40%),
    var(--cream);
  color: var(--brown);
  min-height: 100vh;
  line-height: 1.6;
  padding: 24px 20px 60px;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.paw-band {
  text-align: center;
  letter-spacing: 6px;
  opacity: 0.35;
  font-size: 15px;
  margin-bottom: 6px;
  user-select: none;
}

.hidden { display: none !important; }

.view { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* ---------- 首页 ---------- */
.cat-hero { animation: float 3s ease-in-out infinite; margin-bottom: 2px; width: 170px; }
.cat-hero svg { width: 100%; height: auto; display: block; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.brand-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--orange-d);
  margin: 8px 0 8px;
  text-shadow: 0 2px 0 #fff;
  text-align: center;
}

.subtitle {
  font-size: 14.5px;
  color: var(--brown-soft);
  margin-bottom: 22px;
  text-align: center;
  line-height: 1.7;
}

.btn-primary {
  width: 100%;
  max-width: 360px;
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-d) 100%);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.btn-primary:active { transform: scale(0.97); box-shadow: 0 4px 12px rgba(240,106,36,.2); }

.btn-ghost {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--orange-d);
  background: var(--white);
  border: 2px solid var(--peach);
  border-radius: 14px;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.btn-ghost:active { transform: scale(0.97); background: var(--cream-2); }

.prev-info {
  margin-top: 18px;
  padding: 10px 16px;
  background: var(--white);
  border-radius: 14px;
  font-size: 13.5px;
  color: var(--brown-soft);
  box-shadow: 0 2px 10px rgba(240,106,36,.08);
  text-align: center;
}

/* 首页 12 只猫预览 */
.cat-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 400px;
  margin: 26px 0 6px;
}
.preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--white);
  border-radius: 14px;
  padding: 8px 4px 6px;
  box-shadow: 0 2px 8px rgba(240,106,36,.07);
}
.preview-item svg { width: 100%; height: auto; max-width: 54px; display: block; }
.preview-item span { font-size: 10.5px; color: var(--brown-soft); white-space: nowrap; }

.tip { font-size: 12.5px; color: var(--brown-soft); margin-top: 16px; text-align: center; }

/* ---------- 答题 ---------- */
.quiz-head { width: 100%; max-width: 420px; margin-bottom: 18px; }
.progress-text { font-size: 13px; font-weight: 600; color: var(--brown-soft); }
.progress-track {
  height: 8px; background: var(--white);
  border-radius: 999px; margin-top: 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--peach));
  border-radius: 999px; transition: width .35s ease;
}

.question-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.q-scene {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--brown);
  margin-bottom: 20px;
}

.options-wrap { display: flex; flex-direction: column; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 2px solid #F2E4D3;
  border-radius: 14px;
  background: #FFFBF4;
  color: var(--brown);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.option:hover { border-color: var(--orange); background: var(--cream-2); }
.option:active { transform: scale(0.99); }
.opt-tag {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--peach);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.opt-text { flex: 1; line-height: 1.5; }

.option.selected { border-color: var(--orange); background: var(--cream-2); }
.option.selected .opt-tag { background: var(--orange); }

.nav-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  width: 100%;
  max-width: 420px;
}
.nav-row .btn-ghost { margin-top: 0; flex: 1 1 0; min-width: 0; width: auto; padding: 13px 8px; font-size: 15px; }
.nav-row .btn-primary { flex: 1 1 0; min-width: 0; width: auto; max-width: none; padding: 13px 8px; font-size: 15px; border: 2px solid transparent; }

.btn-ghost[disabled], .btn-primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(93, 64, 55, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 99;
  max-width: 80vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 生成中 ---------- */
.gen-box {
  margin-top: 60px;
  text-align: center;
  width: 100%;
  max-width: 360px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 24px;
  box-shadow: var(--shadow);
}
.gen-cat { font-size: 46px; animation: bounce 1s ease-in-out infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.gen-text { font-size: 15px; font-weight: 600; margin: 16px 0 18px; }
.gen-track { height: 10px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.gen-fill {
  height: 100%; width: 8%;
  background: linear-gradient(90deg, var(--orange), var(--peach));
  border-radius: 999px; transition: width .35s ease;
}

/* ---------- 结果 ---------- */
.report-head { font-size: 21px; font-weight: 800; margin: 4px 0 16px; text-align: center; }

.report-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.report-body { text-align: left; padding: 22px 20px; }

.cat-art { width: 150px; margin: 0 auto 6px; }
.cat-art svg { width: 100%; height: auto; display: block; animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.report-title-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.report-title { font-size: 25px; font-weight: 800; color: var(--orange-d); }
.report-tagline {
  font-size: 13px; font-weight: 700; color: #fff;
  background: var(--orange); padding: 4px 12px; border-radius: 999px;
}

.traits-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.trait {
  padding: 5px 13px;
  background: var(--cream-2);
  border: 1px solid var(--peach);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brown);
}

.section-title { font-size: 15.5px; font-weight: 700; margin: 22px 0 12px; width: 100%; }

.analysis-text { font-size: 14.5px; line-height: 1.85; color: var(--brown); }
.analysis-text p { margin-bottom: 12px; }
.analysis-text p:last-child { margin-bottom: 0; }

.info-block { margin-bottom: 16px; }
.info-block:last-child { margin-bottom: 0; }
.info-label { display: inline-block; font-size: 13px; font-weight: 700; color: var(--orange-d); margin-bottom: 4px; }
.info-text { font-size: 14px; line-height: 1.75; color: var(--brown); }

@media (max-width: 360px) {
  .brand-title { font-size: 24px; }
  .q-scene { font-size: 16px; }
  .cat-preview { grid-template-columns: repeat(3, 1fr); }
}
