/* ================================================
   TPT 关系卡点测试 · 静态网站样式
   从微信小程序 Less 迁移而来
   rpx → px (÷2), Less 嵌套 → 扁平 CSS
   ================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: #0e0d1a;
  height: 100%;
}

body {
  background: #0e0d1a;
  color: #f0eef8;
  font-family: 'STKaiti', 'STSong', 'Songti SC', 'SimSun', 'Noto Serif SC', serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  overflow-x: hidden;
}

/* CSS Variables */
:root {
  --bg: #0e0d1a;
  --bg-deep: #08070f;
  --bg-card: #17152a;
  --bg-card-alt: #1e1b35;
  --bg-elevated: #231f3d;
  --text-primary: #f0eef8;
  --text-secondary: #cdc8e8;
  --text-muted: #8b85b0;
  --text-light: #656085;
  --border: #2e2a50;
  --border-light: #3a3560;
  --accent: #8b5cf6;
  --accent-soft: #a78bfa;
  --accent-dim: rgba(139, 92, 246, 0.25);
  --accent-glow: rgba(139, 92, 246, 0.12);
  --gold: #c9a84c;
  --gold-soft: #e8c96a;
}

button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }

/* ── Page Router ── */
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.page {
  display: none;
  animation: fadeIn 0.35s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Common ── */
.card {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 20px;
  border: 1px solid var(--border);
}

.ornament {
  text-align: center;
  color: #3a3560;
  font-size: 14px;
  letter-spacing: 0.5em;
  margin: 24px 0;
}

/* ================================================
   INDEX PAGE · 封面
   ================================================ */
.cover {
  min-height: 100vh;
  background: #0e0d1a;
  padding: 40px 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.cover::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(100, 60, 200, 0.35) 0%, rgba(80, 40, 160, 0.15) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.cover-top {
  text-align: center;
  padding-top: 20px;
  position: relative;
  z-index: 1;
}

.cover-logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  letter-spacing: 0.4em;
  color: #8b85b0;
  margin-bottom: 8px;
}

.cover-sub {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 13px;
  color: #5c5880;
  letter-spacing: 0.15em;
}

.cover-main {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 0 60px;
  position: relative;
  z-index: 1;
}

.cover-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 56px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 12px;
  color: #f0eef8;
}

.cover-cn-title {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 22px;
  font-weight: 400;
  color: #cdc8e8;
  letter-spacing: 0.3em;
  margin-bottom: 36px;
}

.cover-tagline {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 15px;
  line-height: 2.2;
  color: #9c96c0;
  margin: 0 auto 8px;
  white-space: pre-line;
}

.tagline-em {
  font-family: Georgia, serif;
  font-style: italic;
  color: #a78bfa;
}

.cover-meta {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: #6b6490;
  letter-spacing: 0.15em;
}

.cover-bottom {
  text-align: center;
  margin-top: -40px;
  position: relative;
  z-index: 1;
}

.start-btn {
  display: block;
  width: 100%;
  background: #5b21b6;
  color: #fff;
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 15px;
  letter-spacing: 0.35em;
  border: none;
  border-radius: 4px;
  padding: 18px 0;
  margin-bottom: 20px;
  line-height: 1;
  transition: background 0.2s;
}

.start-btn:active {
  background: #4c1d95;
}

.cover-hint {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 12px;
  color: #5c5880;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.cover-disclaimer {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 10px;
  color: #3d3a58;
  letter-spacing: 0.05em;
  line-height: 1.8;
  text-align: center;
  padding: 0 8px 20px;
}

/* ================================================
   QUIZ PAGE · 答题
   ================================================ */
.quiz-page {
  min-height: 100vh;
  background: #0e0d1a;
  display: flex;
  flex-direction: column;
}

.progress-bar-track {
  height: 2px;
  background: #2e2a50;
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #8b5cf6;
  border-radius: 2px;
  transition: width 0.35s ease;
  min-width: 0;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 30px 20px;
  border-bottom: 1px solid #2e2a50;
}

