/* 
 * 天赋自测网站 - 全局样式
 * 设计理念：专业、高级、克制
 * 移动端优先设计
 */

/* ===== CSS变量系统 ===== */
:root {
  /* 品牌色 - 紫色系 */
  --color-primary: #7C3AED;
  --color-primary-light: #A78BFA;
  --color-primary-dark: #5B21B6;
  --color-primary-ultra-light: #EDE9FE;
  
  /* 中性色 */
  --color-black: #0F172A;
  --color-gray-dark: #1E293B;
  --color-gray: #64748B;
  --color-gray-light: #CBD5E1;
  --color-gray-ultra-light: #F1F5F9;
  --color-bg: #F8FAFC;
  --color-white: #FFFFFF;
  
  /* 功能色 */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  
  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
  --gradient-soft: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  
  /* 阴影系统 */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 
              0 4px 8px rgba(15, 23, 42, 0.06), 
              0 8px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 6px 20px rgba(124, 58, 237, 0.15);
  
  /* 字体大小 - 移动端 */
  --font-size-xl: 32px;
  --font-size-lg: 24px;
  --font-size-md: 20px;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-xs: 12px;
  
  /* 间距系统 */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;
  --spacing-3xl: 40px;
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* 过渡 */
  --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--color-black);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ===== 页面布局 ===== */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
}

.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-xl) 0;
}

/* ===== 首页样式 ===== */
.welcome-page {
  background: radial-gradient(
    circle at 50% 0%,
    rgba(124, 58, 237, 0.03) 0%,
    rgba(255, 255, 255, 0) 50%
  );
}

.welcome-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
}

.welcome-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  background: #F3F0FF;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.welcome-icon svg {
  width: 26px;
  height: 26px;
  stroke: #9D8AC7;
  stroke-width: 2px;
}

.welcome-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 3px;
  color: var(--color-black);
}

.welcome-subtitle-en {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--color-gray-light);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.welcome-tag {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-block;
}

.welcome-tag:hover {
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.welcome-slogan {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-gray-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.welcome-description {
  font-size: var(--font-size-sm);
  color: var(--color-gray);
  margin-bottom: 12px;
  line-height: 1.5;
}

.welcome-copyright {
  font-size: 11px;
  color: var(--color-gray-light);
  margin-bottom: 14px;
  line-height: 1.4;
  max-width: 400px;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
  margin-bottom: 12px;
  width: 100%;
  max-width: 440px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-sm);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  cursor: default;
}

.feature-icon-new {
  width: 40px;
  height: 40px;
  background: var(--color-gray-ultra-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.feature-icon-new svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-gray);
}

.feature-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-gray-dark);
  margin-bottom: 2px;
}

.feature-desc {
  font-size: 12px;
  color: var(--color-gray);
}

/* 测试信息卡片 */
.test-info-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-white);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  width: 100%;
  max-width: 440px;
}

.test-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.test-info-label {
  font-size: 11px;
  color: var(--color-gray);
  font-weight: 500;
}

.test-info-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.3px;
}

.test-info-divider {
  width: 1px;
  height: 28px;
  background: var(--color-gray-ultra-light);
}

/* 温馨提示 */
.welcome-tip {
  font-size: var(--font-size-xs);
  color: var(--color-gray);
  margin-top: 10px;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* 底部信息区域 */
.footer-info {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.footer-info p {
  font-size: 11px;
  color: var(--color-gray-light);
  margin: 4px 0;
  line-height: 1.5;
}

.footer-copyright-text {
  font-weight: 500;
  margin-top: 6px !important;
}

/* ===== 按钮样式 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  height: 52px;
  padding: 0 var(--spacing-2xl);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  min-width: 160px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.btn-secondary {
  background: var(--color-gray-ultra-light);
  color: var(--color-gray-dark);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:active {
  transform: scale(0.98);
  background: var(--color-gray-light);
}

.btn-large {
  height: 58px;
  font-size: 20px;
  width: 100%;
  max-width: 440px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

/* ===== 进度条 ===== */
.progress-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-white);
  padding: 12px var(--spacing-lg) 10px;
}

.progress-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
}

.progress-text {
  font-size: var(--font-size-sm);
  color: var(--color-gray);
  font-weight: 500;
}

.progress-bar-container {
  height: 4px;
  background: var(--color-gray-ultra-light);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width 0.3s ease-out;
  transform-origin: left;
}

/* ===== 测试页面样式 ===== */
.test-page {
  padding-top: 60px;
}

.question-container {
  padding: 12px var(--spacing-lg) var(--spacing-xl);
  animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.question-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
  letter-spacing: 0.3px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-3xl);
}

