/**
 * 博客文章样式
 * Blog Posts CSS - Category, Single Post, Discovery
 */

/* 面包屑导航样式已移至 style.css 全局管理 */

.search-results-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

body.dark-mode .search-results-card {
  background: rgba(26, 29, 41, 0.5);
}

/* 面包屑导航链接样式已移至 style.css 全局管理 */

/* 文章分类页面 */
.blog-category-section {
  padding: 40px 0 20px 0;
  background: transparent;
  min-height: calc(100vh - 200px);
}

body.dark-mode .blog-post-item {
  background: rgba(26, 29, 41, 0.8);
}

.blog-category-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(94, 114, 228, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: var(--radius-lg);
}

.category-info-wrapper {
  max-width: 800px;
}

.blog-category-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.blog-category-description {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
}

.category-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}

.post-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
}

.blog-category-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.blog-category-content {
  flex: 1;
  min-width: 0;
}

.blog-posts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-post-item {
  display: flex;
  gap: 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}

.blog-post-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.post-thumbnail {
  position: relative;
  width: 280px;
  height: 200px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.post-thumbnail .post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--text-muted);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
}

.blog-post-item:hover .post-image-placeholder {
  background: rgba(94, 114, 228, 0.05);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.post-image-favicon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.post-image-favicon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.post-emoji-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--radius-md);
    font-size: 48px;
    line-height: 1;
}

body.dark-mode .post-emoji-placeholder {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

body.dark-mode .post-image-favicon {
  background: var(--bg-light);
}

.blog-post-item:hover .post-image {
  transform: scale(1.05);
}

/* 博客列表页缩略图上的分类标签 */
.post-thumbnail .post-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  z-index: 1;
}

.post-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.post-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.post-title a {
  color: var(--text-color);
  text-decoration: none;
}

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

.post-meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg {
  opacity: 0.7;
}

.post-excerpt {
  flex: 1;
  color: var(--text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.read-more-btn:hover {
  background: #4c63d2;
  transform: translateX(4px);
}

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-tag {
  padding: 4px 12px;
  background: rgba(94, 114, 228, 0.1);
  color: var(--primary-color);
  border-radius: 12px;
  font-size: 12px;
  text-decoration: none;
  transition: var(--transition);
}

.post-tag:hover {
  background: var(--primary-color);
  color: white;
}

/* 侧边栏 */
.blog-category-sidebar {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

body.dark-mode .sidebar-widget {
  background: rgba(26, 29, 41, 0.8);
}

.widget-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-color);
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 4px;
}

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
}

.category-link:hover {
  background: var(--bg-light);
}

.category-link.active {
  background: var(--primary-color);
  color: white;
}

.cat-name {
  font-weight: 500;
}

.cat-count {
  padding: 2px 8px;
  background: var(--bg-light);
  border-radius: var(--radius-full);
  font-size: 12px;
}

.category-link.active .cat-count {
  background: rgba(255, 255, 255, 0.2);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud-item {
  padding: 6px 12px;
  background: rgba(94, 114, 228, 0.1);
  color: var(--primary-color);
  border-radius: var(--radius-full);
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}

.tag-cloud-item:hover {
  background: var(--primary-color);
  color: white;
}

/* 最近文章 */
.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-post-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.recent-post-item:hover {
  background: var(--bg-light);
}

.recent-post-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recent-post-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-color);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.recent-post-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* 分页 */
.blog-pagination {
  margin-top: 40px;
}

