/* ==================== CSS 变量定义 ==================== */
:root {
  /* 主色 */
  --primary: #8a54c2;
  --primary-light: #a574d4;
  --primary-dark: #6d41a0;
  
  /* 辅色 */
  --secondary: #6366f1;
  --secondary-light: #818cf8;
  
  /* 强调色 */
  --accent: #ec4899;
  
  /* 背景色 */
  --bg-light: #eff6ff;
  --bg-gradient: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  
  /* 文字颜色 */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  /* 状态颜色 */
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  
  /* 卡片颜色 */
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* 边框 */
  --border-color: #e2e8f0;
  --border-radius: 12px;
  
  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-cn: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  
  /* 过渡 */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 基础样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-family: var(--font-family-cn), var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* ==================== 布局容器 ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm {
  max-width: 600px;
}

.container-md {
  max-width: 900px;
}

/* ==================== 导航栏 ==================== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 20px;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-name {
  font-weight: 500;
  color: var(--text-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(138, 84, 194, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(138, 84, 194, 0.5);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #d946a8);
  color: white;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
}

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: var(--card-shadow);
}

.btn-white:hover {
  box-shadow: var(--card-shadow-hover);
  color: var(--primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==================== 表单元素 ==================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(138, 84, 194, 0.1);
}

.form-input.error {
  border-color: var(--error);
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 4px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
}

.card-header {
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==================== Hero 区域 ==================== */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 50%, #fce7f3 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238a54c2' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(138, 84, 194, 0.1);
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 60px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==================== 区块样式 ==================== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== 测试卡片 ==================== */
.test-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.test-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.test-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.test-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.test-card-mbti64::before {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.test-card-sbti::before {
  background: linear-gradient(90deg, #059669, #10b981);
}

.test-card-soul::before {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

.test-card-depression::before {
  background: linear-gradient(90deg, #65a30d, #84cc16);
}

.test-card-city::before {
  background: linear-gradient(90deg, #db2777, #ec4899);
}

.test-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.75rem;
}

.test-card-mbti64 .test-card-icon {
  background: linear-gradient(135deg, rgba(138, 84, 194, 0.1), rgba(99, 102, 241, 0.1));
  color: var(--primary);
}

.test-card-sbti .test-card-icon {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.1));
  color: #059669;
}

.test-card-soul .test-card-icon {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(239, 68, 68, 0.1));
  color: #dc2626;
}

.test-card-depression .test-card-icon {
  background: linear-gradient(135deg, rgba(101, 163, 13, 0.1), rgba(132, 204, 22, 0.1));
  color: #65a30d;
}

.test-card-city .test-card-icon {
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.1), rgba(236, 72, 153, 0.1));
  color: #db2777;
}

.test-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.test-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.test-card-link {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.875rem;
}

/* ==================== 特性卡片 ==================== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  text-align: center;
  padding: 40px 30px;
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(138, 84, 194, 0.1), rgba(99, 102, 241, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-desc {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== CTA 横幅 ==================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 80px 0;
  text-align: center;
  color: white;
}

.cta-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.cta-section .btn-white {
  background: white;
  color: var(--primary);
}

/* ==================== 页脚 ==================== */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

/* ==================== 测试页面 ==================== */
.test-container {
  max-width: 700px;
  margin: 100px auto 40px;
  padding: 0 20px;
}

.progress-container {
  margin-bottom: 30px;
}

.progress-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width var(--transition-normal);
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.question-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 40px;
}

