/* === MBTI 测试 - 专业版样式 === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
  --primary: #E85D75;
  --primary-light: #FFE0E6;
  --secondary: #6C5CE7;
  --secondary-light: #E8E0FF;
  --accent-green: #00B894;
  --accent-orange: #E17055;
  --bg-warm: #FFFAF5;
  --bg-pink: #FEF0F5;
  --bg-purple: #F3E8FF;
  --text-dark: #2D2D2D;
  --text-mid: #555555;
  --text-light: #999999;
  --card-shadow: 0 4px 24px rgba(0,0,0,0.06);
  --card-shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Noto Sans SC', 'PingFang SC', -apple-system, sans-serif;
  background: var(--bg-warm);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* === 页面切换动画 === */
.screen {
  display: none;
  min-height: 100vh;
  padding: 20px;
  animation: fadeIn 0.4s ease;
}

.screen.active { display: flex; flex-direction: column; }

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-100px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-15px); }
  60% { transform: translateY(-8px); }
}

@keyframes typing {
  0%, 60%, 100% { opacity: 0; }
  30% { opacity: 1; }
}

/* === 落地页 === */
.landing {
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--bg-pink) 40%, var(--bg-purple) 100%);
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

.landing::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(232,93,117,0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(108,92,231,0.1) 0%, transparent 50%);
  animation: float 6s ease-in-out infinite;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,93,117,0.12);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.landing-title {
  font-size: 42px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(232,93,117,0.15);
}

.landing-subtitle {
  font-size: 16px;
  color: var(--text-mid);
  margin-bottom: 32px;
  line-height: 1.6;
}

.landing-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.landing-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing-stat-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--secondary);
}

.landing-stat-label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.landing-features {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-feature {
  background: white;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}

.landing-feature-icon {
  font-size: 22px;
}

.start-btn {
  background: linear-gradient(135deg, var(--primary), #D44E66);
  color: white;
  font-size: 18px;
  font-weight: 700;
  padding: 16px 48px;
  border: none;
  border-radius: 28px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(232,93,117,0.35);
  transition: var(--transition);
  animation: pulse 2.5s ease-in-out infinite;
  letter-spacing: 1px;
}

.start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(232,93,117,0.45);
}

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

.landing-price-note {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 16px;
}

.landing-price-note span {
  color: var(--primary);
  font-weight: 700;
}

/* === 答题页 === */
.quiz {
  padding: 0;
}

.quiz-header {
  background: linear-gradient(135deg, var(--bg-warm), var(--bg-pink));
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.quiz-progress-bar {
  height: 4px;
  background: #eee;
  border-radius: 2px;
  margin-bottom: 10px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-question-num {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

.quiz-question-num strong {
  color: var(--primary);
  font-weight: 900;
}

.quiz-dimension-tag {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  color: white;
}

.tag-EI { background: #6C5CE7; }
.tag-SN { background: #FD79A8; }
.tag-TF { background: #00B894; }
.tag-JP { background: #E17055; }

.quiz-body {
  padding: 24px 20px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.quiz-question-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.5;
  text-align: center;
  margin-bottom: 28px;
  max-width: 400px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 400px;
}

.quiz-option {
  background: white;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  text-align: left;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}

.quiz-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-lg);
  color: var(--text-dark);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-light), #fff);
  color: var(--primary);
  font-weight: 700;
  transform: scale(1.02);
  box-shadow: var(--card-shadow-lg);
}

.quiz-option.selected::after {
  content: '✓';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--primary);
  font-weight: 900;
}

.quiz-option.animating-out {
  animation: slideOutLeft 0.3s ease forwards;
}

.quiz-option.animating-in {
  animation: slideInRight 0.3s ease forwards;
}

/* === 计算动画页 === */
.processing {
  background: linear-gradient(135deg, var(--bg-warm), var(--bg-pink), var(--bg-purple));
  justify-content: center;
  align-items: center;
  text-align: center;
}

.processing-icon {
  font-size: 80px;
  animation: float 2s ease-in-out infinite;
  margin-bottom: 24px;
}

.processing-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.processing-sub {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.processing-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #eee;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
  margin-bottom: 24px;
}

.processing-dots {
  display: flex;
  gap: 8px;
}

.processing-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.processing-dot:nth-child(2) { animation-delay: 0.2s; }
.processing-dot:nth-child(3) { animation-delay: 0.4s; }

/* === 结果预览页（付费墙） === */
.preview {
  background: linear-gradient(135deg, var(--bg-warm), var(--bg-pink));
  padding: 24px 20px;
  align-items: center;
}

.preview-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 28px;
  font-weight: 900;
  color: white;
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}

.preview-nickname {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
}

.preview-core {
  font-size: 14px;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 380px;
}

.preview-dimensions {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin-bottom: 24px;
}

.preview-dim {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.preview-dim-letter {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 4px;
}

.preview-dim-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}

.preview-dim-bar {
  height: 4px;
  background: #eee;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.preview-dim-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

/* 付费墙 */
.paywall {
  background: white;
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: var(--card-shadow-lg);
  text-align: center;
  width: 100%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
}

.paywall::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent-green));
}

.paywall-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.paywall-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 20px;
}

