/* ============================================================
   Theme · 情绪疗愈 Healing Garden
   柔和自然色系 · 水彩渐变 · 植物感 UI
   暖绿 + 蜜桃 + 薰衣草 · 治愈系呼吸感
   ============================================================ */

/* --- 主题 CSS 变量 --- */
.theme-healing {
  /* 品牌色系 */
  --primary: #7da87b;
  --primary-glow: #a3c9a1;
  --primary-deep: #5c8a5a;
  --primary-dark: #3d6b3b;
  --accent: #e8a87c;
  --accent-glow: #f5d0b0;
  --accent-deep: #d4906a;
  --lavender: #b8a9c9;
  --lavender-light: #dcd3e8;
  --rose: #e0a5b4;
  --rose-light: #f0d4dc;

  /* 背景色系 - 暖白基调 */
  --bg-warm: #faf8f5;
  --bg-cream: #f5f0e8;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8f5f1;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-soft: #f3f0eb;

  /* 文字色系 */
  --text-primary: #3d3529;
  --text-secondary: #6b6054;
  --text-muted: #9b8e82;
  --text-inverse: #faf8f5;

  /* 边框 & 分割线 */
  --border-subtle: rgba(125, 168, 123, 0.15);
  --border-glow: rgba(125, 168, 123, 0.3);
  --border-accent: rgba(232, 168, 124, 0.35);

  /* 阴影 - 柔光 */
  --shadow-sm: 0 2px 8px rgba(61, 53, 41, 0.06);
  --shadow-md: 0 8px 24px rgba(61, 53, 41, 0.08);
  --shadow-lg: 0 16px 48px rgba(61, 53, 41, 0.1);
  --shadow-glow: 0 0 30px rgba(125, 168, 123, 0.2);
  --shadow-accent: 0 0 20px rgba(232, 168, 124, 0.2);

  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* 兼容映射 */
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-subtle);
  --surface: var(--bg-surface);
  --soft: var(--bg-soft);
  --teal: var(--primary);
  --coral: var(--accent);
  --gold: var(--accent);

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
}

/* --- 全局背景：暖白底 + 柔和水彩晕染 --- */
.theme-healing body {
  background: var(--bg-warm);
  background-image:
    radial-gradient(ellipse 60% 40% at 20% 15%, rgba(184, 169, 201, 0.08), transparent),
    radial-gradient(ellipse 50% 35% at 85% 30%, rgba(232, 168, 124, 0.07), transparent),
    radial-gradient(ellipse 55% 45% at 50% 85%, rgba(125, 168, 123, 0.06), transparent),
    radial-gradient(ellipse 40% 50% at 10% 70%, rgba(224, 165, 180, 0.06), transparent);
  background-attachment: fixed;
}

