/* 基础变量定义 */
:root {
  --kether-primary: #2563EB;
  --kether-primary-dark: #1d4ed8;
  --kether-primary-darker: #1e40af;
  --kether-primary-light: #3b82f6;
  --kether-primary-lighter: #60a5fa;
  --kether-primary-lightest: #93c5fd;
  
  --kether-background: var(--ifm-background-surface-color);
  --kether-background-light: rgba(0, 0, 0, 0.01);
  --kether-text: var(--ifm-font-color-base);
  --kether-text-light: var(--ifm-font-color-secondary);
  --kether-text-lighter: var(--ifm-color-secondary-darker);
  
  --kether-border: rgba(0, 0, 0, 0.1);
  --kether-border-light: rgba(0, 0, 0, 0.05);
  --kether-hover: rgba(0, 0, 0, 0.03);
  --kether-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --kether-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --kether-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.04), 0 6px 12px rgba(0, 0, 0, 0.08);
  --kether-sidebar-shadow: -5px 0 30px rgba(0, 0, 0, 0.12);
  
  --kether-radius-sm: 6px;
  --kether-radius: 8px;
  --kether-radius-lg: 12px;
  --kether-radius-xl: 16px;
  
  --kether-transition: all 0.2s ease;
  --kether-transition-fast: all 0.15s ease;
  --kether-transition-slow: all 0.3s ease;
  
  /* 移动优化 */
  --mobile-padding: 16px;
  --mobile-gap: 12px;
  --mobile-radius: 8px;
  
  /* 布局尺寸 */
  --index-width: 180px;
  --detail-padding: 36px;
  --sidebar-width: 380px;
}

/* 响应式设计 - 只使用两种模式：
   1. 大屏(>767px)：正常显示，侧边栏推动内容
   2. 小屏(≤767px)：侧边栏全屏显示，内容隐藏

*/
@media (max-width: 767px) {
  :root {
    --sidebar-width: 100%;
    --detail-padding: 24px;
}
}

/* 暗色主题 */
[data-theme='dark'] {
  --kether-hover: rgba(255, 255, 255, 0.05);
  --kether-border: rgba(255, 255, 255, 0.1);
  --kether-border-light: rgba(255, 255, 255, 0.05);
  --kether-background-light: rgba(255, 255, 255, 0.02);
  --kether-sidebar-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
}

/* 主容器样式 */
.ketherContainer {
  display: flex;
  flex-direction: column;
  min-height: 90vh;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: relative;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  background-color: var(--kether-background);
  width: 100%;
  overflow-x: visible;
  box-sizing: border-box;
  --plugin-catalog-sidebar-width: 380px;
}

/* 设置侧边栏打开时的容器样式 */
.ketherContainer.withSidebar {
  width: 100%;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: visible;
}

/* 小屏模式下主容器隐藏溢出 */
@media (max-width: 767px) {
  .ketherContainer {
    overflow-x: hidden;
  }
}

/* 头部导航区域优化 */
.header {
  background-color: var(--kether-background);
  border-bottom: 1px solid var(--kether-border);
  position: relative;
  z-index: 50;
  transition: var(--kether-transition);
  width: 100%;
}

.headerContent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 100%;
  margin: 0 auto;
  gap: 20px;
}

/* Logo区域优化 */
.logoSection {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 48px;
  height: 48px;
  background-color: var(--kether-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  border-radius: 12px;
  transition: var(--kether-transition);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.logo:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: var(--kether-shadow);
}

.title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--kether-text);
  transition: color 0.2s ease;
}

.title:hover {
  color: var(--kether-primary);
}

