/* article-guide.css — 文章页/SEO 文章区样式（工具页和独立文章页共用） */

/* ===== 文章页主容器 ===== */
.guide-main {
  width: 100%;
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 0 20px 80px;
  box-sizing: border-box;
}

/* ===== 文章页顶部横幅（面包屑、标题、副标题） ===== */
.guide-hero {
  text-align: center;
  padding: 36px 28px 32px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.04) 60%, transparent 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.06);
}

.light-theme .guide-hero {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, rgba(6, 182, 212, 0.03) 60%, transparent 100%);
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.guide-hero-breadcrumb {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 16px;
}

.guide-hero-breadcrumb a {
  color: #10b981;
  text-decoration: none;
}

.guide-hero-breadcrumb a:hover {
  text-decoration: underline;
}

.guide-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.light-theme .guide-hero h1 {
  background: linear-gradient(135deg, #059669, #0891b2);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.guide-hero-subtitle {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #64748b;
  margin: 0 auto 24px auto;
  max-width: 720px;
}

.guide-hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #64748b;
}

.guide-hero-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #475569;
}

/* ===== 工具跳转横幅（文章页内链接到工具） ===== */
.guide-tool-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.light-theme .guide-tool-banner {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.guide-tool-banner-content {
  flex: 1;
  min-width: 200px;
}

.guide-tool-banner-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.light-theme .guide-tool-banner-title {
  color: #0f172a;
}

.guide-tool-banner-desc {
  font-size: 0.875rem;
  color: #94a3b8;
}

.light-theme .guide-tool-banner-desc {
  color: #64748b;
}

.guide-tool-banner-btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.guide-tool-banner-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* ===== 文章跳转横幅（工具页精简内容底部链接到博文） ===== */
.guide-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.08);
}

.light-theme .guide-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.05));
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.06);
}

.guide-banner-content {
  flex: 1;
  min-width: 220px;
}

.guide-banner-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.light-theme .guide-banner-title {
  color: #0f172a;
}

.guide-banner-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
}

.light-theme .guide-banner-desc {
  color: #64748b;
}

.guide-banner-btn {
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* ===== 文章内容容器（工具页 seo-guide 与 文章页 article-content 共用） ===== */
.seo-guide, .article-content {
  margin-top: 30px;
  padding: 28px 40px;
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-sizing: border-box;
}

.article-content {
  margin-top: 0; /* 文章页已有 hero 间距，不需要额外 margin-top */
}

.light-theme .seo-guide,
.light-theme .article-content {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.08);
}

/* ===== 标题（主标题：工具页用 seo-guide-title，文章页用 h2） ===== */
.seo-guide-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 14px 0;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.light-theme .seo-guide-title {
  background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 文章内容中的 h2（大号节标题） */
.article-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px 0;
  color: #f1f5f9;
}

.light-theme .article-content h2 {
  color: #0f172a;
}

