/* ============================================================
   导航站补充样式
   1) 覆盖 iLanding 的全局变量，统一到本站配色
   2) 导航站专有组件：搜索 Banner、分类侧栏、站点卡片、手机底栏
   ============================================================ */

:root {
  --default-font: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading-font: var(--default-font);
  --nav-font: var(--default-font);
  --background-color: #F5F7FB;
  --default-color: #1F2937;
  --heading-color: #1F2937;
  --accent-color: #4F46E5;
  --surface-color: #FFFFFF;
  --contrast-color: #FFFFFF;

  --brand-1: #4F46E5;
  --brand-2: #6366F1;
  --brand-3: #06B6D4;
  --brand-grad: linear-gradient(135deg, #4F46E5 0%, #6366F1 48%, #06B6D4 100%);
  --ink-dark: #1E1B4B;
  --muted: #6B7280;
  --line: #EDF1F7;
  --radius-lg: 20px;
  --radius-md: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 30px rgba(79, 70, 229, .16);
}

body {
  background-color: var(--background-color);
  color: var(--default-color);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
}

a {
  text-decoration: none;
}

/* ---------- 顶栏（复用 iLanding .header 胶囊样式） ---------- */
.header {
  padding: 14px 0;
}

.header .header-container {
  border-radius: 999px;
  padding: 8px 12px 8px 20px;
  box-shadow: 0 6px 24px rgba(30, 27, 75, .08);
}

.header .logo h1 {
  font-size: 20px;
  font-weight: 700;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-logo-icon {
  font-size: 24px;
  margin-right: 8px;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header .btn-getstarted,
.header .btn-getstarted:focus {
  background: var(--brand-grad);
  padding: 8px 18px;
  font-weight: 500;
  border-radius: 999px;
  margin-left: 16px;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .28);
}

.header .btn-getstarted:hover {
  filter: brightness(1.06);
  background: var(--brand-grad);
}

.top-nav .nav-link {
  color: #374151;
  font-weight: 500;
  padding: 6px 14px !important;
  border-radius: 999px;
  transition: all .2s ease;
}

.top-nav .nav-link:hover,
.top-nav .nav-link.active {
  color: var(--brand-1);
  background: rgba(79, 70, 229, .08);
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #374151;
  background: #F3F4F9;
  border: none;
  transition: all .2s ease;
}

.icon-btn:hover {
  color: #fff;
  background: var(--brand-1);
}

/* ---------- 主体骨架 ---------- */
.site-main {
  padding-top: 96px;
  padding-bottom: 40px;
}

.site-shell {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.site-content {
  flex: 1;
  min-width: 0;
}

/* PC 侧栏常驻（文档 4.5） */
.side-nav {
  width: 216px;
  flex: 0 0 216px;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 14px 10px;
}

.side-nav::-webkit-scrollbar {
  width: 5px;
}

.side-nav::-webkit-scrollbar-thumb {
  background: #DDE3EE;
  border-radius: 4px;
}

.side-title {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px 10px;
  letter-spacing: .08em;
}

/* 分类项不绑定 .side-nav，PC 侧栏与手机抽屉共用同一套样式 */
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 500;
  transition: all .18s ease;
}

.side-item i {
  font-size: 16px;
  color: var(--brand-2);
  transition: all .18s ease;
}

.side-item:hover {
  background: rgba(79, 70, 229, .07);
  color: var(--brand-1);
}

.side-item.active {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.side-item.active i {
  color: #fff;
}

.side-count {
  margin-left: auto;
  font-size: 11px;
  opacity: .6;
}

/* 抽屉内加大点击区，便于手指操作 */
.drawer-nav .side-item {
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 14px;
}

.drawer-nav .side-item i {
  font-size: 18px;
}

/* ---------- 两级分类树 ---------- */
.side-group + .side-group {
  margin-top: 2px;
}

.side-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 下拉箭头：独立点击区，点击只展开/收起，不跳转 */
.side-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-right: -8px;
  border-radius: 8px;
  color: #9CA3AF;
  font-size: 12px;
  cursor: pointer;
  transition: transform .2s ease, background .18s ease, color .18s ease;
}

.side-caret:hover {
  background: rgba(79, 70, 229, .14);
  color: var(--brand-1);
}

.side-item.active .side-caret {
  color: rgba(255, 255, 255, .8);
}

.side-item.active .side-caret:hover {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.side-item[aria-expanded="true"] .side-caret {
  transform: rotate(180deg);
}

.side-sub {
  padding: 2px 0 6px 34px;
}

.side-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  color: #6B7280;
  font-size: 13px;
  transition: all .18s ease;
}

.side-sub-item:hover {
  background: rgba(79, 70, 229, .07);
  color: var(--brand-1);
}

.side-sub-item.active {
  color: var(--brand-1);
  font-weight: 600;
  background: rgba(79, 70, 229, .1);
}

.side-dot {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C7CEDB;
  transition: background .18s ease;
}

.side-sub-item:hover .side-dot,
.side-sub-item.active .side-dot {
  background: var(--brand-2);
}

/* 锚点滚动时避开固定顶栏（顶栏实测高 81px） */
.block-card,
.tab-pane {
  scroll-margin-top: 104px;
}

/* 滚到锚点后的短暂高亮，提示已到达该分类 */
@keyframes anchor-flash {
  0% {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .45), 0 12px 32px rgba(79, 70, 229, .20);
  }
  60% {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .28), 0 12px 32px rgba(79, 70, 229, .12);
  }
  100% {
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .05);
  }
}