/* 内容区域包装器 */
.contentWrapper {
  display: flex;
  flex: 1;
  width: 100%;
  position: relative;
  overflow: visible;
  min-height: 90vh;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 小屏模式下内容包装器不显示溢出内容 */
@media (max-width: 767px) {
  .contentWrapper {
    overflow: hidden;
  }
}

/* 主内容区域 */
.content {
  flex: 1;
  padding: 24px 32px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
}

/* 当侧边栏打开时的内容区域样式 */
.content.withSidebar {
  width: calc(100% - var(--plugin-catalog-sidebar-width, var(--sidebar-width)));
  box-sizing: border-box;
  transform: translateX(0);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  margin-right: var(--plugin-catalog-sidebar-width, var(--sidebar-width));
  overflow-y: auto;
  pointer-events: auto;
}

/* 侧边栏 */
.detailSidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: var(--plugin-catalog-sidebar-width, var(--sidebar-width));
  background-color: var(--kether-background);
  border-left: 1px solid var(--kether-border);
  box-shadow: var(--kether-sidebar-shadow);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(5px);
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

/* 侧边栏动画改进 */
@keyframes slideInRight {
  from { 
    transform: translateX(100%); 
    opacity: 0; 
    box-shadow: none;
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
    box-shadow: var(--kether-sidebar-shadow);
  }
}

@keyframes slideOutRight {
  from { 
    transform: translateX(0); 
    opacity: 1; 
    box-shadow: var(--kether-sidebar-shadow);
  }
  to { 
    transform: translateX(100%); 
    opacity: 0; 
    box-shadow: none;
  }
}

/* 侧边栏状态 */
.entering {
  animation: slideInRight 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.visible {
  transform: translateX(0);
}

.leaving {
  animation: slideOutRight 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(100%);
  opacity: 0;
  box-shadow: none;
}

.hidden {
  display: none;
}

/* 响应式适配 - 只在小屏幕下触发，大屏幕保持原样 */
@media (max-width: 767px) {
  /* 左侧内容区域在侧边栏打开时的样式 */
  .content.withSidebar {
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-20px);
    position: absolute;
  }
  
  .disclaimerContainer.withSidebar {
    width: 100%;
    opacity: 0;
    pointer-events: none;
  }
  
  .footer.withSidebar {
    width: 100%;
    display: none;
  }
  
  /* 侧边栏样式 */
  .detailSidebar {
    width: 100% !important; /* 强制全宽 */
    max-width: 100vw !important; /* 确保不会超出视口 */
    right: 0; /* 保持从右侧定位 */
    border-left: none; /* 移除左边框 */
  }
  
  .detailHeader {
    padding: 16px 24px;
  }
  
  .backButton {
    top: 16px;
    left: 16px;
    font-size: 18px;
    width: 32px;
    height: 32px;
  }
  
  .detailTitle {
    font-size: 18px;
    padding-left: 40px;
  }
  
  .detailBody {
    padding: 16px 24px;
  }
  
  /* 布局网格样式 */
  .grid .pluginsGrid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  
  .compact .pluginsGrid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  .downloadButton, .pluginLink {
    padding: 5px 10px;
    font-size: 11px;
  }
  
  .list .pluginLinks {
    min-width: 100px;
  }
  
  .searchSection {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .searchContainer, 
  .filterToggle {
    width: 100% !important;
    height: 42px !important;
    max-width: 100% !important;
    margin: 0 0 8px 0 !important;
    box-sizing: border-box !important;
    border: 1px solid var(--kether-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  }
  
  .searchInput {
    width: 100% !important;
    height: 42px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    padding: 8px 12px 8px 38px !important;
    font-size: 14px !important;
  }
  
  .filterToggle {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    gap: 6px !important;
    background-color: var(--kether-background) !important;
  }
  
  .filterToggle svg {
    font-size: 16px !important;
    margin-right: 4px !important;
  }
  
  .searchIcon {
    left: 12px !important;
    font-size: 16px !important;
  }
  
  .layoutControls {
    width: 100% !important;
    justify-content: center !important;
    margin-top: 10px !important;
  }
  
  .logoSection {
    width: 100% !important;
    margin-bottom: 14px !important;
  }
  
  /* 隐藏所有可能导致宽度差异的元素 */
  .searchSection > * {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
  }
  
  /* 保持原有的其他媒体查询样式 */
  .headerContent {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 16px;
  }
  
  .title {
    font-size: 18px;
  }
  
  .activeTags {
    padding: 12px 16px;
  }
  
  /* 列表样式 */
  .list .pluginCard {
    flex-direction: column;
    padding: 16px;
  }
  
  .list .pluginLinks {
    flex-direction: row;
    width: 100%;
    min-width: auto;
    max-width: 100%;
    margin-top: 8px;
  }
  
  .pluginIconAndInfo {
    width: 100%;
  }
  
  /* 卡片样式 */
  .pluginCard {
    padding: 16px;
  }
  
  .pluginIcon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .pluginName {
    font-size: 15px;
  }
  
  .pluginDescription {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
  
  .pluginTag {
    padding: 2px 6px;
    font-size: 11px;
  }
  
  /* 超小屏幕适配 */
  .pluginIconLarge {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
}

/* 滚动条美化 */
.detailBody::-webkit-scrollbar {
  width: 6px;
}

.detailBody::-webkit-scrollbar-track {
  background: transparent;
}

.detailBody::-webkit-scrollbar-thumb {
  background-color: var(--kether-border);
  border-radius: 3px;
}

.content::-webkit-scrollbar {
  width: 6px;
}

.content::-webkit-scrollbar-track {
  background: transparent;
}

.content::-webkit-scrollbar-thumb {
  background-color: var(--kether-border);
  border-radius: 3px;
}

[data-theme='dark'] .detailBody::-webkit-scrollbar-thumb,
[data-theme='dark'] .content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 侧边栏标题部分 */
.detailHeader {
  padding: 24px 32px;
  border-bottom: 1px solid var(--kether-border);
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(3px);
  z-index: 10;
}

.backButton {
  position: absolute;
  top: 24px;
  left: 24px;
  background: transparent;
  border: none;
  color: var(--kether-text-light);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
}

.backButton:hover {
  background-color: var(--kether-hover);
  color: var(--kether-text);
  transform: rotate(90deg);
}

.detailTitle {
  font-size: 20px;
  font-weight: 600;
  color: var(--kether-text);
  margin: 0;
  padding-left: 48px;
  transition: color 0.2s ease;
  line-height: 1.3;
  flex: 1;
}

/* 侧边栏内容区域 */
.detailBody {
  padding: 24px 32px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* 详情部分 */
.detailSection {
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 24px;
  animation: fadeIn 0.4s ease;
}

.detailSection:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detailSectionTitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--kether-text);
  margin: 0 0 16px;
  position: relative;
  transition: all 0.2s ease;
}

.detailSectionTitle:after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--kether-primary-lightest);
  transition: width 0.3s ease;
}

.detailSection:hover .detailSectionTitle:after {
  width: 60px;
  background-color: var(--kether-primary);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 全局样式 */
:global(body.sidebar-open) {
  padding-right: 15px;
}

/* 小屏模式下禁用滚动 */
@media (max-width: 767px) {
  :global(body.sidebar-open) {
    overflow: hidden;
  }
}

/* 优化搜索部分布局 */
.searchSection {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

[data-theme='dark'] .header {
  background-color: var(--kether-background);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.searchContainer {
  position: relative;
  width: 300px;
}

.searchIcon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--kether-text-light);
  font-size: 18px;
  transition: color 0.2s ease;
  z-index: 2;
  pointer-events: none;
}

.searchInput {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border-radius: var(--kether-radius);
  border: 1px solid var(--kether-border);
  background-color: var(--kether-background);
  color: var(--kether-text);
  font-size: 14px;
  transition: var(--kether-transition);
}

.searchInput:focus {
  outline: none;
  border-color: var(--kether-primary-light);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

/* 确保搜索图标在搜索框获得焦点时正确着色 */
.searchContainer:focus-within .searchIcon {
  color: var(--kether-primary);
}

.clearButton {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--kether-text-light);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
}

.clearButton:hover {
  background-color: var(--kether-hover);
  color: var(--kether-primary);
  transform: translateY(-50%) scale(1.1);
}

/* 筛选器按钮 */
.filterToggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--kether-radius);
  background-color: var(--kether-background);
  border: 1px solid var(--kether-border);
  color: var(--kether-text);
  font-weight: 500;
  cursor: pointer;
  transition: var(--kether-transition);
  position: relative;
  white-space: nowrap;
}

.filterToggle:hover {
  background-color: var(--kether-hover);
  transform: translateY(-1px);
}

.filterToggle.active {
  background-color: var(--kether-primary);
  color: white;
}

.filterToggle svg {
  font-size: 16px;
}

.filterToggle.active svg {
  transform: rotate(15deg);
}

.filterBadge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--kether-primary);
  color: white;
  font-size: 10px;
  font-weight: bold;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 新的筛选器布局 */
