/* 与之前一样，略作精简 */
:root {
  --bg: #f8fafc;
  --text: #333;
  --card: #fff0;
  --border: #d0d0d0;
  --primary: #6366f1;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f172a; --text: #e2e8f0; --card: #1e293b; --border: #334155; }
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  background-color: var(--bg);
  background-image: url('https://www.transparenttextures.com/patterns/skulls.png');
  background-repeat: repeat;
  background-position: center;
  color: var(--text);
  min-height: 100vh; padding: 2rem 1rem;
  display: flex; flex-direction: column; align-items: center;
}
header { text-align:center; margin-bottom: 3rem; }
h1 { font-size: 2.8rem; font-weight: 800;
     background: linear-gradient(90deg, #6366f1, #a855f7);
     -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { color: #94a3b8; font-size: 1.1rem; }

.search { max-width: 600px; width: 100%; margin: 2rem 0; }
.search input {
  width: 100%; padding: 16px 20px; font-size: 1.1rem;
  border: 2px solid var(--border); border-radius: 12px;
  background: var(--card); color: var(--text); outline: none;
}
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 5px rgba(99,102,241,.15); }

main { max-width: 1200px; width: 100%;
       display: grid; gap: 2rem;
       grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
section {
  background: #fff0;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.27);
}
h2 {
  font-size: 1.4rem; margin-bottom: 1.2rem; padding-bottom: 8px;
  border-bottom: 3px solid var(--primary); display: inline-block;
}
ul { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
li { margin: 0; }
a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: var(--text);
  transition: all .2s;
}
a:hover { background: rgba(99,102,241,.12); transform: translateX(4px); }
a img { width: 24px; height: 24px; border-radius: 6px; }
.loading { text-align: center; color: #94a3b8; font-size: 1.2rem; grid-column: 1/-1; }

footer { margin-top: 4rem; color: #94a3b8; font-size: .9rem; }
footer a { color: var(--primary); }