:root {
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: oklch(15% 0.02 260);
  font-family: 'Manrope', sans-serif;
  color: oklch(92% 0.01 260);
  position: relative;
  overflow-x: hidden;
}

::selection {
  background: oklch(70% 0.15 250 / 0.35);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- glow orbs ---------- */

@keyframes glow-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.glow-a {
  top: -200px;
  left: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, oklch(55% 0.16 280 / 0.35), transparent 70%);
  animation: glow-pulse 8s ease-in-out infinite;
}

.glow-b {
  top: 100px;
  right: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, oklch(55% 0.14 200 / 0.3), transparent 70%);
  animation: glow-pulse 10s ease-in-out infinite 2s;
}

/* ---------- header ---------- */

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 32px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, oklch(70% 0.15 250), oklch(70% 0.15 200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: oklch(15% 0.02 260);
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.brand-name span {
  color: oklch(65% 0.01 260);
  font-weight: 500;
  font-size: 14px;
}

.brand-count {
  font-size: 13px;
  color: oklch(60% 0.01 260);
}

/* ---------- hero ---------- */

.view { position: relative; z-index: 2; }

.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 32px 20px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: oklch(70% 0.15 250 / 0.12);
  border: 1px solid oklch(70% 0.15 250 / 0.3);
  font-size: 13px;
  color: oklch(78% 0.13 250);
  margin-bottom: 22px;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 52px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 16px;
  background: linear-gradient(135deg, oklch(96% 0.01 260), oklch(75% 0.1 240));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subhead {
  font-size: 17px;
  color: oklch(70% 0.01 260);
  font-weight: 500;
  max-width: 640px;
  margin: 0 auto 36px;
}

.search-wrap {
  max-width: 560px;
  margin: 0 auto 28px;
  position: relative;
}

.search-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid oklch(100% 0 0 / 0.1);
  background: oklch(22% 0.02 260 / 0.7);
  backdrop-filter: blur(12px);
  color: oklch(94% 0.01 260);
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
  outline: none;
}

.search-wrap input::placeholder {
  color: oklch(55% 0.01 260);
}

.search-wrap input:focus {
  border-color: oklch(70% 0.15 250 / 0.5);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  display: inline-block;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  transition: all 0.15s;
  border: 1px solid oklch(100% 0 0 / 0.1);
  background: oklch(22% 0.02 260 / 0.5);
  color: oklch(75% 0.01 260);
}

.chip span {
  opacity: 0.65;
  font-weight: 500;
}

.chip.active {
  border-color: oklch(78% 0.15 250 / 0.5);
  background: oklch(78% 0.15 250 / 0.16);
  color: oklch(90% 0.05 250);
}

/* ---------- catalog ---------- */

.catalog {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 32px 100px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
}

.mcp-card {
  display: block;
  cursor: pointer;
  padding: 26px;
  border-radius: 18px;
  background: oklch(22% 0.02 260 / 0.55);
  border: 1px solid oklch(100% 0 0 / 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.15s, border-color 0.15s;
  text-align: left;
}

.mcp-card:hover {
  border-color: oklch(100% 0 0 / 0.22);
  transform: translateY(-3px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: oklch(15% 0.02 260);
  background: linear-gradient(135deg, oklch(78% 0.15 var(--h)), oklch(70% 0.15 var(--h2)));
}

.badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid oklch(78% 0.15 var(--h) / 0.32);
  background: oklch(78% 0.15 var(--h) / 0.12);
  color: oklch(78% 0.15 var(--h));
  white-space: nowrap;
}

.card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 6px;
}

.card-tagline-zh {
  font-size: 14px;
  color: oklch(75% 0.01 260);
  margin-bottom: 4px;
}

.card-tagline-en {
  font-size: 12.5px;
  color: oklch(58% 0.01 260);
  margin-bottom: 18px;
}

.card-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: oklch(65% 0.01 260);
  padding-top: 14px;
  border-top: 1px solid oklch(100% 0 0 / 0.07);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: oklch(55% 0.01 260);
  font-size: 15px;
}

/* ---------- detail view ---------- */

.detail {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 32px 120px;
}