.block-card.anchor-flash {
  animation: anchor-flash 1.3s ease-out;
}

/* ---------- 搜索 Banner（复用 iLanding .hero 容器） ---------- */
.hero {
  padding: 54px 28px 44px;
  border-radius: 28px;
  background: var(--brand-grad);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(79, 70, 229, .28);
  margin-bottom: 24px;
}

.hero::before {
  background: radial-gradient(circle at 88% 8%, rgba(255, 255, 255, .35), transparent 42%);
}

.hero::after {
  content: "";
  position: absolute;
  left: -8%;
  bottom: -60%;
  width: 46%;
  height: 160%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 62%);
  pointer-events: none;
}

.hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-title {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 6px;
}

.hero-sub {
  color: rgba(255, 255, 255, .82);
  margin-bottom: 26px;
  font-size: 14px;
}

.search-box {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
  transition: box-shadow .2s ease, transform .2s ease;
}

.search-box:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 14px 34px rgba(15, 23, 42, .22);
}

.search-engine {
  border: none;
  background: #F3F4F9;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  color: #374151;
  outline: none;
  max-width: 108px;
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 15px;
  color: #1F2937;
}

.search-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  color: #fff;
  font-weight: 600;
  background: var(--brand-grad);
  transition: filter .2s ease;
}

.search-btn:hover {
  filter: brightness(1.08);
}

.hot-words {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hot-word {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  transition: all .2s ease;
}

.hot-word:hover {
  background: #fff;
  color: var(--brand-1);
}

.hero-stats {
  margin-top: 22px;
  display: flex;
  gap: 26px;
  justify-content: center;
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
}

.hero-stats b {
  font-size: 20px;
  font-weight: 700;
  margin-right: 4px;
}

/* ---------- 圆形快捷入口 ---------- */
.quick-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.quick-item {
  width: 88px;
  text-align: center;
  color: #374151;
  transition: transform .2s ease;
}

.quick-item:hover {
  transform: translateY(-4px);
  color: var(--brand-1);
}

/* 选择器需比 .quick-item span(0,1,1) 更具体，否则字号与 flex 居中会被覆盖 */
.quick-item .quick-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  line-height: 1;
  color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .22);
  transition: box-shadow .2s ease;
}

.quick-item:hover .quick-icon {
  box-shadow: 0 12px 26px rgba(79, 70, 229, .34);
}

.quick-item span {
  font-size: 12px;
  display: block;
}

/* ---------- 分类区块 ---------- */
.block-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 20px 22px;
  margin-bottom: 22px;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.block-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  background: var(--brand-grad);
}

.block-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.block-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.block-more {
  margin-left: auto;
  font-size: 13px;
  color: var(--brand-1);
  font-weight: 500;
  white-space: nowrap;
}

.block-more:hover {
  color: var(--brand-3);
}

.sub-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.sub-tabs::-webkit-scrollbar {
  display: none;
}

.sub-tabs .nav-link {
  white-space: nowrap;
  border: none;
  background: #F3F4F9;
  color: #4B5563;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s ease;
}

.sub-tabs .nav-link:hover {
  color: var(--brand-1);
}

.sub-tabs .nav-link.active {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow-md);
}

/* ---------- 站点卡片 ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1400px) {
  .link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}

/* 宽屏一屏容纳更多站点 */
@media (min-width: 1800px) {
  .link-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 2200px) {
  .link-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.link-card {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #F3F5FA;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .18s ease;
  overflow: hidden;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, .45);
  background: #EEF0FF;
  color: inherit;
}

