/* MCP 列表与详情：结构复用类型页卡片与站内详情页，这里只补充差异样式。 */

/* 列表视图（紧凑行） */
.mcp-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-card);
  transition: box-shadow 0.16s ease;
}

.mcp-row:hover {
  box-shadow: var(--shadow-hover);
}

.mcp-row .type-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.mcp-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mcp-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcp-row-desc {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcp-row-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.mcp-row-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .mcp-row-tags {
    display: none;
  }
}

@media (max-width: 640px) {
  .mcp-row-stats {
    display: none;
  }
}

.mcp-text {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-sub);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 详情正文（Markdown 渲染） */
.mcp-content {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-sub);
  word-break: break-word;
}

.mcp-content h1,
.mcp-content h2,
.mcp-content h3,
.mcp-content h4 {
  margin: 20px 0 10px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

.mcp-content h1 { font-size: 20px; }
.mcp-content h2 { font-size: 18px; }
.mcp-content h3 { font-size: 16px; }
.mcp-content h4 { font-size: 14px; }

.mcp-content p {
  margin: 10px 0;
}

.mcp-content ul,
.mcp-content ol {
  margin: 10px 0;
  padding-left: 20px;
}

.mcp-content li {
  margin: 4px 0;
}

.mcp-content a {
  color: var(--primary);
}

.mcp-content a:hover {
  text-decoration: underline;
}

.mcp-content code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

.mcp-content pre {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  overflow-x: auto;
}

.mcp-content pre code {
  padding: 0;
  background: transparent;
}

.mcp-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.mcp-content blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--primary);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.mcp-content table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 13px;
}

.mcp-content th,
.mcp-content td {
  padding: 8px 10px;
  border: 1px solid var(--divider);
  text-align: left;
}

/* 详情侧栏：项目地址 */
.mcp-ext-link {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  color: var(--primary);
  word-break: break-all;
}

.mcp-ext-link:hover {
  text-decoration: underline;
}
