/* 侧边栏热门文章样式 */
.hot-sidebar {
  /* background: #ffffff; */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 24px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  margin: 50px 0 auto;
  max-width: 320px;
}
.sidebar2 {
  /* background: #ffffff; */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 24px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  margin: 50px 0 auto;
  max-width: 320px;
}

/* 标题样式 */
.hot-sidebar-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #1890ff;
  position: relative;
  letter-spacing: 1px;
}

.hot-sidebar-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #1890ff, #52c41a);
  border-radius: 1px;
}

/* 文章列表容器 */
.hot-articles {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 单篇文章样式 */
.hot-article {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.hot-article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.hot-article:hover {
  transform: translateX(5px);
  border-bottom-color: #d9d9d9;
}

/* 排名标签 */
.article-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-right: 10px;
  transition: all 0.3s ease;
}

/* 前3名特殊样式 */
.article-rank.top-1 {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #fff;
  font-weight: 700;
}

.article-rank.top-2 {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  color: #fff;
  font-weight: 700;
}

.article-rank.top-3 {
  background: linear-gradient(135deg, #cd7f32, #a66929);
  color: #fff;
  font-weight: 700;
}

.hot-article:hover .article-rank {
  transform: scale(1.1);
}

.hot-article:hover .article-rank.top-1 {
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
}

.hot-article:hover .article-rank.top-2 {
  box-shadow: 0 2px 8px rgba(160, 160, 160, 0.3);
}

.hot-article:hover .article-rank.top-3 {
  box-shadow: 0 2px 8px rgba(166, 105, 41, 0.3);
}

/* 文章标题链接 */
.article-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #262626;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.article-link:hover {
  color: #1890ff;
}

.article-title {
  font-size: 15px;
  font-weight: 500;
  flex: 1;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

/* 分隔线样式 */
.hot-article-divider {
  margin: 16px 0;
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #f0f0f0 10%,
    #f0f0f0 90%,
    transparent
  );
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hot-sidebar {
    padding: 20px;
    margin: 20px 0;
    max-width: 100%;
    border-radius: 8px;
  }

  .hot-sidebar-title {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .article-title {
    font-size: 14px;
  }

  .article-rank {
    min-width: 22px;
    height: 22px;
    font-size: 12px;
  }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .hot-sidebar {
    background: #1a1a1a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }

  .hot-sidebar-title {
    color: #ffffff;
  }

  .article-link {
    color: #f0f0f0;
  }

  .article-link:hover {
    color: #40a9ff;
  }

  .hot-article {
    border-bottom-color: #333;
  }

  .article-rank {
    background: #333;
    color: #999;
  }

  .article-rank.top-1 {
    background: linear-gradient(135deg, #d4af37, #b8860b);
  }

  .article-rank.top-2 {
    background: linear-gradient(135deg, #808080, #696969);
  }

  .article-rank.top-3 {
    background: linear-gradient(135deg, #8b7355, #6b5741);
  }

  .hot-article-divider {
    background: linear-gradient(
      90deg,
      transparent,
      #333 10%,
      #333 90%,
      transparent
    );
  }
}

/* 简约分隔线变体（可选） */
.hot-article-divider.simple {
  height: 1px;
  background: #f0f0f0;
  opacity: 0.6;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hot-article {
  animation: fadeInUp 0.4s ease forwards;
  animation-delay: calc(var(--item-index) * 0.05s);
  opacity: 0;
}
/* 搜索侧边栏样式 */
.search-sidebar {
  /* background: #ffffff; */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 24px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  margin: 72px 0 auto;
  max-width: 320px;
}

/* 搜索标题样式 */
.search-sidebar-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #1890ff;
  position: relative;
  letter-spacing: 1px;
}

.search-sidebar-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #1890ff, #52c41a);
  border-radius: 1px;
}

/* 搜索表单样式 */
.search-form {
  width: 100%;
}

/* 搜索输入框组 */
.search-input-group {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  font-size: 15px;
  color: #262626;
  background: #f8f9fa;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.search-input:focus {
  background: #fff;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.search-input::placeholder {
  color: #8c8c8c;
  font-size: 14px;
}

/* 搜索图标 */
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c8c8c;
  pointer-events: none;
  transition: color 0.3s ease;
}

.search-input:focus + .search-icon {
  color: #1890ff;
}

/* 搜索按钮 */
.search-button {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #1890ff, #096dd9);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.search-button:hover {
  background: linear-gradient(135deg, #096dd9, #0050b3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.search-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.2);
}

/* 高级搜索选项 */
.advanced-search {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.advanced-title {
  font-size: 14px;
  font-weight: 600;
  color: #595959;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 搜索分类选项 */
.search-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-tag {
  padding: 4px 12px;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  font-size: 13px;
  color: #595959;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-tag:hover {
  background: #e6f7ff;
  border-color: #91d5ff;
  color: #1890ff;
}

.category-tag.active {
  background: #1890ff;
  border-color: #1890ff;
  color: white;
}

/* 搜索历史 */
.search-history {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.history-title {
  font-size: 14px;
  font-weight: 600;
  color: #595959;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clear-history {
  font-size: 12px;
  color: #8c8c8c;
  cursor: pointer;
  transition: color 0.2s ease;
}

.clear-history:hover {
  color: #ff4d4f;
}

.history-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-item {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.history-item:last-child {
  border-bottom: none;
}

.history-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #595959;
  font-size: 14px;
  transition: color 0.2s ease;
}

.history-link:hover {
  color: #1890ff;
}

.history-link::before {
  content: "🔍";
  font-size: 12px;
  opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .search-sidebar {
    padding: 20px;
    margin: 16px 0;
    max-width: 100%;
    border-radius: 8px;
  }

  .search-sidebar-title {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .search-input {
    height: 40px;
    font-size: 14px;
  }

  .search-button {
    height: 40px;
    font-size: 15px;
  }

  .category-tag {
    font-size: 12px;
    padding: 3px 10px;
  }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .search-sidebar {
    background: #1a1a1a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }

  .search-sidebar-title {
    color: #ffffff;
  }

  .search-input {
    background: #262626;
    border-color: #434343;
    color: #f0f0f0;
  }

  .search-input:focus {
    background: #1f1f1f;
    border-color: #1890ff;
  }

  .search-input::placeholder {
    color: #8c8c8c;
  }

  .category-tag {
    background: #262626;
    border-color: #434343;
    color: #bfbfbf;
  }

  .category-tag:hover {
    background: #1890ff20;
    border-color: #1890ff;
    color: #1890ff;
  }

  .category-tag.active {
    background: #1890ff;
    border-color: #1890ff;
    color: white;
  }

  .advanced-search,
  .search-history {
    border-top-color: #434343;
  }

  .advanced-title,
  .history-title {
    color: #bfbfbf;
  }

  .history-item {
    border-bottom-color: #434343;
  }

  .history-link {
    color: #bfbfbf;
  }

  .history-link:hover {
    color: #40a9ff;
  }
}

/* 动画效果 */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.search-sidebar {
  animation: slideIn 0.4s ease;
}
/* 横版相关文章样式 */
.horizontal-article-nav {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 20px 0;
}

/* 标题样式 */
.horizontal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #1890ff;
    position: relative;
    letter-spacing: 1px;
}

.horizontal-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #1890ff, #52c41a);
    border-radius: 1px;
}

/* 导航容器 - 横向排列 */
.horizontal-nav-container {
    display: flex;
    gap: 24px;
}

/* 导航项目 */
.horizontal-nav-item {
    flex: 1;
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.horizontal-nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #1890ff;
}

/* 上一篇特殊样式 */
.horizontal-nav-item.prev {
    border-left: 3px solid #1890ff;
}

.horizontal-nav-item.next {
    border-left: 3px solid #52c41a;
}

/* 导航标签 */
.horizontal-nav-label {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.horizontal-nav-item.prev .horizontal-nav-label {
    background: #e6f7ff;
    color: #1890ff;
}

.horizontal-nav-item.next .horizontal-nav-label {
    background: #f6ffed;
    color: #52c41a;
}

/* 文章标题链接 */
.horizontal-nav-link {
    display: block;
    text-decoration: none;
    color: #262626;
    margin-bottom: 12px;
    flex-grow: 1;
}

.horizontal-nav-link:hover {
    color: #1890ff;
}

.horizontal-nav-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 链接图标和时间 */
.horizontal-nav-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}

.horizontal-nav-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #8c8c8c;
}

.horizontal-nav-icon::before {
    content: "🔗";
    font-size: 12px;
}

.horizontal-nav-time {
    font-size: 12px;
    color: #8c8c8c;
}

/* 空状态 */
.horizontal-nav-empty {
    text-align: center;
    color: #8c8c8c;
    font-size: 14px;
    font-style: italic;
    padding: 40px 0;
    flex: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .horizontal-article-nav {
        padding: 20px;
        margin: 16px 0;
    }
    
    .horizontal-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .horizontal-nav-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .horizontal-nav-item {
        min-height: 100px;
        padding: 14px;
    }
    
    .horizontal-nav-title {
        font-size: 15px;
    }
    
    .horizontal-nav-label {
        font-size: 11px;
        padding: 3px 10px;
    }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .horizontal-article-nav {
        background: #1a1a1a;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    
    .horizontal-title {
        color: #ffffff;
    }
    
    .horizontal-nav-item {
        border-color: #333;
        background: #1f1f1f;
    }
    
    .horizontal-nav-item:hover {
        border-color: #1890ff;
        background: #262626;
    }
    
    .horizontal-nav-label {
        background: #333;
        color: #999;
    }
    
    .horizontal-nav-item.prev .horizontal-nav-label {
        background: #1890ff20;
        color: #1890ff;
    }
    
    .horizontal-nav-item.next .horizontal-nav-label {
        background: #52c41a20;
        color: #52c41a;
    }
    
    .horizontal-nav-link {
        color: #f0f0f0;
    }
    
    .horizontal-nav-link:hover {
        color: #40a9ff;
    }
    
    .horizontal-nav-meta {
        border-top-color: #333;
    }
    
    .horizontal-nav-icon,
    .horizontal-nav-time {
        color: #8c8c8c;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.horizontal-nav-item {
    animation: fadeInUp 0.4s ease forwards;
    animation-delay: calc(var(--item-index) * 0.1s);
    opacity: 0;
}