.quiz-section {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 13px;
  color: #8b85b0;
  letter-spacing: 0.15em;
}

.quiz-progress {
  font-family: Georgia, serif;
  font-size: 12px;
  color: #6b6490;
  letter-spacing: 0.2em;
}

.quiz-body {
  flex: 1;
  padding: 30px 30px 20px;
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.question-num {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: #5c5880;
  letter-spacing: 0.2em;
}

.question-text {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 18px;
  color: #f0eef8;
  line-height: 1.85;
  letter-spacing: 0.05em;
  margin-bottom: 28px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #2e2a50;
  border-radius: 5px;
  background: #17152a;
  transition: all 0.2s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.option:active {
  transform: scale(0.98);
}

.option.selected {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
}

.option-letter {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #3a3560;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 13px;
  color: #6b6490;
  line-height: 1;
  transition: all 0.2s;
}

.option.selected .option-letter {
  border-color: #8b5cf6;
  background: #8b5cf6;
  color: #fff;
}

.option-text {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 15px;
  color: #cdc8e8;
  line-height: 1.7;
  letter-spacing: 0.03em;
  flex: 1;
  transition: color 0.2s;
}

.option.selected .option-text {
  color: #f0eef8;
}

.quiz-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px 30px;
  border-top: 1px solid #2e2a50;
}

.nav-btn {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 12px;
  color: #8b85b0;
  letter-spacing: 0.1em;
  padding: 8px 0;
  min-width: 80px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: color 0.15s;
}

.nav-btn:active {
  color: #a78bfa;
}

.nav-btn-hidden {
  visibility: hidden;
}

.nav-btn-dim {
  color: #3a3560;
  pointer-events: none;
}

.quiz-logo {
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: #3a3560;
}

/* ================================================
   RESULT PAGE · 结果
   ================================================ */

/* 加载态 */
.loading-page {
  min-height: 100vh;
  background: #0e0d1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.loading-logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  letter-spacing: 0.4em;
  color: #8b85b0;
}

.loading-text {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 16px;
  color: #cdc8e8;
  text-align: center;
  line-height: 2;
  letter-spacing: 0.1em;
  white-space: pre-line;
}

.loading-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8b5cf6;
  animation: pulse 1.4s infinite ease-in-out;
}

.dot2 { animation-delay: 0.2s; }
.dot3 { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* 结果主体 */
.result-page {
  min-height: 100vh;
  background: #0e0d1a;
}

.result-header {
  text-align: center;
  padding: 48px 30px 28px;
  background: #0e0d1a;
  position: relative;
  overflow: hidden;
}

.result-header::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  height: 250px;
  background: radial-gradient(ellipse at center, rgba(100, 60, 200, 0.3) 0%, rgba(80, 40, 160, 0.1) 50%, transparent 75%);
  pointer-events: none;
}

.result-logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  letter-spacing: 0.4em;
  color: #8b85b0;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.result-sub {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 12px;
  color: #5c5880;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}

/* 人格卡 */
.persona-card {
  background: #17152a;
  padding: 32px 36px;
  border-top: 1px solid #2e2a50;
  border-bottom: 1px solid #2e2a50;
  text-align: center;
}

.persona-type-label {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: #5c5880;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}

.persona-code {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: #a78bfa;
  line-height: 1.1;
  margin-bottom: 8px;
}

.persona-type {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 15px;
  color: #cdc8e8;
  letter-spacing: 0.25em;
  margin-bottom: 20px;
}

.persona-tagline {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 15px;
  color: #f0eef8;
  line-height: 1.9;
  letter-spacing: 0.05em;
  margin-bottom: 28px;
  text-align: left;
  padding: 16px 18px;
  background: rgba(139, 92, 246, 0.08);
  border-left: 2px solid #8b5cf6;
  border-radius: 0 4px 4px 0;
}

.persona-imgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 0;
}

.persona-img {
  width: 100%;
  display: block;
  border-radius: 6px;
  overflow: hidden;
}

