/* ========== 骂骂乐 · 全局样式 · 心理学配色版 ========== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* 基础色板 */
  --bg: #050508;
  --bg-subtle: #0a0a10;
  --text: #e2e2e8;
  --text-dim: #8888a0;
  --text-hint: #4a4a60;

  /* 情绪色 */
  --accent: #e63946;        /* 警告红 · 审视/评判 */
  --accent-soft: #ff6b7a;   /* 柔红 · 选中态 */
  --accent-glow: rgba(230, 57, 70, 0.08); /* 红色呼吸光 */
  --cold-purple: #2a1a3e;   /* 冷紫 · 孤独/疏离 */
  --cold-blue: #141828;     /* 深蓝 · 沉默/审判 */
  --warm-orange: #c87941;   /* 暖橙 · 治愈/安全 */
  --warm-gold: #d4a843;     /* 金色 · 价值感 */
  --warm-glow: rgba(200, 121, 65, 0.06); /* 橙色暖光 */
  --heal-bg: #1a1008;       /* 治愈背景 · 暗暖 */

  /* 功能色 */
  --green: #4caf50;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  /* 字体 */
  --font-main: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Courier New", monospace;

  /* 安全区域 */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
  /* 微弱的径向暗光——营造"被注视"的感觉 */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(230, 57, 70, 0.03) 0%, transparent 60%),
    var(--bg);
  transition: background 2s ease;
}

/* 情绪阶段背景变化（通过 JS 切换 class） */
#app.mood-opening {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    var(--bg);
}

#app.mood-profiling {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(230, 57, 70, 0.04) 0%, transparent 50%),
    var(--bg);
}

#app.mood-simulation {
  background:
    radial-gradient(ellipse at 30% 80%, rgba(42, 26, 62, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(20, 24, 40, 0.2) 0%, transparent 50%),
    var(--bg);
}

#app.mood-judgment {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(20, 24, 40, 0.3) 0%, transparent 60%),
    var(--bg);
}

#app.mood-report {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(230, 57, 70, 0.05) 0%, transparent 50%),
    var(--cold-blue);
}

#app.mood-reversal {
  background:
    radial-gradient(ellipse at 50% 60%, rgba(200, 121, 65, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--heal-bg) 100%);
}

#app.mood-settlement {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(212, 168, 67, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--heal-bg) 0%, #12100a 100%);
}

/* ========== 场景容器 ========== */

.scene {
  min-height: 100vh;
  padding: 60px 24px 120px;
  padding-top: calc(60px + var(--safe-top));
  padding-bottom: calc(120px + var(--safe-bottom));
  padding-left: calc(24px + var(--safe-left));
  padding-right: calc(24px + var(--safe-right));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  transition: opacity 0.6s ease;
  max-width: 640px;
  margin: 0 auto;
}

.scene.active {
  opacity: 1;
}

.scene.fade-out {
  opacity: 0;
}

/* ========== 打字机文本 ========== */

.text-line {
  margin-bottom: 14px;
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  word-break: break-word;
}

.text-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-line.dim {
  color: var(--text-dim);
  font-size: 15px;
}

.text-line.hint {
  color: var(--text-hint);
  font-size: 14px;
  font-style: italic;
}

.text-line .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 0.8s infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 标签前缀 · 暗红色营造"系统在说话"的权威感 */
.text-line .tag {
  color: var(--text-hint);
  margin-right: 4px;
  letter-spacing: 0.5px;
}

/* ========== 大标题 ========== */

.title-big {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 40px 0 12px;
  letter-spacing: 3px;
  color: var(--text);
}

.title-sub {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

/* ========== 选项按钮 ========== */
/* 心理学：按钮面积足够大(≥48px)降低决策压力，
   暗色调让用户觉得"这不重要"从而更诚实 */

.choices-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.choices-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.choice-btn {
  display: block;
  width: 100%;
  padding: 15px 20px;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-main);
  line-height: 1.6;
  /* 防止iOS字体缩放 */
  -webkit-text-size-adjust: 100%;
}

.choice-btn:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: scale(0.98);
}

.choice-btn.selected {
  background: rgba(230, 57, 70, 0.12);
  border-color: var(--accent);
  color: var(--accent-soft);
  /* 选中后微弱脉冲光——强化"已锁定"感 */
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.08);
}

.choice-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ========== 输入框 ========== */