.filtersWrapper {
  border-top: 1px solid var(--kether-border);
  background-color: var(--kether-background);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 5;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(-10px);
  pointer-events: none;
}

.filtersWrapper.show {
  max-height: 800px; /* 大于实际高度的值 */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.filtersPanel {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  transform-origin: top center;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.filtersPanel.hide {
  animation: slideUp 0.3s ease forwards;
}

.filterSection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filterSectionTitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--kether-text);
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--kether-border-light);
}

.filterSectionSubTitle {
  font-size: 12px;
  font-weight: normal;
  color: var(--kether-text-light);
}

/* 筛选选项 */
.filterChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.filterChip {
  padding: 6px 12px;
  border-radius: 16px;
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--kether-text);
  font-size: 13px;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: var(--kether-transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filterChip:hover {
  background-color: rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.filterChip.active {
  background-color: var(--kether-primary);
  color: white;
}

.chipCheckmark {
  font-size: 11px;
}

/* 活跃标签容器和样式 */
.activeTagsContainer {
  border-top: 1px solid var(--kether-border);
  background-color: var(--kether-background-light);
}

.activeTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
}

.activeTag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--kether-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: fadeIn 0.3s ease;
}

.activeTag:hover {
  background-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.activeTagsClearButton {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: var(--kether-radius);
  background-color: transparent;
  border: 1px solid var(--kether-border);
  color: var(--kether-text);
  font-size: 13px;
  cursor: pointer;
  transition: var(--kether-transition);
  display: flex;
  align-items: center;
}

.activeTagsClearButton:hover {
  background-color: rgba(220, 38, 38, 0.1);
  color: rgb(220, 38, 38);
  border-color: rgba(220, 38, 38, 0.2);
  transform: translateY(-1px);
}

/* 布局控制 */
.layoutControls {
  display: flex;
  background-color: var(--kether-background);
  border: 1px solid var(--kether-border);
  border-radius: var(--kether-radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.layoutControls:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.layoutButton {
  background: transparent;
  border: none;
  padding: 8px 10px;
  color: var(--kether-text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--kether-transition);
}

.layoutButton:hover {
  background-color: var(--kether-hover);
  transform: translateY(-1px);
}

.layoutButton.active {
  background-color: var(--kether-primary);
  color: white;
  transform: translateY(-1px);
}

/* 结果统计区域 */
.resultsHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.resultStats {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.resultCount {
  font-size: 20px;
  font-weight: 600;
  color: var(--kether-text);
  transition: color 0.2s ease;
}

.resultLabel {
  font-size: 14px;
  color: var(--kether-text-light);
}

/* 当前排序样式 */
.currentSort {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--kether-text-light);
}

.currentSortType {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--kether-text);
}

.ascending {
  transform: rotate(180deg);
}

.descending {
  transform: rotate(0deg);
}

/* 排序按钮组 */
.sortButtonGroup {
  display: flex;
  background-color: var(--kether-background);
  border: 1px solid var(--kether-border);
  border-radius: var(--kether-radius);
  overflow: hidden;
}

.sortButton {
  background: transparent;
  border: none;
  padding: 8px 16px;
  color: var(--kether-text-light);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-right: 1px solid var(--kether-border);
}

.sortButton:last-child {
  border-right: none;
}

.sortButton:hover {
  background-color: var(--kether-hover);
  color: var(--kether-primary);
  }
  
.sortButton.active {
  background-color: var(--kether-primary);
  color: white;
}

/* 插件网格 */
.pluginsGrid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

/* 布局变体 */
  .grid .pluginsGrid {
  grid-template-columns: repeat(5, 1fr);
  }
  
  .compact .pluginsGrid {
  grid-template-columns: repeat(3, 1fr);
  }
  
.list .pluginsGrid {
  grid-template-columns: 1fr;
}

/* 插件卡片 */
.pluginCard {
  background-color: var(--kether-background);
  border: 1px solid var(--kether-border);
  border-radius: var(--kether-radius);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), 
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), 
              border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--kether-shadow-sm);
  position: relative;
  overflow: hidden;
  height: 100%;
  max-width: 100%;
}

