/* ============================================================
   styles.css · 小红书治愈系风格
   配色：奶油米 + 莫兰迪粉 + 奶茶棕
   避免：纯黑、高饱和、视觉疲劳
   ============================================================ */

/* ============ 设计变量 ============ */
:root {
  /* 主背景层 */
  --bg-cream: #faf6f0;        /* 奶油米主背景 */
  --bg-pink: #fdf2f2;         /* 淡粉米次背景 */
  --bg-card: #ffffff;         /* 卡片纯白 */
  --bg-soft: #f7ede8;         /* 柔粉米 */

  /* 文字色（避免纯黑） */
  --text-main: #3a2e2e;       /* 加深主文字，更清晰 */
  --text-body: #5a4a4a;       /* 加深正文，提升可读性 */
  --text-muted: #7a6a6a;      /* 次文字也加深 */
  --text-light: #9a8a8a;      /* 辅助文字加深 */

  /* 主色调 - 莫兰迪粉系 */
  --accent-pink: #d4a5a5;     /* 莫兰迪粉主色 */
  --accent-rose: #c88a8a;     /* 玫瑰粉强调 */
  --accent-brown: #c9a87c;    /* 奶茶棕辅助 */
  --accent-peach: #e8b5a5;    /* 蜜桃粉 */

  /* 功能色 */
  --color-danger: #e0959c;    /* 柔粉红警告 */
  --color-warn: #d9a87a;      /* 暖橙提示 */
  --color-good: #9ec19e;      /* 莫兰迪绿 */
  --color-info: #a3b8d4;      /* 莫兰迪蓝 */

  /* MBTI 四组色 */
  --nt-purple: #b8a3d4;       /* 分析家紫 */
  --nf-green: #9ec5a8;        /* 外交官绿 */
  --sj-blue: #a3b8d4;         /* 守护者蓝 */
  --sp-yellow: #d4c08a;       /* 探险家黄 */

  /* 边框与阴影 */
  --border-soft: #f0e6e0;     /* 柔边框 */
  --border-mid: #e6d5d0;      /* 中边框 */
  --shadow-soft: 0 4px 20px rgba(180, 140, 130, 0.08);
  --shadow-card: 0 6px 24px rgba(180, 140, 130, 0.12);
  --shadow-hover: 0 10px 30px rgba(180, 140, 130, 0.18);

  /* 圆角 */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* 间距 */
  --sp-xs: 6px;
  --sp-sm: 10px;
  --sp-md: 16px;
  --sp-lg: 22px;
  --sp-xl: 32px;
}

/* ============ 全局重置 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-main);
  background: linear-gradient(160deg, #faf6f0 0%, #fdf2f2 50%, #f7ede8 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ============ 主应用容器 ============ */
.app {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 20px 0 40px;
}

/* ============ 粒子画布（柔光气泡）============ */
.particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ============ 手机壳 ============ */
.phone-shell {
  max-width: 460px;
  margin: 0 auto;
  background: rgba(255, 252, 250, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 60px);
}

/* ============ 屏幕滚动容器 ============ */
.screen {
  padding: 24px 22px 32px;
  position: relative;
}
.screen.home { padding-top: 28px; }

