/* ============================================================
   MindLayer Cosmic · 星曜紫金 主题
   紫色高级玻璃态 UI，深空渐变 + 星光点缀 + 紫金碰撞
   ============================================================ */

/* --- 主题 CSS 变量 --- */
.theme-mindlayer {
  /* 品牌色系 */
  --primary: #a66cff;
  --primary-glow: #c89fff;
  --primary-deep: #7b3fd4;
  --primary-dark: #5a1fa8;
  --accent: #f3c76b;
  --accent-glow: #fde2a3;
  --accent-deep: #d4a12e;
  --gold: #f3c76b;

  /* 深空渐变背景 */
  --bg-deep: #0d0a1a;
  --bg-cosmic: #1a1133;
  --bg-surface: #1f1744;
  --bg-surface-hover: #281f55;
  --bg-card: rgba(31, 23, 68, 0.75);
  --bg-card-solid: #1f1744;

  /* 文字色系 */
  --text-primary: #f5f0ff;
  --text-secondary: rgba(245, 240, 255, 0.72);
  --text-muted: rgba(245, 240, 255, 0.48);
  --text-inverse: #0d0a1a;

  /* 边框 & 分割线 */
  --border-subtle: rgba(166, 108, 255, 0.18);
  --border-glow: rgba(166, 108, 255, 0.35);
  --border-accent: rgba(243, 199, 107, 0.4);

  /* 玻璃态 */
  --glass-bg: rgba(31, 23, 68, 0.55);
  --glass-border: rgba(166, 108, 255, 0.2);
  --glass-blur: blur(24px);

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(166, 108, 255, 0.12);
  --shadow-md: 0 8px 24px rgba(166, 108, 255, 0.16);
  --shadow-lg: 0 16px 48px rgba(13, 10, 26, 0.4);
  --shadow-glow: 0 0 40px rgba(166, 108, 255, 0.25);
  --shadow-accent: 0 0 24px rgba(243, 199, 107, 0.2);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* 基础变量覆盖 (保持兼容) */
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-subtle);
  --surface: var(--bg-surface);
  --surface-soft: rgba(13, 10, 26, 0.42);
  --soft: var(--bg-cosmic);
  --teal: var(--primary);
  --coral: var(--accent);
  --text: var(--text-primary);
  --green: #69c48d;
  --shadow: var(--shadow-md);
  --shadow-soft: var(--shadow-sm);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 字体 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
}

/* --- 全局背景 --- */
.theme-mindlayer body {
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(166, 108, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(243, 199, 107, 0.08), transparent),
    radial-gradient(ellipse 50% 60% at 0% 60%, rgba(166, 108, 255, 0.06), transparent);
  background-attachment: fixed;
}

