/* ---------- 基础 ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.eyebrow.center {
  text-align: center;
}

.card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}

/* ---------- 顶部导航 ---------- */
.site-header {
  height: 82px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.header-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  height: 100%;
}

.logo {
  flex: none;
  color: var(--text);
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo .blue {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 5px;
  align-items: center;
  min-width: 0;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: none;
  padding: 11px 13px;
  border-radius: 10px;
  color: #41516b;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  background: #f1f5f9;
  color: var(--accent);
}

.nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-admin {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #41516b;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-admin:hover {
  background: #f1f5f9;
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 50px 0 38px;
  background: radial-gradient(circle at 18% 18%, #f8fbff 0, #edf4ff 42%, #eaf2fc 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.82fr) minmax(360px, 1.18fr);
  gap: 30px;
  align-items: stretch;
}

.hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px 0;
}

.hero-main h1 {
  margin: 16px 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: clamp(40px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1.05;
}

.lead {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 164px;
  padding: 14px 22px;
  border: 0;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 750;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.17);
}

.button.primary:hover {
  background: var(--accent-hover);
}

.button.secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  color: var(--faint);
  font-size: 13px;
}

.hero-meta strong {
  margin-right: 3px;
  color: var(--text);
  font-weight: 800;
}

/* 关于卡片 */
.about-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 26px 28px;
  border: 0;
  box-shadow: 0 15px 34px rgba(27, 51, 89, 0.07);
}

.about-top {
  display: flex;
  gap: 15px;
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid #dce5f1;
}

.about-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #1262e8;
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.2);
  font-size: 23px;
}

.about-top h2 {
  margin: 0;
  color: #0f2044;
  font-size: 25px;
  letter-spacing: -1px;
}

.about-copy {
  margin: 18px 0 0;
  overflow: auto;
  color: #40526f;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
}

/* 精选站点卡片 */
.offer-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 21px 26px 14px;
  overflow: hidden;
  border: 1px solid #dbe7fa;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, #f7f9ff 58%, #edf2ff 100%);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.1);
}

.offer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.offer-label {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 99px;
  background: #e4f0ff;
  color: #1d64d8;
  font-size: 11px;
  font-weight: 850;
}

.offer-index {
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.offer-product {
  display: flex;
  gap: 15px;
  align-items: center;
  min-width: 0;
  margin-top: 14px;
}

.offer-icon .icon {
  width: 76px;
  height: 76px;
  border-color: #cde3f8;
  border-radius: 22px;
  background: #f6faff;
}

.offer-icon .icon img {
  width: 46px;
  height: 46px;
}

.offer-icon .icon-letter {
  font-size: 26px;
}

.offer-icon .icon-emoji {
  font-size: 36px;
}

.offer-product h2 {
  margin: 0;
  overflow: hidden;
  color: #102045;
  font-size: 28px;
  letter-spacing: -1.2px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offer-product-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.offer-product p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: #71829b;
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.offer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 13px;
}

.offer-tags span {
  padding: 6px 12px;
  border-radius: 99px;
  background: #e4f0ff;
  color: #1d64d8;
  font-size: 12px;
  font-weight: 800;
}

.offer-tags span.muted {
  background: #f1f5f9;
  color: #64748b;
}

.offer-domain {
  padding-top: 14px;
  border-top: 1px dashed #dce6f2;
  text-align: center;
}

.offer-domain strong {
  display: block;
  overflow: hidden;
  color: #1761e8;
  font-size: 27px;
  letter-spacing: -1px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offer-domain small {
  display: block;
  margin-top: 2px;
  color: #8b9ab2;
  font-size: 11px;
}

.offer-action {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  margin-top: 12px;
  border-radius: 11px;
  background: #1761e8;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.19);
  transition: background 0.2s ease;
}

.offer-action:hover {
  background: #1d4ed8;
}

.offer-action b {
  margin-left: 8px;
  font-size: 20px;
  line-height: 1;
}

.offer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 37px;
  margin-top: 12px;
}

.offer-controls > button {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 7px 15px rgba(27, 51, 89, 0.08);
  color: var(--text);
  font: 850 22px Arial, sans-serif;
  line-height: 1;
  cursor: pointer;
}

.offer-controls > button:hover {
  color: var(--accent);
}

.offer-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.offer-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cdd8ea;
  cursor: pointer;
}

.offer-dots button.active {
  background: #1761e8;
}

.offer-empty {
  display: grid;
  flex: 1;
  place-items: center;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

/* ---------- 分区标题 ---------- */
.section {
  padding-top: 72px;
  padding-bottom: 72px;
}

#all {
  padding-top: 38px;
  padding-bottom: 58px;
}

.head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 5px;
}

.head::before,
.head::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34%;
  height: 1px;
  background: #dbe4f0;
}

.head::before {
  left: 0;
}

.head::after {
  right: 0;
}

