:root {
  --bg: #0a0a0f;
  --bg-card: #111119;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --border: #1e1e2e;
  --purple: #8b5cf6;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

header, main, footer { position: relative; z-index: 1; }

.hero {
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--purple), #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline { font-size: 1.25rem; color: var(--text-dim); margin-top: 0.25rem; }
.sub { margin-top: 0.75rem; color: var(--text-dim); font-size: 0.95rem; }
.sub code { color: var(--purple); font-size: 0.9rem; }

.badges { margin-top: 1.5rem; display: flex; gap: 0.5rem; justify-content: center; }
.badges a { text-decoration: none; }
.badges img { height: 22px; }

main { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem; }

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 3rem 0 1.5rem;
  color: var(--purple);
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.server-card:hover {
  border-color: var(--accent, var(--purple));
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent, var(--purple));
}

.tool-count {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent, var(--purple)) 15%, transparent);
  color: var(--accent, var(--purple));
}

.server-card p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.server-card code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: rgba(30, 30, 46, 0.5);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.code-block {
  background: #111119;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-label {
  background: var(--border);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

pre { padding: 1.25rem; overflow-x: auto; font-size: 0.875rem; line-height: 1.7; }
code { font-family: 'SF Mono', 'Fira Code', monospace; color: var(--purple); }
pre code { color: var(--text); }

footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--purple); }
footer p { color: var(--text-dim); font-size: 0.8rem; }
footer p a { color: var(--purple); text-decoration: none; }

.runtime-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: color-mix(in srgb, #3b82f6 15%, transparent);
  color: #3b82f6;
  margin-left: 0.5rem;
}

.alt-runtime { margin-top: 1rem; color: var(--text-dim); font-size: 0.875rem; }
.alt-runtime code { font-size: 0.85rem; }

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .hero { padding-top: 3rem; }
  .server-grid { grid-template-columns: 1fr; }
}
