/* ===================================================
   七宗罪 VS 七美德 14维人格光谱测评
   Dark Academia × Mystical Rose-Gold 奢华暗黑美学样式表
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Noto+Serif+SC:wght@400;600;700&display=swap');

:root {
  --bg-deep: #0a0c10;
  --bg-card: rgba(22, 26, 35, 0.72);
  --bg-card-hover: rgba(30, 36, 48, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 205, 120, 0.35);
  
  --gold-primary: #f5c563;
  --gold-glow: rgba(245, 197, 99, 0.25);
  --rose-sin: #e0726d;
  --rose-glow: rgba(224, 114, 109, 0.25);
  --text-primary: #f2f4f8;
  --text-secondary: rgba(242, 244, 248, 0.65);
  --text-muted: rgba(242, 244, 248, 0.4);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

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

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(224, 114, 109, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(245, 197, 99, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #090a0d 0%, #0e1219 50%, #080a0d 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Serif SC", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  padding: 24px 18px 48px;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ================= 页面切换动画 ================= */
.page {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  flex: 1;
}

.page.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0);
}

/* ================= 1. 欢迎封面页 (Intro Page) ================= */
.intro-hero {
  text-align: center;
  padding: 36px 12px 20px;
}

.badge-tag {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold-primary);
  background: rgba(245, 197, 99, 0.1);
  border: 1px solid var(--border-gold);
  padding: 4px 14px;
  border-radius: 30px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.main-title {
  font-family: 'Cinzel', 'Noto Serif SC', serif;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 20%, #f5c563 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.sub-title {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* 欲望与美德双立柱卡片 */
.dual-pillars {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.pillar-card {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pillar-card.sin {
  border-bottom: 2px solid var(--rose-sin);
}

.pillar-card.sin::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--rose-sin), transparent);
}

.pillar-card.virtue {
  border-bottom: 2px solid var(--gold-primary);
}

.pillar-card.virtue::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.pillar-tag {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pillar-name {
  font-size: 17px;
  font-weight: 700;
}

.pillar-card.sin .pillar-name { color: var(--rose-sin); }
.pillar-card.virtue .pillar-name { color: var(--gold-primary); }

/* 测试指标小格子 */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.meta-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  text-align: center;
}

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
}

.meta-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.intro-desc {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 30px;
  position: relative;
}

.intro-desc::before {
  content: '“';
  font-family: serif;
  font-size: 40px;
  position: absolute;
  top: -6px;
  left: 10px;
  color: rgba(245, 197, 99, 0.2);
}

/* 按钮通用 */
.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #f5c563 0%, #d49a37 100%);
  color: #0c0e14;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 197, 99, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

/* ================= 2. 答题流页面 (Quiz Page) ================= */
.quiz-header {
  margin-bottom: 24px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: 'Cinzel', sans-serif;
  letter-spacing: 1px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 3%;
  background: linear-gradient(90deg, var(--rose-sin), var(--gold-primary));
  border-radius: 10px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--gold-glow);
}

.question-box {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  margin-bottom: 28px;
  min-height: 140px;
  display: flex;
  align-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.question-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text-primary);
}

/* 五点量表选项样式 */
.scale-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 16px 20px;
  margin-bottom: 28px;
}

.scale-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 10px 10px;
  margin-bottom: 12px;
}

.scale-row::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.scale-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #141822;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scale-btn .inner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.25s ease;
}

.scale-btn:active, .scale-btn.selected {
  border-color: var(--gold-primary);
  background: rgba(245, 197, 99, 0.15);
  transform: scale(1.15);
  box-shadow: 0 0 16px var(--gold-glow);
}

.scale-btn.selected .inner-dot {
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 4px;
}

