/* ═══════════════════════════════════════════
   云帆志愿 · 新设计系统 (2026.08)
   基于用户偏好的豆包风格原型提取
   配色: 蓝色主调 #2478E5 + 三色分级
   ═══════════════════════════════════════════ */

/* === CSS 变量 (扩展原有变量体系) === */
:root {
  --primary:        #2478E5;
  --primary-light:  #e8f1fd;
  --primary-dark:   #1a5dc4;
  --levelA:         #36C782;  /* A档·优先推荐 */
  --levelA-light:   #ebf9f2;
  --levelB:         #FFB84D;  /* B档·谨慎选择 */
  --levelB-light:   #fff8ed;
  --levelC:         #F25757;  /* C档·避雷专业 */
  --levelC-light:   #fef2f2;
  --bg-light:       #F7F9FC;  /* 页面底色 */
  --card-shadow:    0 4px 20px rgba(36,120,229,0.08);
  --card-shadow-hover: 0 8px 30px rgba(36,120,229,0.15);
  --radius-lg:      14px;
  --radius-md:      10px;
  --radius-sm:      8px;
  --transition:     0.3s ease;

  /* 兼容原有变量 */
  --blue-600: var(--primary);
  --blue-700: var(--primary-dark);
  --gray-50:  var(--bg-light);
}

/* === 基础重置 === */
body.ds-body {
  background: var(--bg-light);
  color: #1f2937;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === 导航栏 === */
.ds-nav {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  box-shadow: var(--card-shadow);
}
.ds-nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.ds-nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 700; color: var(--primary);
  text-decoration: none;
}
.ds-nav-brand:hover { text-decoration: none; }
.ds-nav-brand i { font-size: 24px; }
.ds-nav-links { display: flex; gap: 20px; align-items: center; font-size: 14px; }
.ds-nav-links a {
  color: #4b5563; text-decoration: none; font-weight: 500;
  transition: color var(--transition);
}
.ds-nav-links a:hover { color: var(--primary); text-decoration: none; }
.ds-nav-links a.active { color: var(--primary); font-weight: 600; }
/* 导航下拉分组 */
.ds-nav-group { position: relative; }
.ds-nav-group-btn { color: #4b5563; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 4px; font-size: 14px; padding: 4px 0; border: none; background: none; }
.ds-nav-group-btn:hover { color: var(--primary); }
.ds-nav-group-btn.active { color: var(--primary); font-weight: 600; }
.ds-nav-group-btn i { font-size: 10px; transition: transform var(--transition); }
.ds-nav-group:hover .ds-nav-group-btn i { transform: rotate(180deg); }
.ds-nav-dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 140px; background: #fff; border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  padding: 8px 0; opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s, transform .2s;
  transform-origin: top center; transform: translateX(-50%) translateY(8px);
  z-index: 100;
}
.ds-nav-group:hover .ds-nav-dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.ds-nav-dropdown a {
  display: block; padding: 8px 18px; font-size: 13px; color: #4b5563;
  white-space: nowrap; transition: background .15s, color .15s;
}
.ds-nav-dropdown a:hover { background: var(--bg); color: var(--primary); text-decoration: none; }
.ds-nav-actions { display: flex; gap: 10px; align-items: center; }

/* 导航进度条 */
.ds-progress-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px 10px; }
.ds-progress-info { display: flex; justify-content: space-between; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.ds-progress-bar { width: 100%; height: 6px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.ds-progress-bar-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.7s ease; }

@media (max-width: 768px) {
  .ds-nav-links { display: none; }
}

/* === 按钮 === */
.ds-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; border: none;
  transition: all var(--transition);
  font-family: inherit;
}
.ds-btn-primary { background: var(--primary); color: #fff; }
.ds-btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.ds-btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.ds-btn-outline:hover { background: var(--primary-light); text-decoration: none; }
.ds-btn-sm { padding: 6px 14px; font-size: 13px; }
.ds-btn-lg { padding: 13px 28px; font-size: 16px; }

/* === 卡片 === */
.ds-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: all var(--transition);
}
.ds-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}
.ds-card-static { /* 不带hover的卡片 */ }
.ds-card-static:hover { transform: none; box-shadow: var(--card-shadow); }

