/* ============================================================
   高考志愿填报助手 · 全局样式（移动端优先，浅色主题）
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #2b6de8;
  --primary-dark: #1e54c4;
  --primary-light: #e8f0fe;
  --success: #16a34a;
  --warning: #ea9a1a;
  --danger: #e5484d;
  --chong: #e5484d;
  --wen: #2b6de8;
  --bao: #16a34a;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1a2332;
  --text2: #5b6b83;
  --text3: #93a1b5;
  --border: #e6ebf4;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(23, 43, 99, .06);
}

html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  padding-bottom: 70px;
}

a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
}
.topbar .logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; color: var(--text);
  white-space: nowrap;
}
.topbar .logo .icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #5b9bff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px;
}
.topbar .nav-links { display: flex; gap: 4px; overflow-x: auto; margin-left: 4px; }
.topbar .nav-links a {
  padding: 6px 11px; border-radius: 8px; font-size: 14px;
  color: var(--text2); white-space: nowrap;
}
.topbar .nav-links a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.topbar .user-box { margin-left: auto; font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 8px; }

/* ---------- 底部导航（移动端） ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 7px; font-size: 11px; color: var(--text3);
}
.bottom-nav a .ic { font-size: 20px; line-height: 1.2; }
.bottom-nav a.active { color: var(--primary); font-weight: 600; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 12px 14px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.card-title .sub { font-size: 12px; font-weight: 400; color: var(--text3); margin-left: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; cursor: pointer;
  padding: 11px 18px; font-size: 15px; font-weight: 600;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost { background: var(--primary-light); color: var(--primary); }
.btn-danger { background: #fdecec; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; color: var(--text); background: #fff;
  outline: none; transition: border-color .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-tip { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ---------- 标签/徽章 ---------- */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
}
.badge-985 { background: #fdeaea; color: var(--chong); }
.badge-211 { background: #fdf3e3; color: #b26a00; }
.badge-syl { background: #e8f0fe; color: var(--primary); }
.badge-pt { background: #eef1f6; color: var(--text2); }
.badge-zk { background: #e9f9ef; color: var(--success); }
.badge-chong { background: #fdeaea; color: var(--chong); }
.badge-wen { background: #e8f0fe; color: var(--wen); }
.badge-bao { background: #e9f9ef; color: var(--bao); }

.tag-chip {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 500; margin: 2px 3px 2px 0;
}

/* ---------- 列表项 ---------- */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.list-item:last-child { border-bottom: none; }
.list-item:active { background: #f8faff; }
.list-item .avatar {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.list-item .body { flex: 1; min-width: 0; }
.list-item .body .name { font-size: 15px; font-weight: 600; }
.list-item .body .desc { font-size: 12px; color: var(--text3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .right { text-align: right; flex-shrink: 0; }
.list-item .right .v1 { font-size: 14px; font-weight: 700; color: var(--primary); }
.list-item .right .v2 { font-size: 11px; color: var(--text3); }

/* ---------- 搜索条 ---------- */
.search-bar { display: flex; gap: 8px; padding: 12px 14px 4px; }
.search-bar .input { flex: 1; }
.search-bar .btn { flex-shrink: 0; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex; gap: 8px; padding: 10px 14px 2px;
  overflow-x: auto; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar .select { width: auto; flex-shrink: 0; padding: 8px 12px; font-size: 13px; }

/* ---------- 段标签 ---------- */
.seg {
  display: flex; background: #eef1f7; border-radius: 10px; padding: 3px; gap: 3px;
}
.seg button {
  flex: 1; border: none; background: transparent; padding: 8px 0;
  border-radius: 8px; font-size: 14px; color: var(--text2); cursor: pointer;
}
.seg button.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* ---------- 概率条 ---------- */
.prob-bar { height: 6px; border-radius: 3px; background: #eef1f6; margin-top: 6px; overflow: hidden; }
.prob-bar .fill { height: 100%; border-radius: 3px; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--text3); }
.empty .ic { font-size: 40px; margin-bottom: 8px; }

/* ---------- 提示条 ---------- */
.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin: 10px 14px; }
.alert-warn { background: #fff8e8; color: #8a5a00; border: 1px solid #f5e3b3; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #c9dcfb; }
.alert-danger { background: #fdecec; color: #b32d31; border: 1px solid #f6cccc; }

/* ---------- 首页 hero ---------- */
.hero {
  background: linear-gradient(135deg, #2b6de8 0%, #5b9bff 60%, #7db2ff 100%);
  color: #fff; padding: 26px 18px 22px;
  border-radius: 0 0 22px 22px;
}
.hero h1 { font-size: 21px; margin-bottom: 6px; }
.hero p { font-size: 13px; opacity: .9; }
.hero .stat-row { display: flex; gap: 12px; margin-top: 16px; }
.hero .stat {
  flex: 1; background: rgba(255,255,255,.16);
  border-radius: 12px; padding: 10px; text-align: center;
  backdrop-filter: blur(4px);
}
.hero .stat .n { font-size: 19px; font-weight: 700; }
.hero .stat .l { font-size: 11px; opacity: .85; }

/* ---------- 首页入口格子 ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 4px 14px; }
.entry-grid .entry {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 14px; text-align: center; cursor: pointer;
}
.entry-grid .entry .ic { font-size: 28px; }
.entry-grid .entry .t { font-size: 15px; font-weight: 700; margin-top: 8px; }
.entry-grid .entry .d { font-size: 12px; color: var(--text3); margin-top: 3px; }
.entry-grid .entry:active { transform: scale(.97); }

/* ---------- 步骤条 ---------- */
.steps { display: flex; padding: 14px; gap: 6px; }
.steps .step { flex: 1; text-align: center; position: relative; }
.steps .step .num {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.steps .step .txt { font-size: 11px; color: var(--text2); margin-top: 5px; }
.steps .step::after {
  content: ''; position: absolute; top: 13px; left: 55%; width: 90%;
  height: 2px; background: var(--border);
}
.steps .step:last-child::after { display: none; }

/* ---------- 详情页 ---------- */
.detail-head { padding: 18px 16px; background: #fff; border-bottom: 1px solid var(--border); }
.detail-head .name { font-size: 20px; font-weight: 700; }
.detail-head .meta { font-size: 13px; color: var(--text2); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-grid .cell { background: #f7f9fd; border-radius: 10px; padding: 10px 12px; }
.info-grid .cell .k { font-size: 12px; color: var(--text3); }
.info-grid .cell .v { font-size: 14px; font-weight: 600; margin-top: 2px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text3); font-weight: 500; background: #f7f9fd; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 18px 18px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 85vh; overflow-y: auto;
}
.modal .m-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.modal .m-close { font-size: 20px; color: var(--text3); cursor: pointer; padding: 0 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(20, 30, 50, .88); color: #fff;
  padding: 10px 20px; border-radius: 20px; font-size: 14px;
  z-index: 300; transition: opacity .3s; pointer-events: none;
  max-width: 85vw; text-align: center;
}

/* ---------- 登录页 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #2b6de8, #5b9bff 70%, #8fc0ff);
  padding: 20px;
}
.auth-card {
  width: 100%; max-width: 380px; background: #fff;
  border-radius: 18px; padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(10, 30, 80, .25);
}
.auth-card .logo2 { text-align: center; margin-bottom: 20px; }
.auth-card .logo2 .ic {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto;
  background: linear-gradient(135deg, var(--primary), #5b9bff);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
}
.auth-card .logo2 h1 { font-size: 18px; margin-top: 10px; }
.auth-card .logo2 p { font-size: 12px; color: var(--text3); margin-top: 3px; }

/* ---------- 测评 ---------- */
.assess-opt {
  display: block; width: 100%; text-align: left;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: #fff; padding: 14px; margin-bottom: 10px;
  font-size: 14px; color: var(--text); cursor: pointer;
}
.assess-opt:active { border-color: var(--primary); background: var(--primary-light); }
.assess-opt.selected { border-color: var(--primary); background: var(--primary-light); }

/* ---------- 雷达图容器 ---------- */
.radar-wrap { display: flex; justify-content: center; padding: 10px 0; }
.radar-wrap svg { max-width: 100%; }

/* ---------- 进度 ---------- */
.progress-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.progress-track { height: 8px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.progress-track .bar { height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s; }

/* ---------- 其他 ---------- */
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.muted { color: var(--text3); font-size: 12px; }
.fw7 { font-weight: 700; }
.text-right { text-align: right; }
.drag-handle { cursor: grab; color: var(--text3); padding: 0 4px; }

@media (min-width: 640px) {
  .bottom-nav { display: none; }
  .container { max-width: 720px; margin: 0 auto; }
  body { padding-bottom: 30px; }
}
@media (max-width: 639px) {
  .topbar .nav-links { display: none; }
}
