/**
 * 址南针 v0.4 - 样式文件
 * v0.4 UI优化版：品牌色升级、卡片升级、微动画、移动端优化
 */

/* ========== CSS Variables - 品牌色升级 ========== */
:root {
  /* 主品牌色 - 蓝紫渐变 */
  --brand-primary: #5B6CFF;
  --brand-primary-dark: #4050E8;
  --brand-primary-light: #EEF0FF;
  --brand-accent: #FF6B9D;
  --brand-gradient: linear-gradient(135deg, #5B6CFF 0%, #8B5CF6 100%);
  
  /* 渐变文字（用于特殊场景） */
  --brand-text-gradient: linear-gradient(135deg, #5B6CFF 0%, #8B5CF6 100%);
  
  /* 功能色 */
  --success: #00C853;
  --success-light: rgba(0, 200, 83, 0.1);
  --warning: #FFB300;
  --warning-light: rgba(255, 179, 0, 0.1);
  --danger: #FF5252;
  --danger-light: rgba(255, 82, 82, 0.1);
  --info: #2979FF;
  
  /* 中性色 */
  --title-black: #1A1A1A;
  --text-gray: #4A4A4A;
  --text-secondary: #999999;
  --border-gray: #E8E8E8;
  --bg-gray: #F5F5F5;
  --white: #FFFFFF;
  
  /* 间距 */
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px;
  
  /* 圆角 - 升级为更大圆角 */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px;
  
  /* 阴影 - 双层阴影更精致 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.12);
  
  /* 品牌阴影 */
  --brand-shadow: 0 4px 16px rgba(91, 108, 255, 0.3);
  --brand-shadow-hover: 0 8px 24px rgba(91, 108, 255, 0.4);
  
  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* ========== Base ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-family); color: var(--text-gray); background: var(--bg-gray); line-height: 1.6; min-height: 100vh; }
.container { max-width: 960px; margin: 0 auto; padding: 0 var(--space-md); }

/* ========== Hero 区域 - 升级版 ========== */
.hero {
  text-align: center;
  padding: 64px var(--space-md) 48px;
  background: linear-gradient(180deg, #F8F9FF 0%, var(--white) 100%);
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

/* 背景装饰 */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 200%;
  background: radial-gradient(circle, rgba(91, 108, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--title-black) 0%, var(--brand-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-subtitle::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--brand-gradient);
  margin: 0 auto 12px;
  border-radius: 2px;
}

/* ========== Header ========== */
.header { display: flex; justify-content: space-between; align-items: center; height: 64px; padding: 0 var(--space-lg); background: var(--white); border-bottom: 1px solid var(--border-gray); }
.logo { display: flex; align-items: center; gap: var(--space-sm); }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 20px; font-weight: 700; background: var(--brand-text-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-actions { display: flex; gap: var(--space-md); }

/* ========== 步骤指示器（新增） ========== */
.progress-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-lg);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: var(--bg-gray);
  color: var(--text-secondary);
}

.progress-step.current .step-circle {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: var(--brand-shadow);
}

.progress-step.completed .step-circle {
  background: var(--success);
  color: var(--white);
}

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

.progress-step.current .step-label {
  color: var(--brand-primary);
  font-weight: 600;
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--bg-gray);
  margin: 0 var(--space-sm);
}

/* ========== Form - 卡片升级版 ========== */
.form-section { padding: var(--space-lg) 0; }

.form-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm), 0 8px 24px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.5s ease forwards;
}

.form-card:nth-child(1) { animation-delay: 0.1s; }
.form-card:nth-child(2) { animation-delay: 0.15s; }
.form-card:nth-child(3) { animation-delay: 0.2s; }
.form-card:nth-child(4) { animation-delay: 0.25s; }
.form-card:nth-child(5) { animation-delay: 0.3s; }

@keyframes cardFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.form-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 16px 40px rgba(0,0,0,0.1);
}

.form-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 17px;
  font-weight: 700;
  color: var(--title-black);
  margin-bottom: var(--space-md);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--brand-gradient);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  border-radius: 50%;
}

.label-hint { font-size: 13px; font-weight: 400; color: var(--text-secondary); margin-left: var(--space-sm); }