/* 左色条卡片 (用于专业分级) */
.ds-card-stripe {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 20px;
  border-left: 4px solid transparent;
  transition: all var(--transition);
}
.ds-card-stripe:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}
.ds-card-stripe.stripe-A { border-left-color: var(--levelA); }
.ds-card-stripe.stripe-B { border-left-color: var(--levelB); }
.ds-card-stripe.stripe-C { border-left-color: var(--levelC); }

/* === 分级标签 === */
.ds-badge {
  display: inline-block; padding: 2px 10px;
  border-radius: 4px; font-size: 12px; font-weight: 600;
}
.ds-badge-A { background: var(--levelA-light); color: var(--levelA); }
.ds-badge-B { background: var(--levelB-light); color: var(--levelB); }
.ds-badge-C { background: var(--levelC-light); color: var(--levelC); }

/* 阶段标签 */
.ds-stage-tag {
  display: inline-block; padding: 4px 12px;
  border-radius: 4px; font-size: 12px; font-weight: 500;
}
.ds-stage-tag.explore { background: var(--levelA-light); color: var(--levelA); }
.ds-stage-tag.track   { background: var(--primary-light); color: var(--primary); }
.ds-stage-tag.decide  { background: var(--levelB-light); color: var(--levelB); }

/* === 表单 === */
.ds-field { margin-bottom: 16px; }
.ds-field label { display: block; font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.ds-field input,
.ds-field select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #e5e7eb; border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  color: #1f2937; background: #fff;
  outline: none; transition: border-color var(--transition);
}
.ds-field input:focus,
.ds-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* === Hero 首屏 === */
.ds-hero {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 20px;
}
.ds-hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
@media (max-width: 768px) {
  .ds-hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
.ds-hero-eyebrow { font-size: 14px; font-weight: 500; color: var(--primary); margin-bottom: 12px; }
.ds-hero-title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800; line-height: 1.3; margin-bottom: 16px; color: #111827;
}
.ds-hero-desc { font-size: 15px; color: #4b5563; line-height: 1.8; margin-bottom: 24px; }
.ds-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero 统计数字 */
.ds-hero-stats { display: flex; gap: 32px; margin-top: 28px; }
.ds-hero-stat-num { font-size: 28px; font-weight: 800; color: var(--primary); }
.ds-hero-stat-label { font-size: 12px; color: #6b7280; }

/* === 时间线 === */
.ds-timeline {
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #86b6f7 100%);
  border-radius: 99px;
  position: relative;
  margin: 20px 0 16px;
}
.ds-timeline-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; color: #6b7280;
  margin-top: -4px;
}

/* === 三阶段卡片网格 === */
.ds-stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .ds-stage-grid { grid-template-columns: 1fr; }
}

