/* 隐藏右侧 TOC 目录栏 */
.md-sidebar--secondary {
  display: none !important;
}

/* 内容区域自适应宽度 */
@media screen and (min-width: 76.25em) {
  .md-content {
    max-width: 100% !important;
    margin-left: 0 !important;
  }
  .md-sidebar--primary {
    width: 12.1rem;
  }
  .md-main__inner {
    max-width: 100%;
  }
}

/* 桌面端：隐藏侧边栏顶部白框标题（首页那个） */
@media (min-width: 76.25em) {
  .md-nav--primary .md-nav__title {
    display: none !important;
  }
}

/* 让顶部标题可点击回到首页 */
.md-header__title {
  cursor: pointer;
}

/* 顶部「回到上一级」链接 */
.parent-back-link {
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}
.parent-back-link a {
  display: inline-block;
  color: var(--md-primary-fg-color);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.parent-back-link a:hover {
  background: var(--md-primary-fg-color--lightest);
  text-decoration: none;
}

/* ===== 响应式全屏背景图片 ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 桌面端 ≥768px：横屏背景图 */
@media (min-width: 768px) {
  body::before {
    background-image: url('assets/images/bg-desktop.jpg');
  }
}

/* 移动端 <768px：竖屏背景图 */
@media (max-width: 767px) {
  body::before {
    background-image: url('assets/images/bg-mobile.jpg');
  }
}

/* 内容区域半透明白底保证文字可读 */
/* 桌面端：0.72 */
@media (min-width: 768px) {
  .md-main {
    background: rgba(255, 255, 255, 0.72) !important;
  }
}
/* 移动端：保持 0.62 */
@media (max-width: 767px) {
  .md-main {
    background: rgba(255, 255, 255, 0.62) !important;
  }
}

/* 导航栏保持不透明 */
.md-header,
.md-tabs {
  background-color: var(--md-primary-fg-color) !important;
}
