:root {
  --primary: #165dff;
  --primary-hover: #4080ff;
  --primary-active: #0e42d2;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1d2129;
  --text-2: #4e5969;
  --muted: #86909c;
  --border: #e5e6eb;
  --border-light: #f2f3f5;
  --green: #00b42a;
  --orange: #ff7d00;
  --red: #f53f3f;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(29, 33, 41, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #6aa1ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.topbar-meta { color: var(--muted); font-size: 12px; }

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 12px 40px;
}

/* ---------- 列表页 ---------- */

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hero p { margin: 0; color: var(--text-2); }
.hero p strong { color: var(--primary); }

.hero-badge {
  background: #e8f1ff;
  color: var(--primary);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.filters input,
.filters select {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.filters input:focus,
.filters select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12); }

.search-input { flex: 1 1 260px; min-width: 220px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); color: #fff; }
.btn.ghost { background: #fff; color: var(--text-2); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }

.college-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.college-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.college-card:hover {
  transform: translateY(-2px);
  border-color: #bedaff;
  box-shadow: 0 10px 26px rgba(22, 93, 255, 0.12);
  color: var(--text);
}

.card-head { display: flex; align-items: center; gap: 12px; }

.logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 10px;
  background: #f2f3f5;
  border: 1px solid var(--border-light);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
}

.logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.logo.big {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  border-radius: 16px;
  font-size: 32px;
}

.logo.big img { padding: 8px; }

