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

:root {
  --primary-color: #FFB6C1;
  --secondary-color: #FFE4B5;
  --accent-color: #F0E68C;
  --text-color: #5a5a5a;
  --light-bg: #FFF8F0;
  --border-radius: 20px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #FFF8F0 0%, #FFE4E1 100%);
  color: var(--text-color);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

/* 屏幕切换 */
.screen {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

.screen.active {
  display: block;
}

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

/* 开始界面 */
.start-content {
  text-align: center;
  padding: 60px 30px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.logo {
  font-size: 80px;
  margin-bottom: 20px;
}

.start-content h1 {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  font-size: 18px;
  color: #999;
  margin-bottom: 30px;
}

.description {
  text-align: left;
  background: var(--light-bg);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 30px;
}

.description p {
  margin-bottom: 15px;
  font-size: 16px;
}

.description ul {
  list-style: none;
  padding-left: 0;
}

.description li {
  padding: 8px 0;
  font-size: 15px;
}

/* 按钮 */
.btn {
  padding: 14px 40px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #FF69B4);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 105, 180, 0.3);
}

.btn-secondary {
  background: #f0f0f0;
  color: var(--text-color);
}

.btn-secondary:hover {
  background: #e0e0e0;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: var(--border-radius);
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow);
}

.modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 24px;
}

.modal-content p {
  color: #999;
  margin-bottom: 20px;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 20px;
  transition: border-color 0.3s;
}

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

.modal-buttons {
  display: flex;
  gap: 10px;
}

.modal-buttons .btn {
  flex: 1;
}

.error-message {
  color: #ff6b6b;
  font-size: 14px;
  margin-top: 10px;
  display: none;
}

.error-message.show {
  display: block;
}

/* 测试界面 */
.test-container {
  background: white;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #FF69B4);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  color: #999;
  font-size: 14px;
  margin-bottom: 30px;
}

.question-card {
  margin-bottom: 30px;
}

.question-card h2 {
  font-size: 20px;
  color: var(--text-color);
  margin-bottom: 25px;
  line-height: 1.6;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--light-bg);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.option:hover {
  background: #FFE4B5;
  transform: translateX(4px);
}

/* 禁用状态 */
.option.disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.option input[type="radio"] {
  margin-right: 12px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.option-text {
  font-size: 15px;
  cursor: pointer;
}

.test-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.test-buttons .btn {
  flex: 1;
  max-width: 200px;
}

/* 结果界面 */
.result-container {
  background: #f5f9fb;
  padding: 20px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
}

/* 结果模块基础样式 */
.result-module {
  background: white;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.module-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
}

/* 模块一：年龄对比 */
.module-age-comparison {
  background: linear-gradient(135deg, #FFF8F0 0%, #FFE4E1 100%);
}

.age-display {
  margin-bottom: 30px;
}

.age-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

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

.age-value {
  font-size: 56px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 8px;
}

.age-label {
  font-size: 13px;
  color: #999;
  font-weight: 600;
}

.age-divider {
  font-size: 24px;
  color: var(--primary-color);
  font-weight: 700;
}

.age-insight {
  text-align: center;
  font-size: 16px;
  color: var(--text-color);
  line-height: 1.6;
  padding: 16px;
  background: white;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  margin-bottom: 20px;
}

.personality-highlight {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid var(--secondary-color);
}

.personality-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
  font-weight: 600;
}

.personality-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

/* 模块二：关键词标签 */
.keywords-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.keyword-tag {
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

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

/* 模块三：雷达图 */
.module-radar {
  text-align: center;
}

.radar-container {
  margin: 20px auto;
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 380px;
}

.radar-container canvas {
  max-width: 100%;
  height: auto;
}

/* 模块四：维度详情 */
.dimensions-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dimension-bar {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  gap: 15px;
  align-items: center;
}

.dimension-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
}

.progress-container {
  height: 8px;
  background: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #FF69B4);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.dimension-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
  text-align: right;
}

/* 模块五：深度自我分析 */
.module-analysis {
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.05), rgba(255, 228, 181, 0.05));
}

.analysis-section {
  margin-bottom: 25px;
  padding: 18px;
  background: white;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
}

.analysis-section:last-child {
  margin-bottom: 0;
}

.section-subtitle {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-content {
  font-size: 14px;
  line-height: 1.8;
  color: #666;
  margin: 0;
  text-align: justify;
}

/* 模块六：社交与匹配 */
.module-matching {
  background: linear-gradient(135deg, rgba(176, 224, 230, 0.05), rgba(240, 230, 140, 0.05));
}

.matching-section {
  margin-bottom: 22px;
  padding: 18px;
  background: white;
  border-radius: 12px;
  border-left: 4px solid var(--accent-color);
}

.matching-section:last-child {
  margin-bottom: 25px;
}

.module-matching .section-subtitle {
  color: var(--text-color);
}

.module-matching .module-title {
  color: var(--text-color);
  border-bottom-color: var(--accent-color);
}

.archetype-info {
  background: var(--light-bg);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  background: var(--light-bg);
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-label {
  font-size: 13px;
  font-weight: 600;
  color: #999;
}

.info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
}

.result-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.result-buttons .btn {
  flex: 1;
  max-width: 200px;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .start-content {
    padding: 40px 20px;
  }

  .start-content h1 {
    font-size: 36px;
  }

  .logo {
    font-size: 60px;
  }

  .test-container,
  .result-container {
    padding: 15px;
  }

  .question-card h2 {
    font-size: 18px;
  }

  .age-value {
    font-size: 42px;
  }

  .age-numbers {
    gap: 12px;
  }

  .age-divider {
    font-size: 18px;
  }

  .dimension-bar {
    grid-template-columns: 100px 1fr 50px;
    gap: 10px;
    font-size: 12px;
  }

  .radar-container {
    max-width: 300px;
    height: 300px;
  }

  .keywords-container {
    gap: 8px;
  }

  .keyword-tag {
    padding: 8px 14px;
    font-size: 12px;
  }

  .result-module {
    padding: 18px;
    margin-bottom: 15px;
  }

  .module-title {
    font-size: 16px;
    margin-bottom: 15px;
  }

  .test-buttons,
  .result-buttons {
    flex-direction: column;
  }

  .test-buttons .btn,
  .result-buttons .btn {
    max-width: 100%;
  }

  .modal-content {
    padding: 30px 20px;
  }

  .analysis-section,
  .matching-section {
    margin-bottom: 18px;
    padding: 14px;
  }

  .section-subtitle {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .section-content {
    font-size: 13px;
  }
}