/* ========== Input - 优化版 ========== */
.input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  font-size: 16px;
  font-family: inherit;
  color: var(--title-black);
  background: #FAFAFA;
  border: 2px solid var(--border-gray);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.input:focus {
  border-color: var(--brand-primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(91, 108, 255, 0.1), 0 2px 8px rgba(91, 108, 255, 0.15);
  transform: translateY(-1px);
}

.input::placeholder { color: #BBBBBB; }
.input-small { width: 160px; }
.form-error { border-color: var(--danger) !important; }
.error-message { font-size: 12px; color: var(--danger); margin-top: var(--space-xs); }

/* ========== Tags - 优化版 ========== */
.form-group { margin-bottom: var(--space-md); }
.form-group:last-child { margin-bottom: 0; }
.group-label { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: var(--space-sm); }
.tag-group { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.tag {
  height: 38px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-gray);
  background: var(--bg-gray);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag:hover {
  background: #EEEEEE;
  transform: scale(1.02);
}

.tag.selected {
  background: linear-gradient(135deg, #EEF0FF 0%, #E8EBFF 100%);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(91, 108, 255, 0.2);
}

/* ========== Address ========== */
.address-item { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.address-input { flex: 1; }
.btn-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border-gray); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; color: var(--text-secondary); transition: all 0.2s; }
.btn-icon:hover { border-color: var(--danger); color: var(--danger); }
.btn-add { display: flex; align-items: center; gap: var(--space-xs); height: 36px; padding: 0 var(--space-md); font-size: 14px; font-family: inherit; color: var(--brand-primary); background: transparent; border: 1px dashed var(--border-gray); border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s; }
.btn-add:hover { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.btn-add:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== Budget ========== */
.budget-row { display: flex; gap: var(--space-lg); }
.budget-item { flex: 1; }
.budget-label { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: var(--space-sm); }
.optional { font-size: 12px; color: var(--text-secondary); }

/* ========== Mode ========== */
.mode-group { display: flex; gap: var(--space-md); }
.mode-option { flex: 1; cursor: pointer; }
.mode-option input { display: none; }
.mode-content { display: flex; flex-direction: column; padding: var(--space-md); background: var(--bg-gray); border: 2px solid var(--border-gray); border-radius: var(--radius-md); transition: all 0.2s; }
.mode-option input:checked + .mode-content { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.mode-title { font-size: 16px; font-weight: 600; color: var(--title-black); margin-bottom: var(--space-xs); }
.mode-desc { font-size: 14px; color: var(--text-secondary); }
.mode-option input:checked + .mode-content .mode-desc { color: var(--brand-primary); }

/* ========== Buttons - 渐变升级版 ========== */
.btn-text { font-size: 14px; font-family: inherit; color: var(--brand-primary); background: transparent; border: none; cursor: pointer; transition: all 0.2s; }
.btn-text:hover { text-decoration: underline; }

.btn-primary {
  display: block;
  width: 100%;
  max-width: 320px;
  height: 52px;
  margin: var(--space-lg) auto 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-family: inherit;
  color: var(--white);
  background: var(--brand-gradient);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--brand-shadow);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

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

.btn-primary:hover::before { left: 100%; }
.btn-primary:active { transform: translateY(0); box-shadow: var(--brand-shadow); }
.btn-primary:disabled { background: var(--border-gray); box-shadow: none; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  height: 40px;
  padding: 0 var(--space-lg);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--brand-primary);
  background: var(--white);
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { background: var(--brand-primary-light); }

/* ========== Disclaimer ========== */
.disclaimer { text-align: center; font-size: 13px; color: var(--text-secondary); margin-top: var(--space-md); padding: var(--space-sm); background: var(--bg-gray); border-radius: var(--radius-sm); }

/* ========== Loading ========== */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.loading-box { background: var(--white); border-radius: var(--radius-lg); padding: var(--space-xl); text-align: center; min-width: 280px; }
.spinner { width: 48px; height: 48px; border: 4px solid var(--border-gray); border-top-color: var(--brand-primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto var(--space-md); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 16px; font-weight: 600; color: var(--title-black); margin-bottom: var(--space-sm); }
.loading-progress { font-size: 13px; color: var(--text-secondary); }

/* ========== Report Section ========== */
.report-section { padding: var(--space-lg) 0; }
.report-header { background: var(--white); border: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.report-title-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-md); }
.report-title { font-size: 20px; font-weight: 700; color: var(--title-black); }
.report-actions { display: flex; gap: var(--space-md); }
.report-content { background: var(--white); border: none; border-top: 1px solid var(--border-gray); border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-md); }
.report-footer { text-align: center; padding: var(--space-lg); font-size: 14px; color: var(--text-secondary); background: var(--bg-gray); border: none; border-radius: var(--radius-lg); margin-top: var(--space-md); }
.disclaimer-text { margin-top: var(--space-sm); }

/* ========== Score Card - 升级版 ========== */
.score-card {
  text-align: center;
  padding: 40px 32px;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, #F8F9FF 0%, #F0F2FF 100%);
  border: 2px solid rgba(91, 108, 255, 0.1);
  box-shadow: 0 8px 32px rgba(91, 108, 255, 0.12);
  animation: successPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.score-card.bg-success-light { background: linear-gradient(135deg, rgba(0,200,83,0.08) 0%, rgba(0,200,83,0.15) 100%); border-color: rgba(0,200,83,0.2); }
.score-card.bg-info-light { background: linear-gradient(135deg, #F8F9FF 0%, #F0F2FF 100%); border-color: rgba(91,108,255,0.1); }
.score-card.bg-warning-light { background: linear-gradient(135deg, rgba(255,179,0,0.08) 0%, rgba(255,179,0,0.15) 100%); border-color: rgba(255,179,0,0.2); }
.score-card.bg-warning-orange-light { background: linear-gradient(135deg, rgba(255,112,67,0.08) 0%, rgba(255,112,67,0.15) 100%); border-color: rgba(255,112,67,0.2); }
.score-card.bg-danger-light { background: linear-gradient(135deg, rgba(239,83,80,0.08) 0%, rgba(239,83,80,0.15) 100%); border-color: rgba(239,83,80,0.2); }

.score-number {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--space-sm);
  background: var(--brand-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-card.bg-success-light .score-number { background: linear-gradient(135deg, #00C853 0%, #00A843 100%); -webkit-background-clip: text; }
.score-card.bg-warning-light .score-number { background: linear-gradient(135deg, #FF8F00 0%, #FF6F00 100%); -webkit-background-clip: text; }
.score-card.bg-warning-orange-light .score-number { background: linear-gradient(135deg, #FF7043 0%, #FF5722 100%); -webkit-background-clip: text; }
.score-card.bg-danger-light .score-number { background: linear-gradient(135deg, #EF5350 0%, #E53935 100%); -webkit-background-clip: text; }

.score-stars { font-size: 36px; letter-spacing: 4px; margin-bottom: var(--space-sm); }
.star-filled { color: #FFD700; filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4)); }
.score-label { font-size: 18px; font-weight: 600; }
.score-card.bg-success-light .score-label { color: #00C853; }
.score-card.bg-info-light .score-label { color: var(--brand-primary); }
.score-card.bg-warning-light .score-label { color: #FF8F00; }
.score-card.bg-warning-orange-light .score-label { color: #FF7043; }
.score-card.bg-danger-light .score-label { color: #EF5350; }

/* ========== 评分算法说明卡片 - 优化版 ========== */
.score-algorithm-card {
  background: linear-gradient(135deg, #F8F9FF 0%, #F5F7FF 100%);
  border: 2px dashed rgba(91, 108, 255, 0.3);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  transition: all 0.2s ease;
}

.score-algorithm-card:hover { border-color: rgba(91, 108, 255, 0.5); background: linear-gradient(135deg, #F0F2FF 0%, #EBEEFF 100%); }

.score-algorithm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: rgba(91, 108, 255, 0.05);
  cursor: pointer;
  user-select: none;
}

.score-algorithm-header:hover { background: rgba(91, 108, 255, 0.08); }

.score-algorithm-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--title-black);
}

.score-algorithm-toggle {
  font-size: 13px;
  color: var(--brand-primary);
  font-weight: 600;
  background: rgba(91, 108, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}

/* 用字符替换方式显示展开/收起状态 */
.score-algorithm-toggle::after {
  content: ' ▼';
  font-size: 11px;
}

.score-algorithm-toggle.expanded::after {
  content: ' ▲';
}

.score-algorithm-body { padding: 0 24px var(--space-lg); display: none; }
.score-algorithm-body.open { display: block; }

.score-formula {
  font-size: 14px;
  color: var(--text-gray);
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.score-formula strong { color: var(--brand-primary); font-weight: 600; }

.score-formula-row { display: flex; align-items: flex-start; gap: var(--space-sm); padding: var(--space-sm) 0; font-size: 13px; border-bottom: 1px solid #eee; }
.score-formula-row:last-child { border-bottom: none; }
.score-formula-label { font-weight: 600; color: var(--title-black); min-width: 80px; }
.score-formula-detail { color: var(--text-secondary); }
.score-formula-detail strong { color: var(--text-gray); }

/* ========== Metrics ========== */
.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); margin-bottom: var(--space-lg); }
.metric-card { background: var(--bg-gray); border-radius: var(--radius-md); padding: var(--space-md); }
.metric-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-xs); }
.metric-name { font-size: 14px; font-weight: 600; color: var(--title-black); }
.metric-stars { font-size: 14px; }
.metric-value { font-size: 12px; color: var(--text-secondary); }

/* Detail Section */
.detail-section { margin-bottom: var(--space-lg); }
.section-title { font-size: 16px; font-weight: 600; color: var(--title-black); margin-bottom: var(--space-sm); padding-left: var(--space-sm); border-left: 3px solid var(--brand-primary); }

/* Lists */
.advantage-list, .risk-list, .suggestion-list, .action-list { list-style: none; }
.advantage-list li, .risk-list li, .suggestion-list li { display: flex; align-items: flex-start; gap: var(--space-sm); padding: var(--space-sm) 0; font-size: 14px; line-height: 1.5; }
.advantage-list li::before { content: '✓'; color: var(--success); font-weight: bold; }
.risk-list li::before { content: '⚠'; color: var(--warning); font-weight: bold; }
.suggestion-list li::before { content: '💡'; }

/* ========== 行动清单 - 优化版 ========== */
.action-list { background: #FAFAFA; border-radius: var(--radius-md); padding: 20px; }
.action-list li {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px 0;
  border-bottom: 1px solid #EEEEEE;
  transition: all 0.2s;
}

.action-list li:hover { background: rgba(91, 108, 255, 0.03); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.action-list li:last-child { border-bottom: none; }
.action-list li::before { display: none; }

.action-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #D0D0D0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: var(--white);
  font-size: 14px;
  color: var(--white);
  flex-shrink: 0;
}

.action-checkbox:hover { border-color: var(--brand-primary); transform: scale(1.1); }

.action-checkbox.checked {
  background: linear-gradient(135deg, #00C853 0%, #00A843 100%);
  border-color: var(--success);
  box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
}

.action-checkbox.checked::after { content: '✓'; }

.action-text { font-size: 15px; line-height: 1.6; cursor: pointer; flex: 1; }
.action-list li.checked .action-text { color: #BBBBBB; text-decoration: line-through; text-decoration-color: #D0D0D0; text-decoration-thickness: 2px; }

/* ========== Compare Table ========== */
.compare-table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-lg); font-size: 14px; }
.compare-table th, .compare-table td { padding: var(--space-sm) var(--space-md); text-align: center; border: 1px solid var(--border-gray); }
.compare-table th { background: var(--bg-gray); font-weight: 600; color: var(--title-black); }
.compare-table tr:nth-child(even) td { background: #fafafa; }
.compare-rank.gold { color: #FFD700; }
.compare-rank.silver { color: #9E9E9E; }
.compare-rank.bronze { color: #CD7F32; }

/* LLM Enhanced */
.llm-enhanced { background: linear-gradient(135deg, var(--brand-primary-light) 0%, #f0f4ff 100%); border: 1px solid var(--brand-primary); border-radius: var(--radius-lg); padding: var(--space-lg); margin-top: var(--space-lg); }
.llm-header { display: flex; align-items: center; gap: var(--space-sm); font-size: 14px; font-weight: 600; color: var(--brand-primary); margin-bottom: var(--space-md); }
.llm-content { 
  font-size: 14px; 
  line-height: 1.8; 
  color: var(--text-gray); 
  white-space: pre-wrap; 
  text-align: left;
}

/* Address Card */
.address-card { background: var(--bg-gray); border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-md); }
.address-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.address-card-title { font-size: 14px; font-weight: 600; color: var(--title-black); }
.address-card-badge { font-size: 12px; padding: 4px 10px; border-radius: 12px; background: var(--brand-gradient); color: var(--white); font-weight: 600; }

/* Modal */
.modal { 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: 1000; padding: var(--space-md); }
.modal-content { background: var(--white); border-radius: var(--radius-lg); max-width: 500px; width: 100%; max-height: 80vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: var(--space-lg); border-bottom: 1px solid var(--border-gray); }
.modal-header h3 { font-size: 18px; font-weight: 600; color: var(--title-black); }
.modal-body { padding: var(--space-lg); }
.modal-body h4 { font-size: 15px; font-weight: 600; color: var(--title-black); margin: var(--space-md) 0 var(--space-sm); }
.modal-body h4:first-child { margin-top: 0; }
.modal-body p { font-size: 14px; line-height: 1.6; color: var(--text-gray); margin-bottom: var(--space-sm); }
.modal-body ol { padding-left: var(--space-lg); margin-bottom: var(--space-sm); }
.modal-body li { font-size: 14px; line-height: 1.6; margin-bottom: var(--space-xs); }
.info-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: var(--space-md); }
.info-table td { padding: var(--space-xs) var(--space-sm); border: 1px solid var(--border-gray); }

/* Footer */
.footer { text-align: center; padding: var(--space-lg); font-size: 12px; color: var(--text-secondary); border-top: 1px solid var(--border-gray); }

/* Rank Badge */
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: 14px; font-weight: 700; border-radius: 50%; }
.rank-badge.gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: var(--white); }
.rank-badge.silver { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: var(--white); }
.rank-badge.bronze { background: linear-gradient(135deg, #CD7F32, #8B4513); color: var(--white); }

/* ========== Responsive ========== */
@media (max-width: 1024px) { .container { max-width: 100%; padding: 0 20px; } }

@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
  .hero-title { font-size: 26px; }
  .hero { padding: 48px var(--space-md) 32px; }
  .progress-indicator { display: none; }
  .budget-row { flex-direction: column; }
  .mode-group { flex-direction: column; }
  .metrics-grid { grid-template-columns: 1fr; }
  .report-title-row { flex-direction: column; align-items: flex-start; }
  .score-card { padding: 32px 24px; }
  .score-number { font-size: 48px; }
  .score-stars { font-size: 28px; }
  .btn-primary { max-width: 100%; }
  .form-card { padding: 20px; }
  .compare-table { font-size: 12px; }
  .compare-table th, .compare-table td { padding: var(--space-xs); }
  .score-formula { font-size: 13px; padding: var(--space-sm); }
  .tag { height: 34px; padding: 0 14px; font-size: 14px; }
  .input { height: 48px; font-size: 16px; }
  .input::placeholder { font-size: 14px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 22px; }
  .hero-subtitle { font-size: 14px; }
  .form-label { font-size: 15px; }
  .score-algorithm-header { padding: 14px 16px; }
  .score-algorithm-body { padding: 0 16px var(--space-md); }
}
/* ========== v0.5 新增样式 ========== */

/* --- 表单验证错误样式 --- */
.required-mark {
  color: var(--danger);
  margin-left: 4px;
}

.field-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-error::before {
  content: '⚠';
  font-size: 12px;
}

.input-error {
  border-color: var(--danger) !important;
  background: rgba(255, 82, 82, 0.05) !important;
}

.card-error {
  border: 2px solid var(--danger);
  background: rgba(255, 82, 82, 0.03);
}

/* --- 地址建议下拉样式 --- */
#helpModal .modal-body li {
  margin-bottom: 6px;
}

/* ========== Bug修复样式 ========== */

/* --- 修复1: 地址建议下拉被遮挡问题 - 使用fixed定位 --- */
.address-suggestions {
  position: fixed;
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  width: auto;
  min-width: 300px;
  overflow-y: auto;
  z-index: 9999 !important;
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--bg-gray);
  transition: background 0.15s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: var(--brand-primary-light);
}

.suggestion-name {
  font-weight: 600;
  color: var(--title-black);
  font-size: 14px;
  line-height: 1.3;
}

.suggestion-address {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- 评分表格样式 --- */
.score-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.score-table th {
  background: var(--brand-primary);
  color: white;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}

.score-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-gray);
  color: var(--text-gray);
}

.score-table tr:hover {
  background: var(--bg-gray);
}

.score-table .score-excellent { background: rgba(0, 200, 83, 0.08); }
.score-table .score-good { background: rgba(46, 91, 255, 0.06); }
.score-table .score-normal { background: rgba(255, 179, 0, 0.08); }
.score-table .score-warning { background: rgba(255, 112, 67, 0.08); }
.score-table .score-danger { background: rgba(239, 83, 80, 0.08); }
