/* ================================================================
   九型人格测试 — 清爽专业风格
   浅色 · 柔和 · 呼吸感 · 亲和力
   ================================================================ */

:root {
  --primary: #5b6abf;
  --primary-light: #7c8ae0;
  --primary-soft: #eef0fb;
  --accent: #f0975b;
  --accent-light: #fbc4a0;
  --accent-soft: #fef6f0;
  --success: #52b788;
  --success-soft: #edf7f2;
  --danger: #e0556a;
  --danger-soft: #fdf0f2;
  --warning: #f0b84d;

  --bg-body: #f7f6f3;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-warm: #faf9f7;

  --text-primary: #2d2b32;
  --text-secondary: #5f5d66;
  --text-muted: #9997a0;
  --text-placeholder: #bfbdc5;

  --border-light: #eae8e4;
  --border-card: #eeedeb;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);

  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --font-stack: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

/* ===== 全局 ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-stack);
  color: var(--text-primary);
  background: var(--bg-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 15px;
}
main { flex: 1; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

/* ===== 导航栏 ===== */
.navbar {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border-light);
  padding: 0.6rem 0;
  transition: var(--transition);
}
.navbar .container { max-width: 1140px; }
.navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary) !important;
  letter-spacing: -0.3px;
}
.navbar-brand i { color: var(--accent); }
.navbar .nav-link {
  color: var(--text-secondary) !important;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 1rem !important;
  border-radius: 6px;
  transition: var(--transition);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-soft);
}
.navbar .btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1.4rem;
  transition: var(--transition);
}
.navbar .btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}
.navbar .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1.6rem;
  box-shadow: 0 2px 8px rgba(91,106,191,0.25);
  transition: var(--transition);
}
.navbar .btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 14px rgba(91,106,191,0.35);
  transform: translateY(-1px);
}
.navbar-toggler { border: none; color: var(--text-primary); }

/* ===== Hero 首页 ===== */
.hero-section {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(175deg, #faf9f8 0%, #f0eef5 40%, #faf8f5 100%);
}
.hero-section::before {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(91,106,191,0.06) 0%, transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(240,151,91,0.06) 0%, transparent 70%);
  bottom: -40px; right: 8%;
  border-radius: 50%;
}
.hero-section .container { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-block;
  padding: 5px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(240,151,91,0.15);
  margin-bottom: 1.5rem;
}
.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.hero-section h1 .highlight {
  background: linear-gradient(135deg, var(--primary), #8b7ec8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-section .hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.2rem;
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 50px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(91,106,191,0.3);
  transition: var(--transition);
}
.btn-hero-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 10px 32px rgba(91,106,191,0.4);
  transform: translateY(-2px);
  color: #fff;
}
.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: 1.5px solid var(--border-light);
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.btn-hero-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  margin-top: 3rem;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}
.hero-stat .lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.hero-stat-divider {
  width: 1px;
  background: var(--border-light);
}

/* ===== 区域标题 ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.4rem;
}

/* ===== 分区 ===== */
.section { padding: 72px 0; }
.section-light { background: #fff; }
.section-warm { background: var(--bg-warm); }

/* ===== 特性卡片 ===== */
.feature-card {
  text-align: center;
  padding: 38px 26px 32px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border-card);
  transition: var(--transition);
  height: 100%;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-card .icon-circle {
  width: 76px; height: 76px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  margin-bottom: 1.3rem;
}
.feature-card h5 { font-weight: 700; margin-bottom: 0.6rem; font-size: 1.08rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* ===== 九型网格 ===== */
.type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border-card);
  transition: var(--transition);
  height: 100%;
  cursor: default;
}
.type-card:hover {
  border-color: var(--primary-soft);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.type-card .type-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.type-card .type-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.type-card .type-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* ===== 数据横幅 ===== */
.stats-banner { padding: 60px 0; }
.stats-banner .stat-num {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--primary);
}
.stats-banner .stat-lbl { font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; }