.card-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.av-0 { background: linear-gradient(135deg, #6366F1, #4F46E5); }
.av-1 { background: linear-gradient(135deg, #06B6D4, #0891B2); }
.av-2 { background: linear-gradient(135deg, #F97316, #EA580C); }
.av-3 { background: linear-gradient(135deg, #16A34A, #15803D); }
.av-4 { background: linear-gradient(135deg, #EC4899, #DB2777); }
.av-5 { background: linear-gradient(135deg, #F59E0B, #D97706); }

.card-main {
  min-width: 0;
  flex: 1;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a {
  color: inherit;
}

.card-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 卡片上的直达按钮：只保留一个淡色小箭头，弱化存在感，引导用户点击进入详情页。
   z-index 需高于 stretched-link 的伪元素，否则会被整卡链接盖住 */
.card-go {
  position: relative;
  z-index: 2;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 12px;
  color: #B9C0CC;
  background: transparent;
  transition: color .18s ease, background .18s ease;
}

.link-card:hover .card-go {
  color: var(--brand-1);
  background: rgba(79, 70, 229, .08);
}

.link-card:hover .card-go:hover {
  color: #fff;
  background: var(--brand-grad);
}

.chip {
  font-size: 11px;
  color: var(--brand-1);
  background: rgba(79, 70, 229, .08);
  border-radius: 6px;
  padding: 1px 7px;
}

.chip-hit {
  color: var(--muted);
  background: #F3F4F9;
}

.card-badges {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: calc(100% - 8px);
}

/* 直达按钮在右上角的卡片（站长推荐 / 热门排行），角标左移避开 */
.featured-card .card-badges {
  right: 32px;
}

.card-badge {
  position: static;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 2px 8px;
  border-radius: 8px;
  line-height: 1.4;
}

.badge-rec { background: linear-gradient(135deg, #F97316, #EA580C); }
.badge-fire { background: linear-gradient(135deg, #EF4444, #DC2626); }
.badge-hot { background: linear-gradient(135deg, #F59E0B, #D97706); }
.badge-ai { background: linear-gradient(135deg, #6366F1, #4F46E5); }
.badge-oss { background: linear-gradient(135deg, #16A34A, #15803D); }
.badge-free { background: linear-gradient(135deg, #06B6D4, #0891B2); }
.badge-cn { background: linear-gradient(135deg, #EC4899, #DB2777); }
.badge-normal { background: linear-gradient(135deg, #6B7280, #4B5563); }

/* ---------- 站点详情页 ---------- */
.site-detail {
  padding: 26px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-avatar {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  flex: 1;
  min-width: 0;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.detail-url {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  word-break: break-all;
}

.detail-url a {
  color: var(--brand-1);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.detail-visit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  background: var(--brand-grad);
  box-shadow: 0 8px 22px rgba(79, 70, 229, .28);
  transition: filter .2s ease, transform .2s ease;
}

.detail-visit:hover {
  color: #fff;
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.detail-body {
  padding-top: 18px;
}

.detail-body p {
  margin: 0 0 12px;
  line-height: 1.9;
  color: #374151;
  font-size: 15px;
}

@media (max-width: 576px) {
  .site-detail {
    padding: 18px;
  }

  .detail-head {
    flex-wrap: wrap;
  }

  .detail-visit {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- 详情页 FAQ 区块 ---------- */
.site-faq {
  margin-top: 22px;
}

.site-faq .block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.site-faq .block-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  background: var(--brand-grad);
}

.site-faq .block-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.site-faq .block-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-weight: 600;
  color: #1F2937;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item .faq-caret {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--muted);
  transition: transform .2s ease;
}

.faq-item[open] .faq-caret {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 16px 14px;
  color: #4B5563;
  font-size: 14px;
  line-height: 1.85;
}

/* ---------- 面包屑 / 空状态 / 分页 ---------- */
.crumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.crumb a {
  color: var(--muted);
}

.crumb a:hover {
  color: var(--brand-1);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state i {
  font-size: 46px;
  color: #C7CEDB;
  display: block;
  margin-bottom: 12px;
}

.pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.pager a {
  padding: 7px 14px;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  border: 1px solid var(--line);
  transition: all .2s ease;
}

.pager a:hover {
  color: #fff;
  background: var(--brand-1);
  border-color: var(--brand-1);
}

.pager a.active {
  color: #fff;
  background: var(--brand-grad);
  border-color: transparent;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink-dark);
  color: rgba(255, 255, 255, .72);
  padding: 44px 0 26px;
  margin-top: 20px;
  font-size: 13px;
}

.site-footer h5 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.site-footer a {
  color: rgba(255, 255, 255, .68);
  transition: color .2s ease;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  padding: 4px 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 26px;
  padding-top: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, .5);
}

.footer-beian {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, .45);
}

.footer-beian a {
  color: rgba(255, 255, 255, .6);
}

/* ---------- 回到顶部 ---------- */
.scroll-top {
  background: var(--brand-grad);
  right: 18px;
  bottom: 78px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
}

/* ---------- 手机抽屉 + 底部工具栏（文档 4.5） ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: flex;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 18px rgba(16, 24, 40, .08);
}

.mobile-bar a {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 2px 0;
}

.mobile-bar a i {
  display: block;
  font-size: 19px;
  margin-bottom: 2px;
}

.mobile-bar a.active {
  color: var(--brand-1);
}

/* ---------- 手机汉堡抽屉 ---------- */
.offcanvas-side {
  /* Bootstrap 5.3 的 .offcanvas-start 是固定 width:400px，这里直接覆盖为窄抽屉 */
  width: min(86vw, 340px);
}

.offcanvas-side .offcanvas-header {
  border-bottom: 1px solid var(--line);
}

.drawer-brand {
  padding: 14px 16px;
}

.drawer-brand .logo h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.drawer-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.drawer-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  font-size: 12px;
  transition: all .18s ease;
}

.drawer-quick-item i {
  font-size: 18px;
  color: var(--brand-2);
  transition: all .18s ease;
}

.drawer-quick-item:hover {
  color: var(--brand-1);
  border-color: rgba(99, 102, 241, .45);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.drawer-footer {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.drawer-footer a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: #F3F4F9;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}

.drawer-footer a:last-child {
  color: #fff;
  background: var(--brand-grad);
}

@media (max-width: 991.98px) {
  .site-main {
    padding-top: 84px;
    padding-bottom: 84px;
  }
}

/* ---------- 宽屏适配：整站容器最宽 2500px ---------- */
.container {
  max-width: 2500px;
}

@media (min-width: 1600px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  .site-shell {
    gap: 28px;
  }

  .side-nav {
    width: 248px;
    flex: 0 0 248px;
  }

  .hero {
    padding: 64px 36px 52px;
  }

  .hero-title {
    font-size: 40px;
  }

  .search-box {
    max-width: 860px;
  }
}

/* ---------- 后台登录页 ---------- */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-grad);
  padding: 24px;
}

.admin-login .card {
  border: none;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .28);
  width: 100%;
  max-width: 400px;
}

/* ---------- 站长推荐 ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1400px) {
  .featured-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

.featured-card {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #F3F5FA;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .18s ease;
  overflow: hidden;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, .45);
  background: #EEF0FF;
  color: inherit;
}

.featured-card .card-title {
  white-space: normal;
}

.featured-remark {
  position: relative;
  margin: 6px 0 0;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #6B7280;
  background: rgba(79, 70, 229, .06);
  border-left: 2px solid var(--brand-1);
  border-radius: 0 8px 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 热门排行（卡片形式） ---------- */
/* 10 条按 5 列排成两整行，铺满 PC 宽屏中间区域 */
.hot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1400px) {
  .hot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .hot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .hot-grid {
    grid-template-columns: 1fr;
  }
}

/* 排行卡片复用 .featured-card 外观，仅左上角加名次徽标、顶部内缩让位 */
.hot-card {
  padding-top: 22px;
}

.hot-rank-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #6B7280;
  background: #E5E7EB;
  border-bottom-right-radius: 10px;
  border-top-left-radius: var(--radius-md);
}

.hot-rank-badge.rank-1 { color: #fff; background: linear-gradient(135deg, #F59E0B, #D97706); box-shadow: 0 3px 8px rgba(245, 158, 11, .35); }
.hot-rank-badge.rank-2 { color: #fff; background: linear-gradient(135deg, #94A3B8, #64748B); box-shadow: 0 3px 8px rgba(100, 116, 139, .30); }
.hot-rank-badge.rank-3 { color: #fff; background: linear-gradient(135deg, #F97316, #C2410C); box-shadow: 0 3px 8px rgba(249, 115, 22, .30); }

.hot-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 站长推荐 / 热门排行 配色区分：暖色面板 + 白卡，区别于下方冷色主内容 */
.featured-section {
  background: #FFF8EC;
}

.featured-section .featured-card {
  background: #fff;
  border-color: #F2E4C8;
}

.featured-section .featured-card:hover {
  background: #FFF6E6;
  border-color: #F0CE8E;
}

.hot-section {
  background: #FFF1F2;
}

.hot-section .featured-card {
  background: #fff;
  border-color: #F4D9DD;
}

.hot-section .featured-card:hover {
  background: #FFECEE;
  border-color: #EFA9B2;
}
