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

:root {
  /* 主色调 - 深空蓝，高级感 */
  --primary: #1e3a5f;
  --primary-light: #2d5a87;
  --primary-dark: #152a42;
  
  /* 辅助色 */
  --accent: #c9a962; /* 金色点缀 */
  --accent-light: #e8d5a3;
  
  /* 中性色 */
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-tertiary: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border: #e2e8f0;
  
  /* 功能色 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* 过渡 */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ==================== 顶部导航 ==================== */
.header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid transparent;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient-primary);
  position: relative;
}

.logo-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  opacity: 0.3;
}

.logo-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

/* ==================== 主内容区 ==================== */
.main {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.step {
  display: none;
  padding: 20px 24px 40px;
  animation: fadeIn 0.4s ease;
}

.step.active {
  display: block;
}

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

/* ==================== 欢迎页 ==================== */
.welcome-content {
  padding: 40px 0 60px;
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
}

.trust-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 20px;
}

/* ==================== 按钮 ==================== */
.btn-primary {
  width: 100%;
  padding: 16px 32px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  font-family: inherit;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-large {
  padding: 18px 36px;
  font-size: 17px;
}

.btn-arrow {
  transition: transform var(--transition-normal);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-ghost {
  padding: 14px 28px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ==================== 表单样式 ==================== */
.form-container {
  padding: 10px 0 30px;
}

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

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width var(--transition-normal);
  width: 33%;
}

.step-indicator {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}

.form-step {
  display: none;
  animation: slideIn 0.4s ease;
}

.form-step.active {
  display: block;
}

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

.form-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: -0.3px;
}

.form-group {
  margin-bottom: 32px;
}

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

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.option-card {
  padding: 16px 12px;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.option-card:hover {
  background: var(--bg-tertiary);
}

.option-card.selected {
  background: rgba(30, 58, 95, 0.08);
  border-color: var(--primary);
}

.option-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.option-sub {
  font-size: 12px;
  color: var(--text-tertiary);
}

.option-card.selected .option-label {
  color: var(--primary);
}

.form-nav {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  position: sticky;
  bottom: 0;
  padding: 20px 0;
  background: linear-gradient(to top, var(--bg-primary) 70%, transparent);
}

.form-nav .btn-primary {
  flex: 1;
}

/* ==================== 加载页 ==================== */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 32px;
}

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

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

.loading-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ==================== 结果页 ==================== */
.result-container {
  padding-bottom: 40px;
}

.result-header {
  margin-bottom: 24px;
}

.result-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.result-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 整体评估卡片 */
.assessment-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--border);
}

.assessment-score {
  text-align: center;
  flex-shrink: 0;
}

.score-number {
  display: block;
  font-size: 48px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.score-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.assessment-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assessment-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-label {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 60px;
}

.item-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.item-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 1s ease;
}

/* 院校列表 */
.school-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.school-category {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.school-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.school-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.school-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
}

.school-card.rush::before {
  background: linear-gradient(180deg, #ef4444, #f97316);
}

.school-card.stable::before {
  background: linear-gradient(180deg, #10b981, #059669);
}

.school-card.safe::before {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.school-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.school-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.school-major {
  font-size: 13px;
  color: var(--primary);
  background: rgba(30, 58, 95, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.school-level {
  font-size: 12px;
  color: var(--text-tertiary);
}

.match-rate {
  text-align: right;
}

.match-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.match-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

.school-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.school-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.highlight-tag {
  font-size: 12px;
  padding: 3px 8px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: 4px;
}

.school-reason {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* 难度星级 */
.difficulty {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}

.star {
  font-size: 14px;
  color: var(--text-tertiary);
}

.star.filled {
  color: var(--accent);
}

/* ==================== CTA区域 ==================== */
.cta-section {
  margin-top: 20px;
}

.cta-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-lg);
}

.cta-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cta-card p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 20px;
}

.cta-card .btn-primary {
  background: white;
  color: var(--primary);
  font-weight: 600;
}

.cta-card .btn-primary:hover {
  background: var(--bg-secondary);
}

/* ==================== 弹窗 ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
  animation: slideUp 0.4s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-tertiary);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-content h3 {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.modal-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.wechat-card {
  text-align: center;
  margin-bottom: 24px;
}

.wechat-qr {
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-placeholder {
  text-align: center;
  color: var(--text-tertiary);
}

.qr-placeholder span {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--success);
}

.wechat-id {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ==================== 底部 ==================== */
.footer {
  padding: 20px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ==================== 响应式 ==================== */
@media (max-width: 375px) {
  .option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .welcome-title {
    font-size: 28px;
  }
  
  .school-meta {
    gap: 12px;
  }
}