/* --- 主容器：干净白板带微弱阴影 --- */
.theme-healing .app {
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

/* --- 顶栏：暖白半透明 --- */
.theme-healing .topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.theme-healing .topbar h1 {
  color: var(--primary-deep);
  font-weight: 800;
}

/* --- Eyebrow 文字 --- */
.theme-healing .eyebrow {
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: none;
  font-weight: 700;
}

/* --- Hero 区域：水彩渐变 --- */
.theme-healing .hero {
  background: linear-gradient(155deg, #f5f0e8, #eef5eb, #f8f3f5);
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  margin: 16px;
  overflow: hidden;
  position: relative;
}

.theme-healing .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(184, 169, 201, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 75% 65%, rgba(232, 168, 124, 0.12) 0%, transparent 45%);
  pointer-events: none;
}

.theme-healing .hero h2 {
  color: var(--text-primary);
}

.theme-healing .hero .eyebrow {
  color: var(--primary-dark);
  text-shadow: none;
}

.theme-healing .hero p:not(.eyebrow) {
  color: var(--text-secondary);
}

/* --- 按钮 --- */
.theme-healing .primary-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 4px 14px rgba(125, 168, 123, 0.3);
  transition: all 0.3s ease;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.theme-healing .primary-button:hover {
  box-shadow: 0 6px 22px rgba(125, 168, 123, 0.45);
  transform: translateY(-1px);
}

.theme-healing .primary-button:disabled {
  background: linear-gradient(135deg, #b8d6b6, #a3c9a1);
  box-shadow: none;
}

.theme-healing .secondary-button {
  background: rgba(125, 168, 123, 0.1);
  color: var(--primary-deep);
  border: 1px solid rgba(125, 168, 123, 0.25);
  border-radius: var(--radius-full);
}

.theme-healing .secondary-button:hover {
  background: rgba(125, 168, 123, 0.18);
}

.theme-healing .ghost-button {
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
}

.theme-healing .ghost-button:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
}

/* --- 指标卡片 --- */
.theme-healing .metrics {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.theme-healing .metrics strong {
  color: var(--primary-deep);
}

.theme-healing .metrics span {
  color: var(--text-muted);
}

/* --- 测试层级卡片 --- */
.theme-healing .tier {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.theme-healing .tier:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.theme-healing .tier-price {
  color: var(--accent);
  font-weight: 900;
}

.theme-healing .tier p {
  color: var(--text-secondary);
}

/* --- 好友邀请卡片 --- */
.theme-healing .invite-card {
  background: linear-gradient(135deg, #f8f5f1, #f0ebe0);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
}

.theme-healing .invite-type {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border-radius: var(--radius-md);
}

.theme-healing .invite-card span {
  color: var(--text-secondary);
}

/* --- 进度条 --- */
.theme-healing .progress-track {
  background: rgba(125, 168, 123, 0.12);
  border-radius: var(--radius-full);
}

.theme-healing #progressBar {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 8px rgba(125, 168, 123, 0.3);
  border-radius: var(--radius-full);
}

/* --- 问题卡片 --- */
.theme-healing .question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.theme-healing .question-card h2 {
  color: var(--text-primary);
}

.theme-healing .option-button {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.5;
}

.theme-healing .option-button:hover {
  border-color: var(--border-glow);
  background: rgba(125, 168, 123, 0.04);
}

.theme-healing .option-button.active {
  border-color: var(--primary);
  background: rgba(125, 168, 123, 0.08);
  box-shadow: inset 4px 0 0 var(--primary);
}

/* --- 结果页 --- */
.theme-healing .result-head,
.theme-healing .wallet-head {
  background: linear-gradient(150deg, #f5f0e8, #eef5eb, #f2eff6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.theme-healing .result-head .eyebrow,
.theme-healing .wallet-head .eyebrow {
  color: var(--primary-deep);
}

.theme-healing .result-head h2,
.theme-healing .wallet-head h2 {
  color: var(--primary-dark);
}

.theme-healing .result-head p:not(.eyebrow),
.theme-healing .wallet-head p:not(.eyebrow) {
  color: var(--text-secondary);
}

.theme-healing #mbtiType {
  color: var(--primary-dark);
  -webkit-text-fill-color: var(--primary-dark);
}

.theme-healing #confidence {
  background: rgba(125, 168, 123, 0.12);
  color: var(--primary-deep);
  border: 1px solid rgba(125, 168, 123, 0.2);
}

.theme-healing #typeTitle {
  color: var(--text-secondary);
}

/* --- 维度条 --- */
.theme-healing .dimension-list {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-healing .dimension {
  border-bottom-color: var(--border-subtle);
}

.theme-healing .bar-track {
  background: rgba(125, 168, 123, 0.08);
  border-radius: var(--radius-full);
}

.theme-healing .bar-left {
  background: linear-gradient(90deg, var(--primary-deep), var(--primary));
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px rgba(125, 168, 123, 0.2);
}

.theme-healing .bar-right {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px rgba(232, 168, 124, 0.2);
}

/* --- 匹配卡片 --- */
.theme-healing .match-card {
  background: rgba(125, 168, 123, 0.06);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
}

.theme-healing .match-card strong:last-child {
  color: var(--accent);
}

.theme-healing .match-card span {
  color: var(--text-secondary);
}

.theme-healing .type-art-image,
.theme-healing .match-type-art,
.theme-healing .share-type-image {
  background: #fff;
  border: 1px solid var(--border-subtle);
}

.theme-healing .match-card-art {
  background: rgba(125, 168, 123, 0.06);
  border-color: var(--border-glow);
}

.theme-healing .match-type-tile {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border-subtle);
}

.theme-healing .match-type-name {
  color: var(--primary-dark);
}

.theme-healing .match-score-node {
  background: var(--primary-dark);
}

/* --- 标签 --- */
.theme-healing .tag-row span {
  background: rgba(125, 168, 123, 0.1);
  color: var(--primary-deep);
  border: 1px solid rgba(125, 168, 123, 0.2);
  border-radius: var(--radius-full);
}

/* --- 解锁卡片 --- */
.theme-healing .unlock-card {
  background: linear-gradient(135deg, rgba(232, 168, 124, 0.08), rgba(184, 169, 201, 0.08));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
}

.theme-healing .unlock-card h3 {
  color: var(--accent);
}

.theme-healing .unlock-card p {
  color: var(--text-secondary);
}

/* --- 维度详情 / 报告段落 / 升级卡片 --- */
.theme-healing .facet,
.theme-healing .report-section,
.theme-healing .upgrade {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-healing .report-section {
  background: rgba(253, 251, 248, 0.8);
}

.theme-healing .facet span,
.theme-healing .report-section span,
.theme-healing .upgrade span {
  color: var(--text-secondary);
}

/* --- 分享卡片 --- */
.theme-healing .share-card {
  background: linear-gradient(150deg, #f5f0e8, #eef5eb, #f2eff6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.theme-healing .share-card h2 {
  color: var(--primary-dark);
}

.theme-healing .share-card p:not(.eyebrow) {
  color: var(--text-secondary);
}

.theme-healing .share-bar,
.theme-healing .share-type-art-copy span,
.theme-healing .share-type-art-code,
.theme-healing .share-type-art-nickname {
  color: var(--text-primary);
}

.theme-healing .share-type-art-copy small {
  color: var(--text-secondary);
}

.theme-healing .share-type-art-copy .share-type-art-code {
  color: var(--primary-dark);
}

.theme-healing .share-bar-track span:first-child {
  background: var(--primary);
}

.theme-healing .share-bar-track span:last-child {
  background: var(--accent);
}

.theme-healing .match-box {
  background: rgba(125, 168, 123, 0.06);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
}

.theme-healing .share-match-score-node {
  background: rgba(125, 168, 123, 0.12);
  border-color: rgba(125, 168, 123, 0.2);
}

.theme-healing .share-match-score-node span,
.theme-healing .share-type-role,
.theme-healing .share-type-tile small {
  color: var(--text-secondary);
}

.theme-healing .share-match-score-node strong,
.theme-healing .share-type-tile strong {
  color: var(--primary-dark);
}

/* --- 复制卡片 --- */
.theme-healing .copy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-healing .copy-card textarea {
  background: var(--bg-soft);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

/* --- 我的页收益网格 --- */
.theme-healing .wallet-grid div {
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-healing .wallet-grid span {
  color: var(--text-muted);
}

.theme-healing .wallet-grid strong {
  color: var(--accent);
}

/* --- 日志列表 --- */
.theme-healing .log-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-healing .log-item span {
  color: var(--text-muted);
}

.theme-healing .log-item strong:last-child {
  color: var(--primary-deep);
}

/* --- 职业卡片 --- */
.theme-healing .career-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-healing .career-style {
  color: var(--text-secondary);
}

.theme-healing .career-tag {
  background: rgba(125, 168, 123, 0.08);
  color: var(--primary-deep);
  border: 1px solid rgba(125, 168, 123, 0.2);
  border-radius: var(--radius-full);
}

.theme-healing .career-name {
  color: var(--text-primary);
  font-weight: 700;
}

.theme-healing .career-match {
  color: var(--primary-deep);
  font-weight: 800;
}

/* --- 关系匹配卡片 --- */
.theme-healing .relation-card select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.theme-healing .relation-card .match-score {
  color: var(--accent);
}

.theme-healing .relation-card .match-level {
  color: var(--primary-deep);
}

.theme-healing .best-match-row {
  border-bottom: 1px solid var(--border-subtle);
}

.theme-healing .bm-score {
  color: var(--accent);
  font-weight: 800;
}

/* --- Toast --- */
.theme-healing .toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  border-radius: var(--radius-md);
}

/* --- 雷达图 SVG --- */
.theme-healing .radar-chart svg line,
.theme-healing .radar-chart svg circle {
  stroke: var(--border-subtle);
}

/* --- Hero 图谱 canvas 节点 --- */
/* 通过 CSS 变量覆盖 JS 节点颜色 */
.theme-healing {
  --graph-node-a: var(--primary);
  --graph-node-b: var(--accent);
  --graph-node-c: var(--lavender);
  --graph-node-d: var(--rose);
}

/* --- 分段标题 --- */
.theme-healing .section-head h3 {
  color: var(--text-primary);
}

.theme-healing .section-head span {
  color: var(--text-muted);
}

/* --- 动画：柔光呼吸 --- */
@keyframes breathe-healing {
  0%, 100% { box-shadow: 0 0 16px rgba(125, 168, 123, 0.08); }
  50% { box-shadow: 0 0 28px rgba(125, 168, 123, 0.16); }
}

.theme-healing .result-head,
.theme-healing .wallet-head {
  animation: breathe-healing 5s ease-in-out infinite;
}

.theme-healing .share-card {
  animation: breathe-healing 5s ease-in-out infinite;
  animation-delay: 1s;
}

/* --- 响应式 --- */
@media (min-width: 720px) {
  .theme-healing .app {
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-top: 24px;
    margin-bottom: 48px;
  }
}

@media (min-width: 1024px) {
  .theme-healing .app {
    width: min(100%, 560px);
  }
}

/* --- 减弱动画偏好 --- */
@media (prefers-reduced-motion: reduce) {
  .theme-healing .result-head,
  .theme-healing .wallet-head,
  .theme-healing .share-card {
    animation: none !important;
  }
}

/* --- 滚动条美化 --- */
.theme-healing ::-webkit-scrollbar {
  width: 6px;
}

.theme-healing ::-webkit-scrollbar-track {
  background: var(--bg-warm);
}

.theme-healing ::-webkit-scrollbar-thumb {
  background: var(--border-glow);
  border-radius: 3px;
}

.theme-healing ::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- 输入框通用样式 --- */
.theme-healing input,
.theme-healing textarea,
.theme-healing select {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: var(--bg-card);
}

.theme-healing input:focus,
.theme-healing textarea:focus,
.theme-healing select:focus {
  outline: none;
  border-color: var(--border-glow);
  box-shadow: 0 0 0 3px rgba(125, 168, 123, 0.1);
}
