/* ============================================
   人生预测纪录片系统 v3.0 — 样式系统
   深色电影感主题
   ============================================ */

:root {
  --bg-deep: #0a0a0f;
  --bg-dark: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a80;
  --accent-gold: #d4a943;
  --accent-gold-bright: #f0c050;
  --accent-purple: #8b6dcf;
  --accent-blue: #5b8def;
  --accent-teal: #4dd4c8;
  --accent-pink: #e87da8;
  --accent-green: #5dd49a;
  --accent-red: #ef6b6b;
  --accent-orange: #f0934a;
  --shadow-glow: 0 0 40px rgba(212, 169, 67, 0.15);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Georgia", "Songti SC", "SimSun", serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 星空背景 */
.starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(139, 109, 207, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(91, 141, 239, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(212, 169, 67, 0.04) 0%, transparent 60%),
    var(--bg-deep);
}

.starfield::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    radial-gradient(1px 1px at 25% 15%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 75% 35%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 10% 65%, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 60% 50%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 85% 10%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 35% 90%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 95% 55%, rgba(255,255,255,0.15), transparent);
  background-size: 300px 300px;
  animation: drift 120s linear infinite;
  opacity: 0.6;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-300px, -300px); }
}

/* 通用容器 */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================
   Hero 区域
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 1s 0.2s forwards;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e8e8f0 0%, #d4a943 50%, #8b6dcf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInUp 1s 0.4s forwards;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInUp 1s 0.6s forwards;
}

.hero-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 1s 0.8s forwards;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 1s 1s forwards;
}

.btn {
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-bright) 100%);
  color: #1a1a2e;
  box-shadow: 0 4px 20px rgba(212, 169, 67, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(212, 169, 67, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

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

/* 滚动指示器 */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   Section 通用
   ============================================ */
.section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #e8e8f0 0%, #d4a943 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   七大模块卡片
   ============================================ */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent-gold);
  opacity: 0;
  transition: var(--transition);
}

.module-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.module-card:hover::before {
  opacity: 1;
}

.module-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.module-num {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
}

.module-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.module-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   十铁律
   ============================================ */
.rules-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.rule-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.rule-item:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
}

.rule-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-gold);
  flex-shrink: 0;
  min-width: 32px;
}

.rule-content h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.rule-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================
   交互式体验区域
   ============================================ */
.experience {
  min-height: 100vh;
  padding: 60px 0;
}

.experience-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* 进度条 */
.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
}

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

.progress-label {
  display: flex;
  justify-content: space-between;
  padding: 16px 28px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 步骤容器 */
.step {
  padding: 32px 28px 40px;
  display: none;
  animation: fadeIn 0.5s ease;
}

.step.active {
  display: block;
}

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

.step-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

/* 选项卡片 */
.option-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 14px;
}

.option-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.option-card.selected {
  background: rgba(212, 169, 67, 0.1);
  border-color: var(--accent-gold);
}

.option-radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}

.option-card.selected .option-radio {
  border-color: var(--accent-gold);
}

.option-card.selected .option-radio::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
}

.option-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  flex: 1;
}

/* 多选 checkbox */
.option-checkbox {
  width: 20px; height: 20px;
  border-radius: 4px;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}

.option-card.selected .option-checkbox {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
}

.option-card.selected .option-checkbox::after {
  content: '✓';
  position: absolute;
  top: -2px; left: 1px;
  color: #1a1a2e;
  font-size: 14px;
  font-weight: 700;
}

/* 成功维度选择卡片 */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.dimension-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
}

.dimension-card:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.dimension-card.selected {
  border-color: var(--dim-color, var(--accent-gold));
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

.dimension-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 12px;
  color: var(--dim-color, var(--accent-gold));
  font-weight: 700;
}

.dimension-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.dimension-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.dimension-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dimension-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.dimension-hint .count {
  color: var(--accent-gold);
  font-weight: 600;
}

/* 输入框 */
.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-field, .select-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.input-field:focus, .select-field:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.06);
}

.select-field {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a0a0b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.select-field option {
  background: var(--bg-dark);
  color: var(--text-primary);
}

/* 价值观声明 */
.values-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
}

.values-box h4 {
  font-size: 1rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.values-box.believes h4 { color: var(--accent-green); }
.values-box.notBelieves h4 { color: var(--accent-red); }

.values-list {
  list-style: none;
}

.values-list li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.values-list li::before {
  flex-shrink: 0;
}

.values-box.believes .values-list li::before { content: '✓'; color: var(--accent-green); }
.values-box.notBelieves .values-list li::before { content: '✗'; color: var(--accent-red); }

/* 按钮行 */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

.btn-row.center {
  justify-content: center;
}

/* ============================================
   人生推演章节
   ============================================ */
.chapter-header {
  text-align: center;
  margin-bottom: 32px;
}

.chapter-age {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.chapter-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.chapter-subtitle {
  color: var(--text-secondary);
  font-style: italic;
  font-family: var(--font-serif);
}

/* 叙事段落 */
.narrative {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--accent-purple);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-family: var(--font-serif);
}

.narrative.protected {
  border-left-color: var(--accent-orange);
}

.narrative.protected::after {
  content: '这不是你的错，这只是概率。';
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--accent-orange);
  font-style: italic;
}

/* 选择题 */
.choice-prompt {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding: 14px 18px;
  background: rgba(212, 169, 67, 0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-gold);
}

/* ============================================
   结局页面
   ============================================ */
.outcome {
  text-align: center;
  padding: 20px 0;
}

.outcome-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #d4a943 0%, #8b6dcf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.outcome-subtitle {
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-style: italic;
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.score-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  text-align: left;
}

.score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.score-label {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.score-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-style: italic;
}

.score-percentile {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.outcome-summary {
  background: rgba(212, 169, 67, 0.06);
  border: 1px solid rgba(212, 169, 67, 0.2);
  border-radius: var(--radius-md);
  padding: 28px;
  margin: 24px 0;
  text-align: left;
}

.outcome-summary h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--accent-gold);
}

.outcome-summary p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

.outcome-suggestions {
  text-align: left;
  margin-top: 20px;
}

.outcome-suggestions h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.suggestion-num {
  color: var(--accent-gold);
  font-weight: 700;
  flex-shrink: 0;
}

/* 保护级别徽章 */
.protection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* 关怀卡片 */
.care-card {
  background: rgba(239, 107, 107, 0.08);
  border: 1px solid rgba(239, 107, 107, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 20px 0;
  text-align: center;
}

.care-card h4 {
  color: var(--accent-red);
  margin-bottom: 12px;
}

.care-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.hotline-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hotline-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hotline-number {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-red);
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .modules-grid { grid-template-columns: 1fr; }
  .rules-list { grid-template-columns: 1fr; }
  .dimension-grid { grid-template-columns: 1fr 1fr; }
  .step { padding: 24px 20px 32px; }
  .btn-row { flex-direction: column-reverse; }
  .btn-row .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .dimension-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
}

/* 滚动动画 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 加载动画 */
.typing-dots {
  display: inline-flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* Footer */
.footer {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 20px;
  line-height: 1.8;
}