.input-container {
  margin: 20px 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.input-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-input {
  width: 100%;
  padding: 15px 20px;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px; /* ≥16px 防止iOS自动缩放 */
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-text-size-adjust: 100%;
}

.text-input:focus {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}

.text-input::placeholder {
  color: var(--text-hint);
}

.input-submit {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.input-submit:active {
  background: rgba(255, 255, 255, 0.12);
}

/* ========== 骰子 ========== */
/* 心理学：骰子用红色光晕营造"命运审判"的仪式感 */

.dice-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 28px 0;
  height: 100px;
}

.dice {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  transition: transform 0.1s ease;
}

.dice.rolling {
  animation: diceShake 0.12s infinite;
}

@keyframes diceShake {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.05); }
  50% { transform: rotate(8deg) scale(0.95); }
  75% { transform: rotate(-5deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(1); }
}

.dice.result {
  animation: diceReveal 0.4s ease forwards;
  border-color: var(--accent);
  background: rgba(230, 57, 70, 0.08);
  box-shadow: 0 0 30px rgba(230, 57, 70, 0.15);
}

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

/* ========== 进度条 ========== */

.progress-container {
  margin: 32px 0;
  text-align: center;
}

.progress-text {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-soft) 100%);
  border-radius: 2px;
  width: 0%;
  transition: width 0.8s ease;
}

.progress-percent {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 8px;
  font-family: var(--font-mono);
}

/* ========== 假崩溃弹窗 ========== */
/* 心理学：纯黑遮罩+突然出现 → 惊吓反应 → 真实感 */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.96);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

.crash-dialog {
  width: 88%;
  max-width: 340px;
  background: #111114;
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  /* 红色微光——暗示"出错了" */
  box-shadow: 0 0 60px rgba(230, 57, 70, 0.06);
}

.crash-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.crash-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.crash-code {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.crash-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ========== 假退出弹窗 ========== */

.exit-dialog {
  width: 88%;
  max-width: 340px;
  background: #111114;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}

.exit-dialog .exit-text {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.7;
}

.exit-buttons {
  display: flex;
  gap: 12px;
}

.exit-btn {
  flex: 1;
  padding: 14px;
  min-height: 48px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
  transition: all 0.15s ease;
}

.exit-btn.continue {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.exit-btn.quit {
  background: rgba(230, 57, 70, 0.12);
  color: var(--accent-soft);
  border: 1px solid rgba(230, 57, 70, 0.25);
  position: relative;
}

.exit-btn:active {
  transform: scale(0.96);
}

/* ========== 报告卡 ========== */
/* 心理学：报告卡用更密的信息布局制造"被透视"的感觉 */

.report-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px 20px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.8;
}

.report-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
}

.report-header .report-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.report-header .report-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
}

.report-header .report-id {
  font-size: 11px;
  color: var(--text-hint);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.report-header .report-portrait {
  font-size: 17px;
  color: var(--accent);
  margin-top: 12px;
  margin-bottom: 12px;
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,0.03);
}

.report-header .report-verdict {
  font-size: 14px;
  color: var(--accent);
  margin-top: 8px;
  letter-spacing: 1px;
}

.report-section {
  margin-bottom: 20px;
}

.report-label {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.report-value {
  font-size: 15px;
  color: var(--text);
}

.report-translate {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.04);
}

/* 进度条（报告卡内） */
.report-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 13px;
}

.report-bar-label {
  width: 80px;
  color: var(--text-dim);
  flex-shrink: 0;
  font-size: 12px;
}

.report-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 2px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-hint);
  letter-spacing: -1px;
}

.report-bar-fill {
  display: inline-block;
  color: var(--accent-soft);
}

.report-bar-empty {
  display: inline-block;
  color: rgba(255, 255, 255, 0.1);
}

.report-bar-value {
  width: 36px;
  text-align: right;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  flex-shrink: 0;
}

/* 成就 */
.report-achievement {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.7;
}

.report-achievement .badge {
  margin-right: 4px;
}

.report-achievement .name {
  color: var(--text);
}

.report-achievement .desc {
  color: var(--text-dim);
  margin-left: 4px;
}

/* 分隔线 */
.report-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin: 18px 0;
}

/* 大数据 */
.report-bigdata {
  text-align: center;
  margin: 20px 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 2.2;
}

