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

:root {
  --accent: #dfa94e;
  --accent-soft: rgba(223, 169, 78, 0.14);
  --bg: #0a0c11;
  --card: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.55);
  --faint: rgba(244, 241, 234, 0.32);
  --g1: #2a1e5c;
  --g2: #0e2a4a;
  --g3: #3a1650;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px 60px;
  overflow-x: hidden;
}

/* ---------- 天空 ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: 0.5; transition: background 3s ease; }
.b1 { background: radial-gradient(circle, var(--g1), transparent 70%); top: -20vmax; left: -15vmax; animation: drift 55s ease-in-out infinite alternate; }
.b2 { background: radial-gradient(circle, var(--g2), transparent 70%); bottom: -25vmax; right: -15vmax; animation: drift 70s ease-in-out infinite alternate-reverse; }
.b3 { background: radial-gradient(circle, var(--g3), transparent 70%); top: 30%; left: 55%; width: 45vmax; height: 45vmax; animation: drift 62s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(6vmax, 4vmax) scale(1.12); }
}
.grain {
  position: absolute; inset: 0; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
.meteor {
  position: absolute; top: 12%; left: 70%; width: 140px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), transparent);
  transform: rotate(-32deg) translateX(0); opacity: 0; pointer-events: none;
}
.meteor.go { animation: shoot 1.4s ease-out forwards; }
@keyframes shoot {
  0% { opacity: 0; transform: rotate(-32deg) translateX(0); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: rotate(-32deg) translateX(-46vmax); }
}

/* ---------- Bento 布局 ---------- */
.bento {
  width: 100%; max-width: 1060px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  align-items: stretch;
}
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 28px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 95ms);
  min-width: 0;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.label {
  font-size: 12px; letter-spacing: 0.22em; color: var(--faint);
  text-transform: uppercase; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.keys { letter-spacing: 0.05em; text-transform: none; }

/* ---------- 搜索 ---------- */
.search { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.search-box {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 8px 4px 16px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-ico { color: var(--faint); flex: none; }
.search-box input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 17px; padding: 13px 0; font-family: var(--sans);
}
.search-box input::placeholder { color: var(--faint); }
.search-box kbd {
  flex: none; font-family: var(--sans); font-size: 13px; color: var(--muted);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 7px;
  padding: 3px 9px; background: rgba(255, 255, 255, 0.05);
}
.hint { font-size: 13px; color: var(--faint); line-height: 1.8; }
.hint b { color: var(--accent); font-weight: 600; }

/* ---------- 速达 ---------- */
.fav-row { display: flex; gap: 10px; flex-wrap: wrap; }
.fav {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 76px; padding: 12px 4px 10px; border-radius: 14px;
  text-decoration: none; color: var(--text);
  border: 1px solid transparent;
  transition: transform 0.22s, border-color 0.22s, background 0.22s;
}
.fav:hover { transform: translateY(-3px); border-color: var(--border); background: rgba(255, 255, 255, 0.05); }
.fav img { width: 38px; height: 38px; border-radius: 10px; }
.fav .letter {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft);
}
.fav .fname { font-size: 12px; color: var(--muted); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav .num {
  position: absolute; top: 4px; left: 4px;
  font-size: 10px; font-weight: 700; color: #0a0c11;
  background: var(--accent); border-radius: 50%;
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
}

/* ---------- 分类 ---------- */
.collections { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.cat { animation: rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) both; animation-delay: calc(var(--i, 2) * 95ms); }
.cat-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; padding: 0 6px; }
.cat-head h2 { font-size: 17px; font-weight: 600; letter-spacing: 0.14em; }
.cat-head .count {
  font-size: 12px; color: var(--accent);
  border: 1px solid var(--accent-soft); background: var(--accent-soft);
  border-radius: 20px; padding: 2px 10px; font-variant-numeric: tabular-nums;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.site {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 15px 17px; text-decoration: none; color: var(--text);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.site:hover {
  transform: translateY(-4px);
  border-color: rgba(223, 169, 78, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 22px rgba(223, 169, 78, 0.12);
}
.site img { width: 40px; height: 40px; border-radius: 11px; flex: none; background: rgba(255,255,255,0.06); }
.site .letter {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; color: var(--accent); background: var(--accent-soft);
}
.site .meta { min-width: 0; }
.site .name { font-size: 15.5px; font-weight: 600; }
.site .domain { font-size: 12.5px; color: var(--faint); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

footer { text-align: center; color: var(--faint); font-size: 13px; padding: 14px 0 4px; letter-spacing: 0.06em; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  body { padding: 24px 14px 44px; }
  .bento { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: span 1; }
  .card { padding: 22px 20px; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card, .cat { opacity: 1 !important; transform: none !important; }
}