.section-title {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 13px;
  color: #8b85b0;
  letter-spacing: 0.3em;
  text-align: left;
  margin-bottom: 14px;
}

.persona-para {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 14.5px;
  color: #cdc8e8;
  line-height: 2;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-align: left;
  white-space: pre-wrap;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-start;
}

.tag {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 12px;
  color: #a78bfa;
  padding: 5px 12px;
  border: 1px solid #3a3560;
  border-radius: 20px;
  letter-spacing: 0.1em;
  background: rgba(139, 92, 246, 0.08);
}

/* 卡点 */
.stuck-section {
  padding: 32px 36px;
  background: #0e0d1a;
}

.stuck-text {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 14.5px;
  color: #cdc8e8;
  line-height: 2;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.essence-text {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 14px;
  color: #a78bfa;
  line-height: 1.9;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  background: rgba(139, 92, 246, 0.08);
  border-radius: 4px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* 如何改变 */
.change-section {
  padding: 32px 36px;
  background: #17152a;
  border-top: 1px solid #2e2a50;
  border-bottom: 1px solid #2e2a50;
}

.change-text {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 15px;
  color: #f0eef8;
  line-height: 2;
  letter-spacing: 0.05em;
}

/* 如果你现在 */
.callout-section {
  padding: 32px 36px;
  background: #17152a;
  border-top: 1px solid #2e2a50;
  border-bottom: 1px solid #2e2a50;
}

.callout-label {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 13px;
  color: #8b85b0;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.callout-question {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 16px;
  color: #f0eef8;
  line-height: 1.8;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.callout-intro {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 13px;
  color: #8b85b0;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.callout-item {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 14px;
  color: #cdc8e8;
  line-height: 2.2;
  letter-spacing: 0.05em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.callout-dot {
  color: #8b5cf6;
  font-size: 16px;
  flex-shrink: 0;
}

.callout-wechat {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 16px 18px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 8px;
}

.callout-wechat-text {
  flex: 1;
}

.callout-wechat-title {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 14px;
  color: #f0eef8;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.callout-wechat-desc {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 12px;
  color: #8b85b0;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

.callout-wechat-qr {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

/* 得分分布 */
.scores-section {
  padding: 32px 36px;
  background: #0e0d1a;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  opacity: 0.6;
}

.score-row.score-winner {
  opacity: 1;
}

.score-label {
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 12px;
  color: #8b85b0;
  width: 120px;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.score-row.score-winner .score-label {
  color: #a78bfa;
}

.score-bar-wrap {
  flex: 1;
  height: 4px;
  background: #2e2a50;
  border-radius: 2px;
  overflow: hidden;
}

.score-bar {
  height: 100%;
  background: #3a3560;
  border-radius: 2px;
  min-width: 0;
  transition: width 0.5s ease;
}

.score-row.score-winner .score-bar {
  background: #8b5cf6;
}

.score-num {
  font-family: Georgia, serif;
  font-size: 12px;
  color: #5c5880;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.score-row.score-winner .score-num {
  color: #a78bfa;
}

/* 重新测试 */
.retry-section {
  padding: 32px 36px 50px;
  background: #17152a;
  border-top: 1px solid #2e2a50;
  text-align: center;
}

.retry-btn {
  display: block;
  width: 100%;
  background: transparent;
  color: #8b85b0;
  font-family: 'STKaiti', 'STSong', serif;
  font-size: 14px;
  letter-spacing: 0.3em;
  border: 1px solid #3a3560;
  border-radius: 4px;
  padding: 18px 0;
  margin-bottom: 14px;
  line-height: 1;
  transition: all 0.2s;
}

.retry-btn:active {
  background: rgba(139, 92, 246, 0.08);
  border-color: #8b5cf6;
  color: #a78bfa;
}

.retry-hint {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 11px;
  color: #5c5880;
  letter-spacing: 0.1em;
}

/* ================================================
   Desktop enhancement
   ================================================ */
@media (min-width: 431px) {
  #app {
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.08);
  }
}
