*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --card: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --accent: #22d3ee;
  --warn: #fbbf24;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shell-header-h: 56px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shell-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px;
  min-height: var(--shell-header-h);
  display: flex;
  align-items: center;
  gap: 12px;
}

.shell-brand {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shell-brand:hover { opacity: 0.9; }

.shell-search-wrap { flex: 1; min-width: 0; }

.shell-search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}

.shell-search:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.shell-spacer { flex: 1; }

.shell-right { flex-shrink: 0; }

.shell-home-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 6px 8px;
}

.shell-home-link:hover { color: var(--text); }

.shell-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.shell-hero { text-align: center; margin-bottom: 28px; }

.shell-hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shell-hero p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.95rem;
}

.shell-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .shell-grid { grid-template-columns: 1fr 1fr; }
}

.shell-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.1s;
}

.shell-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.shell-card:active { transform: scale(0.99); }

.shell-card h2 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.shell-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.shell-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.shell-card-tags span {
  background: var(--card);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

.shell-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 32px 8px;
}

.shell-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .shell-header-inner { flex-wrap: wrap; }
  .shell-search-wrap { flex-basis: 100%; order: 3; }
}
