/* 小猫智商测试 —— 暖色系可爱风 */

: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: 4px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

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

.subtitle {
  font-size: 15px;
  color: var(--brown-soft);
  margin-bottom: 20px;
  text-align: center;
}

.name-row { width: 100%; max-width: 360px; margin-bottom: 16px; }
.name-row input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--peach);
  border-radius: 14px;
  background: var(--white);
  font-size: 15px;
  color: var(--brown);
  outline: none;
  transition: border-color .2s;
}
.name-row input:focus { border-color: var(--orange); }
.name-row input::placeholder { color: #C9A98F; }

.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.sm { max-width: 100%; padding: 12px; font-size: 15px; }
.btn-primary:active { transform: scale(0.97); box-shadow: 0 4px 12px rgba(240,106,36,.2); }

.btn-ghost {
  margin-top: 14px;
  padding: 11px 22px;
  font-size: 14px;
  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: 14px;
  color: var(--brown-soft);
  box-shadow: 0 2px 10px rgba(240,106,36,.08);
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 10px;
}
.chip {
  padding: 6px 12px;
  background: var(--white);
  border: 1px solid var(--peach);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--brown);
}

.tip { font-size: 12.5px; color: var(--brown-soft); margin-top: 14px; 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: 18px;
  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; }

/* 选项选中态 */
.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: 22px; font-weight: 800; margin: 4px 0 16px; }
.report-card {
  width: 100%; text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: var(--shadow);
}
.report-emoji { font-size: 54px; margin-bottom: 8px; }
.report-title-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.report-title { font-size: 24px; font-weight: 800; color: var(--orange-d); }
.report-band {
  font-size: 13px; font-weight: 700; color: #fff;
  background: var(--orange); padding: 4px 12px; border-radius: 999px;
}
.report-desc { font-size: 14px; color: var(--brown-soft); margin: 12px 0 18px; }
.score-line { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.score-label { font-size: 14px; color: var(--brown-soft); }
.score-num { font-size: 38px; font-weight: 800; color: var(--orange-d); }
.score-max { font-size: 14px; color: var(--brown-soft); }
.score-pct { font-size: 14px; color: var(--brown-soft); }

.section-title { font-size: 16px; font-weight: 700; margin: 22px 0 12px; align-self: flex-start; width: 100%; }
.dim-chart { width: 100%; background: var(--white); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.dim-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.dim-name { width: 74px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.dim-track { flex: 1; height: 12px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.dim-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--peach)); border-radius: 999px; transition: width .6s ease; }
.dim-val { width: 42px; text-align: right; font-size: 12px; color: var(--brown-soft); }
.dim-comment { font-size: 12.5px; color: var(--brown-soft); margin: -3px 0 12px 84px; }

.share-box {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.share-text { font-size: 14px; color: var(--brown); margin-bottom: 14px; }
.copy-tip { font-size: 12.5px; color: var(--orange-d); margin-top: 10px; }

@media (max-width: 360px) {
  .brand-title { font-size: 26px; }
  .q-scene { font-size: 16px; }
}
