/* 导航栏优化样式 */

/* 1. LOGO放大 - 设置为80px宽度，高度自适应 */
.VPNavBarTitle .VPImage.logo {
  width: 80px !important;
  height: auto !important;
  max-width: none !important;
}

/* 2. 隐藏搜索栏 */
.VPNavBarSearch,
#local-search,
.DocSearch {
  display: none !important;
}

/* 3. 隐藏日夜模式切换 */
.VPNavBarAppearance,
.VPSwitchAppearance,
.VPNavBarExtra .item.appearance {
  display: none !important;
}

/* 4. 隐藏GitHub图标 */
.VPNavBarSocialLinks,
.VPSocialLinks,
.VPSocialLink {
  display: none !important;
}

/* 5. 调整导航栏布局，确保删除元素后视觉平衡 */
.VPNavBar .content-body {
  gap: 1rem;
}

.VPNavBarMenu {
  margin-left: auto;
}

/* 6. 确保标题文字样式 */
.VPNavBarTitle .title span {
  font-size: 1.1rem;
  font-weight: 600;
}

/* 7. 移动端优化 */
@media (max-width: 768px) {
  .VPNavBarTitle .VPImage.logo {
    width: 60px !important;
  }
}

/* ============================================
   导航栏布局修复 - 强制同行显示
   ============================================ */

/* 1. 强制container使用flex布局，使LOGO和导航菜单在同一行 */
.VPNavBar .container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 1.5rem !important;
  width: 100% !important;
}

/* 2. title区域（LOGO+文字）布局 */
.VPNavBar .container .title {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.VPNavBarTitle {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 3. LOGO和标题文字水平排列 */
.VPNavBarTitle .title {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 4. content区域（导航菜单）布局 */
.VPNavBar .container .content {
  display: flex !important;
  align-items: center !important;
  flex: 1 !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}

.VPNavBar .content-body {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  width: 100% !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 5. 导航菜单样式 */
.VPNavBarMenu {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
}

/* 6. 确保导航栏整体高度一致 */
.VPNavBar {
  min-height: 64px !important;
}

.VPNavBar .wrapper {
  padding: 0.75rem 1.5rem !important;
}

/* 7. 移除可能导致换行的样式 */
.VPNavBar .container > * {
  flex-shrink: 0 !important;
}

/* 8. 确保LOGO和文字垂直居中 */
.VPNavBarTitle .VPImage.logo {
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
}

.VPNavBarTitle .title span {
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

/* 9. 移动端适配 - 保持单行但允许菜单折叠 */
@media (max-width: 768px) {
  .VPNavBar .container {
    gap: 1rem !important;
  }
  
  .VPNavBarTitle .title span {
    font-size: 0.9rem !important;
  }
  
  .VPNavBarMenu {
    gap: 0.25rem !important;
  }
  
  /* 移动端如果空间不足，隐藏标题文字，只显示LOGO */
  @media (max-width: 480px) {
    .VPNavBarTitle .title span {
      display: none !important;
    }
  }
}

/* 10. 确保内容区域不会被遮挡 */
.VPContent {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 11. 修复可能的溢出问题 */
.VPNavBar .container {
  overflow: visible !important;
  max-width: 100% !important;
}

/* 12. 确保导航链接样式正常 */
.VPNavBarMenuLink,
.VPNavBarMenuGroup {
  white-space: nowrap !important;
}

/* ============================================
   导航栏布局修复 - 强制同行显示
   ============================================ */

/* 1. 强制container使用flex布局，使LOGO和导航菜单在同一行 */
.VPNavBar .container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 1.5rem !important;
  width: 100% !important;
}

/* 2. title区域（LOGO+文字）布局 */
.VPNavBar .container .title {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.VPNavBarTitle {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 3. LOGO和标题文字水平排列 */
.VPNavBarTitle .title {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 4. content区域（导航菜单）布局 */
.VPNavBar .container .content {
  display: flex !important;
  align-items: center !important;
  flex: 1 !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}

.VPNavBar .content-body {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  width: 100% !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 5. 导航菜单样式 */
.VPNavBarMenu {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
}

/* 6. 确保导航栏整体高度一致 */
.VPNavBar {
  min-height: 64px !important;
}

.VPNavBar .wrapper {
  padding: 0.75rem 1.5rem !important;
}

/* 7. 移除可能导致换行的样式 */
.VPNavBar .container > * {
  flex-shrink: 0 !important;
}

/* 8. 确保LOGO和文字垂直居中 */
.VPNavBarTitle .VPImage.logo {
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
}

.VPNavBarTitle .title span {
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

/* 9. 移动端适配 - 保持单行但允许菜单折叠 */
@media (max-width: 768px) {
  .VPNavBar .container {
    gap: 1rem !important;
  }
  
  .VPNavBarTitle .title span {
    font-size: 0.9rem !important;
  }
  
  .VPNavBarMenu {
    gap: 0.25rem !important;
  }
  
  /* 移动端如果空间不足，隐藏标题文字，只显示LOGO */
  @media (max-width: 480px) {
    .VPNavBarTitle .title span {
      display: none !important;
    }
  }
}

/* 10. 确保内容区域不会被遮挡 */
.VPContent {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 11. 修复可能的溢出问题 */
.VPNavBar .container {
  overflow: visible !important;
  max-width: 100% !important;
}

/* 12. 确保导航链接样式正常 */
.VPNavBarMenuLink,
.VPNavBarMenuGroup {
  white-space: nowrap !important;
}