.blog-pagination .pagination,
.blog-pagination .nav-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  color: var(--text-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

body.dark-mode .blog-pagination .page-numbers {
  background: rgba(26, 29, 41, 0.8);
}

.blog-pagination .page-numbers:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.blog-pagination .page-numbers.current {
  background: var(--primary-color);
  color: white;
}

.blog-pagination .page-numbers svg {
  width: 16px;
  height: 16px;
}

/* 响应式 */
@media (max-width: 1024px) {
  .blog-category-wrapper {
    flex-direction: column;
  }

  .blog-category-sidebar {
    width: 100%;
    position: static;
  }

  .post-thumbnail {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .blog-category-section {
    padding: 20px 0 10px 0;
  }

  .blog-category-header {
    padding: 30px 15px;
  }

  .blog-category-title {
    font-size: 32px;
  }

  .blog-category-description {
    font-size: 16px;
  }

  .blog-post-item {
    flex-direction: column;
  }

  .post-thumbnail {
    width: 100%;
    height: 180px;
  }

  .post-title {
    font-size: 20px;
  }

  .post-footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .blog-pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* ========================================
   发现分类页面样式
   ======================================== */

.discovery-section {
  padding: 40px 0 20px 0;
  background: transparent;
  min-height: 100vh;
  border-radius: 0;
  box-shadow: none;
}

body.dark-mode .latest-post-item {
  background: rgba(26, 29, 41, 0.8);
}

body.dark-mode .discovery-sidebar .sidebar-widget {
  background: rgba(26, 29, 41, 0.8);
}

.discovery-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.discovery-content {
  flex: 1;
}

.discovery-sidebar {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

/* 最新文章列表 */
.latest-posts-section {
  margin-bottom: 40px;
}

.latest-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.latest-post-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.latest-post-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.latest-post-item .post-thumbnail {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.latest-post-item .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.latest-post-item .post-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--text-muted);
  font-size: 32px;
}

.latest-post-item .post-image-favicon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.latest-post-item .post-image-favicon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.latest-post-item .post-emoji-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: var(--radius-md);
  font-size: 40px;
  line-height: 1;
}

body.dark-mode .latest-post-item .post-emoji-placeholder {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

body.dark-mode .latest-post-item .post-image-favicon {
  background: var(--bg-light);
}

.latest-post-item .post-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.latest-post-item .post-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.latest-post-item .post-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.latest-post-item .post-title a:hover {
  color: var(--primary-color);
}

.latest-post-item .post-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-post-item .post-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--text-muted);
}

.latest-post-item .post-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.latest-post-item .post-meta svg {
  flex-shrink: 0;
}

/* 侧边栏小部件 */
.discovery-sidebar .sidebar-widget {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.discovery-sidebar .widget-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text-color);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
}

/* 热门标签 */
.hot-tags-widget .tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-tags-widget .tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.hot-tags-widget .tag-cloud-item:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.hot-tags-widget .tag-count {
  font-size: 11px;
  opacity: 0.7;
}

/* 热门发现列表 */
.hot-discovery-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hot-discovery-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.hot-discovery-item:last-child {
  border-bottom: none;
}

.hot-discovery-item:hover {
  background: var(--bg-light);
  margin: 0 -12px;
  padding: 12px;
  border-radius: 8px;
}

.discovery-rank {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #8b9dff 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(94, 114, 228, 0.3);
}