/* ============ 顶部栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 4px 0;
}
.topbar .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
}
.topbar .back-link:hover { color: var(--accent-rose); background: rgba(255,255,255,0.95); }
.topbar .topbar-title {
  font-size: 15px;
  color: var(--text-body);
  font-weight: 500;
}

/* ============ 通用按钮 ============ */
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, #e8b5a5 0%, #d4a5a5 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 18px rgba(212, 165, 165, 0.35);
  transition: all 0.25s;
  letter-spacing: 0.5px;
}
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(212, 165, 165, 0.45); }
.primary:active { transform: translateY(0); }

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 17px 24px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-rose);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--accent-pink);
  transition: all 0.2s;
}
.ghost:hover { background: var(--bg-pink); border-color: var(--accent-rose); }

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  color: var(--text-muted);
  font-size: 14px;
  border-radius: var(--r-pill);
  transition: color 0.2s;
  margin-top: 8px;
}
.text-button:hover { color: var(--accent-rose); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-rose);
  font-size: 14px;
  font-weight: 500;
}
.text-link:hover { text-decoration: underline; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-body);
  transition: all 0.2s;
}
.icon-button:hover { background: #fff; color: var(--accent-rose); transform: rotate(-8deg); }

/* ============ 首页：Hero 区 ============ */
.hero-copy { margin-bottom: 26px; padding: 0 4px; }
.hero-copy .kicker {
  display: inline-block;
  font-size: 12px;
  color: var(--accent-rose);
  background: var(--bg-pink);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}
.hero-copy h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.hero-copy h1 .accent { color: var(--accent-rose); }
.hero-copy .sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============ 首页：分类卡片网格 ============ */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.category-card {
  position: relative;
  display: block;
  padding: 18px 16px 16px;
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s;
  border: 1.5px solid transparent;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.category-card .cat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.category-card .cat-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.3;
}
.category-card .cat-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.category-card .cat-emoji {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 32px;
  opacity: 0.85;
}
.category-card.mbti {
  background: linear-gradient(135deg, #f3e8ff 0%, #fff 100%);
  border-color: #e8d5f5;
}
.category-card.zodiac {
  background: linear-gradient(135deg, #e3f2ff 0%, #fff 100%);
  border-color: #d0e3f5;
}
.category-card.xingxiu {
  background: linear-gradient(135deg, #f0e8ff 0%, #fff 100%);
  border-color: #ddd0f0;
}
.category-card.avoidant {
  background: linear-gradient(135deg, #ffe8e8 0%, #fff 100%);
  border-color: #f5d5d5;
}

/* ============ 首页：精选 Boss 卡片 ============ */
.featured-section { margin-bottom: 24px; }
.featured-section .section-label {
  font-size: 12px;
  color: var(--accent-rose);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.boss-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.boss-card {
  display: block;
  padding: 18px;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border-soft);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  --card-accent: var(--accent-pink);
}
.boss-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--card-accent);
}
.boss-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--card-accent);
}
.boss-card .boss-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.boss-card .boss-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
}
.boss-card .boss-avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.boss-card .boss-info { flex: 1; min-width: 0; }
.boss-card .boss-tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.boss-card .mbti-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 70%, #000));
  padding: 3px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.boss-card .boss-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-pink);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.boss-card .boss-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}
.boss-card .boss-nickname {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.boss-card .boss-desc {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 12px;
}
.boss-card .boss-stats {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
  flex-wrap: wrap;
}
.boss-card .boss-stats span { display: inline-flex; align-items: center; gap: 3px; }
.boss-card .boss-stats .stat-pass {
  color: var(--color-danger);
  font-weight: 800;
  font-size: 14px;
  background: rgba(220, 80, 80, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
  animation: pulse-rate 2s ease-in-out infinite;
}
@keyframes pulse-rate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.boss-card .boss-warning {
  display: inline-block;
  font-size: 11px;
  color: var(--color-warn);
  background: rgba(217, 168, 122, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 6px;
}

/* ============ MBTI 顶部椭圆 Tab 切换栏（响应式 grid）============ */
.group-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px 0;
}
.group-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 9px 4px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.group-tab:hover {
  border-color: var(--tab-color, var(--accent-pink));
  color: var(--text-main);
  transform: translateY(-1px);
}
.group-tab.is-active {
  background: var(--tab-color, var(--accent-rose));
  border-color: var(--tab-color, var(--accent-rose));
  color: #fff;
  box-shadow: 0 6px 16px rgba(180, 140, 130, 0.25);
  transform: translateY(-1px);
}
.group-tab-emoji { font-size: 18px; line-height: 1; }
.group-tab-name { font-size: 13px; line-height: 1.2; }
.group-tab-en {
  font-size: 9px;
  font-weight: 700;
  opacity: 0.6;
  letter-spacing: 0.3px;
}
.group-tab.is-active .group-tab-en { opacity: 0.85; }

/* 响应式适配：屏幕 ≤ 400px（iPhone SE / 小屏安卓） */
@media (max-width: 400px) {
  .group-tabs { gap: 4px; }
  .group-tab { padding: 7px 2px; border-radius: 16px; }
  .group-tab-emoji { font-size: 16px; }
  .group-tab-name { font-size: 12px; }
  .group-tab-en { font-size: 8px; }
}

/* 响应式适配：屏幕 ≤ 360px（超小屏） */
@media (max-width: 360px) {
  .group-tabs { gap: 3px; }
  .group-tab { padding: 6px 2px; border-radius: 14px; border-width: 1px; }
  .group-tab-emoji { font-size: 15px; }
  .group-tab-name { font-size: 11px; }
  .group-tab-en { display: none; }
}

/* 响应式适配：屏幕 ≤ 320px（极小屏） */
@media (max-width: 320px) {
  .group-tab { padding: 5px 1px; }
  .group-tab-emoji { font-size: 14px; }
  .group-tab-name { font-size: 10px; }
}

/* 当前分组描述横幅 */
.group-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,252,250,0.6));
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  border-left: 5px solid var(--banner-color, var(--accent-pink));
  animation: fadeInUp 0.35s ease both;
}
.group-banner-emoji {
  font-size: 34px;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.group-banner-text { flex: 1; min-width: 0; }
.group-banner-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.group-banner-title span {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--banner-color, var(--accent-rose));
  padding: 2px 9px;
  border-radius: var(--r-pill);
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}
.group-banner-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============ 心碎页按钮组间距 ============ */
.death-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 16px;
}
.death-actions .text-button { margin-top: 0; }

