/* mint 主题 - baozi 文档样式 */

:root {
  --mint-primary: #7FCAB5;
  --mint-secondary: #FFD4B8;
  --mint-bg: #FAFCFB;
  --mint-fg: #1F2937;
  --mint-muted: #6B7280;
  --mint-border: #E5E7EB;
  --mint-code-bg: #F0F9F5;
  --mint-accent: #FFE5D4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--mint-bg);
  color: var(--mint-fg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
               "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 252, 251, 0.8);
  border-bottom: 1px solid var(--mint-border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--mint-fg);
  font-weight: 700;
}

.nav-logo {
  width: 36px;
  height: 36px;
  background: var(--mint-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-brand-name {
  font-size: 16px;
  font-weight: 700;
}

.nav-brand-tag {
  font-size: 10px;
  color: var(--mint-muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  color: var(--mint-muted);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--mint-fg);
  background: rgba(127, 202, 181, 0.08);
}

.nav-link.active {
  color: var(--mint-fg);
  background: rgba(127, 202, 181, 0.15);
}

/* 主体 */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
  flex: 1;
  width: 100%;
}

/* Markdown 内容 */
.markdown-body h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--mint-fg);
}

.markdown-body h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--mint-border);
}

.markdown-body h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--mint-fg);
}

.markdown-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.markdown-body p {
  margin-bottom: 16px;
  color: var(--mint-fg);
}

.markdown-body a {
  color: var(--mint-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.markdown-body a:hover {
  text-decoration-thickness: 2px;
}

.markdown-body strong {
  font-weight: 600;
  color: var(--mint-fg);
}

.markdown-body em {
  font-style: italic;
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 16px;
  padding-left: 28px;
}

.markdown-body li {
  margin-bottom: 6px;
}

.markdown-body li > ul, .markdown-body li > ol {
  margin-top: 6px;
  margin-bottom: 0;
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid var(--mint-border);
  margin: 32px 0;
}

/* 表格 */
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.markdown-body table th {
  background: rgba(127, 202, 181, 0.08);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: var(--mint-fg);
  border-bottom: 1px solid var(--mint-border);
}

.markdown-body table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--mint-border);
  vertical-align: top;
}

.markdown-body table tr:last-child td {
  border-bottom: 0;
}

.markdown-body table tr:hover {
  background: rgba(127, 202, 181, 0.04);
}

/* 代码 */
.markdown-body code {
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: var(--mint-code-bg);
  color: #2D5C4D;
  padding: 2px 6px;
  border-radius: 4px;
}

.markdown-body pre {
  background: #F8FAF9;
  border: 1px solid var(--mint-border);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.55;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  color: var(--mint-fg);
  font-size: inherit;
}

/* 引用块 */
.markdown-body blockquote {
  border-left: 4px solid var(--mint-primary);
  background: rgba(127, 202, 181, 0.06);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  color: var(--mint-fg);
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Footer */
.footer {
  border-top: 1px solid var(--mint-border);
  padding: 24px;
  text-align: center;
  color: var(--mint-muted);
  font-size: 13px;
}

/* 返回链接 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--mint-muted);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--mint-fg);
}

/* 文档目录卡片 */
.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.doc-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--mint-border);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  background: white;
}

.doc-card:hover {
  border-color: var(--mint-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(127, 202, 181, 0.15);
}

.doc-card-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-card-desc {
  font-size: 13px;
  color: var(--mint-muted);
  line-height: 1.5;
}

.doc-card-status {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.doc-card-status.live {
  background: rgba(127, 202, 181, 0.15);
  color: #2D5C4D;
}

.doc-card-status.planned {
  background: rgba(255, 212, 184, 0.3);
  color: #8B5A3C;
}

/* 移动端 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .container {
    padding: 24px 16px;
  }
  .markdown-body h1 {
    font-size: 1.75rem;
  }
  .markdown-body h2 {
    font-size: 1.4rem;
  }
  .markdown-body table {
    font-size: 12px;
  }
  .markdown-body pre {
    font-size: 12px;
  }
}