:root {
  --text: #1f2937;
  --muted: #64748b;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.65);
  --shadow: 0 8px 24px rgba(31, 41, 55, 0.10);
  --shadow-hover: 0 18px 42px rgba(99, 102, 241, 0.24);
  --primary: #6366f1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 45%, #ecfeff 100%);
  position: relative;
  overflow-x: hidden;
}

/* 动态光斑背景 */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.bg span:nth-child(1) { width: 440px; height: 440px; background: #a5b4fc; top: -130px; left: -90px; }
.bg span:nth-child(2) { width: 400px; height: 400px; background: #f0abfc; bottom: -140px; right: -70px; animation: float 15s ease-in-out infinite; }
.bg span:nth-child(3) { width: 340px; height: 340px; background: #67e8f9; top: 38%; right: 8%; animation: float 19s ease-in-out infinite reverse; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-32px) translateX(22px); }
}

/* Hero */
.hero { text-align: center; padding: 60px 20px 34px; }
.hero-inner { max-width: 880px; margin: 0 auto; }
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 16px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: .5px;
  background: linear-gradient(120deg, #4f46e5, #7c3aed 50%, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline { margin: 0 0 26px; font-size: 15px; color: var(--muted); }

.search-box { position: relative; max-width: 560px; margin: 0 auto; }
.search-box input {
  width: 100%;
  padding: 15px 46px 15px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 15px;
  background: var(--glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  outline: none;
  transition: box-shadow .2s, border-color .2s;
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .18), var(--shadow);
}
.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: .55;
}
.hint { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

/* 分类导航 */
.cat-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px 16px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}
.cat-pill {
  border: 1px solid rgba(255, 255, 255, .7);
  background: var(--glass-strong);
  color: var(--text);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.cat-pill:hover { transform: translateY(-1px); border-color: var(--primary); color: var(--primary); }
.cat-pill.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .35);
}

/* 网格 */
.container { max-width: 1080px; margin: 0 auto; padding: 30px 20px 10px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
}
.cat-title {
  grid-column: 1 / -1;
  font-size: 18px;
  font-weight: 700;
  margin: 22px 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(99, 102, 241, .22);
}
.cat-title .count { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }

.card {
  display: block;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 18px 16px 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  animation: rise .42s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(129, 140, 248, .65);
}
.card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.card .icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}
.card .name { font-weight: 700; font-size: 15.5px; }
.card .desc { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.card .url { font-size: 11.5px; color: #94a3b8; margin-top: 10px; word-break: break-all; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* 页脚 */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 36px 20px 44px;
}
.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .hero { padding: 44px 16px 26px; }
  .grid { grid-template-columns: 1fr; }
}