.option-card {
  position: relative;
  min-height: 60px;
  padding: 18px 20px;
  background: var(--color-white);
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  font-size: var(--font-size-base);
  color: var(--color-gray-dark);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.option-card:active {
  transform: scale(0.98);
}

.option-card.selected {
  border: 2px solid var(--color-primary);
  background: #FDFBFF;
  color: var(--color-primary);
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

/* ===== 导航按钮 ===== */
.nav-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  background: var(--color-white);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  gap: var(--spacing-sm);
  z-index: 99;
}

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

/* ===== 结果页面样式 ===== */
.result-page {
  padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-xl);
}

.result-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.result-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: var(--spacing-md);
}

.result-summary {
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--color-gray-dark);
}

.highlight-talent {
  color: var(--color-primary);
  font-weight: 600;
}

.lowlight-talent {
  color: var(--color-gray);
}

/* ===== 雷达图 ===== */
.radar-section {
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.radar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-lg);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

#radarChart {
  max-width: 100%;
  height: auto;
}

/* ===== 分值列表 ===== */
.scores-section {
  margin-bottom: var(--spacing-xl);
}

.score-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: 10px;
  padding: 8px 10px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.score-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-black);
  min-width: 85px;
  flex-shrink: 0;
}

.score-bar-wrapper {
  flex: 1;
  position: relative;
  height: 36px;
  background: var(--color-bg);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.score-bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-bar.level-high {
  background: var(--gradient-primary);
}

.score-bar.level-medium {
  background: linear-gradient(90deg, #A78BFA 0%, #C4B5FD 100%);
}

.score-bar.level-low {
  background: #E2E8F0;
}

.score-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-white);
  position: relative;
  z-index: 1;
}

.score-bar.level-low .score-value {
  color: var(--color-gray);
}

.score-rating {
  font-size: 13px;
  color: var(--color-gray);
  min-width: 70px;
  text-align: right;
  flex-shrink: 0;
}

/* ===== 结果页按钮 ===== */
.result-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.result-actions .btn {
  flex: 1;
}

/* ===== 结果页底部版权 ===== */
.result-footer {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  text-align: center;
}

.result-footer p {
  font-size: 11px;
  color: var(--color-gray-light);
  margin: 4px 0;
  line-height: 1.5;
}

/* ===== 响应式设计 - 小屏手机 ===== */
@media (max-width: 360px) {
  .welcome-features {
    grid-template-columns: 1fr;
    max-width: 280px;
  }
  
  .test-info-card {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .test-info-divider {
    width: 80px;
    height: 1px;
  }
}

/* ===== 响应式设计 - 平板 ===== */
@media (min-width: 768px) {
  :root {
    --font-size-xl: 36px;
    --font-size-lg: 28px;
    --font-size-md: 22px;
    --font-size-base: 17px;
    --font-size-sm: 15px;
    --font-size-xs: 13px;
  }
  
  .container {
    max-width: 680px;
  }
  
  .progress-bar-container {
    height: 5px;
  }
  
  .welcome-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }
  
  .welcome-icon svg {
    width: 32px;
    height: 32px;
  }
  
  .welcome-title {
    font-size: 42px;
    margin-bottom: 6px;
  }
  
  .welcome-subtitle-en {
    font-size: 12px;
  }
  
  .welcome-slogan {
    font-size: 20px;
  }
  
  .welcome-features {
    max-width: 500px;
  }
  
  .feature-card {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .feature-icon-new {
    width: 44px;
    height: 44px;
  }
  
  .feature-icon-new svg {
    width: 22px;
    height: 22px;
  }
  
  .test-info-card {
    max-width: 500px;
  }
  
  .btn-large {
    max-width: 500px;
  }
  
  #radarChart {
    width: 380px;
    height: 380px;
  }
}

/* ===== 响应式设计 - 桌面 ===== */
@media (min-width: 1024px) {
  :root {
    --font-size-xl: 40px;
    --font-size-lg: 28px;
    --font-size-md: 22px;
    --font-size-base: 17px;
  }
  
  .container {
    max-width: 720px;
  }
  
  .progress-bar-container {
    height: 6px;
  }
  
  .welcome-title {
    font-size: 48px;
    margin-bottom: 6px;
  }
  
  .welcome-subtitle-en {
    font-size: 12px;
  }
  
  .welcome-slogan {
    font-size: 22px;
  }
  
  .welcome-features {
    max-width: 540px;
  }
  
  .test-info-card {
    max-width: 540px;
  }
  
  .btn-large {
    max-width: 540px;
    height: 60px;
    font-size: 20px;
  }
  
  .btn:hover {
    transform: translateY(-1px);
  }
  
  .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
  }
  
  .btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
  }
  
  .btn-secondary:hover {
    background: var(--color-gray-light);
  }
  
  .option-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  
  .option-card.selected:hover {
    transform: translateY(-3px);
  }
  
  #radarChart {
    width: 400px;
    height: 400px;
  }
}

/* ===== 加载动画 ===== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xl);
}

.loading-dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: loading-bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ===== 辅助类 ===== */
.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