/* --- 星光粒子（纯 CSS 动画）--- */
.theme-mindlayer .app::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(166, 108, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, rgba(243, 199, 107, 0.5), transparent),
    radial-gradient(1px 1px at 80% 50%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 10% 80%, rgba(166, 108, 255, 0.4), transparent),
    radial-gradient(1px 1px at 70% 90%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 90% 15%, rgba(243, 199, 107, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 30% 50%, rgba(166, 108, 255, 0.45), transparent),
    radial-gradient(1px 1px at 50% 85%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 15% 15%, rgba(243, 199, 107, 0.35), transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* --- 主容器 --- */
.theme-mindlayer .app {
  background: var(--bg-deep);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  z-index: 1;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

/* --- 顶栏（玻璃态）--- */
.theme-mindlayer .topbar {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.theme-mindlayer .topbar h1 {
  background: linear-gradient(135deg, var(--primary-glow), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Eyebrow 文字 --- */
.theme-mindlayer .eyebrow {
  color: var(--primary-glow);
  letter-spacing: 0.08em;
}

/* --- Hero 区域 --- */
.theme-mindlayer .hero {
  background: linear-gradient(160deg, var(--primary-dark), var(--bg-cosmic), var(--bg-deep));
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}

.theme-mindlayer .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(166, 108, 255, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(243, 199, 107, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.theme-mindlayer .hero h2 {
  background: linear-gradient(135deg, #fff, var(--primary-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-mindlayer .hero p:not(.eyebrow) {
  color: var(--text-secondary);
}

/* --- 按钮 --- */
.theme-mindlayer .primary-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 4px 15px rgba(166, 108, 255, 0.35);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-mindlayer .primary-button:hover {
  box-shadow: 0 6px 25px rgba(166, 108, 255, 0.5);
  transform: translateY(-1px);
}

.theme-mindlayer .primary-button:disabled {
  background: rgba(166, 108, 255, 0.25);
  box-shadow: none;
}

.theme-mindlayer .secondary-button {
  background: rgba(166, 108, 255, 0.12);
  color: var(--primary-glow);
  border: 1px solid var(--border-subtle);
}

.theme-mindlayer .secondary-button:hover {
  background: rgba(166, 108, 255, 0.2);
}

.theme-mindlayer .ghost-button {
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
}

.theme-mindlayer .ghost-button:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
}

/* --- 指标卡片 --- */
.theme-mindlayer .metrics {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-mindlayer .metrics strong {
  color: var(--primary-glow);
}

.theme-mindlayer .metrics span {
  color: var(--text-muted);
}

/* --- 测试层级卡片 --- */
.theme-mindlayer .tier {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-mindlayer .tier:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.theme-mindlayer .tier-price {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(243, 199, 107, 0.3);
}

.theme-mindlayer .tier p {
  color: var(--text-secondary);
}

/* --- 好友邀请卡片 --- */
.theme-mindlayer .invite-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
}

.theme-mindlayer .invite-type {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
}

.theme-mindlayer .invite-card span {
  color: var(--text-secondary);
}

/* --- 进度条 --- */
.theme-mindlayer .progress-track {
  background: rgba(166, 108, 255, 0.1);
}

.theme-mindlayer #progressBar {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px rgba(166, 108, 255, 0.4);
}

/* --- 问题卡片 --- */
.theme-mindlayer .question-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.theme-mindlayer .option-button {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
}

.theme-mindlayer .option-button:hover {
  border-color: var(--border-glow);
  background: rgba(166, 108, 255, 0.08);
}

.theme-mindlayer .option-button.active {
  border-color: var(--primary);
  background: rgba(166, 108, 255, 0.15);
  box-shadow: inset 4px 0 0 var(--primary), var(--shadow-glow);
}

/* --- 结果页 --- */
.theme-mindlayer .result-head,
.theme-mindlayer .wallet-head {
  background: linear-gradient(160deg, var(--primary-dark), var(--bg-cosmic));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}

.theme-mindlayer #mbtiType {
  background: linear-gradient(135deg, #fff, var(--primary-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-mindlayer #confidence {
  background: rgba(166, 108, 255, 0.2);
  color: var(--primary-glow);
  border: 1px solid var(--border-subtle);
}

.theme-mindlayer #typeTitle {
  color: var(--text-secondary);
}

/* --- 维度条 --- */
.theme-mindlayer .dimension-list {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-mindlayer .dimension {
  border-bottom-color: var(--border-subtle);
}

.theme-mindlayer .bar-track {
  background: rgba(166, 108, 255, 0.1);
}

.theme-mindlayer .bar-left {
  background: linear-gradient(90deg, var(--primary-deep), var(--primary));
  box-shadow: 0 0 8px rgba(166, 108, 255, 0.3);
}

.theme-mindlayer .bar-right {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  box-shadow: 0 0 8px rgba(243, 199, 107, 0.3);
}

/* --- 匹配卡片 --- */
.theme-mindlayer .match-card {
  background: rgba(166, 108, 255, 0.1);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
}

.theme-mindlayer .match-card strong:last-child {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(243, 199, 107, 0.3);
}

.theme-mindlayer .match-card span {
  color: var(--text-secondary);
}

/* --- 标签 --- */
.theme-mindlayer .tag-row span {
  background: rgba(166, 108, 255, 0.15);
  color: var(--primary-glow);
  border: 1px solid var(--border-subtle);
}

/* --- 解锁卡片 --- */
.theme-mindlayer .unlock-card {
  background: rgba(243, 199, 107, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
}

.theme-mindlayer .unlock-card h3 {
  color: var(--accent);
}

.theme-mindlayer .unlock-card p {
  color: var(--text-secondary);
}

.theme-mindlayer .one-shot-paywall-head {
  color: rgba(245, 240, 255, 0.84);
}

.theme-mindlayer .one-shot-countdown-time,
.theme-mindlayer .one-shot-paywall-head em {
  color: #ffd86f;
  text-shadow: 0 0 20px rgba(243, 199, 107, 0.36), 0 14px 34px rgba(13, 10, 26, 0.42);
}

.theme-mindlayer .one-shot-rarity {
  background:
    linear-gradient(90deg, rgba(166, 108, 255, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(166, 108, 255, 0.12) 1px, transparent 1px),
    rgba(31, 23, 68, 0.86);
  border: 1px solid rgba(243, 199, 107, 0.28);
  color: #fff8dc;
}

.theme-mindlayer .one-shot-rarity span,
.theme-mindlayer .one-shot-rarity p {
  color: rgba(245, 240, 255, 0.76);
}

.theme-mindlayer .one-shot-rarity strong {
  color: #fff8dc;
}

.theme-mindlayer .one-shot-type-suffix {
  color: rgba(222, 205, 255, 0.92);
}

.theme-mindlayer .one-shot-rarity em {
  background: linear-gradient(135deg, #f3c76b, #ff8f62);
  color: #211039;
}

.theme-mindlayer .one-shot-package {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(243, 199, 107, 0.34);
  color: #24183a;
}

.theme-mindlayer .one-shot-package strong,
.theme-mindlayer .one-shot-package small,
.theme-mindlayer .one-shot-package i {
  color: #24183a;
}

.theme-mindlayer .one-shot-package span {
  color: #5a1fa8;
}

.theme-mindlayer .one-shot-package.recommended {
  background: #fffaf0;
  border-color: rgba(243, 199, 107, 0.72);
}

.theme-mindlayer .one-shot-package.primary {
  background: linear-gradient(135deg, #8e58dc, #f25f4c);
  color: #fff;
}

.theme-mindlayer .one-shot-package.primary strong,
.theme-mindlayer .one-shot-package.primary small,
.theme-mindlayer .one-shot-package.primary i,
.theme-mindlayer .one-shot-package.primary span {
  color: #fff;
}

.theme-mindlayer .one-shot-benefit-grid,
.theme-mindlayer .one-shot-benefit-title,
.theme-mindlayer .one-shot-buyer-line {
  color: rgba(245, 240, 255, 0.88);
}

.theme-mindlayer .one-shot-unlocked-card {
  background: rgba(31, 23, 68, 0.86);
  border-color: rgba(243, 199, 107, 0.34);
  color: var(--text-primary);
}

.theme-mindlayer .one-shot-unlocked-card h3 {
  color: #fff8dc;
}

.theme-mindlayer .one-shot-unlocked-card p,
.theme-mindlayer .one-shot-unlocked-note {
  color: rgba(245, 240, 255, 0.78);
}

/* --- 维度详情卡片 --- */
.theme-mindlayer .facet,
.theme-mindlayer .report-section,
.theme-mindlayer .upgrade {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-mindlayer .report-section {
  background: rgba(31, 23, 68, 0.4);
}

.theme-mindlayer #resultView .facet,
.theme-mindlayer #resultView .report-section,
.theme-mindlayer #resultView .report-output-card,
.theme-mindlayer #resultView .upgrade,
.theme-mindlayer #resultView .career-card,
.theme-mindlayer #resultView .relation-card {
  background: rgba(31, 23, 68, 0.72) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-primary);
}

.theme-mindlayer .type-art-card {
  border-color: rgba(243, 199, 107, 0.34);
  background: linear-gradient(145deg, rgba(35, 22, 70, 0.82), rgba(14, 8, 33, 0.88));
  box-shadow: 0 18px 42px rgba(98, 56, 204, 0.24);
}

.theme-mindlayer .type-art-card img {
  border: 1px solid rgba(243, 199, 107, 0.28);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), 0 0 26px rgba(166, 108, 255, 0.28);
}

.theme-mindlayer .type-art-image,
.theme-mindlayer .match-type-art,
.theme-mindlayer .share-type-image {
  background: #f7f0ff;
  border: 1px solid rgba(243, 199, 107, 0.28);
}

.theme-mindlayer .type-art-fallback-text {
  color: var(--accent-glow);
}

.theme-mindlayer .type-art-meta strong {
  color: #fff8dc;
}

.theme-mindlayer .type-art-meta > span {
  color: rgba(250, 246, 255, 0.74);
}

.theme-mindlayer .match-card-art {
  background: rgba(31, 23, 68, 0.72);
  border-color: rgba(166, 108, 255, 0.34);
}

.theme-mindlayer .match-type-tile {
  background: rgba(13, 8, 34, 0.38);
  border-color: rgba(166, 108, 255, 0.26);
}

.theme-mindlayer .match-type-role,
.theme-mindlayer .match-type-tile small {
  color: var(--text-secondary);
}

.theme-mindlayer .match-type-name {
  color: var(--accent-glow);
}

.theme-mindlayer .match-score-node {
  background: linear-gradient(180deg, rgba(166, 108, 255, 0.36), rgba(13, 8, 34, 0.9));
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 24px rgba(166, 108, 255, 0.18);
}

.theme-mindlayer .relation-hero,
.theme-mindlayer .relation-type-card,
.theme-mindlayer .relation-insight-group {
  background: rgba(31, 23, 68, 0.74);
  border-color: var(--border-subtle);
  box-shadow: 0 14px 34px rgba(13, 10, 26, 0.26);
}

.theme-mindlayer .relation-hero {
  background: linear-gradient(145deg, rgba(94, 38, 188, 0.42), rgba(23, 13, 48, 0.86));
}

.theme-mindlayer .relation-type-art {
  background: rgba(13, 10, 26, 0.34);
  color: var(--accent-glow);
  border: 1px solid rgba(243, 199, 107, 0.24);
}

.theme-mindlayer .relation-card-role,
.theme-mindlayer .relation-insight-item strong {
  color: var(--accent-glow);
}

.theme-mindlayer .relation-type-name,
.theme-mindlayer .relation-insight-group h3 {
  color: var(--text-primary);
}

.theme-mindlayer .relation-type-copy small,
.theme-mindlayer .relation-insight-item p,
.theme-mindlayer .relation-score-orb span {
  color: var(--text-secondary);
}

.theme-mindlayer .relation-score-orb {
  background: linear-gradient(180deg, rgba(166, 108, 255, 0.38), rgba(13, 8, 34, 0.9));
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 26px rgba(166, 108, 255, 0.22);
}

.theme-mindlayer .relation-score-orb small {
  color: var(--accent-glow);
}

.theme-mindlayer .relation-insight-item + .relation-insight-item {
  border-top-color: var(--border-subtle);
}

.theme-mindlayer .report-output-card,
.theme-mindlayer .career-card,
.theme-mindlayer .relation-card,
.theme-mindlayer .my-section,
.theme-mindlayer .relationship-free-card,
.theme-mindlayer .professional-lock-card,
.theme-mindlayer .professional-advice {
  background: rgba(31, 23, 68, 0.72);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  box-shadow: 0 10px 28px rgba(13, 10, 26, 0.24);
}

.theme-mindlayer .career-card h3,
.theme-mindlayer .relation-card h3,
.theme-mindlayer .report-output-card strong,
.theme-mindlayer .my-section h3,
.theme-mindlayer .report-module-head strong,
.theme-mindlayer .career-name,
.theme-mindlayer .best-match-row .bm-type,
.theme-mindlayer .history-row strong,
.theme-mindlayer .friend-row strong,
.theme-mindlayer .inviter-row strong {
  color: var(--text-primary);
}

.theme-mindlayer .career-style,
.theme-mindlayer .relation-result .match-summary,
.theme-mindlayer .best-match-row .bm-title,
.theme-mindlayer .my-section p,
.theme-mindlayer .history-row span,
.theme-mindlayer .friend-row span,
.theme-mindlayer .inviter-row span,
.theme-mindlayer .form-hint {
  color: var(--text-secondary);
}

.theme-mindlayer .career-item,
.theme-mindlayer .relation-result,
.theme-mindlayer .best-match-row,
.theme-mindlayer .professional-advice-grid div {
  background: rgba(13, 10, 26, 0.28);
  border-color: var(--border-subtle);
}

.theme-mindlayer .career-tag,
.theme-mindlayer .report-mode-row span,
.theme-mindlayer .friend-status-tag,
.theme-mindlayer .profile-completeness {
  background: rgba(166, 108, 255, 0.16);
  color: var(--primary-glow);
  border: 1px solid var(--border-subtle);
}

.theme-mindlayer .profile-avatar-fallback,
.theme-mindlayer .profile-insight-card,
.theme-mindlayer .profile-rising-fields {
  background: rgba(13, 10, 26, 0.28);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.theme-mindlayer .profile-rising-fields input {
  background: rgba(13, 8, 34, 0.88);
  color: var(--text-primary);
  border-color: rgba(166, 108, 255, 0.38);
}

.theme-mindlayer .profile-insight-card strong {
  color: var(--text-primary);
}

.theme-mindlayer .profile-insight-card span,
.theme-mindlayer .profile-insight-card p,
.theme-mindlayer .profile-form-grid span,
.theme-mindlayer .profile-rising-fields span {
  color: var(--text-secondary);
}

.theme-mindlayer .astro-modal-card {
  background: #130d25;
  color: var(--text-primary);
  border-color: var(--border-subtle);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.theme-mindlayer .astro-modal-close {
  background: rgba(27, 18, 51, 0.92);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.theme-mindlayer .astro-modal-eyebrow,
.theme-mindlayer .astro-modal-table td strong,
.theme-mindlayer .astro-modal-highlight strong {
  color: var(--primary-glow);
}

.theme-mindlayer .astro-modal-section,
.theme-mindlayer .astro-modal-highlight,
.theme-mindlayer .astro-modal-summary,
.theme-mindlayer .astro-modal-tip {
  background: rgba(13, 10, 26, 0.42);
  border-color: var(--border-subtle);
}

.theme-mindlayer .astro-modal-section p,
.theme-mindlayer .astro-modal-highlight span,
.theme-mindlayer .astro-modal-highlight p,
.theme-mindlayer .astro-modal-summary,
.theme-mindlayer .astro-modal-tip,
.theme-mindlayer .astro-modal-table th,
.theme-mindlayer .astro-modal-table td {
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.theme-mindlayer .career-avoid {
  background: rgba(243, 199, 107, 0.1);
  border-color: var(--border-accent);
  color: var(--accent-glow);
}

.theme-mindlayer .relation-finder select,
.theme-mindlayer input,
.theme-mindlayer textarea,
.theme-mindlayer select {
  background: rgba(13, 8, 34, 0.82);
  border-color: rgba(166, 108, 255, 0.34);
  color: var(--text-primary);
}

.theme-mindlayer #myPhoneSection input {
  background: rgba(13, 8, 34, 0.88);
  color: var(--text-primary);
  border: 1px solid rgba(166, 108, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.theme-mindlayer #myPhoneSection input:focus {
  border-color: rgba(217, 163, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(166, 108, 255, 0.16);
}

.theme-mindlayer #myPhoneSection .secondary-button,
.theme-mindlayer #verifyPhone {
  background: linear-gradient(135deg, rgba(126, 62, 220, 0.82), rgba(85, 48, 151, 0.9));
  color: var(--text-primary);
  border: 1px solid rgba(217, 163, 255, 0.35);
}

.theme-mindlayer input::placeholder,
.theme-mindlayer textarea::placeholder {
  color: rgba(245, 240, 255, 0.58);
}

.theme-mindlayer .report-module.locked {
  background: rgba(243, 199, 107, 0.08);
  border-color: var(--border-accent);
}

.theme-mindlayer .facet span,
.theme-mindlayer .report-section span,
.theme-mindlayer .upgrade span {
  color: var(--text-secondary);
}

.theme-mindlayer .upgrade-card {
  gap: 14px;
}

.theme-mindlayer .upgrade-card-head {
  align-items: center;
}

.theme-mindlayer .upgrade-price {
  background: linear-gradient(135deg, var(--accent), #f6d995);
  color: #321a05;
  box-shadow: 0 0 18px rgba(243, 199, 107, 0.2);
}

.theme-mindlayer .upgrade-title-wrap strong {
  color: var(--text-primary);
}

.theme-mindlayer .upgrade-title-wrap small {
  color: var(--accent-glow);
}

.theme-mindlayer .upgrade-copy {
  color: var(--text-secondary) !important;
}

.theme-mindlayer .upgrade-card .guidance-tags span {
  background: rgba(169, 112, 255, 0.18);
  border-color: rgba(243, 199, 107, 0.34);
  color: #f8f3ff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* --- 分享卡片 --- */
.theme-mindlayer .share-card {
  background: linear-gradient(160deg, var(--primary-dark), var(--bg-cosmic));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}

.theme-mindlayer .share-card h2 {
  background: linear-gradient(135deg, #fff, var(--primary-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-mindlayer .share-card p:not(.eyebrow) {
  color: var(--text-secondary);
}

.theme-mindlayer .share-bar-track span:first-child {
  background: var(--primary-glow);
}

.theme-mindlayer .share-bar-track span:last-child {
  background: var(--accent);
}

.theme-mindlayer .match-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

/* --- 复制卡片 --- */
.theme-mindlayer .copy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-mindlayer .copy-card textarea {
  background: var(--bg-deep);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.theme-mindlayer .poster-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.theme-mindlayer .poster-head h3 {
  color: var(--text-primary);
}

.theme-mindlayer .poster-card img {
  border-color: var(--border-subtle);
  background: var(--bg-deep);
  box-shadow: var(--shadow-glow);
}

/* --- 我的页收益网格 --- */
.theme-mindlayer .wallet-grid div {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-mindlayer .wallet-grid span {
  color: var(--text-muted);
}

.theme-mindlayer .wallet-grid strong {
  color: var(--accent);
}

/* --- 日志列表 --- */
.theme-mindlayer .log-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.theme-mindlayer .log-item span {
  color: var(--text-muted);
}

.theme-mindlayer .log-item strong:last-child {
  color: var(--accent);
}

/* --- Toast --- */
.theme-mindlayer .toast {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-glow);
  color: var(--text-primary);
}

/* --- 画布节点颜色（Hero 图谱）--- */
/* 这些颜色通过 JS drawGraph 中的 nodes 控制，主题 class 会影响全局色 */

/* --- 动画：呼吸光晕 --- */
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 20px rgba(166, 108, 255, 0.2); }
  50% { box-shadow: 0 0 40px rgba(166, 108, 255, 0.4); }
}

.theme-mindlayer .result-head {
  animation: breathe 4s ease-in-out infinite;
}

.theme-mindlayer .share-card {
  animation: breathe 4s ease-in-out infinite;
  animation-delay: 1s;
}

/* --- 响应式 --- */
@media (min-width: 720px) {
  .theme-mindlayer .app {
    border-radius: var(--radius-xl);
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  .theme-mindlayer .app {
    width: min(100%, 560px);
  }
}

/* --- 减弱动画偏好 --- */
@media (prefers-reduced-motion: reduce) {
  .theme-mindlayer .app::before,
  .theme-mindlayer .result-head,
  .theme-mindlayer .share-card {
    animation: none !important;
  }
}

/* --- 渐变文字浏览器兼容降级 --- */
@supports not (-webkit-background-clip: text) {
  .theme-mindlayer .topbar h1,
  .theme-mindlayer .hero h2,
  .theme-mindlayer #mbtiType,
  .theme-mindlayer .share-card h2 {
    -webkit-text-fill-color: currentColor;
    background: none;
    color: var(--primary-glow);
  }
}

/* --- 滚动条美化 --- */
.theme-mindlayer ::-webkit-scrollbar {
  width: 6px;
}

.theme-mindlayer ::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

.theme-mindlayer ::-webkit-scrollbar-thumb {
  background: var(--border-glow);
  border-radius: 3px;
}

.theme-mindlayer ::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Result page readability and compact paid-tier header */
.theme-mindlayer #resultView .upgrade-card-head {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.theme-mindlayer #resultView .upgrade-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  padding: 0 14px;
  line-height: 32px;
  background: linear-gradient(135deg, var(--accent), #f6d995) !important;
  color: #321a05 !important;
  box-shadow: 0 0 18px rgba(243, 199, 107, 0.22);
}

.theme-mindlayer #resultView .upgrade-title-wrap {
  min-width: 0;
}

.theme-mindlayer #resultView .upgrade-title-wrap strong,
.theme-mindlayer #resultView .upgrade-title-wrap small {
  overflow-wrap: anywhere;
}

.theme-mindlayer #resultView .career-card,
.theme-mindlayer #resultView .relation-card,
.theme-mindlayer #resultView .report-output-card {
  background: linear-gradient(145deg, rgba(31, 23, 68, 0.9), rgba(13, 8, 34, 0.92)) !important;
  border-color: rgba(166, 108, 255, 0.3) !important;
  color: var(--text-primary) !important;
}

.theme-mindlayer #resultView .career-card h3,
.theme-mindlayer #resultView .relation-card h3,
.theme-mindlayer #resultView .career-name,
.theme-mindlayer #resultView .best-matches > strong,
.theme-mindlayer #resultView .best-match-row .bm-type,
.theme-mindlayer #resultView .relation-result .match-level {
  color: var(--text-primary) !important;
  -webkit-text-fill-color: currentColor;
}

.theme-mindlayer #resultView .career-style,
.theme-mindlayer #resultView .best-match-row .bm-title,
.theme-mindlayer #resultView .relation-result .match-summary {
  color: rgba(245, 240, 255, 0.74) !important;
}

.theme-mindlayer #resultView .career-item,
.theme-mindlayer #resultView .relation-result,
.theme-mindlayer #resultView .best-match-row {
  background: rgba(13, 8, 34, 0.56) !important;
  border: 1px solid rgba(166, 108, 255, 0.28) !important;
}

.theme-mindlayer #resultView .career-tag {
  background: rgba(166, 108, 255, 0.18) !important;
  color: var(--primary-glow) !important;
}

.theme-mindlayer #resultView .career-match,
.theme-mindlayer #resultView .best-match-row .bm-score,
.theme-mindlayer #resultView .relation-result .match-score {
  color: #3fd4d2 !important;
}

.theme-mindlayer #resultView .relation-finder select {
  background: rgba(13, 8, 34, 0.86) !important;
  color: var(--text-primary) !important;
  border-color: rgba(166, 108, 255, 0.34) !important;
}

.theme-mindlayer .share-type-art-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(166, 108, 255, 0.28);
  border-radius: var(--radius-md);
}

.theme-mindlayer .share-type-tile {
  color: var(--text-primary);
}

.theme-mindlayer .share-type-role,
.theme-mindlayer .share-type-tile small {
  color: rgba(245, 240, 255, 0.72);
}

.theme-mindlayer .share-match-score-node {
  background: rgba(13, 8, 34, 0.42);
  border-color: rgba(243, 199, 107, 0.24);
}

.theme-mindlayer .share-match-score-node strong {
  color: var(--accent-glow);
}

.theme-mindlayer .share-type-art-box img {
  border: 1px solid rgba(243, 199, 107, 0.32);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 24px rgba(166, 108, 255, 0.24);
}

.theme-mindlayer .share-type-art-copy span {
  color: #fff8dc;
}

.theme-mindlayer .share-type-art-copy small {
  color: rgba(245, 240, 255, 0.72);
}

.theme-mindlayer .share-card h2 {
  background: none !important;
  color: #f8f2ff !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: 0 0 18px rgba(198, 159, 255, 0.34);
}

.theme-mindlayer .share-card .eyebrow,
.theme-mindlayer .share-bar {
  color: rgba(248, 242, 255, 0.88);
}

.theme-mindlayer .share-card p:not(.eyebrow) {
  color: rgba(248, 242, 255, 0.78) !important;
}

.theme-mindlayer .copy-card input#shareUrl {
  background: #f1e7ff !important;
  border-color: rgba(166, 108, 255, 0.42) !important;
  color: var(--primary-dark) !important;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.theme-mindlayer .copy-card input#shareUrl::selection {
  background: rgba(166, 108, 255, 0.28);
  color: #2d0d59;
}

/* --- 新组件对比度护栏：浅色表面必须使用深色文字，深色表面保持高对比 --- */
.theme-mindlayer .report-unlock-status,
.theme-mindlayer .unlocked-value-grid span,
.theme-mindlayer .report-feedback-card,
.theme-mindlayer .report-feedback-actions button,
.theme-mindlayer .wallet-form,
.theme-mindlayer .ai-chat-shell,
.theme-mindlayer .retest-comparison-card,
.theme-mindlayer .measurement-quality-card {
  border-color: rgba(166, 108, 255, 0.28);
}

.theme-mindlayer .report-unlock-status,
.theme-mindlayer .unlocked-value-grid span,
.theme-mindlayer .report-feedback-card,
.theme-mindlayer .report-feedback-actions button,
.theme-mindlayer .wallet-form {
  background: rgba(31, 23, 68, 0.82);
  color: var(--text-primary);
}

.theme-mindlayer .report-unlock-status strong,
.theme-mindlayer .unlocked-value-grid i,
.theme-mindlayer .report-feedback-card > span {
  color: var(--accent-glow);
}

.theme-mindlayer .report-unlock-status.is-full {
  background: linear-gradient(135deg, #176b4a, #23865f);
  color: #fff;
}

.theme-mindlayer .report-unlock-status.is-full strong {
  color: #fff;
}

.theme-mindlayer .report-feedback-card h3,
.theme-mindlayer .report-feedback-actions button {
  color: var(--text-primary);
}

.theme-mindlayer .report-feedback-card p,
.theme-mindlayer .report-feedback-card > small {
  color: var(--text-secondary);
}

.theme-mindlayer .report-feedback-actions button.selected {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  border-color: var(--primary-glow);
  color: #fff;
}

.theme-mindlayer .one-shot-package em {
  background: #eee5fb;
  color: #5a1fa8;
}

.theme-mindlayer .one-shot-package.primary em {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.theme-mindlayer .wallet-form input:focus,
.theme-mindlayer .ai-chat-input-row input:focus {
  background: rgba(13, 8, 34, 0.94);
  border-color: rgba(217, 163, 255, 0.72);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(166, 108, 255, 0.16);
}

.theme-mindlayer .ai-chat-top,
.theme-mindlayer .ai-chat-input-row,
.theme-mindlayer .ai-quick-btns button,
.theme-mindlayer .ai-bubble.assistant .ai-bubble-inner,
.theme-mindlayer .ai-bubble.ai-typing .ai-bubble-inner,
.theme-mindlayer .retest-type-route > div,
.theme-mindlayer .measurement-quality-metrics > div {
  background: rgba(31, 23, 68, 0.88);
  border-color: rgba(166, 108, 255, 0.28);
  color: var(--text-primary);
}

.theme-mindlayer .ai-chat-body {
  background: #120c25;
}

.theme-mindlayer .retest-card-head > strong[data-level="low"],
.theme-mindlayer .retest-card-head > strong[data-level="high"] {
  color: #fff;
}

.theme-mindlayer .gender-card-grid button,
.theme-mindlayer .one-shot-preview {
  color: #24183a;
}

/* --- V0 紫色主题全流程对比度护栏 --- */
.theme-mindlayer .progressive-conversion-bridge {
  background: linear-gradient(145deg, rgba(43, 30, 85, 0.98), rgba(24, 16, 54, 0.98));
  border-color: rgba(200, 159, 255, 0.42);
  color: var(--text-primary);
  box-shadow: 0 14px 32px rgba(13, 10, 26, 0.28);
}

.theme-mindlayer .progressive-conversion-bridge h3 {
  color: #f8f4ff;
}

.theme-mindlayer .progressive-conversion-bridge p {
  color: rgba(245, 240, 255, 0.8);
}

.theme-mindlayer .progressive-achievement {
  background: #f3c76b;
  color: #211039;
}

.theme-mindlayer .progressive-value-grid span,
.theme-mindlayer .one-shot-stage-gains span {
  background: rgba(13, 8, 34, 0.68);
  border: 1px solid rgba(200, 159, 255, 0.32);
  color: #f8f4ff;
}

.theme-mindlayer .progressive-share-first {
  background: rgba(166, 108, 255, 0.2);
  border-color: rgba(200, 159, 255, 0.5);
  color: #f8f4ff;
}

.theme-mindlayer .one-shot-stage-complete {
  background: #f3c76b;
  color: #211039;
  box-shadow: 0 8px 18px rgba(243, 199, 107, 0.18);
}

.theme-mindlayer .test-identity-person {
  background: rgba(13, 8, 34, 0.52);
  border-color: rgba(200, 159, 255, 0.3);
  color: var(--text-primary);
}

.theme-mindlayer .test-identity-person span {
  color: rgba(245, 240, 255, 0.74);
}

.theme-mindlayer .test-identity-person strong {
  color: #f8f4ff;
}

.theme-mindlayer .my-universal-entry {
  background: linear-gradient(135deg, rgba(45, 30, 92, 0.94), rgba(29, 20, 62, 0.96));
  border-color: rgba(200, 159, 255, 0.38);
  color: #f8f4ff;
  box-shadow: 0 12px 26px rgba(13, 10, 26, 0.22);
}

.theme-mindlayer .my-universal-entry span,
.theme-mindlayer .my-universal-entry b {
  color: #d9bbff;
}

.theme-mindlayer .my-universal-entry strong {
  color: #f8f4ff;
}

.theme-mindlayer #privacyStatusBadge {
  background: rgba(166, 108, 255, 0.2);
  border: 1px solid rgba(200, 159, 255, 0.3);
  color: #eadcff;
}

.theme-mindlayer #privacyStatusBadge[data-status="pending"] {
  background: rgba(243, 199, 107, 0.16);
  border-color: rgba(243, 199, 107, 0.34);
  color: #ffe7a6;
}

.theme-mindlayer .share-type-art-box > .public-personality-identity {
  background: rgba(13, 8, 34, 0.66);
  border-color: rgba(200, 159, 255, 0.34);
  color: #f8f4ff;
}

.theme-mindlayer .share-type-art-box > .public-personality-identity > div > span {
  color: #d9bbff;
}

.theme-mindlayer .share-type-art-box > .public-personality-identity strong {
  color: #f8f4ff;
}

.theme-mindlayer .share-type-art-box > .public-personality-identity > .public-personality-avatar-fallback {
  background: #68409c;
  color: #fff;
}

.theme-mindlayer #resultView .one-shot-package.recommended > span {
  color: #5a1fa8 !important;
  -webkit-text-fill-color: currentColor;
}

.theme-mindlayer #resultView .one-shot-package.recommended > span s {
  color: #4f3b63 !important;
  -webkit-text-fill-color: currentColor;
  opacity: 0.72;
}

.theme-mindlayer .one-shot-benefit-grid i {
  background: #68409c;
  color: #fff;
}

.theme-mindlayer .one-shot-benefit-grid span.muted {
  color: rgba(245, 240, 255, 0.64);
}

.theme-mindlayer .one-shot-package b {
  background: #b42318;
  color: #fff;
}

.theme-mindlayer .one-shot-preview p {
  color: #6c4a78;
}

.theme-mindlayer .one-shot-safe-note {
  color: #8ee7bc;
}

.theme-mindlayer .locked-pdf-button:disabled {
  background: #2a1d52 !important;
  border-color: rgba(200, 159, 255, 0.36) !important;
  color: #e8d8ff !important;
  opacity: 1 !important;
}

.theme-mindlayer .gender-card-grid button::after {
  background: linear-gradient(135deg, #6536a8, #705019);
}

.theme-mindlayer .hot-badge {
  background: #2f684e;
  color: #fff;
}