.back-link {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: oklch(65% 0.01 260);
  margin-bottom: 28px;
  background: none;
  border: none;
  font-family: 'Manrope', sans-serif;
  padding: 0;
}

.back-link span {
  opacity: 0.7;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.detail-mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 27px;
  color: oklch(15% 0.02 260);
  background: linear-gradient(135deg, oklch(78% 0.15 var(--h)), oklch(70% 0.15 var(--h2)));
  flex-shrink: 0;
}

.detail-headtext {
  flex: 1;
  min-width: 240px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.detail-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 30px;
  margin: 0;
}

.detail-tagline-zh {
  font-size: 16px;
  color: oklch(78% 0.01 260);
  margin-bottom: 2px;
}

.detail-tagline-en {
  font-size: 13.5px;
  color: oklch(58% 0.01 260);
}

.detail-github-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: oklch(70% 0.13 250);
  text-decoration: none;
}

.detail-github-link:hover {
  text-decoration: underline;
}

.detail-meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: oklch(65% 0.01 260);
  padding: 16px 0;
  border-top: 1px solid oklch(100% 0 0 / 0.08);
  border-bottom: 1px solid oklch(100% 0 0 / 0.08);
  margin-bottom: 28px;
}

.detail-meta span.muted {
  opacity: 0.6;
}

.detail-desc {
  font-size: 15.5px;
  line-height: 1.75;
  color: oklch(82% 0.01 260);
  margin-bottom: 40px;
}

.detail-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: oklch(62% 0.01 260);
  margin-bottom: 36px;
  padding-bottom: 4px;
}

.detail-nav a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.detail-nav a:hover {
  color: oklch(90% 0.01 260);
}

.section-block {
  margin-bottom: 44px;
}

.section-block-last {
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 16px;
}

.section-title span {
  font-weight: 500;
  font-size: 14px;
  color: oklch(58% 0.01 260);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.tool-card {
  padding: 16px 18px;
  border-radius: 12px;
  background: oklch(22% 0.02 260 / 0.5);
  border: 1px solid oklch(100% 0 0 / 0.07);
}

.tool-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: oklch(78% 0.15 var(--h));
  margin-bottom: 6px;
}

.tool-desc {
  font-size: 13.5px;
  color: oklch(72% 0.01 260);
  line-height: 1.5;
}

.setup-steps {
  font-size: 14.5px;
  color: oklch(72% 0.01 260);
  margin-bottom: 14px;
  line-height: 1.7;
}

.code-block {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid oklch(100% 0 0 / 0.08);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: oklch(19% 0.015 260);
  border-bottom: 1px solid oklch(100% 0 0 / 0.06);
}

.code-filename {
  font-size: 12px;
  color: oklch(55% 0.01 260);
  font-family: 'JetBrains Mono', monospace;
}

.copy-btn {
  cursor: pointer;
  font-size: 12px;
  color: oklch(70% 0.13 250);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid oklch(70% 0.13 250 / 0.3);
  background: none;
  font-family: 'Manrope', sans-serif;
}

.code-block pre {
  margin: 0;
  padding: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: oklch(85% 0.02 150);
  background: oklch(13% 0.015 260);
  overflow-x: auto;
  white-space: pre;
}

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.usecase-card {
  padding: 18px;
  border-radius: 12px;
  background: oklch(78% 0.15 var(--h) / 0.12);
  border: 1px solid oklch(78% 0.15 var(--h) / 0.32);
  font-size: 14.5px;
  color: oklch(90% 0.01 260);
  line-height: 1.55;
}

.clients-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: oklch(22% 0.02 260 / 0.5);
  border: 1px solid oklch(100% 0 0 / 0.08);
  font-size: 13.5px;
}

.client-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.client-dot.full { background: oklch(75% 0.15 150); }
.client-dot.partial { background: oklch(75% 0.15 80); }

.client-level {
  color: oklch(58% 0.01 260);
  font-size: 12px;
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 32px 40px;
  text-align: center;
  font-size: 12.5px;
  color: oklch(45% 0.01 260);
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .hero h1 { font-size: 36px; }
  .site-header { padding: 20px 20px 0; flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero { padding: 40px 20px 16px; }
  .catalog { padding: 24px 20px 60px; }
  .detail { padding: 28px 20px 80px; }
}
