/* Blog Layout — following zwplayer pattern */
.blog-layout { display: flex; gap: 2.5rem; }
.blog-main { flex: 1; min-width: 0; }
.blog-sidebar { width: 280px; flex-shrink: 0; }

/* Category Tabs */
.category-tab {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.375rem 0.875rem; border-radius: 9999px;
  font-size: 0.8125rem; font-weight: 500;
  background: #f9fafb; border: 1px solid #e5e7eb;
  color: #6b7280; transition: all 0.2s;
}
.category-tab:hover { border-color: #fdba74; color: #f97316; }
.category-tab.active { background: #f97316; color: #fff; border-color: #f97316; box-shadow: 0 2px 8px rgba(249,115,22,0.25); }
.tab-count { font-size: 0.6875rem; opacity: 0.7; margin-left: 0.125rem; }

/* Article Card */
.article-item {
  border: 1px solid #e5e7eb; border-radius: 0.75rem;
  background: #fff; transition: box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}
.article-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); border-color: #fed7aa; }
.article-link { display: flex; gap: 1rem; padding: 1.25rem; text-decoration: none; color: inherit; }

/* Article Thumbnail — gradient placeholders like zwplayer */
.article-thumb {
  width: 160px; height: 110px; border-radius: 0.5rem;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-thumb-icon { font-size: 1.5rem; color: rgba(255,255,255,0.8); }
.thumb-tag-label {
  font-size: 1.25rem; font-weight: 800; color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  letter-spacing: 0.05em;
}

.thumb-color-0 { background: linear-gradient(135deg, #667eea, #764ba2); }
.thumb-color-1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.thumb-color-2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.thumb-color-3 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.thumb-color-4 { background: linear-gradient(135deg, #fa709a, #fee140); }
.thumb-color-5 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }

/* Article Body */
.article-body { flex: 1; min-width: 0; }
.article-title {
  font-size: 1rem; font-weight: 700; color: #1f2937;
  margin-bottom: 0.375rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-desc {
  font-size: 0.8125rem; color: #6b7280; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Tag Badge */
.tag-badge {
  display: inline-block; padding: 0.125rem 0.5rem;
  border-radius: 9999px; font-size: 0.6875rem;
  background: #fff7ed; color: #ea580c; font-weight: 500;
}

/* Sidebar */
.sidebar-widget {
  padding: 1.25rem; margin-bottom: 1.25rem;
  border: 1px solid #e5e7eb; border-radius: 0.75rem;
  background: #fff;
}
.sidebar-title {
  font-size: 0.875rem; font-weight: 700; color: #1f2937;
  margin-bottom: 1rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; font-size: 0.8125rem;
}
.sidebar-list li + li { border-top: 1px solid #f9fafb; }
.sidebar-list a { color: #4b5563; text-decoration: none; transition: color 0.2s; }
.sidebar-list a:hover { color: #f97316; }
.sidebar-count { font-size: 0.6875rem; color: #9ca3af; background: #f3f4f6; padding: 0.125rem 0.5rem; border-radius: 9999px; }

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-item {
  display: inline-block; padding: 0.25rem 0.625rem;
  border-radius: 9999px; font-size: 0.6875rem;
  background: #f9fafb; border: 1px solid #e5e7eb;
  color: #6b7280; text-decoration: none; transition: all 0.2s;
}
.tag-item:hover { border-color: #fdba74; color: #f97316; background: #fff7ed; }

/* Sidebar CTA */
.sidebar-cta { background: linear-gradient(135deg, #fff7ed, #fffbeb); border-color: #fed7aa; }

/* Blog Post — Prose Styling */
.prose { font-size: 1rem; line-height: 1.8; color: #374151; }
.prose h2 {
  font-size: 1.5rem; font-weight: 700; color: #111827;
  margin: 2rem 0 1rem; padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}
.prose h3 { font-size: 1.25rem; font-weight: 600; color: #1f2937; margin: 1.5rem 0 0.75rem; }
.prose p { margin: 0.75rem 0; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 0.75rem 0; }
.prose li { margin: 0.375rem 0; }
.prose blockquote {
  border-left: 4px solid #fdba74; padding: 0.75rem 1rem;
  background: #f9fafb; border-radius: 0 0.5rem 0.5rem 0;
  color: #4b5563; margin: 1rem 0;
}
.prose strong { color: #111827; }
.prose code {
  background: #f3f4f6; padding: 0.125rem 0.375rem;
  border-radius: 0.25rem; font-size: 0.875em;
}
.prose pre {
  background: #1e293b; color: #e2e8f0;
  padding: 1rem; border-radius: 0.5rem;
  overflow-x: auto; margin: 1rem 0; font-size: 0.875rem;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose a { color: #f97316; text-decoration: underline; }
.prose a:hover { color: #ea580c; }
.prose img { max-width: 100%; border-radius: 0.5rem; margin: 1rem 0; }

/* Post TOC */
.post-layout { display: flex; gap: 2rem; }
.post-toc {
  flex-shrink: 0; width: 200px;
  position: sticky; top: 80px; align-self: flex-start;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.post-toc-title {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: #94a3b8; margin-bottom: 0.75rem;
}
.post-toc-list {
  list-style: none; padding: 0; margin: 0;
  border-left: 2px solid #e2e8f0;
}
.post-toc-list li { margin: 0; }
.post-toc-list a {
  display: block; padding: 4px 0 4px 12px;
  font-size: 0.8rem; color: #94a3b8;
  margin-left: -2px; border-left: 2px solid transparent;
  text-decoration: none; transition: all 0.2s;
}
.post-toc-list a:hover { color: #334155; }
.post-toc-list a.active {
  color: #f97316; border-left-color: #f97316; font-weight: 600;
}
.post-toc-list .toc-h3 a { padding-left: 24px; font-size: 0.75rem; }
.post-header h1, .post-header p { max-width: 720px; }
.post-tags-wrap { max-width: 720px; }

/* Responsive */
@media (max-width: 768px) {
  .post-toc { display: none; }
  .post-layout { flex-direction: column; }
  .blog-layout { flex-direction: column; }
  .blog-sidebar { width: 100%; }
  .article-link { flex-direction: column; }
  .article-thumb { width: 100%; height: 160px; }
}
