/* 文章详情页样式 - 图图抠图大师 (jpggo.com) 现代化阅读与留存套件 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-main, #1A1A2E);
  background: var(--bg-body, #F8FAFC);
}
a { color: #00B88A; text-decoration: none; transition: color .2s; }
a:hover { color: #009973; }
img { max-width: 100%; height: auto; }

/* 顶部平滑阅读进度条 */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #00B88A, #00D4AA);
  z-index: 10001;
  width: 0%;
  transition: width 0.1s ease-out;
}

.breadcrumb {
  background: var(--bg-surface, #FFFFFF);
  border-bottom: 1px solid var(--border-light, #E2E8F0);
  padding: 12px 0;
  font-size: 14px;
}
.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a { color: var(--text-secondary, #475569); }
.breadcrumb a:hover { color: var(--brand-primary, #00B88A); }
.breadcrumb span { color: var(--text-muted, #94A3B8); }
.breadcrumb-current { color: var(--text-main, #0F172A); font-weight: 500; }

.article-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
}
.article-content { min-width: 0; }
.article-sidebar { position: sticky; top: 90px; height: fit-content; }

.article-header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light, #E2E8F0);
}
.article-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main, #0F172A);
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted, #94A3B8);
  flex-wrap: wrap;
  align-items: center;
}
.article-category {
  display: inline-block;
  background: var(--brand-primary, #00B88A);
  color: #FFF;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.article-stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #E8F7F3;
  color: #009973;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 12px;
}

.article-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-secondary, #475569);
}
.article-body h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main, #0F172A);
  margin: 2em 0 1em;
  padding-left: 14px;
  border-left: 4px solid var(--brand-primary, #00B88A);
}
.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main, #0F172A);
  margin: 1.5em 0 .8em;
}
.article-body p { margin-bottom: 1.3em; }
.article-body ul, .article-body ol { margin: 1em 0 1.2em 1.5em; }
.article-body li { margin-bottom: .5em; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.article-body th, .article-body td { border: 1px solid #E2E8F0; padding: 12px; text-align: left; }
.article-body th { background: #F1F5F9; font-weight: 600; }
.article-body blockquote {
  border-left: 4px solid var(--brand-primary, #00B88A);
  background: #F0FAF7;
  padding: 16px 20px;
  margin: 1.5em 0;
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary, #475569);
}

/* 侧边栏与工具卡片 */
.sidebar-widget {
  background: #FFFFFF;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.widget-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main, #0F172A);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-primary, #00B88A);
}

.tool-card {
  background: linear-gradient(135deg, #00B88A, #00D4AA);
  border-radius: 12px;
  padding: 22px;
  color: #FFF;
  text-align: center;
  display: block;
  text-decoration: none;
}
.tool-card h3 { font-size: 18px; margin-bottom: 8px; color: #FFF; }
.tool-card p { font-size: 14px; opacity: 0.95; margin-bottom: 16px; line-height: 1.5; color: #FFF; }
.tool-card .btn-simulate {
  display: inline-block;
  background: #FFF;
  color: #00B88A !important;
  padding: 10px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .2s, box-shadow .2s;
}
.tool-card:hover .btn-simulate {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 目录 ScrollSpy 高亮 */
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 10px; }
.toc-list a {
  color: var(--text-secondary, #475569);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}
.toc-list a:hover, .toc-list a.active {
  color: var(--brand-primary, #00B88A);
  font-weight: 600;
  transform: translateX(4px);
}
.toc-num {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: #00B88A;
  background: #E8F7F3;
  padding: 2px 8px;
  border-radius: 4px;
}

/* 相关推荐 */
.related-list { list-style: none; }
.related-list li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #E2E8F0; }
.related-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.related-list a { color: var(--text-main, #0F172A); font-size: 14px; font-weight: 500; display: block; margin-bottom: 4px; }
.related-list a:hover { color: #00B88A; }
.related-list .related-date { font-size: 12px; color: #94A3B8; }

/* 暗黑模式自适应 */
@media (prefers-color-scheme: dark) {
  body { background: #0F172A; color: #F8FAFC; }
  .article-title { color: #F8FAFC; }
  .article-body { color: #CBD5E1; }
  .article-body h2, .article-body h3 { color: #F8FAFC; }
  .sidebar-widget { background: #1E293B; border-color: #334155; }
  .widget-title { color: #F8FAFC; border-color: #00B88A; }
  .breadcrumb { background: #1E293B; border-color: #334155; }
  .breadcrumb a { color: #94A3B8; }
  .breadcrumb-current { color: #F8FAFC; }
  .article-header { border-color: #334155; }
  .toc-num { background: #334155; color: #00D4AA; }
  .toc-list a { color: #94A3B8; }
  .related-list li { border-color: #334155; }
  .related-list a { color: #F8FAFC; }
  .article-stats-badge { background: #1E3A34; color: #00D4AA; }
  .article-body th { background: #1E293B; }
  .article-body blockquote { background: #132E27; color: #CBD5E1; }
}

@media (max-width: 1024px) {
  .article-wrapper { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}
@media (max-width: 768px) {
  .article-title { font-size: 23px; }
  .article-body h2 { font-size: 19px; }
  .article-wrapper { padding: 30px 16px 20px; }
  .breadcrumb-inner { overflow-x: auto; white-space: nowrap; }
}