.hot-discovery-item:nth-child(1) .discovery-rank {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.hot-discovery-item:nth-child(2) .discovery-rank {
  background: linear-gradient(135deg, #ffa726 0%, #ffb74d 100%);
  box-shadow: 0 2px 6px rgba(255, 167, 38, 0.4);
}

.hot-discovery-item:nth-child(3) .discovery-rank {
  background: linear-gradient(135deg, #66bb6a 0%, #81c784 100%);
  box-shadow: 0 2px 6px rgba(102, 187, 106, 0.4);
}

.discovery-content {
  flex: 1;
  min-width: 0;
}

.hot-discovery-item .discovery-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 6px;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-discovery-item .discovery-title:hover {
  color: var(--primary-color);
}

.discovery-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.discovery-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.discovery-views svg {
  flex-shrink: 0;
}

.discovery-date {
  color: var(--text-muted);
}

/* 无文章提示 */
.no-posts {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.no-posts-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.no-posts h3 {
  font-size: 24px;
  color: var(--text-color);
  margin: 0 0 10px 0;
}

.no-posts p {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
}

/* 分页导航 */
.pagination-wrapper {
  margin-top: 40px;
}

.pagination-wrapper .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-wrapper .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination-wrapper .page-numbers:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.pagination-wrapper .page-numbers.current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-wrapper .page-numbers svg {
  flex-shrink: 0;
}

.pagination-wrapper .prev,
.pagination-wrapper .next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .discovery-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .discovery-sidebar {
    width: 100%;
    position: static;
  }
}

@media (max-width: 768px) {
  .discovery-section {
    padding: 20px 0 10px 0;
  }

  .latest-post-item {
    gap: 12px;
    padding: 16px;
  }

  .latest-post-item .post-thumbnail {
    width: 90px;
    height: 90px;
  }

  .latest-post-item .post-title {
    font-size: 15px;
    margin: 0 0 6px 0;
  }

  .latest-post-item .post-excerpt {
    font-size: 13px;
    -webkit-line-clamp: 2;
    margin: 0 0 8px 0;
  }

  .latest-post-item .post-meta {
    font-size: 11px;
    gap: 8px;
  }

  .latest-post-item .post-image-favicon img {
    width: 32px;
    height: 32px;
  }

  .latest-post-item .post-emoji-placeholder {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .latest-post-item {
    gap: 10px;
    padding: 12px;
  }

  .latest-post-item .post-thumbnail {
    width: 80px;
    height: 80px;
  }

  .latest-post-item .post-title {
    font-size: 14px;
    margin: 0 0 4px 0;
  }

  .latest-post-item .post-excerpt {
    font-size: 12px;
    -webkit-line-clamp: 2;
    margin: 0 0 6px 0;
  }

  .latest-post-item .post-meta {
    font-size: 10px;
    gap: 6px;
  }

  .latest-post-item .post-image-favicon img {
    width: 28px;
    height: 28px;
  }

  .latest-post-item .post-emoji-placeholder {
    font-size: 28px;
  }

  .hot-discovery-item {
    padding: 10px 0;
  }

  .hot-discovery-item:hover {
    margin: 0 -10px;
    padding: 10px;
  }

  .discovery-rank {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .hot-discovery-item .discovery-title {
    font-size: 12px;
  }
}

/* ========================================
   单篇文章页面样式
   ======================================== */

.single-post-section {
  padding: 40px 0 20px 0;
  background: transparent;
  min-height: calc(100vh - 200px);
  border-radius: 0;
  box-shadow: none;
}

.single-post-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* 主内容区 */
.single-post-main {
  flex: 1;
  min-width: 0;
}

/* 文章面包屑现在在外面，移除内部样式 */

.single-post-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: var(--spacing-xl);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}

body.dark-mode .single-post-header {
  background: rgba(26, 29, 41, 0.8);
}

/* 文章分类标签 */
/* 单篇文章中的分类标签（在 meta 中显示） */
.single-post-meta .post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  color: var(--primary-color);
  border-radius: 0;
  font-size: inherit;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.single-post-meta .post-category-badge:hover {
  color: #4c63d2;
  transform: none;
  box-shadow: none;
}

/* 文章标题 */
.single-post-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color);
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
}

/* 文章元信息 */
.single-post-meta {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.meta-items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.meta-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.meta-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.meta-item a:hover {
  color: var(--primary-color);
}

.post-author {
  font-weight: 500;
}

.post-date,
.post-views,
.post-comments {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 编辑按钮 */
.post-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(94, 114, 228, 0.1);
  color: var(--primary-color);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.post-edit-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.post-edit-link svg {
  width: 14px;
  height: 14px;
}

/* 文章缩略图 */
.single-post-thumbnail {
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.single-post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.single-post-content {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}

body.dark-mode .single-post-content {
  background: rgba(26, 29, 41, 0.8);
}

/* 单篇文章侧边栏 */
.single-post-sidebar {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.single-post-sidebar .sidebar-widget {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

body.dark-mode .single-post-sidebar .sidebar-widget {
  background: rgba(26, 29, 41, 0.8);
}

/* 响应式 */
@media (max-width: 1024px) {
  .single-post-wrapper {
    flex-direction: column;
  }

  .single-post-sidebar {
    width: 100%;
    position: static;
  }
}

@media (max-width: 768px) {
  .single-post-section {
    padding: 20px 0 10px 0;
  }

  .single-post-header,
  .single-post-content {
    padding: 20px;
  }

  .single-post-header {
    padding: 20px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  .single-post-content {
    padding: 20px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  .single-post-title {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 15px;
  }

  .single-post-meta {
    padding-top: 15px;
  }

  .meta-items {
    flex-wrap: wrap;
    gap: 12px;
  }

  .meta-item {
    font-size: 12px;
  }

  .meta-item svg {
    width: 14px;
    height: 14px;
  }

  .post-edit-link {
    font-size: 12px;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .single-post-section {
    padding: 20px 0 10px 0;
  }

  .single-post-header,
  .single-post-content {
    padding: 16px;
  }

  .single-post-header {
    padding: 16px 12px;
    margin-bottom: 12px;
  }

  .single-post-content {
    padding: 16px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
  }

  .single-post-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .meta-items {
    gap: 10px;
    font-size: 11px;
  }

  .meta-item {
    font-size: 11px;
  }

  .meta-item svg {
    width: 12px;
    height: 12px;
  }

  .post-edit-link {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* 文章标签 */
.post-tags-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

body.dark-mode .post-tags-wrapper {
  background: rgba(26, 29, 41, 0.8);
}

.tags-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 15px;
}

.tags-label svg {
  flex-shrink: 0;
  color: var(--primary-color);
}

.post-tags-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-tag-link {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(94, 114, 228, 0.1);
  color: var(--primary-color);
  border-radius: 16px;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.post-tag-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* 上一篇/下一篇导航 */
.single-post-navigation {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

body.dark-mode .single-post-navigation {
  background: rgba(26, 29, 41, 0.8);
}

.single-post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(94, 114, 228, 0.05);
  transform: translateX(4px);
}

.nav-previous:hover {
  transform: translateX(-4px);
}

.nav-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-subtitle svg {
  flex-shrink: 0;
}

.nav-next .nav-subtitle {
  justify-content: flex-end;
}

.nav-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.nav-next .nav-title {
  text-align: right;
}

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

/* 相关文章 */
.related-posts-section {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

body.dark-mode .related-posts-section {
  background: rgba(26, 29, 41, 0.8);
}

.related-posts-section .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.related-posts-section .section-title svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.related-post-item {
  background: var(--bg-light);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

body.dark-mode .related-post-item {
  background: rgba(255, 255, 255, 0.05);
}

.related-post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

body.dark-mode .related-post-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.related-post-link {
  display: flex;
  text-decoration: none;
  color: inherit;
  height: 100%;
  padding: 12px;
  gap: 12px;
}

.related-post-thumbnail {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f0e7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

body.dark-mode .related-post-thumbnail {
  background: rgba(147, 51, 234, 0.15);
}

.related-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-item:hover .related-post-thumbnail img {
  transform: scale(1.1);
}

.related-post-favicon,
.related-post-emoji {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
}

body.dark-mode .related-post-favicon,
body.dark-mode .related-post-emoji {
  background: rgba(255, 255, 255, 0.1);
}

.related-post-favicon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.related-post-emoji {
  font-size: 24px;
  line-height: 1;
}

.related-post-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-post-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.related-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.related-post-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.related-post-meta svg {
  flex-shrink: 0;
}

/* 响应式 - 文章页面 */
@media (max-width: 768px) {
  .post-tags-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .tags-label {
    font-size: 13px;
  }

  .post-tags-list {
    gap: 8px;
  }

  .post-tag-link {
    font-size: 12px;
    padding: 5px 12px;
  }

  .single-post-navigation {
    padding: 16px;
  }

  .single-post-navigation .nav-links {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nav-item {
    padding: 16px;
  }

  .nav-next .nav-subtitle {
    justify-content: flex-start;
  }

  .nav-next .nav-title {
    text-align: left;
  }

  .related-posts-section {
    padding: 20px;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .post-tags-wrapper {
    padding: 12px;
  }

  .post-tag-link {
    font-size: 11px;
    padding: 4px 10px;
  }

  .single-post-navigation {
    padding: 12px;
  }

  .nav-item {
    padding: 12px;
  }

  .nav-subtitle {
    font-size: 12px;
  }

  .nav-title {
    font-size: 14px;
  }

  .related-posts-section {
    padding: 16px;
  }

  .related-posts-section .section-title {
    font-size: 18px;
  }

  .related-post-thumbnail {
    width: 60px;
    height: 60px;
  }

  .related-post-favicon,
  .related-post-emoji {
    width: 32px;
    height: 32px;
  }

  .related-post-favicon img {
    width: 20px;
    height: 20px;
  }

  .related-post-emoji {
    font-size: 20px;
  }

  .related-post-title {
    font-size: 13px;
  }

  .related-post-meta {
    font-size: 11px;
    gap: 8px;
  }
}

/* ========================================
   文章内容样式
   ======================================== */

/* 注意：.single-post-content 的基础样式（背景、边距等）在上面已定义 */

.single-post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
}

.single-post-content > *:first-child {
  margin-top: 0;
}

.single-post-content > *:last-child {
  margin-bottom: 0;
}

.single-post-content h1,
.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
  margin: 1.5em 0 0.8em;
  color: var(--text-color);
  font-weight: 600;
  line-height: 1.4;
}

.single-post-content h2 {
  font-size: 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.single-post-content h3 {
  font-size: 24px;
}

.single-post-content h4 {
  font-size: 20px;
}

.single-post-content h5 {
  font-size: 18px;
}

.single-post-content h6 {
  font-size: 16px;
}

.single-post-content p {
  margin: 0 0 1.5em;
}

.single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}

.single-post-content iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px;
  margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}

.single-post-content a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: var(--transition);
  position: relative;
  padding-right: 16px;
}

.single-post-content a::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e72e4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  transition: all 0.3s;
}

.single-post-content a:hover {
  color: #4c63d2;
}

.single-post-content a:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(2px);
}

/* 暗黑模式下的链接图标 */
body.dark-mode .single-post-content a::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9dff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
}

.single-post-content ul,
.single-post-content ol {
  margin: 0 0 1.5em 2em;
  padding: 0;
}

.single-post-content li {
  margin-bottom: 0.5em;
}

.single-post-content blockquote {
  margin: 1.5em 0;
  padding: 20px 24px;
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}

.single-post-content code {
  position: relative;
  padding: 2px 8px;
  background: var(--bg-light);
  border-radius: 4px;
  font-family: 'Courier New', Consolas, Monaco, monospace;
  font-size: 0.9em;
  color: #e83e8c;
  cursor: pointer;
  transition: all 0.3s ease;
}

.single-post-content code:hover {
  background: rgba(94, 114, 228, 0.1);
  color: var(--primary-color);
  padding-right: 28px;
}

/* 行内代码复制图标 */
.single-post-content code::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e72e4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.single-post-content code:hover::after {
  opacity: 0.7;
}

/* pre 中的 code 不需要复制图标（已有按钮） */
.single-post-content pre code {
  cursor: text;
  padding-right: 0;
}

.single-post-content pre code:hover {
  background: none;
  color: inherit;
  padding-right: 0;
}

.single-post-content pre code::after {
  display: none;
}

/* 代码块容器 */
.single-post-content pre {
  position: relative;
  padding: 20px;
  padding-top: 50px;
  background: #2d2d2d;
  color: #f8f8f2;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5em 0;
  box-shadow: var(--shadow-md);
}

.single-post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.6;
}

/* 代码块复制按钮 */
.code-block-wrapper {
  position: relative;
  margin: 1.5em 0;
}

.code-block-wrapper pre {
  margin: 0;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8f8f2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  z-index: 10;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.code-copy-btn.copied {
  background: #66bb6a;
  border-color: #66bb6a;
  color: white;
}

.code-copy-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* 代码语言标签 */
.code-language-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: rgba(94, 114, 228, 0.8);
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

body.dark-mode .code-language-label {
  background: rgba(94, 114, 228, 0.9);
}

.single-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}

.single-post-content table th,
.single-post-content table td {
  padding: 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.single-post-content table th {
  background: var(--bg-light);
  font-weight: 600;
}

.single-post-content hr {
  margin: 2em 0;
  border: none;
  border-top: 2px solid var(--border-color);
}

/* 文章分页链接 */
.post-page-links {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.post-page-links .post-page-numbers {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-light);
  color: var(--text-color);
  border-radius: 6px;
  text-decoration: none;
  transition: var(--transition);
}

.post-page-links .post-page-numbers:hover,
.post-page-links .post-page-numbers.current {
  background: var(--primary-color);
  color: white;
}

/* ========================================
   热门文章样式
   ======================================== */

.hot-posts-widget {
  margin-bottom: 20px;
}

.hot-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hot-post-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.hot-post-item:last-child {
  border-bottom: none;
}

.hot-post-item:hover {
  background: var(--bg-light);
  margin: 0 -12px;
  padding: 12px;
  border-radius: 8px;
}

.hot-post-rank {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.hot-post-item:nth-child(1) .hot-post-rank {
  background: #ff6b6b;
}

.hot-post-item:nth-child(2) .hot-post-rank {
  background: #ffa726;
}

.hot-post-item:nth-child(3) .hot-post-rank {
  background: #66bb6a;
}

.hot-post-content {
  flex: 1;
  min-width: 0;
}

.hot-post-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 6px;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hot-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.hot-post-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hot-post-views svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.hot-post-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* 响应式 - 文章内容 */
@media (max-width: 768px) {
  .single-post-content {
    font-size: 15px;
  }

  .single-post-content h2 {
    font-size: 22px;
    margin-top: 1.2em;
  }

  .single-post-content h3 {
    font-size: 19px;
  }

  .single-post-content h4 {
    font-size: 17px;
  }

  .single-post-content p {
    margin-bottom: 1.2em;
  }

  .single-post-content img {
    margin: 1.2em 0;
    border-radius: 6px;
  }

  .single-post-content iframe {
    border-radius: 6px;
    margin: 1.2em 0;
  }

  .single-post-content ul,
  .single-post-content ol {
    margin-left: 1.5em;
  }

  .single-post-content blockquote {
    padding: 15px 20px;
    margin: 1.2em 0;
  }

  .single-post-content pre {
    padding: 15px;
    font-size: 13px;
  }

  .hot-posts-list {
    gap: 10px;
  }

  .hot-post-item {
    padding: 10px;
  }

  .hot-post-title {
    font-size: 13px;
  }
  
  /* 移动端面包屑样式已移至 style.css 全局管理 */

  .hot-post-meta {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .single-post-content {
    font-size: 14px;
  }

  .single-post-content h2 {
    font-size: 19px;
  }

  .single-post-content h3 {
    font-size: 17px;
  }

  .single-post-content h4 {
    font-size: 15px;
  }

  .single-post-content ul,
  .single-post-content ol {
    margin-left: 1.2em;
  }

  .single-post-content blockquote {
    padding: 12px 16px;
    font-size: 14px;
  }

  .single-post-content pre {
    padding: 12px;
    font-size: 12px;
  }

  .hot-post-rank {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .hot-post-title {
    font-size: 12px;
  }
}