.head h2 {
  position: relative;
  z-index: 1;
  padding: 0 30px;
  margin: 0;
  background: var(--bg);
  font-size: 26px;
  letter-spacing: -0.5px;
}

.head h2::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

.head-link {
  position: absolute;
  right: 0;
  bottom: 3px;
  z-index: 1;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.head-link:hover {
  color: var(--accent-hover);
}

/* 搜索 */
.site-search {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  width: min(560px, 100%);
  height: 50px;
  padding: 0 14px 0 16px;
  margin: 34px auto 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(24, 42, 74, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.site-search svg {
  flex: none;
  color: var(--faint);
}

.site-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.site-search kbd {
  flex: none;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--faint);
  font-family: inherit;
  font-size: 11px;
  line-height: 1.5;
}

.result-hint {
  min-height: 18px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 12.5px;
  text-align: center;
}

/* 分类筛选 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 8px 0 6px;
}

.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.chip-count {
  color: var(--faint);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.chip.active .chip-count {
  color: var(--accent);
  opacity: 0.75;
}

/* ---------- 站点网格 ---------- */
.group {
  margin-top: 28px;
}

.group:first-child {
  margin-top: 8px;
}

.group-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 12px;
}

.group-head h3 {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

.group-head span {
  color: var(--faint);
  font-size: 12px;
}

.grid.sites {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.site-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  min-height: 96px;
  padding: 16px;
  border: 1px solid #e3e8f1;
  border-radius: 18px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-card:hover {
  border-color: #cadcf6;
  box-shadow: 0 15px 30px rgba(23, 32, 51, 0.09);
  transform: translateY(-4px);
}

.site-card .icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.site-card .icon img {
  width: 32px;
  height: 32px;
}

.site-card .icon-letter {
  font-size: 20px;
}

.site-card .icon-emoji {
  font-size: 26px;
}

.site-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.site-title {
  display: flex;
  gap: 5px;
  align-items: center;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-title .pin {
  flex: none;
  color: var(--accent);
  font-size: 10px;
}

.site-desc {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 空状态 */
.state {
  padding: 64px 20px;
  margin-top: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  text-align: center;
}

.state-icon {
  margin-bottom: 6px;
  font-size: 26px;
}

.state-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 650;
}

.state-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 分类浏览 ---------- */
.knowledge {
  background: var(--surface-2);
}

.knowledge-title {
  margin: 10px 0;
  font-size: 30px;
  letter-spacing: -1px;
}

.knowledge-lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
  margin-top: 30px;
}

.article {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article:hover {
  box-shadow: 0 15px 30px rgba(23, 32, 51, 0.09);
  transform: translateY(-4px);
}

.cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 125px;
}

.cover-emoji {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

.cover-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 11px;
  font-weight: 750;
}

.g1 {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.g2 {
  background: linear-gradient(135deg, #7c3aed, #c084fc);
}

.g3 {
  background: linear-gradient(135deg, #0891b2, #22d3ee);
}

.g4 {
  background: linear-gradient(135deg, #059669, #34d399);
}

.g5 {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.g6 {
  background: linear-gradient(135deg, #475569, #94a3b8);
}

.article-body {
  padding: 18px;
}

.article-body .eyebrow {
  font-size: 11px;
}

.article-body h3 {
  margin: 8px 0 6px;
  font-size: 17px;
}

.article-body p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 26px 0;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 12.5px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
}

.footer-meta {
  display: flex;
  gap: 18px;
  align-items: center;
}

.footer-meta a:hover {
  color: var(--accent);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  }

  .offer-card {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 650px;
    justify-self: center;
  }
}

@media (max-width: 1000px) {
  .nav a {
    padding: 9px 8px;
    font-size: 13px;
  }

  .grid.sites {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 70px;
  }

  .nav {
    display: none;
  }

  .nav-admin {
    margin-left: auto;
  }

  .hero {
    padding: 40px 0 30px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-main {
    padding: 4px 0 8px;
  }

  .hero-main h1 {
    font-size: 46px;
  }

  .lead {
    font-size: 16px;
  }

  .offer-card {
    grid-column: auto;
    max-width: none;
  }

  .section {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  #all {
    padding-top: 32px;
    padding-bottom: 46px;
  }

  .head::before,
  .head::after {
    width: 24%;
  }

  .head-link {
    display: none;
  }

  .grid.sites {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .articles {
    grid-template-columns: 1fr;
  }

  .knowledge-title {
    font-size: 25px;
  }

  .about-card {
    min-height: 0;
  }

  .button {
    min-width: 0;
    flex: 1;
    padding: 13px 18px;
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .grid.sites {
    grid-template-columns: 1fr;
  }

  .hero-main h1 {
    font-size: 40px;
    letter-spacing: -1.8px;
  }

  .site-search {
    height: 48px;
    margin-top: 28px;
  }

  .site-search kbd {
    display: none;
  }

  .offer-product h2 {
    font-size: 25px;
  }

  .offer-domain strong {
    font-size: 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
