/* 风格9 - NPlayer网站风格  */
.sidebar {
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  box-shadow: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sidebar-nav {
  padding: 0;
  background: transparent;
}

.sidebar-nav ul {
  margin: 0;
  padding: 8px 0;
}

.sidebar-nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-nav a {
  display: block;
  padding: 6px 16px;
  color: #4A4A4A;
  text-decoration: none;
  font-size: 14px;
  line-height: 28px;
  transition: all 0.2s ease;
  position: relative;
  font-weight: normal;
}

/* 主导航项（顶级导航）不加粗 */
.sidebar-nav > ul > li > a {
  font-weight: normal;
}

.sidebar-nav a:hover {
  background: #EFEFEF;
  color: #333333;
}

.sidebar-nav a.active {
  background: #E6E2F5;
  color: #1F1F1F;
  font-weight: normal;
  border-left: 4px solid #7B61FF;
  border-radius: 6px;
  margin: 2px 8px;
  padding: 6px 12px;
}

/* 嵌套层级样式 */
.sidebar-nav ul ul {
  padding-left: 0;
  background: transparent;
}

.sidebar-nav ul ul a {
  padding-left: 28px;
  font-size: 14px;
  color: #4A4A4A;
}

.sidebar-nav ul ul a:hover {
  color: #4b5563;
}

.sidebar-nav ul ul a.active {
  color: #1F1F1F;
  background: #E6E2F5;
  border-left: 4px solid #7B61FF;
  border-radius: 6px;
  margin: 2px 8px;
  padding: 6px 12px;
}

/* 未选中的子项目样式（如弹幕插件） */
.sidebar-nav ul ul a.inactive-highlight {
  background: #EFEFEF;
  border-radius: 6px;
  margin: 2px 8px;
  padding: 6px 12px;
  color: #333333;
}

.sidebar-nav ul ul ul a {
  padding-left: 48px;
  font-size: 12px;
  color: #9ca3af;
}

.sidebar-nav ul ul ul a:hover {
  color: #6b7280;
}

/* 搜索框样式 */
.sidebar .search {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  margin: 0;
}

.sidebar .search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: none;
}

.sidebar .search input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sidebar .search input::placeholder {
  color: #9ca3af;
}

/* 标题样式（带展开/收起功能） */
.sidebar h1,
.sidebar h2 {
  margin: 0;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: normal;
  color: #4A4A4A;
  text-transform: none;
  letter-spacing: normal;
  border-bottom: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  line-height: 28px;
}

/* 搜索结果标题加粗 */
.sidebar .search-results h1,
.sidebar .search-results h2,
.sidebar .search-results h3,
.sidebar .search-results h4,
.sidebar .search-results .matching-post h1,
.sidebar .search-results .matching-post h2,
.sidebar .search-results .matching-post h3,
.sidebar .search-results .matching-post h4,
.sidebar .search-results .matching-post h5,
.sidebar .search-results .matching-post h6 {
  font-weight: bold !important;
}

/* 搜索结果中的匹配标题 */
.sidebar .search-results .matching-post .post-title {
  font-weight: bold;
}

/* 搜索结果链接样式 */
.sidebar .search-results a {
  font-weight: normal;
}

.sidebar .search-results a:hover {
  font-weight: normal;
}

.sidebar-nav .sidebar-nav-item {
  position: relative;
}

/* 展开/收起箭头图标 */
.sidebar-nav .sidebar-nav-item::before {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 5px;
  height: 5px;
  border-right: 1px solid #888A90;
  border-bottom: 1px solid #888A90;
  transition: transform 0.2s ease;
}

.sidebar-nav .sidebar-nav-item.active::before {
  transform: translateY(-50%) rotate(-135deg);
}

.sidebar-nav .sidebar-nav-item.collapsed::before {
  transform: translateY(-50%) rotate(45deg);
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #ffffff;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
  }
  
  .sidebar-nav a {
    padding: 6px 12px;
    font-size: 15px;
    line-height: 28px;
  }
  
  .sidebar-nav ul ul a {
    padding-left: 24px;
    font-size: 14px;
  }
  
  .sidebar-nav ul ul ul a {
    padding-left: 44px;
    font-size: 13px;
  }
  
  .sidebar .search {
    padding: 10px 12px;
  }
  
  .sidebar .search input {
    padding: 10px 12px;
    font-size: 15px;
  }
}