/* 全站黑色基调 */
:root {
  --bg: #121212;
  --fg: #e5e5e5;
  --sidebar: #1e1e1e;
  --link: #8ab4f8;
  --code-bg: #1e1e1e;
}

/* 页面主体 */
body,
.book-body,
.book-body .page-wrapper {
  background: var(--bg) !important;
  color: var(--fg) !important;
}

/* 侧边栏 */
.book .book-summary {
  background: var(--sidebar) !important;
}

/* 链接和代码块 */
a         { color: var(--link) !important; }
code,
pre       { background: var(--code-bg) !important; }

/* ---- Dark‑mode readability tweaks ---- */

/* Headings & body text */
.book-body h1,
.book-body h2,
.book-body h3,
.book-body h4,
.book-body h5,
.book-body h6,
.book-body p,
.book-body li {
  color: var(--fg) !important;   /* use the light foreground across all text */
}

/* Search bar (top‑left) */
#book-search-input input {
  background: var(--sidebar) !important;
  color: var(--fg) !important;
  border: 1px solid #333 !important;
}

/* Placeholder text inside the search box */
#book-search-input input::placeholder {
  color: #888 !important;
}

/* Fix the white divider around the search bar */
#book-search-input {
  border-bottom: 1px solid #333 !important; /* darken the thin line under the box */
}

/* Remove default white border on the input itself */
#book-search-input input {
  border: none !important;
  outline: none !important;
}

/* Override the default white separator under the search box */
.book .book-summary ul.summary {
  border-top: 1px solid #333 !important;  /* match dark sidebar tone */
}

/* Extra fix: remove plugin‑injected white shadow/border under search bar */
.book .book-summary ul.summary {
  box-shadow: none !important;      /* remove default white inset shadow */
  border-top: 1px solid #333 !important; /* keep subtle divider in dark tone */
}

/* Ensure the search wrapper inherits dark background and zero border */
.book .book-summary #book-search-input {
  background: var(--sidebar) !important;
  border: none !important;
}