/* ===== 虚拟人生 · 浅色主题 ===== */
:root {
  --primary: #6d5ef2;
  --primary-soft: #eee9ff;
  --accent: #f59e0b;
  --accent-soft: #fef3dc;
  --bg: #f6f5fb;
  --card: #ffffff;
  --text: #1f2430;
  --text-2: #6b7280;
  --line: #eceaf6;
  --shadow: 0 10px 30px rgba(60, 50, 130, 0.08);
  --radius: 16px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, #f6f5fb 0%, #efeafa 50%, #fbf3e8 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

/* ---- 顶部 ---- */
.hero { text-align: center; margin-bottom: 24px; }
.hero h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.app-version {
  font-size: 0.7rem;
  font-weight: 400;
  margin-left: 8px;
  color: var(--text-2);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--text-2);
  letter-spacing: 1px;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
}
/* ---- 卡片 ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.section-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }

/* ---- 输入区 ---- */
.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.tri-row { display: flex; gap: 10px; }
.tri-row .field { flex: 1; min-width: 0; }
.field .field-label { margin-bottom: 8px; }
.input-row { display: flex; align-items: center; gap: 10px; }
.num-input {
  flex: 1;
  min-width: 0;
  font-size: 24px;
  font-weight: 700;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s;
}
.num-input:focus { border-color: var(--primary); }
.unit { font-size: 18px; color: var(--text-2); }
.select-input {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s;
}
.select-input:focus { border-color: var(--primary); }
.edu-line {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* ---- 生肖概要（精简） ---- */
.summary-card { display: flex; gap: 14px; align-items: center; padding: 16px 20px; }
.zodiac-badge {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  box-shadow: 0 6px 16px rgba(109, 94, 242, 0.3);
}
.summary-body { flex: 1; min-width: 0; }
.summary-line { font-size: 15px; font-weight: 600; }
.zodiac-name { font-size: 20px; font-weight: 800; color: var(--primary); }

/* ---- 相邻 6 年生肖（可左右滑动，当年居中） ---- */
.strip-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.strip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  position: relative;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
}
.strip-item {
  flex: 0 0 84px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfbff;
  text-align: center;
}
.strip-item.current {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(109, 94, 242, 0.3);
}
.strip-emoji { font-size: 20px; line-height: 1; }
.strip-year { font-size: 10.5px; color: var(--text-2); margin-top: 2px; }
.strip-animal { font-size: 12.5px; font-weight: 700; }
.strip-item.current .strip-emoji,
.strip-item.current .strip-animal { color: #fff; }
.strip-item.current .strip-year { color: rgba(255, 255, 255, .85); }

/* ---- 时间轴 ---- */
.timeline { list-style: none; }
.timeline li {
  position: relative;
  padding: 0 0 20px 26px;
  border-left: 2px solid var(--line);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline li.future::before { background: var(--line); box-shadow: 0 0 0 2px var(--line); }
.tl-year { font-weight: 800; color: var(--primary); margin-right: 8px; }
.tl-age { color: var(--text-2); font-size: 13px; margin-right: 8px; }
.tl-label { font-weight: 600; }
.tl-note {
  display: inline-block;
  font-size: 12px;
  background: var(--accent-soft);
  color: #b45309;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 1px;
}
.tl-note.future-note { background: #eef2f7; color: var(--text-2); }

/* ---- 截图保存 ---- */
#shotBtn {
  display: block;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), #a855f7);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
#shotBtn:active { transform: scale(0.98); }
#shotBtn:hover { box-shadow: 0 6px 18px rgba(109, 94, 242, 0.35); }
#shotBtn:disabled { opacity: .6; cursor: default; }
.shot-tip { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--primary); text-align: center; }

/* ---- 结果区出现动画 ---- */
.result { animation: fadeUp .4s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
