:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --subtle: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --line-hover: #94a3b8;
  --accent: #0f172a;
  --dot: #10b981;
  --radius: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 75% 42% at 50% -8%, rgba(37, 99, 235, 0.08), transparent 68%),
    radial-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hub-wrap {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Header */
.hub-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hub-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hub-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(2, 132, 199, 0.28);
  color: #0369a1;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px -10px rgba(2, 132, 199, 0.34);
  transition: all 0.16s ease;
}

.hub-contact-pill:hover {
  background: #f0f9ff;
  border-color: rgba(2, 132, 199, 0.52);
  transform: translateY(-1px);
}

.hub-contact-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.hub-title-block h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hub-title-block p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-3);
}

.hub-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: inline-flex;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}

.filter-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.filter-tab:hover {
  color: var(--ink);
}

.filter-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.search-box input {
  width: 210px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--line-hover);
}

/* 3x3 Minimalist Grid */
.site-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.site-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.site-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 14px 30px -16px rgba(37, 99, 235, 0.24), 0 0 0 1px rgba(37, 99, 235, 0.08);
}

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

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--ic-bg, #eff6ff);
  color: var(--ic-fg, #1d4ed8);
  border: 1px solid var(--ic-bd, #bfdbfe);
}

.card-icon svg {
  width: 18px;
  height: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
}

.domain-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink-3);
}

.domain-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot);
}

.card-name {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.card-summary {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.btn-enter {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Make entire card clickable via stretched link */
.btn-enter::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.site-card:hover .btn-enter {
  color: #1d4ed8;
}

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Beautified Contact Author QR Section */
.wechat-card {
  margin-top: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 249, 255, 0.72) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(2, 132, 199, 0.18);
  border-radius: 18px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 14px 36px -22px rgba(2, 132, 199, 0.28);
}

.wechat-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #0284c7;
  margin-bottom: 5px;
}

.wechat-copy h2 {
  margin: 0 0 6px;
  font-size: 18.5px;
  font-weight: 700;
  color: var(--ink);
}

.wechat-copy p {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.wechat-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wechat-tags span {
  font-size: 11.5px;
  font-weight: 600;
  color: #0369a1;
  background: rgba(224, 242, 254, 0.78);
  border: 1px solid rgba(2, 132, 199, 0.18);
  padding: 3px 10px;
  border-radius: 999px;
}

.wechat-qr-box {
  flex-shrink: 0;
}

.qr-frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid rgba(2, 132, 199, 0.22);
  box-shadow: 0 12px 26px -14px rgba(2, 132, 199, 0.34);
}

.qr-plate {
  position: relative;
  background: #ffffff;
  padding: 9px;
  border-radius: 12px;
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
}

.qr-plate img {
  width: 146px;
  height: 146px;
  object-fit: contain;
  border-radius: 5px;
  display: block;
}

.qr-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: #0284c7;
  border-style: solid;
  pointer-events: none;
}

.qr-corner.tl { top: 4px; left: 4px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.qr-corner.tr { top: 4px; right: 4px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.qr-corner.bl { bottom: 4px; left: 4px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.qr-corner.br { bottom: 4px; right: 4px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }

.qr-cap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #0369a1;
}

.qr-cap i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

@media (max-width: 900px) {
  .site-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .hub-wrap {
    padding: 24px 0 40px;
    gap: 20px;
  }
  .site-grid {
    grid-template-columns: 1fr;
  }
  .search-box,
  .search-box input {
    width: 100%;
  }
  .wechat-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }
}
