* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: #f4f6fb;
  color: #1f2329;
  line-height: 1.7;
}
a { text-decoration: none; color: inherit; }
img { display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ===== 顶部品牌区 ===== */
.hero {
  background: url(../../../img/banner.jpg) center/cover no-repeat;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
  border-radius: 50%;
}
.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  position: relative;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 44px; height: 44px;
  background: #fff;
  color: #c0231f;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.brand .name { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.brand .sub { font-size: 12px; opacity: .8; margin-top: 2px; }
.hero-nav .links a {
  margin-left: 26px;
  font-size: 14px;
  opacity: .92;
  transition: .15s;
}
.hero-nav .links a:hover { opacity: 1; text-decoration: underline; }

.hero-main {
  text-align: center;
  padding: 36px 0 56px;
  position: relative;
  z-index: 2;
}
.hero-main h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.hero-main p {
  font-size: 16px;
  opacity: .9;
  margin-bottom: 30px;
}

/* ===== 搜索框 ===== */
.search-box {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border-radius: 50px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
}
.search-box select {
  border: none;
  outline: none;
  background: transparent;
  padding: 0 18px;
  font-size: 13px;
  color: #555;
  border-right: 1px solid #eee;
  cursor: pointer;
  max-width: 200px;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 20px;
  font-size: 16px;
  color: #333;
}
.search-box button {
  border: none;
  background: linear-gradient(135deg, #c0231f, #e0453a);
  color: #fff;
  padding: 10px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}
.search-box button:hover { filter: brightness(1.05); }

.hotwords { margin-top: 18px; font-size: 13px; opacity: .9; }
.hotwords a {
  display: inline-block;
  margin: 0 6px;
  padding: 3px 12px;
  background: rgba(255,255,255,.16);
  border-radius: 20px;
  transition: .15s;
}
.hotwords a:hover { background: rgba(255,255,255,.3); }

/* ===== 主体布局 ===== */
.layout { display: flex; gap: 24px; margin: 30px auto; align-items: flex-start; }
.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 0;
  padding: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  position: sticky;
  top: 16px;
}
.sidebar h3 {
  font-size: 15px;
  color: #1f2329;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar h3 .bar { width: 4px; height: 15px; background: #c0231f; border-radius: 2px; }
.cat-item {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  transition: .12s;
  margin-bottom: 2px;
}
.cat-item:hover { background: #faf0ef; color: #c0231f; }
.cat-item.active { background: #c0231f; color: #fff; }

.content { flex: 1; min-width: 0; }

/* 排序切换 Tab */
.content-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f4f6fb;
  padding-top: 16px;
  margin-top: -16px;
  padding-bottom: 4px;
}
.school-tabs {
  background: #fff;
  border-radius: 0;
  padding: 12px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.school-tabs .label { font-size: 12px; color: #999; margin-right: 4px; }
.school-tabs a {
  padding: 4px 14px;
  border-radius: 0;
  font-size: 12px;
  border: 1px solid #eee;
  color: #555;
  transition: .12s;
}
.school-tabs a:hover { border-color: #c0231f; color: #c0231f; }
.school-tabs a.active { background: #c0231f; color: #fff; border-color: #c0231f; }

.result-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
  color: #666;
}
.result-bar b { color: #c0231f; font-size: 16px; }

.corpus-card {
  background: #fff;
  border-radius: 0;
  padding: 22px 26px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  transition: .15s;
  border: 1px solid transparent;
  display: block;
}
.corpus-card:hover {
  box-shadow: 0 8px 24px rgba(192,35,31,.1);
  border-color: #f3d3d1;
}
.corpus-card .tags {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e5e5e5;
}
.corpus-card .tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 4px;
  margin-right: 8px;
}
.tag-school { background: #fdeceb; color: #c0231f; }
.tag-cat { background: #eef3fb; color: #3a6bb5; }
.tag-top { background: #fff3e0; color: #e8852a; }
.corpus-card .q {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}
.corpus-card .q mark { background: #ffe9a8; padding: 0 3px; border-radius: 2px; }
.corpus-card .a {
  color: #5a6066;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.corpus-card .footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 12px;
  color: #999;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e5e5e5;
}
.corpus-card .views { white-space: nowrap; }
.corpus-card .meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.corpus-card .meta-item {
  white-space: nowrap;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 4px;
}
.corpus-card .meta-item:nth-child(1) { background: #fdeceb; color: #c0231f; }
.corpus-card .meta-item:nth-child(2) { background: #eef3fb; color: #3a6bb5; }
.corpus-card .meta-item:nth-child(3) { background: #eef7ee; color: #3a9a4e; }

.empty {
  background: #fff;
  border-radius: 12px;
  text-align: center;
  padding: 80px 20px;
  color: #999;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.pager { text-align: center; margin: 24px 0 10px; }
.pager ul, .pager .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pager li { list-style: none; }
.pager a, .pager span {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 6px;
  background: #fff;
  color: #666;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.pager a:hover { color: #c0231f; }
.pager .active span, .pager .active a, .pager .current { background: #c0231f; color: #fff; }
.pager .disabled span { opacity: .45; cursor: not-allowed; }

/* 详情页 */
.detail-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 36px 44px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  margin: 30px auto;
}
.detail-wrap .crumb { font-size: 13px; color: #999; margin-bottom: 18px; }
.detail-wrap .crumb a:hover { color: #c0231f; }
.detail-wrap h1 { font-size: 26px; margin-bottom: 14px; color: #1a1a1a; }
.detail-meta { margin-bottom: 24px; }
.detail-meta .tag { display:inline-block; font-size: 12px; padding: 3px 12px; border-radius: 4px; margin-right: 8px; }
.detail-meta .views { color:#999; font-size:13px; }
.detail-answer {
  font-size: 16px;
  color: #333;
  line-height: 2;
  white-space: pre-wrap;
  padding: 22px 24px;
  background: #fafbfd;
  border-radius: 10px;
  border-left: 4px solid #c0231f;
}
.detail-like { margin-top: 26px; padding-top: 18px; border-top: 1px dashed #e5e5e5; }
.detail-like .lt { font-size: 14px; color: #888; margin-bottom: 10px; }
.detail-like span {
  display: inline-block;
  background: #f3f4f6;
  border-radius: 16px;
  padding: 5px 14px;
  margin: 4px 8px 4px 0;
  font-size: 13px;
  color: #555;
}
.related { margin-top: 30px; }
.related h3 { font-size: 16px; margin-bottom: 14px; display:flex; align-items:center; gap:6px; }
.related h3 .bar { width: 4px; height: 16px; background: #c0231f; border-radius: 2px; }
.related a {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fafbfd;
  margin-bottom: 8px;
  font-size: 14px;
  color: #444;
  transition: .12s;
}
.related a:hover { background: #faf0ef; color: #c0231f; }

/* 页脚 */
.footer-bar {
  text-align: center;
  padding: 30px 0;
  color: #9aa0a6;
  font-size: 13px;
}

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .search-box { flex-wrap: wrap; border-radius: 16px; }
  .search-box select, .search-box input { width: 100%; border-right: none; padding: 10px 16px; }
  .search-box button { width: 100%; margin-top: 6px; padding: 12px; }
  .hero-main h1 { font-size: 28px; }
}

/* ===== 列表弹层详情 ===== */
.pop-detail { padding: 22px 26px; }
.pop-detail .pop-meta { margin-bottom: 18px; }
.pop-detail .pop-meta .tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 4px;
  margin-right: 8px;
}
.pop-detail .pop-meta .tag-school { background: #fdeceb; color: #c0231f; }
.pop-detail .pop-meta .tag-cat { background: #eef3fb; color: #3a6bb5; }
.pop-detail .pop-views { color: #9aa0a6; font-size: 13px; }

/* 问答对话形式 */
.pop-detail .qa-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.pop-detail .qa-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.pop-detail .qa-badge-q { background: #c0231f; }
.pop-detail .qa-badge-a { background: #3a9a4e; }
.pop-detail .qa-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.9;
  color: #333;
  white-space: pre-wrap;
  padding: 10px 14px;
}
.pop-detail .qa-q .qa-text { font-weight: 600; color: #1a1a1a; background: #fdeceb; }
.pop-detail .qa-a .qa-text { background: #eef7ee; }
.pop-detail .pop-like { margin-top: 20px; padding-top: 16px; border-top: 1px dashed #e5e5e5; }
.pop-detail .pop-like-t { font-size: 13px; color: #888; margin-bottom: 10px; }
.pop-detail .pop-like span {
  display: inline-block;
  background: #f3f4f6;
  border-radius: 16px;
  padding: 5px 14px;
  margin: 4px 8px 4px 0;
  font-size: 13px;
  color: #555;
}
