/* ============================================================
   网站源码展示平台 · list 样式
   ============================================================ */
* { box-sizing: border-box; }
:root {
  --brand1: #7b5cff;
  --brand2: #a855f7;
  --bg: #f7f8fa;
  --text: #1f2329;
  --text-2: #4e5969;
  --text-3: #8a8f99;
  --border: #eef0f3;
  --radius: 12px;
  --sh-sm: 0 2px 12px rgba(0,0,0,.05);
  --sh-md: 0 12px 30px rgba(0,0,0,.1);
  --sh-brand: 0 4px 14px rgba(123,92,255,.32);
}
body { background: var(--bg); color: var(--text); }

/* ============ Hero ============ */
.hp-hero {
  text-align: center;
  padding: 64px 20px 44px;
  background: #fff;
}
.hp-hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #1a1a1a;
  margin: 0 0 14px;
}
.hp-hero p {
  font-size: 15px;
  color: var(--text-3);
  letter-spacing: .5px;
  margin: 0 0 32px;
}
.hp-en { font-style: italic; opacity: .75; }

.hp-search {
  display: flex;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  transition: box-shadow .25s, border-color .25s;
  overflow: hidden;
  padding-left: 20px;
}
.hp-search:focus-within {
  border-color: rgba(123,92,255,.35);
  box-shadow: 0 6px 26px rgba(123,92,255,.15);
}
.hp-search-icon { font-size: 15px; opacity: .5; }
.hp-search-input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 14px;
  height: 54px;
  font-size: 15px;
  color: var(--text);
  background: transparent;
}
.hp-search-input::placeholder { color: #a6a6a6; }
.hp-search-btn {
  border: 0;
  padding: 0 38px;
  height: 54px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: filter .25s;
}
.hp-search-btn:hover { filter: brightness(1.08); }

/* ============ 主布局 ============ */
.hp-main {
  max-width: 100%;
  margin: 28px auto 0;
  padding: 0 32px 60px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

/* ============ 侧边栏 ============ */
.hp-side {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 18px 24px;
  box-shadow: var(--sh-sm);
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.hp-side::-webkit-scrollbar { width: 5px; }
.hp-side::-webkit-scrollbar-thumb { background: #d8d8d8; border-radius: 3px; }

.hp-side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}
.hp-side-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.hp-side-title svg { color: var(--brand1); }
.hp-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
  padding: 3px 8px;
  border-radius: 999px;
  transition: .2s;
  text-decoration: none;
}
.hp-clear:hover { color: var(--brand1); background: #f6f3ff; }
.hp-clear svg { flex-shrink: 0; }

.hp-side-h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin: 22px 0 12px;
  padding-left: 9px;
  border-left: 3px solid var(--brand1);
  line-height: 1.2;
}
.hp-side-h3:first-of-type { margin-top: 16px; }

/* ============ 筛选胶囊（默认横排） ============ */
.hp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hp-chips > a,
a.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-2);
  background: #f2f3f5;
  border-radius: 999px;
  white-space: nowrap;
  transition: .18s;
  text-decoration: none;
  cursor: pointer;
}
.hp-chips > a:hover,
a.hp-chip:hover { background: #e8ebf0; color: var(--text); }
.hp-chips > a.is-active,
a.hp-chip.is-active {
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #fff;
  box-shadow: var(--sh-brand);
}

/* ============ 行业单列列表（长名自动换行） ============ */
.hp-chips.hp-chips-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hp-chips.hp-chips-list > a,
.hp-chips.hp-chips-list a.hp-chip {
  display: block;
  width: 100%;
  padding: 9px 13px;
  border-radius: 8px;
  background: #f5f6f8;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  word-break: break-all;
  transition: .18s;
}
.hp-chips.hp-chips-list > a:hover,
.hp-chips.hp-chips-list a.hp-chip:hover {
  background: #ebeef3;
  color: var(--text);
}
.hp-chips.hp-chips-list > a.is-active,
.hp-chips.hp-chips-list a.hp-chip.is-active {
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #fff;
  box-shadow: var(--sh-brand);
}

/* 颜色小圆点 */
.hp-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0d0d0;
  flex-shrink: 0;
}

/* ============ 内容区 ============ */
.hp-content { min-width: 0; }

.hp-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  margin-bottom: 18px;
}
.hp-toolbar h2 {
  position: relative;
  margin: 0;
  padding-left: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.hp-toolbar h2::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 20px;
  background: linear-gradient(180deg, var(--brand1), var(--brand2));
  border-radius: 2px;
}
.hp-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-3);
}
.hp-count strong { color: var(--brand1); font-size: 15px; margin: 0 2px; }

.hp-mfilter-btn {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 13px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--sh-brand);
}

/* ============ 卡片网格 ============ */
.hp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.hp-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: .3s cubic-bezier(.2,.7,.3,1);
}
.hp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
}

.hp-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #eef0f5, #e3e6ec);
}
.hp-thumb-link {
  position: absolute;
  inset: 0;
  display: block;
}
.hp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.hp-card:hover .hp-thumb img { transform: scale(1.06); }