/* ===== 副标题（仅工具页使用） ===== */
.seo-guide-subtitle {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #94a3b8;
  margin: 0 0 20px 0;
  font-weight: 400;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.light-theme .seo-guide-subtitle {
  color: #475569;
  border-bottom-color: #e2e8f0;
}

/* ===== 内容区 flex 布局（工具页用 seo-guide-columns 包裹文章小节） ===== */
.seo-guide-columns {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== 文章小节（工具页 seo-guide-article 与 文章页 article-section） ===== */
.seo-guide-article {
  padding: 0 0 0 24px;
  line-height: 1.9;
  position: relative;
  margin-bottom: 0; /* 父级 .seo-guide-columns gap 控制间距 */
}

.article-section {
  padding: 0 0 0 24px;
  line-height: 1.9;
  position: relative;
  margin-bottom: 28px;
}

.article-section:last-child,
.seo-guide-article:last-child {
  margin-bottom: 0;
}

/* ===== 小节编号（共用） ===== */
.article-section-num {
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  font-size: 0;
  color: transparent;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.seo-guide-article-num {
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  font-size: 0;
  color: transparent;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.light-theme .article-section-num,
.light-theme .seo-guide-article-num {
  background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* ===== 小节小标题 h3（工具页专用） ===== */
.seo-guide-article h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 12px 0;
  color: #f1f5f9;
}

.light-theme .seo-guide-article h3 {
  color: #0f172a;
}

/* ===== 小节小标题 h3（文章页专用） ===== */
.article-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 10px 0;
  color: #e2e8f0;
}

.light-theme .article-content h3 {
  color: #1e293b;
}

/* ===== 段落文字（工具页专用） ===== */
.seo-guide-article p {
  font-size: 1rem;
  color: #cbd5e1;
  margin: 0 0 14px 0;
  line-height: 1.95;
}

.seo-guide-article p:last-child {
  margin-bottom: 0;
}

.light-theme .seo-guide-article p {
  color: #334155;
}

/* ===== 段落文字（文章页专用） ===== */
.article-content p {
  font-size: 0.9375rem;
  color: #94a3b8;
  margin: 0 0 12px 0;
  line-height: 1.95;
}

.article-content p:last-child {
  margin-bottom: 0;
}

.light-theme .article-content p {
  color: #475569;
}

/* ===== 列表样式（工具页专用） ===== */
.seo-guide-article ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seo-guide-article ul li {
  font-size: 1rem;
  color: #cbd5e1;
  padding: 6px 12px 6px 22px;
  position: relative;
  line-height: 1.85;
}

.light-theme .seo-guide-article ul li {
  color: #334155;
}

/* 列表圆点（工具页） */
.seo-guide-article ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

/* ===== 列表样式（文章页专用） ===== */
.article-content ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-content ul li {
  font-size: 0.90625rem;
  color: #94a3b8;
  padding: 6px 12px 6px 22px;
  position: relative;
  line-height: 1.8;
}

.light-theme .article-content ul li {
  color: #475569;
}

/* 列表圆点（文章页） */
.article-content ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

/* ===== strong 强调文字（工具页专用） ===== */
.seo-guide-article strong {
  color: #6ee7b7;
  font-weight: 600;
}

.light-theme .seo-guide-article strong {
  color: #059669;
}

/* ===== strong 强调文字（文章页专用） ===== */
.article-content strong {
  color: #6ee7b7;
  font-weight: 600;
}

.light-theme .article-content strong {
  color: #059669;
}

.article-content a {
  color: #34d399;
  text-decoration: none;
  border-bottom: 1px dashed rgba(52, 211, 153, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.article-content a:hover {
  color: #6ee7b7;
  border-bottom-color: #6ee7b7;
}

.light-theme .article-content a {
  color: #059669;
  border-bottom-color: rgba(5, 150, 105, 0.35);
}

.light-theme .article-content a:hover {
  color: #10b981;
  border-bottom-color: #10b981;
}

/* ===== 行内 code 样式（共用） ===== */
.seo-guide-code {
  display: inline-block;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  background: rgba(15, 23, 42, 0.75);
  color: #5eead4;
  border: 1px solid rgba(94, 234, 212, 0.15);
  border-radius: 3px;
  line-height: 1.55;
  font-weight: 500;
}

.light-theme .seo-guide-code {
  background: #f1f5f9;
  color: #0d9488;
  border-color: #e2e8f0;
}

/* 文章页内的 inline code 稍微加大 padding（视觉更舒展） */
.article-content .seo-guide-code {
  padding: 2px 8px;
  font-size: 0.84375rem;
}

/* ===== 文章页底部：相关工具推荐 ===== */
.guide-related-tools {
  margin-top: 48px;
  padding: 32px;
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.light-theme .guide-related-tools {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.08);
}

.guide-related-tools-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 16px 0;
}

.light-theme .guide-related-tools-title {
  color: #0f172a;
}

.guide-related-tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.guide-related-tools-item {
  padding: 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.guide-related-tools-item:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.light-theme .guide-related-tools-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.light-theme .guide-related-tools-item:hover {
  background: #ecfdf5;
  border-color: #10b981;
}

.guide-related-tools-item-icon {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.guide-related-tools-item-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.light-theme .guide-related-tools-item-name {
  color: #0f172a;
}

.guide-related-tools-item-desc {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

/* ===== 响应式（共用） ===== */
@media (max-width: 768px) {
  .guide-main {
    margin-top: 24px;
    padding: 0 12px 48px;
  }
  .guide-hero {
    padding: 20px 16px 24px;
    margin-bottom: 20px;
  }
  .guide-hero h1 {
    font-size: 1.5rem;
  }
  .guide-hero-subtitle {
    font-size: 0.9375rem;
  }
  .seo-guide, .article-content {
    padding: 28px 20px;
  }
  .article-content h2 {
    font-size: 1.125rem;
  }
  .seo-guide {
    margin-top: 20px;
    border-radius: 12px;
  }
  .seo-guide-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
  }
  .seo-guide-subtitle {
    font-size: 0.875rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  .seo-guide-columns {
    gap: 14px;
  }
  .seo-guide-article, .article-section {
    padding: 0 0 0 20px;
  }
  .article-section-num {
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
  }
  .seo-guide-article-num {
    top: 7px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
  }
  .seo-guide-article h3,
  .article-content h3,
  .seo-guide-article p,
  .article-content p,
  .seo-guide-article ul li,
  .article-content ul li {
    font-size: 0.875rem;
  }
  .guide-tool-banner {
    padding: 20px;
  }
  .guide-tool-banner-btn,
  .guide-banner-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .guide-banner {
    padding: 18px 20px;
    gap: 14px;
  }
  .guide-banner-title { font-size: 0.9375rem; }
  .guide-banner-desc { font-size: 0.8125rem; }
  .guide-related-tools {
    padding: 24px 16px;
  }
}

/* ===== Token 三段展示代码块（JWT 指南用） ===== */
.article-token-block {
  margin: 14px 0 16px 0;
  padding: 14px 18px;
  background: rgba(51, 65, 85, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.9;
  color: #cbd5e1;
  word-break: break-all;
}

.light-theme .article-token-block {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

.article-token-block > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.article-token-block > div:not(:first-child) {
  margin-top: 2px;
}

.article-token-block-label {
  display: inline-block;
  min-width: 76px;
  color: #94a3b8;
  font-weight: 500;
  flex-shrink: 0;
}

.light-theme .article-token-block-label {
  color: #64748b;
}

.article-token-block-value {
  flex: 1;
  color: #a5f3fc;
  font-weight: 500;
}

.light-theme .article-token-block-value {
  color: #0e7490;
}

/* ===== 表格样式（共用，默认无边框但有可读性） ===== */
.seo-guide table,
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px 0;
  font-size: 0.875rem;
  table-layout: auto;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.35);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.3);
}

.light-theme .seo-guide table,
.light-theme .article-content table {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.seo-guide table th,
.seo-guide table td,
.article-content table th,
.article-content table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  vertical-align: top;
  line-height: 1.65;
}

.light-theme .seo-guide table th,
.light-theme .seo-guide table td,
.light-theme .article-content table th,
.light-theme .article-content table td {
  border-bottom-color: #e2e8f0;
}

/* 表头 */
.seo-guide table thead th,
.article-content table thead th {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: #5eead4;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-bottom: 2px solid rgba(16, 185, 129, 0.5);
  white-space: nowrap;
}

.light-theme .seo-guide table thead th,
.light-theme .article-content table thead th {
  color: #0f766e;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
  border-bottom: 2px solid rgba(16, 185, 129, 0.4);
}

/* 表体行 */
.seo-guide table tbody tr:last-child td,
.article-content table tbody tr:last-child td {
  border-bottom: none;
}

.seo-guide table tbody tr:nth-child(even) td,
.article-content table tbody tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.22);
}

.light-theme .seo-guide table tbody tr:nth-child(even) td,
.light-theme .article-content table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.seo-guide table tbody tr:hover td,
.article-content table tbody tr:hover td {
  background: rgba(16, 185, 129, 0.06);
  transition: background 0.2s ease;
}

.light-theme .seo-guide table tbody tr:hover td,
.light-theme .article-content table tbody tr:hover td {
  background: #ecfdf5;
}

/* 表格文字颜色 */
.seo-guide table td {
  color: #cbd5e1;
}
.article-content table td {
  color: #94a3b8;
}
.light-theme .seo-guide table td {
  color: #334155;
}
.light-theme .article-content table td {
  color: #475569;
}

/* 表格中 inline code：稍微缩小以避免撑裂单元格 */
.seo-guide table .seo-guide-code,
.article-content table .seo-guide-code {
  font-size: 0.78125rem;
  padding: 1px 6px;
  margin: 0 1px;
  white-space: nowrap;
}

/* ===== 表格水平滚动兜底：防止窄屏表格撑破布局 ===== */
@media (max-width: 768px) {
  .seo-guide,
  .article-content {
    overflow-x: hidden;
  }
  .seo-guide table,
  .article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.8125rem;
  }
  .seo-guide table th,
  .seo-guide table td,
  .article-content table th,
  .article-content table td {
    padding: 8px 10px;
  }
}