.report-bigdata .highlight {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ========== 结算页按钮 ========== */

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 32px 0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  min-height: 56px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.action-btn:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.98);
}

.action-btn .icon {
  font-size: 22px;
  flex-shrink: 0;
}

.action-btn .label {
  flex: 1;
}

.action-btn .price {
  font-size: 13px;
  color: var(--accent-soft);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* ========== 250认证系统 ========== */

.cert-250-btn {
  border-color: var(--warm-gold, #d4a843) !important;
  background: rgba(212, 168, 67, 0.08) !important;
  margin-top: 8px;
}
.cert-250-btn .cert-price {
  color: var(--warm-gold, #d4a843) !important;
  font-weight: 700;
  font-size: 16px !important;
}

.cert-250-tag {
  text-align: center;
  color: var(--warm-gold, #d4a843);
  font-size: 13px;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 8px;
  background: rgba(212, 168, 67, 0.06);
}

.report-cert-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d4a843, #f0d060);
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

/* 250购买弹窗 */
.dialog-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.dialog-250 {
  background: var(--bg-subtle);
  border: 1px solid var(--warm-gold, #d4a843);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.dialog-250 .dialog-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.dialog-250 .dialog-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--warm-gold, #d4a843);
  margin-bottom: 4px;
}

.dialog-250 .dialog-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.dialog-250 .dialog-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: left;
}

.dialog-250 .dialog-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ========== 灵魂档案预览入口 ========== */

.soul-teaser {
  background: rgba(230, 57, 70, 0.04);
  border: 1px solid rgba(230, 57, 70, 0.15);
  border-radius: 16px;
  padding: 24px 20px;
  margin: 20px 0;
}

.soul-teaser-header {
  text-align: center;
  margin-bottom: 16px;
}

.soul-teaser-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.soul-teaser-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}

.soul-teaser-chapters {
  margin-bottom: 16px;
}

.soul-chapter {
  padding: 10px 12px;
  margin: 6px 0;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.soul-chapter.unlocked {
  background: rgba(76, 175, 80, 0.08);
  color: var(--text);
  border: 1px solid rgba(76, 175, 80, 0.15);
}

.soul-chapter.locked {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.soul-view-btn {
  background: rgba(76, 175, 80, 0.12) !important;
  border-color: rgba(76, 175, 80, 0.3) !important;
  color: #4caf50 !important;
  font-weight: 700 !important;
  text-align: center !important;
  margin-top: 8px;
}

.soul-buy-btn {
  background: rgba(230, 57, 70, 0.08) !important;
  border-color: rgba(230, 57, 70, 0.25) !important;
  text-align: center !important;
  margin-top: 8px;
}

/* ========== 灵魂档案完整页面 ========== */

.soul-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 28px 20px;
  margin-bottom: 16px;
}

.soul-section-label {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(230, 57, 70, 0.15);
}

/* 隐藏人格揭示 */
.soul-type-reveal {
  text-align: center;
  padding: 24px 0;
}

.soul-type-emoji {
  font-size: 56px;
  margin-bottom: 12px;
  animation: soulReveal 0.8s ease forwards;
}

@keyframes soulReveal {
  0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.soul-type-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.soul-type-rarity {
  font-size: 12px;
  color: var(--text-hint);
  font-family: var(--font-mono);
}

.soul-type-desc {
  font-size: 15px;
  color: var(--text);
  line-height: 2;
  margin: 16px 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

.soul-traits-title {
  font-size: 13px;
  color: var(--text-dim);
  margin: 16px 0 8px;
}

.soul-trait-item {
  font-size: 14px;
  color: var(--text);
  line-height: 2;
  padding-left: 4px;
}

/* 五维雷达 */
.soul-radar {
  padding: 8px 0;
}

.soul-radar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.soul-radar-label {
  width: 72px;
  font-size: 13px;
  color: var(--text);
  flex-shrink: 0;
  font-weight: 600;
}

.soul-radar-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.soul-radar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-soft) 100%);
  border-radius: 4px;
  transition: width 1s ease;
}

.soul-radar-val {
  width: 36px;
  text-align: right;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.soul-radar-desc {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 14px;
  padding-left: 82px;
}

.soul-radar-summary {
  text-align: center;
  font-size: 14px;
  color: var(--accent-soft);
  margin-top: 16px;
  padding: 12px;
  background: rgba(230, 57, 70, 0.06);
  border-radius: 10px;
  line-height: 1.8;
}

/* 灵魂处方 */
.soul-rx-header {
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.soul-rx-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.soul-rx-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.soul-rx-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  flex-shrink: 0;
  padding-top: 2px;
}

.soul-rx-content {
  flex: 1;
}

.soul-rx-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 6px;
}

.soul-rx-meta {
  font-size: 12px;
  color: var(--text-hint);
}

/* ========== 从众计数器 ========== */

.roast-counter {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

/* 全屏居中的英雄态 */
.roast-counter-hero {
  padding: 48px 20px;
  margin-top: calc(35vh - 60px);
  margin-bottom: auto;
  border-color: rgba(230, 57, 70, 0.15);
  background: rgba(230, 57, 70, 0.03);
}

.roast-counter-hero .roast-counter-num {
  font-size: 48px;
  display: block;
  margin-bottom: 6px;
  letter-spacing: 3px;
}

.roast-counter-hero .roast-counter-today {
  font-size: 14px;
  margin-top: 10px;
}

/* 缩小到顶部的常驻态 */
.roast-counter-mini {
  padding: 12px 16px;
  margin: 0 0 20px;
  opacity: 1 !important;
}

.roast-counter-mini .roast-counter-num {
  font-size: 20px;
  display: inline;
}

.roast-counter-mini .roast-counter-today {
  font-size: 11px;
  margin-top: 2px;
}

.roast-counter-num {
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

.roast-counter-today {
  color: var(--text-hint);
  display: block;
}

/* ========== 骂朋友横幅 ========== */

.roast-friend-banner {
  text-align: center;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-soft);
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: 12px;
  line-height: 1.6;
}

/* ========== 骂龄统计卡 ========== */

.roast-stats-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.roast-stats-title {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.roast-stats-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 12px;
}

.roast-stats-item {
  text-align: center;
  flex: 1;
}

.roast-stats-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1.3;
}

.roast-stats-label {
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 4px;
}

.roast-stats-beat {
  text-align: center;
  font-size: 13px;
  color: var(--warm-gold);
  padding: 8px;
  background: rgba(212, 168, 67, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 67, 0.15);
}

/* ========== 损失厌恶：灵魂档案预览遮罩 ========== */

.soul-chapter-tease {
  background: rgba(230, 57, 70, 0.08) !important;
  border-color: rgba(230, 57, 70, 0.2) !important;
  color: var(--accent-soft) !important;
  cursor: pointer;
  position: relative;
}

.soul-blur-hint {
  font-size: 11px;
  color: var(--text-hint);
  margin-left: 4px;
  animation: breathe 2s ease-in-out infinite;
}

/* ========== 分享卡（离屏渲染截图用） ========== */

.share-card {
  width: 360px;
  padding: 32px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #e2e2e8;
  line-height: 1.7;
}

.share-free {
  background: #050508;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.share-premium {
  background: linear-gradient(180deg, #0f0d15 0%, #0a0a10 40%, #0f0d15 100%);
  border: 2px solid #d4a843;
  border-radius: 16px;
  box-shadow: inset 0 0 40px rgba(212, 168, 67, 0.05);
}

.share-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.share-premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d4a843, #f0d060);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.share-cert {
  font-size: 12px;
  color: #d4a843;
  margin-bottom: 6px;
}

.share-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #e2e2e8;
}

.share-id {
  font-size: 11px;
  color: #4a4a60;
  font-family: "SF Mono", "Menlo", monospace;
  margin-top: 4px;
}

.share-portrait {
  font-size: 16px;
  color: #e63946;
  font-weight: 700;
  line-height: 1.7;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: rgba(230, 57, 70, 0.06);
  border-left: 3px solid #e63946;
  border-radius: 0 8px 8px 0;
}

.share-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.share-name {
  color: #e2e2e8;
  font-weight: 600;
}

.share-verdict {
  color: #e63946;
  font-size: 13px;
}

.share-value {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #e63946;
  font-family: "SF Mono", "Menlo", monospace;
  letter-spacing: 2px;
  margin: 16px 0;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.share-soul-type {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #d4a843;
  margin: 12px 0;
  padding: 8px;
  background: rgba(212, 168, 67, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 67, 0.2);
}

.share-quote {
  text-align: center;
  font-size: 13px;
  color: #8888a0;
  font-style: italic;
  line-height: 1.8;
  margin: 12px 0;
  padding: 0 8px;
}

.share-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #4a4a60;
  font-size: 12px;
  line-height: 1.8;
}

/* ========== 动画工具类 ========== */

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 呼吸灯效果——暗示"系统是活的" */
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.breathing {
  animation: breathe 3s ease-in-out infinite;
}

/* ========== 滚动条 ========== */

#app::-webkit-scrollbar {
  display: none;
}

#app {
  scrollbar-width: none;
}

