/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */

/* You can override the default Infima variables here. */
:root {
  --ifm-color-primary: #2e8555;
  --ifm-color-primary-dark: #29784c;
  --ifm-color-primary-darker: #277148;
  --ifm-color-primary-darkest: #205d3b;
  --ifm-color-primary-light: #33925d;
  --ifm-color-primary-lighter: #359962;
  --ifm-color-primary-lightest: #3cad6e;
  --ifm-code-font-size: 95%;
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme="dark"] {
  --ifm-color-primary: #25c2a0;
  --ifm-color-primary-dark: #21af90;
  --ifm-color-primary-darker: #1fa588;
  --ifm-color-primary-darkest: #1a8870;
  --ifm-color-primary-light: #29d5b0;
  --ifm-color-primary-lighter: #32d8b4;
  --ifm-color-primary-lightest: #4fddbf;
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

/* 上面的是系统自动生成的网站全局配色样式，想修改颜色可以动，但是要做好设计，不要搞得太丑了 */
/* 下面是我们的自定义CSS，对网站是全局生效的 */

.markdown h2 {
  position: relative;
  padding-left: 16px;
  border-left: 6px solid var(--ifm-color-primary);
  font-weight: bold;
  margin-top: 32px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 4px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0));
  display: inline-block;
  max-width: fit-content;
}

html[data-theme="dark"] .markdown h2 {
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.01),
    rgba(255, 255, 255, 0)
  );
  border-left-color: var(--ifm-color-primary-light);
}

/* 强制 Mermaid 图表在黑暗模式下使用白色背景 */
html[data-theme="dark"] .docusaurus-mermaid-container {
  background-color: #ffffff;
}

.docs-card h2 {
  padding-left: initial;
  border-left: initial;
  margin-top: initial;
  margin-bottom: initial;
  padding: initial;
  border-radius: initial;
  background: initial;
}

.pagination-nav {
  display: none;
}

/* blockquote 样式 */
.markdown blockquote {
  background-color: #f0f0f0; /* 浅灰色背景 */
  border-left: 5px solid #ccc;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  color: #333;
}
html[data-theme="dark"] .markdown blockquote {
  background-color: #333;
  border-left-color: #555;
  color: #f1f1f1;
}