.card-title h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.card-title p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.tag-blue { background: #e8f1ff; color: #165dff; }
.tag-green { background: #e8ffea; color: #009a29; }
.tag-orange { background: #fff3e8; color: #d25f00; }
.tag-gray { background: #f2f3f5; color: #4e5969; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.rank-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--text-2);
  font-size: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: auto;
}

.rank-row b { color: var(--primary); font-size: 14px; }
.rank-row .hits { margin-left: auto; color: var(--muted); }

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-info { border: none; background: transparent; color: var(--muted); margin-left: 6px; }

.empty {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

.empty h3 { margin: 0 0 6px; color: var(--text); }

/* ---------- 详情页 ---------- */

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.hero-main { flex: 1; min-width: 0; }
.hero-main h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; letter-spacing: -0.5px; }
.hero-main .en { margin: 0 0 10px; color: var(--muted); font-size: 13px; }

.hero-rank {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 380px;
}

.rank-card {
  min-width: 58px;
  padding: 8px 8px;
  border-radius: 10px;
  background: #f7f9ff;
  border: 1px solid #e8f1ff;
  text-align: center;
}

.rank-card span { display: block; color: var(--muted); font-size: 11px; }
.rank-card b { display: block; color: var(--primary); font-size: 20px; line-height: 1.2; }

.tabs {
  display: flex;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  position: sticky;
  top: 76px;
  z-index: 10;
}

.tab-btn {
  flex: 1;
  height: 42px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn:hover { background: var(--border-light); }
.tab-btn.active { background: var(--primary); color: #fff; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-grid.small { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.stat-card span { display: block; color: var(--muted); font-size: 12px; }
.stat-card b { display: inline-block; margin-top: 2px; font-size: 24px; line-height: 1.2; color: var(--text); }
.stat-card small { color: var(--muted); margin-left: 4px; }

.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.section-card h3 { margin: 0 0 12px; font-size: 18px; }
.section-card h3 small { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }
.section-card h4 { margin: 18px 0 8px; font-size: 15px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.two-col > .section-card { margin-bottom: 16px; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; background: #fafbfc; }
.table tr:last-child td { border-bottom: none; }

.news-list, .link-list, .timeline { list-style: none; padding: 0; margin: 0; }
.news-list li { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border-light); align-items: baseline; }
.news-list li:last-child { border-bottom: none; }
.news-year { flex: 0 0 auto; color: var(--primary); font-weight: 600; font-size: 12px; }
.news-title { flex: 1; min-width: 0; }
.news-meta { flex: 0 0 auto; color: var(--muted); font-size: 12px; }

.link-list li { padding: 8px 0; border-bottom: 1px dashed var(--border-light); }
.link-list li:last-child { border-bottom: none; }

.rich-details summary, .dept summary, .major-intro summary {
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
}

.rich-text {
  line-height: 1.85;
  color: var(--text-2);
  font-size: 14px;
}

.rich-text img { margin: 10px 0; border-radius: 8px; }
.rich-text p { margin: 8px 0; }

.eval-round { margin-bottom: 18px; }
.eval-round h4 { margin: 0 0 8px; color: var(--primary); }
.eval-level { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.level-badge {
  flex: 0 0 44px;
  text-align: center;
  border-radius: 6px;
  background: #e8f1ff;
  color: var(--primary);
  font-weight: 700;
  padding: 2px 0;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.subject-chip {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f3f5;
  color: var(--text-2);
  font-size: 12px;
}

.subject-group { padding: 6px 0; }
.group-title { display: inline-block; min-width: 120px; color: var(--text-2); font-weight: 600; margin-right: 10px; }

.dept { border-bottom: 1px solid var(--border-light); }
.dept:last-child { border-bottom: none; }
.dept summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dept summary small { color: var(--muted); font-weight: 400; }
.dept-body { padding: 6px 0 14px; }

.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.person-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fafbfc;
}

.avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  overflow: hidden;
  background: #e8f1ff;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-body h4 { margin: 0 0 2px; font-size: 14px; }
.person-body p { margin: 0; font-size: 12px; }
.person-body .intro { color: var(--text-2); margin-top: 4px; }

.timeline { border-left: 2px solid #e8f1ff; padding-left: 16px; }
.timeline li { position: relative; padding: 4px 0 12px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
}
.time { display: inline-block; min-width: 76px; color: var(--primary); font-weight: 600; font-size: 12px; }
.timeline-content { color: var(--text-2); }

.campus-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.campus-btn {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.campus-btn:hover { border-color: var(--primary); color: var(--primary); }
.campus-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.campus-panel { display: none; }
.campus-panel.active { display: block; }

.facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.facility {
  background: #fafbfc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
}

.facility b { display: block; margin-bottom: 4px; }
.facility p { margin: 0; color: var(--text-2); font-size: 12px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.gallery figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #fafbfc;
}

.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: 6px 8px; font-size: 12px; color: var(--muted); }

.muted { color: var(--muted); }

@media (max-width: 900px) {
  .stat-grid, .stat-grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .detail-hero { flex-wrap: wrap; }
  .hero-rank { max-width: none; justify-content: flex-start; }
  .tabs { top: 68px; }
}

@media (max-width: 600px) {
  .page { padding: 16px 14px 40px; }
  .topbar-inner { padding: 0 14px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero h1 { font-size: 24px; }
  .filters { padding: 10px; }
  .filters input, .filters select { flex: 1 1 140px; }
  .college-grid { grid-template-columns: 1fr; }
  .hero-main h1 { font-size: 22px; }
  .stat-card b { font-size: 20px; }
  .tab-btn { font-size: 13px; }
}

/* ---------- 原帮助中心格式 ---------- */

.brand-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: #e8f1ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  margin-left: 2px;
}

.page-wrap { padding: 0; }

.page-container {
  margin: 30px 40px;
  padding: 40px;
  padding-bottom: 28px;
  color: #666;
  background: #fff;
  border-radius: 4px;
}

.page-header {
  font-size: 20px;
  font-weight: 600;
  color: #1d2129;
  line-height: 20px;
  padding-bottom: 15px;
  box-sizing: content-box;
  border-bottom: 1px solid #f2f3f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.page-title span { color: #4e5969; font-size: 14px; font-weight: 400; }
.page-title span b { color: #1d2129; font-weight: 500; }
.page-title .back-link { font-size: 20px; color: #4e5969; line-height: 1; }
.page-title .back-link:hover { color: var(--primary); }
.page-header-meta { color: var(--muted); font-size: 13px; font-weight: 400; white-space: nowrap; }

.header-search { display: flex; align-items: center; gap: 0; }
.header-search input[type="search"] {
  width: 323px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--primary);
  border-right: none;
  border-radius: 4px 0 0 4px;
  outline: none;
  font-size: 14px;
}
.header-search input[type="search"]:focus { box-shadow: 0 0 0 2px rgba(22,93,255,.12); }
.header-search .btn { height: 40px; border-radius: 0 4px 4px 0; padding: 0 20px; }

.help-layout { display: flex; align-items: flex-start; margin-top: 20px; }

.help-aside {
  width: 230px;
  flex: 0 0 230px;
  background: #fff;
  padding: 20px 10px 20px 0;
}

.aside-title {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 0 6px 27px;
  line-height: 1;
}
.aside-title:first-child { padding-top: 0; }

.aside-item {
  display: block;
  width: 100%;
  height: 30px;
  line-height: 30px;
  padding: 0 0 0 27px;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: #1d2129;
  font-family: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aside-item:hover { background: #e8f3ff; color: var(--primary); }
.aside-item.active { color: var(--primary); background: #f5f9ff; }

.help-main {
  flex: 1;
  min-width: 0;
  border-left: 1px solid #f2f3f5;
  padding: 20px 0 0 20px;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-left: 15px;
  margin-bottom: 6px;
}
.list-toolbar select {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
}
.list-toolbar .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.toolbar-count { margin-left: auto; color: var(--muted); font-size: 12px; }

.college-list { border-top: 1px solid #f2f3f5; margin-top: 4px; }

.college-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 15px;
  border-bottom: 1px solid #f2f3f5;
  color: var(--text);
  transition: background .12s ease;
}
.college-row:hover { background: #f5f9ff; color: var(--text); }

.college-row .logo { width: 54px; height: 54px; flex: 0 0 54px; }

.row-main { flex: 1; min-width: 0; }
.row-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.row-title h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.row-title .en { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main .tags { margin-bottom: 4px; }
.row-main .meta-row { font-size: 12px; }

.row-rank {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: var(--text-2);
  font-size: 12px;
}
.row-rank b { color: var(--primary); font-size: 14px; }
.row-rank .hits { color: var(--muted); margin-top: 2px; }

.detail-hero { margin-top: 0; }

@media (max-width: 1100px) {
  .page-container { margin: 20px; padding: 24px; }
  .help-aside { width: 200px; flex-basis: 200px; }
  .row-rank { flex-basis: 150px; }
}

@media (max-width: 900px) {
  .page-container { margin: 14px; padding: 18px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .header-search { width: 100%; }
  .header-search input[type="search"] { flex: 1; width: auto; }
  .help-layout { flex-direction: column; }
  .help-aside {
    width: 100%;
    flex: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 0 12px;
  }
  .aside-title { display: none; }
  .aside-item { width: auto; padding: 0 12px; font-size: 14px; }
  .help-main { border-left: none; padding: 12px 0 0; width: 100%; }
  .college-row { align-items: flex-start; }
  .row-rank { flex-basis: 120px; }
}
