/* ============================================
   251网 · 优质站点导航 样式
   www.251w.com
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2563eb;
  --primary-deep: #1e40af;
  --accent: #6366f1;
  --dark: #1e293b;
  --text: #475569;
  --text-light: #94a3b8;
  --bg: #f4f6fb;
  --border: #e5e9f2;
  --radius: 14px;
  --shadow: 0 4px 14px rgba(30, 41, 59, .06);
  --shadow-lg: 0 12px 30px rgba(37, 99, 235, .14);
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1360px; margin: 0 auto; padding: 0 24px; }

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

/* ---------- 顶部条 ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .35);
  letter-spacing: 0;
}
.brand-logo em { font-style: normal; color: #fbbf24; margin-left: 1px; }
.brand-text b { display: block; font-size: 18px; color: var(--dark); line-height: 1.2; }
.brand-text small { font-size: 11px; color: var(--text-light); letter-spacing: 1px; }
.top-stats { font-size: 13px; color: var(--text-light); }
.top-stats b { color: var(--primary); font-size: 16px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1e40af, #4f46e5 55%, #7c3aed);
  color: #fff; padding: 64px 0 46px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(255,255,255,.10), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(251,191,36,.12), transparent 40%);
}
.hero .container { position: relative; }
.hero h1 { font-size: 34px; font-weight: 800; }
.hero p { color: #c7d2fe; margin: 12px 0 26px; font-size: 15px; }

.search {
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 50px; padding: 8px 10px 8px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}
.search svg { width: 20px; height: 20px; color: var(--text-light); flex-shrink: 0; }
.search input { flex: 1; border: none; outline: none; font-size: 15px; color: var(--dark); background: transparent; }
.search button {
  border: none; background: var(--bg); color: var(--text-light); width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font-size: 14px; display: none; transition: all .2s; flex-shrink: 0;
}
.search button:hover { background: #e2e8f0; color: var(--dark); }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.filters button {
  padding: 8px 22px; border-radius: 50px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.10); color: #fff; font-size: 13px; cursor: pointer;
  transition: all .2s;
}
.filters button:hover { background: rgba(255,255,255,.22); }
.filters button.on { background: #fff; color: var(--primary-deep); font-weight: 600; box-shadow: 0 8px 20px rgba(0,0,0,.15); }

/* ---------- 分组 ---------- */
main.container { padding: 44px 24px 20px; }

.group { margin-bottom: 40px; }
.group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.g-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .25);
}
.g-icon svg { width: 24px; height: 24px; }
.group-head h2 { font-size: 20px; color: var(--dark); line-height: 1.3; }
.group-head p { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.g-count { margin-left: auto; font-size: 13px; color: var(--text-light); background: #fff; border: 1px solid var(--border); padding: 5px 14px; border-radius: 20px; }

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

.link-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; transition: all .25s; position: relative; overflow: hidden;
}
.link-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0; transition: opacity .25s;
}
.link-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent;
}
.link-card:hover::before { opacity: 1; }

.lc-icon {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: var(--bg); color: var(--primary); font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s;
}
.link-card:hover .lc-icon { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }

.lc-body { flex: 1; min-width: 0; }
.lc-body b { display: block; font-size: 15px; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-body i { display: block; font-style: normal; font-size: 12px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }

.lc-tag {
  flex-shrink: 0; font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
}
.lc-arrow { flex-shrink: 0; color: var(--text-light); transition: all .25s; }
.lc-arrow svg { width: 16px; height: 16px; display: block; }
.link-card:hover .lc-arrow { color: var(--primary); transform: translate(2px, -2px); }

/* 空状态 */
.empty { text-align: center; padding: 60px 0; color: var(--text-light); }
.empty svg { width: 52px; height: 52px; margin-bottom: 14px; }
.empty p { font-size: 15px; }

/* ---------- 页脚 ---------- */
.footer {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  color: #94a3b8;
  padding: 0;
  margin-top: 48px;
  font-size: 13px;
  border-top: 1px solid rgba(148,163,184,.12);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 28px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}
.ft-brand { display: flex; align-items: center; gap: 14px; }
.ft-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .35);
  flex-shrink: 0;
}
.ft-logo em { font-style: normal; color: #fbbf24; margin-left: 1px; }
.ft-brand b { display: block; color: #f8fafc; font-size: 16px; line-height: 1.3; }
.ft-brand p { color: #64748b; font-size: 12px; margin-top: 2px; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ft-nav a { color: #cbd5e1; transition: color .2s; font-size: 14px; }
.ft-nav a:hover { color: #fff; }
.footer-copy { padding: 20px 0 28px; text-align: center; }
.footer-copy p { color: #64748b; line-height: 1.8; }
.footer-copy p + p { margin-top: 2px; font-size: 12px; color: #475569; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 26px; }
  .links { grid-template-columns: 1fr; }
  .top-stats { display: none; }
  .lc-tag { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; padding: 28px 0 22px; }
  .ft-nav { gap: 10px 16px; }
}
