/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0f;
  --bg-subtle: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #2a2a3a;
  --border-subtle: #1e1e2e;
  --text: #e4e4ed;
  --text-muted: #8888a0;
  --text-dim: #5a5a72;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-dim: #3d347a;
  --green: #00d2a0;
  --green-dim: #0a3a2e;
  --orange: #f39c12;
  --blue: #4fc3f7;
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 600;
}

a {
  color: var(--accent-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
}

/* ── Nav ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 5px;
}

.logo-text {
  font-weight: 600;
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: 0.2s;
}

/* ── Hero ── */
.hero {
  padding: 160px 0 100px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-light);
  background: var(--accent-dim);
  border: 1px solid rgba(108, 92, 231, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-sub strong {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #5b4bd6;
  text-decoration: none;
}

/* ── Sections ── */
section {
  padding: 80px 0;
}

section h2 {
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 48px;
  max-width: 560px;
}

/* ── Server Catalogue ── */
.servers {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

.server-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text);
  text-decoration: none;
}

a.server-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  text-decoration: none;
}

.server-card-soon {
  border-style: dashed;
  opacity: 0.5;
}

.server-card-header {
  margin-bottom: 24px;
}

.server-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.server-card-title h3 {
  font-size: 18px;
}

.server-status {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(0, 210, 160, 0.2);
  padding: 2px 10px;
  border-radius: 10px;
}

.server-card-header p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.server-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.server-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.server-url {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent-light);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 4px;
}

/* ── MCP Detail Section ── */
.mcp-detail {
  padding: 80px 0;
}

.detail-header {
  margin-bottom: 48px;
}

.detail-breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.detail-header h2 {
  margin-bottom: 12px;
}

.detail-header .section-sub {
  margin-bottom: 0;
}

/* ── Get Started ── */
.get-started {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
}

.get-started h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.get-started-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.get-started-block h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

/* ── Detail subsections ── */
.detail-section {
  margin-bottom: 48px;
}

.detail-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.detail-source {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.detail-source a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

/* ── Tools ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, background 0.2s;
}

.tool-card:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
}

.tool-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.tool-card > p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tool-input {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(79, 195, 247, 0.1);
  color: var(--blue);
  border: 1px solid rgba(79, 195, 247, 0.2);
}

.tool-example {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow-x: auto;
}

.tool-response {
  color: var(--text-dim);
  font-size: 12px;
  white-space: pre;
}

/* ── Versions ── */
.version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.version-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s;
  position: relative;
}

.version-card:hover {
  border-color: var(--accent-dim);
}

.version-latest {
  border-color: var(--accent);
}

.version-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 10px;
  border-radius: 10px;
}

.version-num {
  display: block;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.version-modules {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Code blocks ── */
.code-block {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.code-block pre {
  padding: 16px 52px 16px 16px;
  overflow-x: auto;
}

.code-block code {
  color: var(--green);
  font-size: 13px;
  line-height: 1.6;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.copy-btn.copied {
  color: var(--green);
  border-color: var(--green);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-built {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-built a {
  color: var(--text);
  transition: color 0.2s;
}

.footer-built a:hover {
  color: var(--accent-light);
}

.heart {
  color: #e74c3c;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-sub {
    font-size: 16px;
  }

  section {
    padding: 60px 0;
  }

  section h2 {
    font-size: 26px;
  }

  .server-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .get-started-grid {
    grid-template-columns: 1fr;
  }

  .version-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .get-started {
    padding: 24px;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .version-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
