/* GuiMax Studio Read the Docs 主题中文排版与视觉增强 */

:root {
  --guimax-accent: #2563eb;
  --guimax-accent-hover: #1d4ed8;
  --guimax-nav-bg: #1e293b;
  --guimax-border: #e2e8f0;
  --guimax-surface: #f8fafc;
}

body,
.rst-content,
.wy-nav-side,
.wy-menu-vertical a,
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    "Noto Sans CJK SC", sans-serif;
}

code, pre, .rst-content tt, .rst-content code {
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular",
    Menlo, Monaco, monospace;
}

/* 放宽宽屏阅读区，减少表格和代码折行 */
.wy-nav-content {
  max-width: 980px;
}

/* 侧边栏 Logo 尺寸与排版 */
.wy-side-nav-search {
  background-color: var(--guimax-nav-bg);
}

.wy-side-nav-search > a img.logo {
  width: 56px;
  height: 56px;
  padding: 0;
  margin: 0 auto 8px auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.wy-side-nav-search > a {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.wy-side-nav-search input[type="text"] {
  border-radius: 6px;
  border-color: #334155;
}

/* 正文排版优化 */
.rst-content p,
.rst-content li {
  line-height: 1.72;
  color: #1e293b;
}

.rst-content h1 {
  padding-bottom: 0.35em;
  border-bottom: 2px solid var(--guimax-border);
  margin-bottom: 1rem;
}

.rst-content h2 {
  margin-top: 2rem;
  padding-bottom: 0.25em;
  border-bottom: 1px solid #f1f5f9;
}

/* 表格防溢出与样式优化 */
.wy-table-responsive {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.wy-table-responsive table td,
.wy-table-responsive table th {
  white-space: normal !important;
  vertical-align: top;
}

.rst-content table.docutils {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid var(--guimax-border);
}

.rst-content table.docutils thead th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

/* 行内代码与快捷键样式 */
.rst-content code.literal,
.rst-content tt.literal {
  color: #be123c;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.88em;
}

kbd,
.rst-content kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.84em;
  line-height: 1.2;
  color: #0f172a;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 4px;
  box-shadow: inset 0 -1px 0 #cbd5e1;
  font-family: "JetBrains Mono", Consolas, monospace;
}

/* 代码块美化 */
.rst-content div[class^="highlight"] {
  border-radius: 6px;
  border: 1px solid var(--guimax-border);
}

/* 提示块圆角 */
.rst-content .admonition {
  border-radius: 6px;
  overflow: hidden;
}

/* 示例工程缩略图与卡片增强 */
.sd-card {
  border-radius: 8px !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.sd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

.example-thumb {
  width: 100%;
  max-height: 168px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--guimax-border);
  background: #0f172a;
  margin-bottom: 0.65rem;
}

/* 顶部徽章行 */
.manual-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.5rem 0 1.25rem 0;
}

.manual-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