/* 二选一情境题按钮 */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.choice-btn {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.choice-btn:active, .choice-btn.selected {
  border-color: var(--gold-primary);
  background: rgba(245, 197, 99, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.choice-btn.selected::after {
  content: '✓';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-primary);
  font-weight: bold;
}

/* 答题底部导航栏 */
.quiz-nav {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.btn-secondary {
  flex: 1;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.1);
}

/* ================= 3. 结果页 (Result Page) ================= */
.result-header {
  text-align: center;
  padding-bottom: 20px;
}

.persona-title-box {
  background: linear-gradient(180deg, rgba(245, 197, 99, 0.1) 0%, rgba(22, 26, 35, 0.8) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(245, 197, 99, 0.1);
}

.persona-tag {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold-primary);
  margin-bottom: 6px;
}

.persona-name {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff2d1 0%, #f5c563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.persona-motto {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

/* 双核心卡片 */
.dual-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.top-badge-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border-subtle);
}

.top-badge-card.sin { border-left: 3px solid var(--rose-sin); }
.top-badge-card.virtue { border-left: 3px solid var(--gold-primary); }

.top-badge-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.top-badge-name {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 2px;
}

.top-badge-card.sin .top-badge-name { color: var(--rose-sin); }
.top-badge-card.virtue .top-badge-name { color: var(--gold-primary); }

.top-badge-score {
  font-size: 12px;
  color: var(--text-muted);
}

/* 雷达图展示区 */
.radar-section {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.radar-canvas-wrap {
  width: 100%;
  max-width: 360px;
  height: 360px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#radarCanvas {
  width: 100%;
  height: 100%;
}

.balance-banner {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 16px;
  border-radius: 20px;
}

/* 14维详情列表 */
.dim-accordion {
  margin-bottom: 30px;
}

.dim-section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dim-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.dim-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dim-row-name {
  font-size: 15px;
  font-weight: 700;
}

.dim-row.sin .dim-row-name { color: var(--rose-sin); }
.dim-row.virtue .dim-row-name { color: var(--gold-primary); }

.dim-row-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.dim-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dim-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}

.dim-row.sin .dim-bar-fill { background: var(--rose-sin); }
.dim-row.virtue .dim-bar-fill { background: var(--gold-primary); }

.dim-row-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 结果页操作按钮区 */
.action-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.btn-poster {
  background: linear-gradient(135deg, #e0726d 0%, #c24641 100%);
  box-shadow: 0 8px 24px rgba(224, 114, 109, 0.3);
}

/* ================= 4. 海报弹窗 (Poster Modal) ================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #141720;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.poster-preview-img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
}

.poster-tip {
  font-size: 13px;
  color: var(--gold-primary);
  margin-bottom: 16px;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
}

/* ================= 5. 安全拦截屏 (Lockout Page) ================= */
.lockout-box {
  background: var(--bg-card);
  border: 1px solid var(--rose-sin);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  margin-top: 60px;
  box-shadow: 0 12px 32px rgba(224, 114, 109, 0.15);
}

.lockout-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.lockout-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--rose-sin);
  margin-bottom: 12px;
}

.lockout-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.input-token-box {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.input-token {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.input-token:focus {
  border-color: var(--gold-primary);
}

.btn-verify {
  padding: 12px 18px;
  background: var(--gold-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

/* Toast 提示浮窗 */
.toast-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 24, 32, 0.95);
  border: 1px solid var(--border-gold);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: fadeInOut 1.5s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -40%); }
  15% { opacity: 1; transform: translate(-50%, -50%); }
  85% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -60%); }
}

/* 免责声明 */
.disclaimer-text {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 24px;
  line-height: 1.5;
}

/* ================= 6. 小红书订单激活弹窗 ================= */
.order-modal-box {
  background: #141722;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 30px 22px 24px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  position: relative;
}

.order-modal-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--gold-primary);
  background: rgba(245, 197, 99, 0.12);
  border: 1px solid var(--border-gold);
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.order-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.order-modal-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.order-input-wrapper {
  margin-bottom: 18px;
}

.order-input {
  width: 100%;
  padding: 16px 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(245, 197, 99, 0.3);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
  outline: none;
  transition: all 0.25s;
}

.order-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px var(--gold-glow);
}

.order-guide-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  margin-top: 14px;
  display: inline-block;
}

.guide-tooltip {
  display: none;
  background: rgba(20, 24, 32, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 10px;
  text-align: left;
}

.guide-tooltip.active {
  display: block;
}