.pluginCard:hover {
  transform: translateY(-3px);
  box-shadow: var(--kether-shadow);
  border-color: var(--kether-primary-lightest);
}

.pluginCard:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--kether-primary), var(--kether-primary-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pluginCard:hover:after {
  opacity: 1;
}

/* 插件图标 */
.pluginIcon {
  width: 42px;
  height: 42px;
  background-color: var(--kether-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  border-radius: 10px;
  margin-bottom: 4px;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.15);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.pluginCard:hover .pluginIcon {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

/* 插件基本信息 */
.pluginName {
  font-size: 16px;
  font-weight: 600;
  color: var(--kether-text);
  margin: 0 0 4px;
  transition: color 0.2s ease;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.pluginCard:hover .pluginName {
  color: var(--kether-primary);
}

.pluginDescription {
  font-size: 14px;
  color: var(--kether-text-light);
  margin: 0 0 8px;
  line-height: 1.5;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

/* 插件标签 */
.pluginTags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.pluginTag {
  padding: 3px 8px;
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--kether-text-light);
  font-size: 12px;
  border-radius: 6px;
  transition: var(--kether-transition);
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.pluginCard:hover .pluginTag {
  background-color: rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.categoryTag {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--kether-primary);
}

.letterTag {
  background-color: rgba(0, 0, 0, 0.05);
}

.moreLinksTag {
  background-color: rgba(0, 0, 0, 0.03);
}

/* 列表视图特殊布局 */
.list .pluginCard {
  flex-direction: row;
  padding: 16px 20px;
  gap: 16px;
  align-items: flex-start;
}

.pluginIconAndInfo {
  display: flex;
  gap: 12px;
  flex: 1;
  align-items: flex-start;
  min-width: 0; /* 确保flex项可以缩小 */
}

.pluginDetails {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0; /* 确保flex项可以缩小 */
}

.list .pluginName {
  margin: 0 0 2px;
  font-size: 15px;
}

.list .pluginDescription {
  margin: 0;
  -webkit-line-clamp: 2;
  font-size: 13px;
}

.list .pluginTags {
  margin-top: 6px;
}

/* 插件链接 */
.pluginLinks {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.list .pluginLinks {
  flex-direction: column;
  min-width: 120px;
  max-width: 140px;
  margin-left: auto;
  margin-top: 0;
  flex-shrink: 0;
}

.downloadButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: var(--kether-primary);
  color: white;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.downloadButton:hover {
  background-color: var(--kether-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.pluginLink {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--kether-text);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pluginLink:hover {
  background-color: var(--kether-hover);
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 详情内容 */
.detailSection {
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 28px;
}

.detailSection:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detailPluginName {
  font-size: 18px;
  font-weight: 600;
  color: var(--kether-text);
  margin: 0 0 4px;
}

.detailPluginId {
  font-size: 13px;
  color: var(--kether-text-light);
  background-color: rgba(0, 0, 0, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 8px;
}

.pluginInfoRow {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.pluginInfoDetails {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.metaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.metaItem {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--kether-text-light);
}

.metaItem svg {
  color: var(--kether-primary);
  font-size: 15px;
}

.detailTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detailTag {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--kether-text);
  transition: var(--kether-transition);
}

.detailDescription {
  font-size: 14px;
  line-height: 1.6;
  color: var(--kether-text);
  white-space: pre-line;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* 侧边栏下载按钮 */
.detailDownloadButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--kether-primary);
  color: white;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.15);
}

.detailDownloadButton:hover {
  background-color: var(--kether-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

/* 侧边栏链接样式 */
.linksList {
  display: flex;
    flex-direction: column;
  gap: 12px;
}

.linkGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  }
  
.linkGroupTitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--kether-text-light);
  margin-bottom: 4px;
}

.detailLink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--kether-text);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.detailLink:hover {
  background-color: var(--kether-hover);
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 加载和空状态 */
.loaderContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  border-top-color: var(--kether-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loaderContainer p {
  margin-top: 16px;
  color: var(--kether-text-light);
  animation: pulse 1.5s ease-in-out infinite;
}

.emptyState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  animation: fadeInUp 0.5s ease;
}

.emptyIcon {
  font-size: 40px;
  color: var(--kether-text-lighter);
  margin-bottom: 20px;
  animation: bounce 2s ease infinite;
}

.emptyState h3 {
  margin: 0 0 8px;
  color: var(--kether-text);
  font-size: 20px;
}

.emptyState p {
  margin: 0 0 20px;
  color: var(--kether-text-light);
}

.resetButton {
  padding: 10px 20px;
  background-color: var(--kether-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resetButton:hover {
  background-color: var(--kether-primary-dark);
  transform: translateY(-2px);
}

/* 免责声明 */
.disclaimerContainer {
  margin-top: 32px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  box-sizing: border-box;
}

.disclaimerContainer.withSidebar {
  width: calc(100% - var(--plugin-catalog-sidebar-width, var(--sidebar-width)));
  margin-right: var(--plugin-catalog-sidebar-width, var(--sidebar-width));
  box-sizing: border-box;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 确保免责声明区域在侧边栏打开时正确定位 */
.content .disclaimerContainer {
  width: 100%;
}

.content.withSidebar .disclaimerContainer {
  width: 100%;
  margin-right: 0;
}

.disclaimer {
  background-color: rgba(0, 0, 0, 0.02);
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-direction: row; /* 强制水平排列 */
  flex-wrap: nowrap; /* 防止换行 */
  max-width: 100%;
}

.disclaimerIcon {
  font-size: 20px;
  color: var(--kether-text-lighter);
  margin-top: 2px;
  flex-shrink: 0; /* 防止图标被压缩 */
}

.disclaimerText {
  margin: 0;
  font-size: 13px;
  color: var(--kether-text-light);
  line-height: 1.6;
  flex: 1; /* 占据剩余空间 */
  min-width: 0; /* 允许文本在必要时压缩 */
}

.disclaimerText a {
  color: var(--kether-primary);
  text-decoration: none;
}

.disclaimerText a:hover {
  text-decoration: underline;
}

/* 响应式调整 - 小屏幕下免责声明仍然保持水平 */
@media (max-width: 767px) {
  .disclaimerContainer.withSidebar {
    width: 100%;
  opacity: 0;
    pointer-events: none;
}

  .disclaimer {
    flex-direction: row; /* 保持水平方向 */
    padding: 12px;
  }
  
  .disclaimerIcon {
    font-size: 18px;
  }
  
  .disclaimerText {
    font-size: 12px;
  }
}

/* 动画定义 */
@keyframes slideInRight {
  from { 
    transform: translateX(100%); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

@keyframes slideOutRight {
  from { 
    transform: translateX(0); 
    opacity: 1; 
  }
  to { 
    transform: translateX(100%); 
    opacity: 0; 
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes slideUp {
  from { 
    transform: translateY(20px); 
    opacity: 0;
}
  to { 
    transform: translateY(0); 
    opacity: 1;
}
}

/* 侧边栏中的插件图标 */
.pluginIconLarge {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--kether-primary), var(--kether-primary-darker));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}

/* 插件信息行 */
.pluginInfoRow {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.pluginInfoDetails {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.detailPluginName {
  font-size: 18px;
  font-weight: 600;
  color: var(--kether-text);
  margin: 0;
  line-height: 1.3;
}

/* 元数据行 */
.metaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.metaItem {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--kether-text-light);
}

.metaItem svg {
  color: var(--kether-primary);
  font-size: 15px;
}

/* 详情标签 */
.detailTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detailTag {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--kether-text);
  transition: var(--kether-transition);
}

/* 详情描述 */
.detailDescription {
  font-size: 14px;
  line-height: 1.6;
  color: var(--kether-text);
  white-space: pre-line;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* 链接列表 */
.linksList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.linkGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.linkGroupTitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--kether-text-light);
  margin-bottom: 4px;
}

.detailDownloadButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--kether-primary);
  color: white;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.15);
}

.detailDownloadButton:hover {
  background-color: var(--kether-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

.detailLink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--kether-text);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.detailLink:hover {
  background-color: var(--kether-hover);
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 底部导航适配侧边栏 */
.footer {
  padding: 20px 24px;
  border-top: 1px solid var(--kether-border);
  margin-top: auto;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  background-color: rgba(0, 0, 0, 0.01);
}

.footer.withSidebar {
  width: calc(100% - var(--plugin-catalog-sidebar-width, var(--sidebar-width)));
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1200px) {
  .grid .pluginsGrid {
    grid-template-columns: repeat(4, 1fr);
}
}

@media (max-width: 992px) {
  .grid .pluginsGrid {
    grid-template-columns: repeat(3, 1fr);
}

  .compact .pluginsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
} @media (max-width: 767px) { .layoutControls { display: none !important; } .grid .pluginsGrid, .compact .pluginsGrid { grid-template-columns: 1fr !important; } }