/* ===== 测试页面 ===== */
.test-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 15px;
}
.test-progress-wrap { margin-bottom: 28px; }
.test-progress-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}
.test-progress {
  height: 8px;
  border-radius: 4px;
  background: var(--border-light);
}
.test-progress .progress-bar {
  background: linear-gradient(90deg, var(--primary), #8b7ec8);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.question-card {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 42px 38px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.question-number {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.question-text {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 30px;
  line-height: 1.7;
  color: var(--text-primary);
}
.option-group {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.option-item { flex: 1; min-width: 78px; text-align: center; }
.option-item input[type="radio"] { display: none; }
.option-item label {
  display: block;
  padding: 14px 6px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  background: #fafaf9;
}
.option-item label:hover {
  border-color: #c5c1d8;
  background: #f5f4fa;
  color: var(--text-secondary);
}
.option-item input[type="radio"]:checked + label {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(91,106,191,0.08);
}
.test-nav-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}
.test-nav-btns .btn {
  border-radius: 50px;
  padding: 11px 28px;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ===== 按钮体系 ===== */
.btn {
  border-radius: 10px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(91,106,191,0.2);
}
.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  box-shadow: 0 4px 14px rgba(91,106,191,0.3);
  transform: translateY(-1px);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(240,151,91,0.3);
}
.btn-accent:hover {
  background: #e8884a;
  color: #fff;
  box-shadow: 0 8px 24px rgba(240,151,91,0.4);
  transform: translateY(-1px);
}
.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}
.btn-outline-secondary {
  border-color: var(--border-light);
  color: var(--text-secondary);
}
.btn-outline-secondary:hover {
  background: var(--bg-warm);
  border-color: #ccc;
  color: var(--text-primary);
}
.btn-lg { padding: 13px 36px; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 6px 16px; font-size: 0.82rem; border-radius: 8px; }

/* ===== 过渡动画页 ===== */
.processing-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
}
.processing-spinner-wrap {
  width: 110px; height: 110px;
  margin: 0 auto 28px;
  position: relative;
}
.processing-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid transparent;
}
.processing-ring-1 {
  border-top-color: var(--primary);
  animation: spin 1.4s linear infinite;
}
.processing-ring-2 {
  inset: 10px;
  border-right-color: var(--accent);
  animation: spin 1s linear infinite reverse;
}
.processing-ring-3 {
  inset: 22px;
  border-bottom-color: #8b7ec8;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-text { font-size: 1.05rem; color: var(--text-muted); font-weight: 500; }
.processing-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } 100% { content: ''; }
}

/* ===== 结果页面 ===== */
.result-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 15px;
}
.result-header { text-align: center; margin-bottom: 32px; }
.result-badge {
  display: inline-block;
  padding: 8px 26px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #8b7ec8);
  margin-bottom: 20px;
}
.result-card {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 34px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.result-card h5 { font-weight: 700; color: var(--text-primary); }

/* 付费墙 */
.pay-wall {
  background: linear-gradient(135deg, #fffbf5, #fff8ee);
  border: 2px dashed rgba(240,151,91,0.3);
  border-radius: var(--radius-xl);
  padding: 44px 32px;
  text-align: center;
  position: relative;
}
.pay-wall .lock-icon { font-size: 2.8rem; color: var(--accent); margin-bottom: 0.6rem; }
.pay-wall h4 { color: var(--text-primary); font-weight: 700; }
.pay-wall .price {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent);
}
.pay-wall .price small { font-size: 1.1rem; color: var(--text-muted); }

/* 雷达图 */
.radar-chart-wrap { width: 100%; max-width: 480px; margin: 0 auto; }
.chart-container { width: 100%; height: 420px; }

/* 报告下载区 */
.report-download-area {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.report-footer-bar {
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
  margin-top: 18px;
  text-align: center;
}
.report-footer-bar .site-info { font-size: 0.84rem; color: var(--text-muted); margin-top: 6px; }

/* ===== 认证页 ===== */
.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 15px;
  background: var(--bg-warm);
}
.auth-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-card);
}
.auth-card h3 {
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
  font-size: 1.45rem;
  color: var(--text-primary);
}
.auth-card .subtitle { color: var(--text-muted); text-align: center; margin-bottom: 1.8rem; font-size: 0.9rem; }
.form-label { font-weight: 600; font-size: 0.84rem; margin-bottom: 5px; color: var(--text-secondary); }
.form-control, .form-select {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.94rem;
  color: var(--text-primary);
  background: #fafaf9;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,106,191,0.08);
  color: var(--text-primary);
}
.form-control::placeholder { color: var(--text-placeholder); }
.form-select option { background: #fff; }
.captcha-img { height: 44px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border-light); }
.btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 0;
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
  box-shadow: 0 4px 16px rgba(91,106,191,0.2);
  cursor: pointer;
  transition: var(--transition);
}
.btn-submit:hover { background: var(--primary-light); box-shadow: 0 6px 22px rgba(91,106,191,0.3); }