/* ============ 挑战介绍页 ============ */
.intro-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 8px 0;
  margin-bottom: 8px;
}
.intro-back:hover { color: var(--accent-rose); }

.intro-hero {
  padding: 20px 0 24px;
  border-bottom: 1px dashed var(--border-soft);
  margin-bottom: 20px;
}
.intro-hero .intro-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #fff;
  background: var(--accent-rose);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
  font-weight: 600;
}
.intro-hero .intro-tag .mbti-emoji { font-size: 16px; }
.intro-hero h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 10px;
}
.intro-hero .intro-sub {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* 世界观卡片 */
.world-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 18px;
  border: 1.5px solid var(--border-soft);
  margin-bottom: 20px;
}
.world-card .world-label {
  font-size: 11px;
  color: var(--accent-rose);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.world-card .world-text {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 14px;
}
.world-card .world-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
}
.world-card .world-stat { text-align: center; }
.world-card .world-stat strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-rose);
  margin-bottom: 2px;
}
.world-card .world-stat:nth-child(2) strong {
  font-size: 26px;
  color: var(--color-danger);
  text-shadow: 0 0 12px rgba(220, 80, 80, 0.2);
  animation: pulse-rate 2.5s ease-in-out infinite;
}
.world-card .world-stat:nth-child(2) span {
  color: var(--color-danger);
  font-weight: 600;
}
.world-card .world-stat span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============ 游戏页 ============ */
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-soft);
}
.game-top .level-info {
  font-size: 13px;
  color: var(--text-muted);
}
.game-top .level-info strong {
  color: var(--accent-rose);
  font-size: 16px;
  font-weight: 800;
}
.game-top .restart-link {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.7);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.game-top .restart-link:hover { color: var(--accent-rose); }

/* 进度条 */
.progress-bar {
  height: 6px;
  background: var(--bg-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: 16px;
}
.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e8b5a5, #d4a5a5);
  border-radius: var(--r-pill);
  transition: width 0.5s ease;
}

/* 4 项数值面板 */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.stat {
  background: var(--bg-card);
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}
.stat .stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.stat .stat-name {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.stat .stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}
.stat .stat-bar {
  height: 4px;
  background: var(--bg-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.stat .stat-bar i {
  display: block;
  height: 100%;
  background: var(--accent-pink);
  border-radius: var(--r-pill);
  transition: width 0.5s ease;
}
.stat.is-danger .stat-val { color: var(--color-danger); animation: heartbeat 1s ease infinite; }
.stat.is-danger .stat-bar i { background: var(--color-danger); animation: pulse 1s ease infinite; }
.stat.is-warn .stat-val { color: var(--color-warn); }
.stat.is-warn .stat-bar i { background: var(--color-warn); }
.stat.is-good .stat-bar i { background: var(--color-good); }

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.15); }
  60% { transform: scale(0.95); }
}

/* 场景描述面板 */
.scene-panel {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 16px;
  border: 1.5px solid var(--border-soft);
  position: relative;
}
.scene-panel .scene-label {
  font-size: 11px;
  color: var(--accent-rose);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scene-panel .scene-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.4;
}
.scene-panel blockquote {
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.7;
  font-style: normal;
  padding-left: 12px;
  border-left: 3px solid var(--accent-pink);
  margin: 10px 0;
}