.question-number {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.likert-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.likert-option {
  flex: 1;
  text-align: center;
}

.likert-option input {
  display: none;
}

.likert-option label {
  display: block;
  padding: 16px 8px;
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
}

.likert-option label:hover {
  border-color: var(--primary);
  background: rgba(138, 84, 194, 0.05);
}

.likert-option input:checked + label {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: var(--primary);
}

.question-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* ==================== 结果页面 ==================== */
.result-container {
  max-width: 800px;
  margin: 100px auto 40px;
  padding: 0 20px;
}

.result-header {
  text-align: center;
  margin-bottom: 40px;
}

.result-type {
  font-size: 5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.result-name {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.result-variant {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.radar-chart {
  max-width: 400px;
  margin: 40px auto;
}

.dimension-bars {
  margin: 40px 0;
}

.dimension-item {
  margin-bottom: 20px;
}

.dimension-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 500;
}

.dimension-bar {
  height: 12px;
  background: var(--bg-light);
  border-radius: 6px;
  overflow: hidden;
}

.dimension-fill {
  height: 100%;
  border-radius: 6px;
  transition: width var(--transition-slow);
}

.dimension-fill.ei { background: linear-gradient(90deg, #f97316, #fb923c); }
.dimension-fill.sn { background: linear-gradient(90deg, #22c55e, #4ade80); }
.dimension-fill.tf { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.dimension-fill.jp { background: linear-gradient(90deg, #a855f7, #c084fc); }
.dimension-fill.at { background: linear-gradient(90deg, #ec4899, #f472b6); }
.dimension-fill.hc { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }

.traits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.trait-tag {
  background: linear-gradient(135deg, rgba(138, 84, 194, 0.1), rgba(99, 102, 241, 0.1));
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.result-section {
  margin: 40px 0;
}

.result-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* ==================== 认证页面 ==================== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
}

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

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

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

.auth-subtitle {
  color: var(--text-secondary);
}

.auth-form {
  margin-bottom: 20px;
}

.auth-footer {
  text-align: center;
  color: var(--text-secondary);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  padding: 0 15px;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.875rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==================== 类型列表页 ==================== */
.types-container {
  padding: 100px 20px 40px;
}

.types-header {
  text-align: center;
  margin-bottom: 40px;
}

.types-search {
  max-width: 500px;
  margin: 30px auto 0;
  position: relative;
}

.types-search input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border: 2px solid var(--border-color);
  border-radius: 30px;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.types-search input:focus {
  outline: none;
  border-color: var(--primary);
}

.types-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.type-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 24px;
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
}

.type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary);
}

.type-card-code {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.type-card-variant {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

.type-card-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 12px 0 8px;
}

.type-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== 类型详情页 ==================== */
.type-detail-container {
  padding: 100px 20px 40px;
  max-width: 900px;
  margin: 0 auto;
}

.type-detail-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
}

.type-detail-code {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.type-detail-name {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin: 10px 0;
}

.type-detail-variant {
  color: var(--accent);
  font-weight: 500;
}

.type-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin: 30px 0;
  text-align: justify;
}

.type-detail-section {
  margin: 40px 0;
}

.type-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.type-section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.compatible-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.compatible-type-card {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.compatible-type-card:hover {
  background: rgba(138, 84, 194, 0.1);
}

/* ==================== 关于页面 ==================== */
.about-container {
  padding: 100px 20px 40px;
  max-width: 800px;
  margin: 0 auto;
}

.about-content h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin: 40px 0 20px;
}

.about-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-content ul {
  color: var(--text-secondary);
  margin: 16px 0;
  padding-left: 20px;
}

.about-content li {
  margin-bottom: 10px;
}

.faq-item {
  margin: 20px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px;
  background: var(--card-bg);
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-light);
}

.faq-icon {
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.faq-item.active .faq-answer {
  padding: 20px;
  max-height: 500px;
}

/* ==================== 个人中心 ==================== */
.profile-container {
  padding: 100px 20px 40px;
  max-width: 800px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
}

.profile-info h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.profile-info p {
  color: var(--text-secondary);
}

.profile-section {
  margin: 40px 0;
}

.profile-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.history-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
}

.history-item:hover {
  box-shadow: var(--card-shadow);
}

.history-type {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.history-date {
  color: var(--text-light);
  font-size: 0.875rem;
}

.history-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* ==================== 加载状态 ==================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .result-type {
    font-size: 4rem;
  }
}

@media (max-width: 767px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero {
    padding: 120px 0 60px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-stats {
    gap: 20px;
  }
  
  .stat-number {
    font-size: 1.75rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .test-cards {
    grid-template-columns: 1fr;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-brand {
    max-width: 100%;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .likert-scale {
    flex-direction: column;
  }
  
  .likert-option label {
    padding: 12px;
  }
  
  .question-card {
    padding: 24px;
  }
  
  .result-type {
    font-size: 3rem;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .result-actions .btn {
    width: 100%;
  }
  
  .auth-card {
    padding: 30px 20px;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
}

/* ==================== 模态框 ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform var(--transition-fast);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(138, 84, 194, 0.1), rgba(99, 102, 241, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--primary);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-text {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

/* ==================== 分享卡片 ==================== */
.share-canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.share-canvas-container.active {
  opacity: 1;
  visibility: visible;
}

.share-canvas-wrapper {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.share-canvas {
  border-radius: 8px;
  margin-bottom: 20px;
}

.share-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
