:root {
  --theme-color: #1f4e79;
}

/* ---------- 顶部大标题 ---------- */
.site-title {
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid #eef1f4;
  color: #1f3a5f;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 3px;
  z-index: 140;
}

/* ---------- 返回首页按钮 ---------- */
.back-home {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #111;
  font-size: .82rem;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .10);
  transition: background .2s ease;
}

.back-home:hover {
  background: #f1f5f9;
  color: #000;
}

/* ---------- 搜索框（移到右上角） ---------- */
.sidebar .search {
  position: fixed;
  top: 22px;
  right: 24px;
  left: auto;
  width: 300px;
  margin: 0;
  padding: 0;
  z-index: 300;
}

.sidebar .search .input-wrap {
  margin: 0;
}

.sidebar .search input {
  width: 100%;
  height: 38px;
  padding: 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #1e293b;
  font-size: .88rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

.sidebar .search input:focus {
  border-color: var(--theme-color);
  outline: none;
}

.sidebar .search .results-panel {
  position: fixed;
  top: 58px;
  right: 24px;
  width: 300px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  z-index: 301;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 280px;
  padding-top: 0;
  border-right: 1px solid #e8ebef;
}

.content {
  top: 82px;
  left: 280px;
  padding-top: 0;
}

.sidebar .app-name {
  display: block;
  margin: 0;
  padding: 14px 60px 16px 20px;
  background: #1f3a5f;
  color: #fff !important;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  letter-spacing: 2px;
}

.sidebar .app-name a {
  display: inline-block;
  padding: 8px 13px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 6px;
  outline: 1px solid rgba(255, 255, 255, .38);
  outline-offset: 4px;
  box-shadow: inset 0 0 14px rgba(255, 255, 255, .1);
  transform: rotate(-2deg);
  font-family: "STXingkai", "华文行楷", "KaiTi", "楷体", "STKaiti", "LiSu", "隶书", serif;
  font-weight: 500;
  letter-spacing: 4px;
  line-height: 1.25;
}

.sidebar-nav {
  padding: 16px 0 40px;
}

.sidebar ul li a {
  padding: 4px 0;
}

/* ---------- 正文 ---------- */
.markdown-section {
  max-width: 100%;
  padding: 36px 48px 90px;
}

.markdown-section h1 {
  font-size: 1.7rem;
  text-align: center;
  border-bottom: 1px solid #eef1f4;
  padding-bottom: .45em;
}

.markdown-section h2 {
  font-size: 1.5rem;
  margin-top: 2.2rem;
}

.markdown-section p,
.markdown-section li {
  line-height: 1.85;
}

.markdown-section blockquote {
  border-left: 3px solid var(--theme-color);
  background: #f5f8fb;
  margin: 1.6em 0;
  padding: .7em 1.1em;
  color: #4a5a6a;
}

.markdown-section code {
  background: #f4f6f8;
  color: #c92c2c;
}

.markdown-section pre {
  background: #f7f9fb;
  border-radius: 6px;
}

.markdown-section pre > code {
  color: #3a4a5a;
}

/* ---------- 表格 ---------- */
.markdown-section table {
  display: table;
  width: 100%;
}

.markdown-section th {
  background: #f5f8fb;
}

/* ---------- 移动端 ---------- */
@media screen and (max-width: 768px) {
  .content {
    left: 0;
  }
  .back-home {
    top: 10px;
    left: 10px;
  }
}