/* ========== 手机适配 ========== */

/* 小屏手机 (iPhone SE, 320px) */
@media screen and (max-width: 360px) {
  .scene {
    padding-left: calc(18px + var(--safe-left));
    padding-right: calc(18px + var(--safe-right));
  }

  .title-big {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .text-line {
    font-size: 14px;
  }

  .choice-btn {
    padding: 13px 16px;
    font-size: 14px;
  }

  .report-card {
    padding: 24px 16px;
  }
}

/* 中等屏幕 (375-414px, 主流 iPhone/Android) */
@media screen and (min-width: 361px) and (max-width: 430px) {
  .scene {
    padding-left: calc(22px + var(--safe-left));
    padding-right: calc(22px + var(--safe-right));
  }
}

/* 大屏手机 / 小平板 (430px+) */
@media screen and (min-width: 431px) and (max-width: 768px) {
  .scene {
    padding-left: calc(28px + var(--safe-left));
    padding-right: calc(28px + var(--safe-right));
  }

  .text-line {
    font-size: 16px;
  }
}

/* 平板和桌面 */
@media screen and (min-width: 769px) {
  .scene {
    max-width: 580px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .text-line {
    font-size: 16px;
  }

  .choice-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
  }

  .action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
  }
}

/* 横屏手机 */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .scene {
    padding-top: calc(20px + var(--safe-top));
    padding-bottom: calc(60px + var(--safe-bottom));
    min-height: auto;
  }

  .title-big {
    margin: 20px 0 8px;
    font-size: 18px;
  }

  .dice-container {
    height: 80px;
    margin: 16px 0;
  }

  .dice {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }
}