/* TA 的回复气泡 - 微信风格（左灰椭圆·左尖角）*/
.ta-bubble {
  background: #f5f5f5;
  padding: 10px 14px;
  border-radius: 10px 10px 10px 2px;
  margin: 8px 0;
  font-size: 15px;
  color: #1a1a1a;
  line-height: 1.55;
  position: relative;
  max-width: 78%;
  border: none;
  box-shadow: none;
  word-break: break-word;
}
.ta-bubble .ta-avatar {
  position: absolute;
  left: -42px;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
}
.ta-bubble .ta-avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.bubble-row {
  display: flex;
  justify-content: flex-start;
  padding-left: 46px;
  position: relative;
  margin: 10px 0;
}
/* 我的气泡 - 微信绿（右绿椭圆·右尖角）*/
.ta-bubble.me-bubble {
  background: #95EC69 !important;
  color: #1a1a1a !important;
  border: none !important;
  border-radius: 10px 10px 2px 10px !important;
  box-shadow: none !important;
  max-width: 78%;
}

/* 选项区 */
.choice-section { margin-top: 8px; }
.choice-section .choice-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choices button {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  font-size: 14.5px;
  color: var(--text-main);
  line-height: 1.55;
  text-align: left;
  transition: all 0.2s;
  position: relative;
}
.choices button:hover {
  border-color: var(--accent-pink);
  background: var(--bg-pink);
  transform: translateX(2px);
}
.choices button:active { transform: translateX(0); }
.choices button .choice-letter {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--accent-rose);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.choices button:hover .choice-letter {
  background: var(--accent-pink);
  color: #fff;
}