/* 图片加载失败 */
.hp-thumb.hp-img-error {
  background: linear-gradient(135deg, #eef0f5, #e3e6ec);
}
.hp-thumb.hp-img-error::after {
  content: '预览图缺失';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0b5bd;
  font-size: 13px;
}

.hp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 40, .58);
  backdrop-filter: blur(2px);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .28s;
  z-index: 2;
}
.hp-card:hover .hp-overlay { opacity: 1; }
.hp-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(123,92,255,.45);
  transform: scale(.85);
  transition: transform .3s;
  text-decoration: none;
  white-space: nowrap;
}
.hp-card:hover .hp-demo-btn { transform: scale(1); }
.hp-demo-btn:hover { filter: brightness(1.1); }

.hp-body { padding: 14px 16px 16px; }

.hp-title {
  font-size: 14px;

  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 8px;
  min-height: 42px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-title a { color: inherit; text-decoration: none; }
.hp-title a:hover { color: var(--brand1); }

.hp-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: .3px;
}
.hp-code { flex: 1; }
.hp-visits { display: inline-flex; align-items: center; gap: 3px; }

/* ============ 分页（强制横排） ============ */
.hp-pager {
  margin-top: 40px;
  text-align: center;
  font-size: 0;
}
.hp-pager > * { font-size: 14px; }

.hp-pager ul,
.hp-pager ul.pagination,
.hp-pager .pagination,
.hp-pager .pagination-wrap {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center;
  gap: 6px;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.hp-pager ul.pagination > li,
.hp-pager .pagination > li,
.hp-pager ul > li {
  display: inline-block !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  list-style: none !important;
  font-size: 14px;
}

.hp-pager li a,
.hp-pager li span,
.hp-pager a {
  display: inline-block;
  min-width: 38px;
  height: 38px;
  line-height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-2);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: .2s;
  text-decoration: none;
  text-align: center;
}
.hp-pager li a:hover,
.hp-pager a:hover {
  background: #f0eeff;
  color: var(--brand1);
}
.hp-pager li.active a,
.hp-pager li.active span,
.hp-pager .active a {
  background: linear-gradient(135deg, var(--brand1), var(--brand2)) !important;
  color: #fff !important;
  box-shadow: var(--sh-brand);
}

/* 分页文字描述（"共670条 当前1/42页"） */
.hp-pager > span,
.hp-pager .pagination-wrap > span {
  display: inline-block;
  margin: 0 8px 0 0;
  color: var(--text-3);
  font-size: 13px;
}

/* ============ 空状态 ============ */
.hp-empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-3);
  background: #fff;
  border-radius: var(--radius);
  font-size: 14px;
}
.hp-empty-icon { font-size: 40px; opacity: .4; margin-bottom: 12px; }
.hp-empty p { font-size: 14px; margin: 0; }

/* ============ 移动端抽屉 ============ */
.hp-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: .28s;
}
.hp-drawer.is-open { visibility: visible; opacity: 1; }
.hp-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.hp-drawer-body {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 86%;
  max-width: 360px;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.2,.7,.3,1);
}
.hp-drawer.is-open .hp-drawer-body { transform: translateX(0); }
.hp-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
}
.hp-drawer-close {
  border: 0;
  background: none;
  color: var(--text-3);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.hp-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
}
.hp-drawer-content h3 { margin-top: 0; }
.hp-drawer-content h3 + .hp-chips + h3 { margin-top: 20px; }
.hp-drawer-foot {
  display: flex;
  gap: 10px;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
}
.hp-btn-reset,
.hp-btn-confirm {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.hp-btn-reset { color: var(--text-2); background: #f2f3f5; }
.hp-btn-confirm {
  color: #fff;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  border: 0;
}

/* ============ 响应式 ============ */
@media (max-width: 1600px) {
  .hp-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1280px) {
  .hp-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .hp-main {
    grid-template-columns: 1fr;
    padding: 0 16px 40px;
    margin-top: 20px;
  }
  .hp-side { display: none; }
  .hp-mfilter-btn { display: inline-flex; }
  .hp-toolbar { flex-wrap: wrap; }
  .hp-count { order: 3; width: 100%; margin-left: 0; margin-top: 4px; }
  .hp-mfilter-btn { margin-left: auto; }

  .hp-hero { padding: 40px 16px 32px; }
  .hp-hero h1 { font-size: 28px; letter-spacing: 2px; }
  .hp-hero p { font-size: 13px; margin-bottom: 22px; }
  .hp-search { padding-left: 14px; border-radius: 10px; }
  .hp-search-input { height: 46px; padding: 0 10px; font-size: 14px; }
  .hp-search-btn { height: 46px; padding: 0 22px; font-size: 14px; letter-spacing: 1px; }
  .hp-grid { gap: 14px; }
  .hp-pager { margin-top: 28px; }
}
@media (max-width: 720px) {
  .hp-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hp-body { padding: 10px 12px 12px; }
  .hp-title { font-size: 13px; min-height: 38px; margin-bottom: 6px; }
  .hp-meta { font-size: 11px; gap: 8px; }
  .hp-demo-btn { padding: 8px 16px; font-size: 13px; }
  .hp-pager li a,
  .hp-pager li span {
    min-width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 13px;
    padding: 0 10px;
  }
}
@media (max-width: 380px) {
  .hp-grid { grid-template-columns: 1fr; }
}