.paywall-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.paywall-feature {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 12px;
}

.paywall-price {
  font-size: 36px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
}

.paywall-price-unit {
  font-size: 14px;
  color: var(--text-light);
}

.paywall-original {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.paywall-original del {
  color: #ccc;
}

.pay-btn {
  background: linear-gradient(135deg, var(--primary), #D44E66);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 40px;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(232,93,117,0.35);
  transition: var(--transition);
  width: 100%;
  max-width: 300px;
  margin-bottom: 12px;
}

.pay-btn:hover { transform: scale(1.03); box-shadow: 0 8px 32px rgba(232,93,117,0.45); }
.pay-btn:active { transform: scale(0.98); }

.share-unlock-btn {
  background: white;
  border: 2px solid var(--secondary);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  max-width: 300px;
}

.share-unlock-btn:hover {
  background: var(--secondary-light);
  transform: scale(1.03);
}

.paywall-note {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 12px;
  line-height: 1.5;
}

/* === 完整报告页 === */
.report {
  padding: 20px;
  align-items: center;
}

.report-header {
  background: white;
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: var(--card-shadow-lg);
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.report-header-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.08;
  z-index: 0;
}

.report-header > * { position: relative; z-index: 1; }

.report-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 24px;
  font-weight: 900;
  color: white;
  margin-bottom: 8px;
}

.report-nickname {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}

.report-core {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
}

.report-section {
  background: white;
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: var(--card-shadow);
  width: 100%;
  margin-bottom: 16px;
}

.report-section-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-section-title .icon {
  font-size: 20px;
}

.report-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-trait {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 12px;
}

.report-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 10px;
}

.report-list-item:last-child { margin-bottom: 0; }

.report-list-icon {
  font-size: 16px;
  min-width: 20px;
  text-align: center;
}

.report-dim-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.report-dim-card:last-child { border-bottom: none; }

.report-dim-name {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  min-width: 60px;
}

.report-dim-bar-wrap {
  flex: 1;
  display: flex;
  gap: 4px;
  height: 24px;
}

.report-dim-bar-left {
  border-radius: 12px 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  transition: width 1s ease;
}

.report-dim-bar-right {
  border-radius: 0 12px 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  transition: width 1s ease;
}

.report-dim-letters {
  display: flex;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.report-career-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-career {
  background: white;
  border: 1px solid #eee;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 16px;
  color: var(--text-mid);
}

.report-love-card {
  background: linear-gradient(135deg, var(--bg-pink), var(--bg-purple));
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
}

.report-love-style {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.report-love-match {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 8px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
}

.report-love-match-reason {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 12px;
}

.report-love-quote {
  font-size: 14px;
  color: var(--text-light);
  font-style: italic;
  padding: 12px 16px;
  border-left: 3px solid var(--primary);
  background: rgba(232,93,117,0.05);
  border-radius: 0 12px 12px 0;
  line-height: 1.6;
}

.report-growth-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 8px;
}

.report-growth-item:last-child { margin-bottom: 0; }

.report-famous-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-famous {
  background: var(--secondary-light);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 12px;
}

/* 分享按钮区 */
.share-area {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin-top: 8px;
  padding-bottom: 40px;
}

.share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.share-btn:hover { transform: scale(1.03); }
.share-btn:active { transform: scale(0.98); }

.share-btn-wechat {
  background: #07C160;
  color: white;
  box-shadow: 0 4px 16px rgba(7,193,96,0.3);
}

.share-btn-save {
  background: white;
  border: 2px solid #eee;
  color: var(--text-mid);
}

.share-btn-save:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.share-btn-retest {
  background: white;
  border: 2px solid var(--primary);
  color: var(--primary);
}

/* === 支付弹窗 === */
.pay-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.pay-modal.active { display: flex; }

.pay-modal-content {
  background: white;
  border-radius: 24px;
  padding: 28px 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--card-shadow-lg);
  text-align: center;
}

.pay-modal-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 16px;
}

.pay-options {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.pay-option {
  flex: 1;
  background: white;
  border: 2px solid #eee;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pay-option:hover { border-color: var(--primary); }

.pay-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pay-option-icon {
  font-size: 32px;
}

.pay-option-name {
  font-size: 14px;
  font-weight: 700;
}

.pay-confirm-btn {
  background: linear-gradient(135deg, var(--primary), #D44E66);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 40px;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
  box-shadow: 0 6px 24px rgba(232,93,117,0.35);
}

.pay-confirm-btn:hover { transform: scale(1.03); }

.pay-cancel-btn {
  background: white;
  border: 2px solid #eee;
  color: var(--text-light);
  font-size: 13px;
  padding: 10px 24px;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 12px;
  transition: var(--transition);
}

/* === 响应式 === */
@media (min-width: 768px) {
  .app { max-width: 520px; }
  .landing-title { font-size: 48px; }
  .quiz-question-text { font-size: 22px; }
}

@media (max-width: 360px) {
  .landing-title { font-size: 32px; }
  .quiz-question-text { font-size: 17px; }
  .quiz-option { padding: 16px 18px; font-size: 14px; }
  .paywall-price { font-size: 28px; }
}