/* === 选中反馈状态 === */
.choices button.chosen {
  transform: translateX(0) scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.choices button.chosen .choice-letter {
  color: #fff;
  animation: pop 0.4s ease;
}
.choices button.chosen.is-good {
  border-color: #9ec5a8;
  background: linear-gradient(135deg, #f0f9f2, #e8f5ec);
}
.choices button.chosen.is-good .choice-letter { background: #9ec5a8; }
.choices button.chosen.is-okay {
  border-color: #c9b574;
  background: linear-gradient(135deg, #faf6ec, #f5f0e0);
}
.choices button.chosen.is-okay .choice-letter { background: #c9b574; }
.choices button.chosen.is-bad {
  border-color: #d4a5a5;
  background: linear-gradient(135deg, #fdf2f2, #fce8e8);
}
.choices button.chosen.is-bad .choice-letter { background: #d4a5a5; }
.choices button.chosen.is-kill {
  border-color: #8a7a7a;
  background: linear-gradient(135deg, #f0eded, #e8e0e0);
}
.choices button.chosen.is-kill .choice-letter { background: #8a7a7a; }

.choices button.faded {
  opacity: 0.35;
  transform: scale(0.98);
  filter: grayscale(0.3);
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* === 对话流（选择后替换选项区）=== */
.dialogue-flow {
  margin-top: 16px;
  padding: 18px 14px;
  background: rgba(250,246,240,0.6);
  border-radius: 18px;
  border: 1px solid rgba(212,165,165,0.15);
  animation: fadeInUp 0.4s ease both;
}
.dialogue-flow .bubble-row {
  margin-bottom: 12px;
}
.dialogue-flow .bubble-row:last-of-type {
  margin-bottom: 8px;
}

/* === 下一关提示 === */
.next-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  padding: 8px 0 2px;
  letter-spacing: 0.5px;
  animation: hintPulse 1.4s ease infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* === 场景中 TA 的话（选择前展示的左侧气泡）=== */
.scene-bubble-wrap {
  margin-top: 14px;
  padding-left: 46px;
  position: relative;
}

/* === 下一关操作区 + 精致按钮 === */
.next-action {
  text-align: center;
  margin-top: 22px;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* CTA 容器 */
.next-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* === 主按钮（柔瓣设计 · 简约治愈风）=== */
.next-level-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 280px;
  padding: 15px 28px;
  border: none;
  cursor: pointer;
  border-radius: 50px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8a5b8 0%, #d4889a 50%, #c47889 100%);
  box-shadow:
    0 4px 16px rgba(196, 120, 137, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: nextBtnEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both,
             nextBtnGlow 3s ease-in-out 0.5s infinite;
}

/* 按钮文字 */
.next-level-btn .btn-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(180, 80, 100, 0.2);
  white-space: nowrap;
}

/* 箭头图标 */
.next-level-btn .btn-arrow-icon {
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 1px 2px rgba(180, 80, 100, 0.15));
}

/* 悬停效果 */
.next-level-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(196, 120, 137, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.next-level-btn:hover .btn-arrow-icon {
  transform: translateX(4px);
}

/* 按下效果 */
.next-level-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    0 2px 8px rgba(196, 120, 137, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* === 倒计时进度条 === */
.btn-countdown-track {
  width: 140px;
  height: 3px;
  border-radius: 100px;
  background: rgba(196, 120, 137, 0.12);
  overflow: hidden;
}
.btn-countdown-fill {
  height: 100%;
  width: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, #e8a5b8, #c47889);
  transform-origin: left center;
  animation: countdownShrink 3s linear forwards;
}

/* 提示文字 */
.next-hint {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

/* === 按钮动画 === */
@keyframes nextBtnEntrance {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes nextBtnGlow {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(196, 120, 137, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow:
      0 6px 22px rgba(196, 120, 137, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }
}

@keyframes countdownShrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* === TA 反应区（保留兼容）=== */
.reaction-wrap {
  margin-top: 16px;
  animation: fadeInUp 0.4s ease both;
}
.reaction-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.reaction-tag.is-good { background: rgba(158,197,168,0.18); color: #5a8a68; }
.reaction-tag.is-okay { background: rgba(201,181,116,0.18); color: #8a7a3a; }
.reaction-tag.is-bad { background: rgba(212,165,165,0.18); color: #a56868; }
.reaction-tag.is-kill { background: rgba(138,122,122,0.18); color: #6a5858; }

/* === 数值变化提示 === */
.stat-delta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-left: 42px;
}
.stat-delta span {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  animation: deltaPop 0.5s ease both;
}
.stat-delta .delta-up {
  background: rgba(158,197,168,0.2);
  color: #5a8a68;
}
.stat-delta .delta-down {
  background: rgba(212,165,165,0.2);
  color: #a56868;
}
@keyframes deltaPop {
  0% { opacity: 0; transform: translateY(8px) scale(0.8); }
  60% { transform: translateY(-2px) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ 死亡页（心碎页）============ */
.screen.death {
  text-align: center;
  padding: 40px 24px 32px;
}
.death-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd5d5, #e8a5a5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 36px;
  box-shadow: 0 8px 24px rgba(224, 149, 156, 0.3);
}
.death-mark svg { width: 36px; height: 36px; }
.screen.death .kicker {
  display: inline-block;
  font-size: 12px;
  color: var(--color-danger);
  background: rgba(224, 149, 156, 0.12);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}
.screen.death h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.4;
}
.death-card {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  text-align: left;
  border: 1px solid var(--border-soft);
}
.death-card span {
  display: block;
  font-size: 11px;
  color: var(--color-danger);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.death-card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
}
.toxic-list {
  background: rgba(224, 149, 156, 0.06);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin: 12px 0 20px;
  text-align: left;
}
.toxic-list p {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 8px;
  padding-left: 18px;
  position: relative;
}
.toxic-list p::before {
  content: '💔';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 12px;
}
.toxic-list p:last-child { margin-bottom: 0; }

/* === 心碎页：大数字醒目卡片 === */
.death-title {
  font-size: 22px;
  color: var(--text-main);
  margin: 8px 0 16px;
  font-weight: 700;
}
.death-title .death-num {
  font-size: 38px;
  color: var(--color-danger);
  font-weight: 800;
  margin: 0 4px;
  vertical-align: -2px;
}
.death-pct-card {
  background: linear-gradient(135deg, rgba(224,149,156,0.12), rgba(212,165,165,0.18));
  border-radius: 18px;
  padding: 20px 16px 16px;
  margin: 0 0 18px;
  text-align: center;
  border: 1.5px solid rgba(224,149,156,0.25);
}
.death-pct-num {
  font-size: 64px;
  font-weight: 900;
  color: var(--color-danger);
  line-height: 1;
  letter-spacing: -2px;
  text-shadow: 0 2px 8px rgba(224,149,156,0.3);
  animation: pctPop 0.6s cubic-bezier(0.16,1,0.3,1) both;
}
.death-pct-num .death-pct-sign {
  font-size: 32px;
  vertical-align: 12px;
  margin-left: 2px;
}
.death-pct-label {
  font-size: 13.5px;
  color: var(--text-body);
  margin-top: 6px;
  font-weight: 500;
}
@keyframes pctPop {
  0% { opacity: 0; transform: scale(0.5); }
  60% { transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}
.death-card-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.death-card.death-reason .death-card-label { color: var(--color-danger); }
.death-card.death-fatal {
  background: rgba(212,165,165,0.08);
  border: 1px dashed rgba(212,165,165,0.4);
}
.death-card.death-fatal .death-card-label { color: #a56868; }
.death-card.death-fatal p {
  font-style: italic;
  color: var(--text-main);
  font-weight: 500;
}

/* ============ 胜利结果页 ============ */
.screen.result {
  text-align: center;
  padding: 32px 24px 28px;
}
.poster {
  background: linear-gradient(160deg, #fff 0%, #fdf2f2 100%);
  border-radius: var(--r-xl);
  padding: 28px 22px 24px;
  margin-bottom: 20px;
  border: 1.5px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}
.poster::before {
  content: '✨';
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 20px;
  opacity: 0.7;
}
.poster .kicker {
  display: inline-block;
  font-size: 12px;
  color: var(--accent-rose);
  background: var(--bg-pink);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}
.poster h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 16px;
}
.poster .rank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #ffe8b5, #f5c97a);
  color: #8a5a1a;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--r-pill);
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(245, 201, 122, 0.3);
}
.poster .rank svg { width: 18px; height: 18px; }
.poster .title-badge {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #e8b5a5, #d4a5a5);
  padding: 8px 20px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(212, 165, 165, 0.3);
}
.poster .rebel-line {
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 20px;
  padding: 0 8px;
  font-style: italic;
}
.poster .stat-grid {
  text-align: left;
  margin-bottom: 18px;
}
.poster-lines p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 6px;
}
.poster-lines p::before {
  content: '·';
  margin-right: 6px;
  color: var(--accent-rose);
}
.poster small {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
}

/* ============ App 下载入口 ============ */
.app-download-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, #fdf2f2 100%);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border-soft);
  margin-top: 16px;
  text-align: left;
  transition: all 0.2s;
}
.app-download-entry:hover { box-shadow: var(--shadow-soft); }
.app-download-entry > span {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-rose);
}
.app-download-entry > span svg { width: 22px; height: 22px; }
.app-download-entry strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.app-download-entry em {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.5;
}
.app-download-entry b {
  flex-shrink: 0;
  font-size: 12px;
  color: #fff;
  background: var(--accent-rose);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-weight: 600;
}

/* ============ Web 返回按钮 ============ */
.web-back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.7);
  margin-bottom: 12px;
  transition: all 0.2s;
}
.web-back-button:hover { color: var(--accent-rose); background: #fff; }

/* ============ 页脚 ============ */
.copyright-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  padding: 24px 0 12px;
  letter-spacing: 0.5px;
}

/* ============ 动画 ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
/* 聊天气泡逐条动态出现 · 左侧从左滑入 / 右侧从右滑入 */
.bubble-row.bubble-in-left {
  opacity: 0;
  animation: bubbleSlideLeft 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.bubble-row.bubble-in-right {
  opacity: 0;
  animation: bubbleSlideRight 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes bubbleSlideLeft {
  0%   { opacity: 0; transform: translateX(-36px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes bubbleSlideRight {
  0%   { opacity: 0; transform: translateX(36px); }
  100% { opacity: 1; transform: translateX(0); }
}
.scene-panel { animation: fadeInUp 0.4s ease both; }
.choices button { animation: fadeInUp 0.3s ease both; }
.choices button:nth-child(2) { animation-delay: 0.05s; }
.choices button:nth-child(3) { animation-delay: 0.1s; }
.choices button:nth-child(4) { animation-delay: 0.15s; }

/* ============ 参与感小贴士 ============ */
.tip-card {
  background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
  border: 1.5px dashed var(--accent-peach);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-body);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.tip-card .tip-icon {
  flex-shrink: 0;
  font-size: 16px;
}

/* ============ 响应式 ============ */
@media (max-width: 430px) {
  body { font-size: 15px; }
  .phone-shell {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  .app { padding: 0; }
  .screen { padding: 20px 16px 28px; }
  .hero-copy h1 { font-size: 26px; }
  .intro-hero h1 { font-size: 23px; }
  .stat-grid { gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat .stat-val { font-size: 16px; }
  .choices button { padding: 12px 14px; font-size: 14px; }
}

@media (max-width: 360px) {
  .hero-copy h1 { font-size: 23px; }
  .category-grid { gap: 10px; }
  .category-card { padding: 14px 12px; min-height: 115px; }
  .category-card .cat-title { font-size: 15px; }
}

/* ============ 滚动条美化 ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-pink); border-radius: 3px; opacity: 0.5; }