/* ===== 会员中心 ===== */
.member-sidebar {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.member-sidebar .list-group-item {
  border: none;
  padding: 13px 20px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  background: transparent;
}
.member-sidebar .list-group-item:hover,
.member-sidebar .list-group-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

/* ===== 后台 ===== */
.admin-wrapper { min-height: 100vh; }
.admin-sidebar {
  background: #2d2b32;
  color: #fff;
  width: 240px;
  min-height: 100vh;
  flex-shrink: 0;
}
.admin-sidebar .sidebar-header {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-sidebar .nav-link {
  border-radius: 8px;
  margin-bottom: 2px;
  transition: var(--transition);
  padding: 10px 14px;
  color: rgba(255,255,255,0.55) !important;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(255,255,255,0.08);
  color: #fff !important;
}
.admin-main { background: #f7f6f3; min-height: 100vh; }
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-content { max-width: 1400px; }

/* ===== 卡片/表格 ===== */
.stat-card {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.stat-card .stat-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--text-primary); }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.84rem; margin-top: 2px; }

.table-card {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-xs);
}
.table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-color: var(--border-light);
  padding: 12px 14px;
}
.table td {
  border-color: var(--border-light);
  vertical-align: middle;
  font-size: 0.9rem;
  padding: 12px 14px;
}
.table-hover tbody tr:hover { background: var(--primary-soft); }
.badge { font-weight: 600; padding: 5px 12px; border-radius: 50px; font-size: 0.78rem; }
.progress { background: var(--border-light); border-radius: 10px; }
.pagination .page-link {
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 8px;
  margin: 0 3px;
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ===== 文章 ===== */
.article-card {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.article-card .card-body { padding: 22px; }
.article-meta { font-size: 0.82rem; color: var(--text-muted); }

/* ===== 页脚 ===== */
footer {
  background: #fff;
  border-top: 1px solid var(--border-light);
  padding: 48px 0 32px;
  margin-top: auto;
}
footer h5, footer h6 { color: var(--text-primary); font-weight: 700; }

/* ===== CTA区域 ===== */
.cta-section {
  text-align: center;
  padding: 64px 0;
}
.cta-section h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.cta-section p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .hero-section h1 { font-size: 2.2rem; }
}
@media (max-width: 768px) {
  .hero-section { padding: 64px 0 48px; }
  .hero-section h1 { font-size: 1.8rem; }
  .hero-section .hero-subtitle { font-size: 0.95rem; }
  .hero-stats { gap: 1rem; }
  .hero-stat .num { font-size: 1.4rem; }
  .hero-stat-divider { display: none; }
  .question-card { padding: 26px 18px; }
  .question-text { font-size: 1.05rem; }
  .option-group { gap: 6px; }
  .option-item label { padding: 12px 4px; font-size: 0.76rem; }
  .auth-card { padding: 28px 20px; margin: 0 10px; }
  .section-header h2 { font-size: 1.6rem; }
  .feature-card { padding: 26px 16px; }
  .result-card { padding: 22px 16px; }
  .chart-container { height: 300px; }
  .admin-sidebar { width: 100% !important; min-height: auto; }
  .admin-wrapper { flex-direction: column; }
  .admin-sidebar .nav { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .hero-section h1 { font-size: 1.55rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .pay-wall .price { font-size: 2.2rem; }
}