/* 暗色模式强制（防止系统亮色模式干扰） */
@media (prefers-color-scheme: light) {
  html, body {
    background: var(--bg);
    color: var(--text);
    color-scheme: dark;
  }
}

/* 减少动画（无障碍） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================
   启动屏 — 首页两个/三个大按钮
   ======================== */
.start-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 24px) 24px env(safe-area-inset-bottom, 24px);
  text-align: center;
  gap: 28px;
}

.start-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.start-logo {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #ff5a32 0%, #ffb649 60%, #ff5a32 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.start-tagline {
  font-size: 13px;
  color: var(--text-dim, #a8a8b8);
  letter-spacing: 0.1em;
}

.start-counter {
  font-size: 13px;
  color: var(--text-hint, #6b6b7a);
}

.start-counter-num {
  color: var(--accent, #ff5a32);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.start-actions {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.start-btn {
  font-family: inherit;
  font-size: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s, opacity 0.2s, background 0.2s;
}

.start-btn.primary {
  background: linear-gradient(135deg, #ff5a32, #ff7a3a);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 90, 50, 0.35);
}

.start-btn.primary:active {
  transform: scale(0.97);
}

.start-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #ddd);
  border-color: rgba(255, 255, 255, 0.14);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 20px;
}

.start-btn.secondary:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.97);
}

.start-footer {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-hint, #6b6b7a);
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.start-footer a {
  color: var(--text-dim, #a8a8b8);
  text-decoration: none;
}

.start-footer a:active {
  opacity: 0.6;
}

/* ========================
   打字机「跳过」按钮 — 右下角浮动
   ======================== */
.typewriter-skip-btn {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  right: 18px;
  background: rgba(255, 90, 50, 0.92);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 999px;
  z-index: 60;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  letter-spacing: 0.05em;
  font-weight: 600;
  transition: transform 0.1s, opacity 0.2s;
}

.typewriter-skip-btn:active {
  transform: scale(0.94);
  opacity: 0.85;
}

@media (max-width: 360px) {
  .start-logo { font-size: 48px; }
  .start-btn { font-size: 15px; padding: 14px 18px; }
  .typewriter-skip-btn { font-size: 12px; padding: 8px 14px; }
}