/* === 四宫格优势 === */
.ds-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .ds-feature-grid { grid-template-columns: repeat(2, 1fr); }
}
.ds-feature-item { text-align: center; padding: 16px; }
.ds-feature-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; font-size: 20px;
}
.ds-feature-item h5 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.ds-feature-item p { font-size: 13px; color: #6b7280; line-height: 1.7; }

/* === 章节标题 === */
.ds-section { padding: 48px 0; }
.ds-section-white { background: #fff; }
.ds-section-title {
  font-size: 26px; font-weight: 700; text-align: center;
  margin-bottom: 8px; color: #111827;
}
.ds-section-subtitle {
  font-size: 14px; color: #6b7280; text-align: center;
  max-width: 600px; margin: 0 auto 36px; line-height: 1.8;
}

/* === 筛选栏面板 === */
.ds-filter-bar {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; align-items: end;
}

/* === 专业卡片网格 (地图页) === */
.ds-major-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

/* === 动画 === */
@keyframes dsFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ds-animate-fade {
  animation: dsFadeIn 0.6s ease forwards;
}

/* === 页脚 === */
.ds-footer {
  background: #1f2937; color: #d1d5db;
  padding: 36px 0; text-align: center; font-size: 13px;
}
.ds-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.ds-footer p + p { margin-top: 6px; }
.ds-footer .muted { color: #9ca3af; }

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

/* === 页面头部 === */
.ds-page-head { margin-bottom: 28px; }
.ds-page-head .stage-label { font-size: 13px; color: var(--primary); font-weight: 500; }
.ds-page-head h2 { font-size: 24px; font-weight: 700; margin-top: 6px; }
.ds-page-head p { font-size: 14px; color: #6b7280; margin-top: 6px; line-height: 1.7; }

/* === 对比表格 === */
.ds-compare-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--card-shadow);
}
.ds-compare-table th, .ds-compare-table td {
  padding: 14px 18px; font-size: 14px; text-align: left;
  border-bottom: 1px solid #f3f4f6;
}
.ds-compare-table th { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.ds-compare-table td { background: #fff; }
.ds-compare-table .check { color: var(--levelA); font-weight: 700; }
.ds-compare-table .cross { color: var(--levelC); }

/* === 模考仪表盘 === */
.ds-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .ds-dashboard-grid { grid-template-columns: 1fr; }
}
.ds-record-list { list-style: none; }
.ds-record-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: #fff;
  border: 1px solid #f3f4f6; border-radius: var(--radius-md);
  margin-bottom: 8px; transition: box-shadow var(--transition);
}
.ds-record-item:hover { box-shadow: var(--card-shadow); }
.ds-record-seq {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ds-record-seq.latest { background: var(--primary); color: #fff; }
.ds-record-info { flex: 1; min-width: 0; }
.ds-record-name { font-size: 15px; font-weight: 600; color: #111827; }
.ds-record-meta { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.ds-record-score { text-align: right; flex-shrink: 0; }
.ds-record-score .val { font-size: 18px; font-weight: 700; color: #1f2937; }
.ds-record-score .sub { font-size: 12px; color: #6b7280; }

/* === 图表容器 === */
.ds-chart-wrap {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow); padding: 20px;
}
.ds-chart-wrap h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }

/* === 登录弹窗 === */
.ds-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 100; display: flex; align-items: center; justify-content: center;
}
.ds-modal {
  background: #fff; border-radius: var(--radius-lg);
  padding: 32px; max-width: 420px; width: 90%;
  animation: dsFadeIn 0.3s ease;
}
.ds-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.ds-modal-header h4 { font-size: 18px; font-weight: 700; color: var(--primary); }

/* === 工具中心新版 === */
.ds-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.ds-tool-entry {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow); padding: 22px;
  transition: all var(--transition);
  text-decoration: none; color: inherit;
  border: 1.5px solid transparent;
}
.ds-tool-entry:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-light);
  text-decoration: none;
}
.ds-tool-entry .num {
  font-size: 12px; font-weight: 700; color: var(--primary);
  letter-spacing: 1px;
}
.ds-tool-entry h3 { font-size: 16px; font-weight: 700; margin: 8px 0 6px; }
.ds-tool-entry p { font-size: 13px; color: #6b7280; line-height: 1.6; }

/* === 其他工具类 === */
.ds-text-center { text-align: center; }
.ds-mt-lg { margin-top: 32px; }
.ds-mb-lg { margin-bottom: 32px; }
.ds-hidden { display: none; }
.ds-flex-center { display: flex; align-items: center; justify-content: center; }
.ds-gap-sm { gap: 8px; }

/* === 使用说明折叠区（各工具页共用） === */
.help-toggle { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--primary); cursor:pointer; user-select:none; padding-top:12px; font-weight:500; }
.help-toggle:hover { color:var(--primary-dark); }
.help-body { background:var(--primary-light); border-radius:var(--radius-md); padding:16px 20px; margin-top:10px; font-size:13px; color:#64748b; line-height:1.8; display:none; }
.help-body.open { display:block; }
.help-body b { color:#374151; }
.help-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px 24px; margin-top:6px; }
@media (max-width:768px) { .help-grid { grid-template-columns:1fr; } }
