:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --border: #e2e8f0;
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-soft: #eff6ff;
  --accent: #ea580c;
  --accent-soft: #fff7ed;
  --secondary: #0d9488;
  --max-w: 1280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* 1. 顶部导航栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.brand-title {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
  display: block;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  white-space: nowrap;
}

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

.main-nav a:hover {
  color: var(--primary);
  background: var(--bg-muted);
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  flex: 1;
}

.mini-search {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 260px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 4px 4px 12px;
  gap: 6px;
}

.mini-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
}

.mini-search button {
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

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

/* 2. 首屏 Hero 搜索区 */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  color: #dbeafe;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
}

.hero-desc {
  max-width: 660px;
  margin: 12px auto 0;
  font-size: 16px;
  color: #dbeafe;
}

.hero-search {
  max-width: 680px;
  margin: 28px auto 0;
  background: var(--bg-surface);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.hero-search i {
  color: var(--text-muted);
  font-size: 18px;
}

.hero-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-main);
  padding: 10px 4px;
  outline: none;
}

.hero-search button {
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

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

.hot-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
  color: #bfdbfe;
}

.hot-tags a {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #eff6ff;
}

.hot-tags a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 36px;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: #bfdbfe;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
}

/* 通用区块头 */
.section-block {
  padding: 52px 0;
}

.section-muted {
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sec-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.sec-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sec-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sec-title {
  font-size: 18px;
  font-weight: 700;
}

.sec-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 3. 焦点网址推荐 */
.spotlight-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface);
  overflow: hidden;
  display: grid;
  grid-template-columns: 3fr 2fr;
}

.spotlight-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.spotlight-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.badge-hot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.badge-cat {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-sub);
  font-size: 12px;
}

.spotlight-info h3 {
  font-size: 28px;
  font-weight: 800;
}

.spotlight-info p {
  margin-top: 10px;
  color: var(--text-sub);
  font-size: 15px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.mini-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-muted);
  color: var(--text-muted);
}

.visit-count {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-sub);
  font-size: 14px;
}

.btn-secondary:hover {
  background: var(--bg-muted);
}

.spotlight-visual {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.spotlight-letter {
  font-size: 72px;
  font-weight: 900;
  color: #fff;
}

/* 4. 分类快捷入口 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.cat-card:hover {
  border-color: #93c5fd;
}

.cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cat-card.is-accent .cat-icon {
  background: linear-gradient(135deg, #f97316, var(--accent));
}

.cat-card.is-secondary .cat-icon {
  background: linear-gradient(135deg, #14b8a6, var(--secondary));
}

.cat-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.cat-count {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 5. 最新更新网址 + 右侧边栏 */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.site-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.site-card:hover {
  border-color: #93c5fd;
}

.site-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.site-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.site-avatar.is-accent {
  background: linear-gradient(135deg, #f97316, var(--accent));
}

.site-avatar.is-secondary {
  background: linear-gradient(135deg, #14b8a6, var(--secondary));
}

.site-meta-head {
  flex: 1;
  min-width: 0;
}

.site-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.site-name {
  font-size: 15px;
  font-weight: 700;
}

.site-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.site-cat {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.site-desc {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-sub);
  flex: 1;
}

.site-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.site-actions a {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.link-ghost {
  border: 1px solid var(--border);
  color: var(--text-sub);
}

.link-ghost:hover {
  background: var(--bg-muted);
}

.link-solid {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.link-solid:hover {
  background: var(--primary-hover);
}

/* 右侧边栏面板 */
.side-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  padding: 20px;
}

.side-panel + .side-panel {
  margin-top: 20px;
}

.side-panel h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.rank-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.rank-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rank-num {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--bg-muted);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-num.top {
  background: var(--primary-soft);
  color: var(--primary);
}

.rank-heat {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 6. 页脚 */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 13px;
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--primary);
}

@media (max-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-nav,
  .header-right {
    display: none;
  }

  .hero h1 {
    font-size: 30px;
  }

  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero-stats {
    gap: 24px;
  }
}
