:root {
  --bg1: #0f172a;
  --bg2: #1e293b;
  --card: rgba(255, 255, 255, 0.06);
  --card-hover: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --radius: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 800px at 10% -10%, #1e3a5f 0%, transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, #1a2a4a 0%, transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header { text-align: center; margin-bottom: 28px; }

.title { font-size: 2rem; font-weight: 700; letter-spacing: 1px; }

.subtitle { color: var(--muted); margin-top: 8px; font-size: 0.95rem; }

.toolbar { margin-bottom: 28px; }

.search {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.search:focus { border-color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  flex: 1;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 20px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
}

.card:hover {
  background: var(--card-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
}

.card-icon.letter {
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
}

.card-name {
  font-weight: 600;
  font-size: 1.02rem;
  word-break: break-all;
}

.card-desc {
  color: var(--muted);
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
  font-size: 0.95rem;
}

.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}

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

.beian-icon { width: 14px; height: 14px; }

@media (max-width: 560px) {
  .footer { flex-direction: column; gap: 10px; }
}
