  /* =============================================
     Article Detail Page Styles
     ============================================= */

  /* ========== Base Reset ========== */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: var(--font-family);
    background: var(--color-bg-page);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  h1, h2, h3, h4, h5, h6, strong ,b{
    font-weight: 500 !important;
    font-size: 16px !important;
  }
  /* ========== Reveal Animation ========== */
  .reveal {
    opacity: 0; transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.visible { opacity: 1; transform: translateY(0); }

  /* ========== Breadcrumb ========== */
  .detail-breadcrumb {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
  }
  .breadcrumb-inner {
    max-width: 1200px; margin: 0 auto; padding: 14px var(--space-6);
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--color-text-muted);
  }
  .breadcrumb-inner a {
    color: var(--color-text-muted); text-decoration: none;
    transition: color 0.2s;
  }
  .breadcrumb-inner a:hover { color: var(--color-primary); }
  .breadcrumb-sep {
    color: var(--color-text-disabled);
    font-size: 11px;
    margin: 0 8px;
  }
  .breadcrumb-inner .bc-current {
    color: var(--color-text-secondary);
    max-width: 360px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* ========== Main Layout ========== */
  .detail-layout {
    max-width: 1200px; margin: 0 auto;
    padding: 48px var(--space-6) 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
  }

  /* ========== Article Content Area ========== */
  .article-content-wrap {
    min-width: 0;
  }

  /* Content Card */
  .article-content-card {
    background: #fff;
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(15,174,255,0.07);
    box-shadow: 0 2px 16px rgba(0,60,120,0.05);
    padding: 48px 52px;
    margin-bottom: 28px;
  }

  /* ========== Article Header ========== */
  .article-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--color-border);
  }
  /* Title */
  .article-title {
    font-size: 24px !important; 
    font-weight: 600; 
    line-height: 1.8;
    color: var(--color-text-primary);
    margin-bottom: 16px;
  }
  /* Meta strip */
  .article-meta {
    display: flex; align-items: center; gap: 20px;
    flex-wrap: wrap;
  }
  .meta-author {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--color-text-secondary); font-weight: 600;
  }
  .meta-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, #0faeff, #0090d9);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 900; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(15,174,255,0.25);
  }
  .meta-sep { width: 1px; height: 16px; background: var(--color-border-strong); }
  .meta-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--color-text-muted); font-weight: 500;
  }
  .meta-item svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

  /* Article rich text body */
  .article-body {
    font-size: 16px;
    line-height: 2;
    color: var(--color-text-secondary);
    word-break: break-word;
  }
  .article-content {
    min-height: 200px;
  }
  .article-body h2 {
    font-size: 22px; font-weight: 900;
    color: var(--color-text-primary);
    margin: 40px 0 16px;
    padding-left: 16px;
    border-left: 4px solid var(--color-primary);
    line-height: 1.35;
    letter-spacing: -0.01em;
  }
  .article-body h3 {
    font-size: 18px; font-weight: 800;
    color: var(--color-text-primary);
    margin: 32px 0 12px;
    line-height: 1.4;
  }
  .article-body h4 {
    font-size: 15px; font-weight: 700;
    color: var(--color-text-primary);
    margin: 24px 0 8px;
  }
  .article-body p {
    margin-bottom: 18px;
  }
  .article-body a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
  }
  .article-body a:hover { color: var(--color-primary-dark); }
  .article-body strong { font-weight: 800; color: var(--color-text-primary); }
  .article-body em { font-style: italic; }
  .article-body ul, .article-body ol {
    margin: 0 0 18px 0;
    padding-left: 24px;
  }
  .article-body ul li, .article-body ol li {
    margin-bottom: 8px;
    line-height: 1.75;
  }
  .article-body ul { list-style: none; padding-left: 0; }
  .article-body ul li {
    position: relative;
    padding-left: 20px;
  }
  .article-body ul li::before {
    content: '';
    position: absolute; left: 0; top: 10px;
    width: 7px; height: 7px;
    background: var(--color-primary);
    border-radius: 50%;
  }
  .article-body blockquote {
    margin: 24px 0;
    padding: 18px 20px 18px 24px;
    background: var(--color-primary-bg);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--color-text-secondary);
    font-style: italic;
  }
  .article-body blockquote p { margin-bottom: 0; }
  .article-body hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 32px 0;
  }
  .article-body img {
    width: 100%; border-radius: var(--radius-lg);
    margin: 24px 0;
    box-shadow: 0 8px 24px rgba(0,60,120,0.08);
    display: block;
  }
  .article-body table {
    width: 100%; border-collapse: collapse;
    margin: 24px 0; font-size: 14px;
  }
  .article-body th {
    background: var(--color-bg-surface);
    font-weight: 800; color: var(--color-text-primary);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--color-border-strong);
  }
  .article-body td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
  }
  .article-body tr:hover td { background: var(--color-bg-surface); }
  .article-body code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    padding: 2px 7px;
    color: var(--color-primary-deeper);
  }
  .article-body pre {
    background: #0d1117;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin: 24px 0;
    overflow-x: auto;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
  }
  .article-body pre code {
    background: none; border: none; padding: 0;
    font-size: 14px; color: #e6edf3;
    line-height: 1.65;
  }

  /* ========== Share Bar ========== */
  .article-share {
    display: flex; align-items: center; gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
  }
  .share-label {
    font-size: 13px; font-weight: 700; color: var(--color-text-muted);
    flex-shrink: 0;
  }
  .share-btns { display: flex; gap: 8px; }
  .share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px; font-weight: 700;
    cursor: pointer; border: none; outline: none;
    transition: all 0.25s; text-decoration: none;
    user-select: none;
  }
  .share-btn svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .share-btn.copy-link {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text-secondary);
  }
  .share-btn.copy-link:hover {
    background: #fff; color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 3px 10px rgba(15,174,255,0.15);
  }

  /* ========== Prev / Next Navigation ========== */
  .article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
  }
  .article-nav-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 18px 20px;
    text-decoration: none;
    display: flex; align-items: flex-start; gap: 12px;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
  }
  .article-nav-item::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--color-primary-bg), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
  }
  .article-nav-item:hover {
    border-color: rgba(15,174,255,0.24);
    box-shadow: 0 8px 28px rgba(15,174,255,0.10);
    transform: translateY(-2px);
  }
  .article-nav-item:hover::before { opacity: 1; }
  .article-nav-item.nav-next { flex-direction: row-reverse; text-align: right; }
  .nav-arrow {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s;
  }
  .article-nav-item:hover .nav-arrow {
    background: var(--color-primary);
    border-color: transparent;
  }
  .nav-arrow svg { width: 14px; height: 14px; stroke: var(--color-text-muted); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.25s; }
  .article-nav-item:hover .nav-arrow svg { stroke: #fff; }
  .nav-direction {
    font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--color-text-muted);
    margin-bottom: 6px;
  }
  .nav-title {
    font-size: 13px; font-weight: 700;
    color: var(--color-text-primary); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.25s;
  }
  .article-nav-item:hover .nav-title { color: var(--color-primary); }
  .nav-date { font-size: 11px; color: var(--color-text-muted); margin-top: 5px; }

  /* Single nav item (first / last article) */
  .article-nav .nav-placeholder {
    background: transparent; border: 1px dashed var(--color-border);
    border-radius: var(--radius-xl);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: var(--color-text-disabled);
    padding: 18px 20px; pointer-events: none;
  }

  /* ========== Sidebar ========== */
  .detail-sidebar {
    position: sticky; top: 80px;
    display: flex; flex-direction: column; gap: 24px;
  }

  /* Sidebar widget */
  .detail-sw {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(15,174,255,0.07);
    box-shadow: 0 2px 12px rgba(0,60,120,0.04);
    overflow: hidden;
  }
  .detail-sw-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(15,174,255,0.07);
    display: flex; align-items: center; gap: 10px;
  }
  .dsw-icon {
    width: 30px; height: 30px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .dsw-icon svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .dsw-icon.blue   { background: linear-gradient(135deg, #0faeff, #0090d9); }
  .dsw-icon.purple { background: linear-gradient(135deg, #7c5cfc, #5b3cf6); }
  .dsw-icon.green  { background: linear-gradient(135deg, #10b981, #059669); }
  .dsw-icon.amber  { background: linear-gradient(135deg, #ffa940, #ff8a00); }
  .dsw-title { font-size: 13px; font-weight: 800; color: var(--color-text-primary); }

  /* TOC (Table of Contents) */
  .detail-toc { padding: 12px 8px 16px; }
  .toc-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 15px;
  }
  .toc-item:hover { background: var(--color-bg-surface); }
  .toc-item.active { background: var(--color-primary-bg); }
  .toc-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--color-border-strong);
    flex-shrink: 0; margin-top: 5px;
    transition: background 0.2s;
  }
  .toc-item.active .toc-dot,
  .toc-item:hover .toc-dot { background: var(--color-primary); }
  .toc-text {
    color: var(--color-text-secondary);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.2s;
  }
  .toc-item.active .toc-text,
  .toc-item:hover .toc-text { color: var(--color-primary); }
  .toc-h3 { padding-left: 26px; font-size: 12px; }
  .toc-h3 .toc-dot { width: 4px; height: 4px; margin-top: 6px; }

  /* Recommend */
  .dsw-recommend { padding: 8px 10px 14px; }
  .drec-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
  }
  .drec-item:hover { background: var(--color-bg-surface); }
  .drec-num {
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 900; color: #fff;
    flex-shrink: 0; margin-top: 1px;
  }
  .drec-num.n1 { background: linear-gradient(135deg, #0faeff, #0090d9); }
  .drec-num.n2 { background: linear-gradient(135deg, #7c5cfc, #5b3cf6); }
  .drec-num.n3 { background: linear-gradient(135deg, #10b981, #059669); }
  .drec-num.n4 { background: linear-gradient(135deg, #ffa940, #ff8a00); }
  .drec-num.n5 { background: linear-gradient(135deg, #06b6d4, #0891b2); }
  .drec-content { flex: 1; min-width: 0; }
  .drec-title {
    font-size: 12px; font-weight: 700; color: var(--color-text-primary);
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.25s; margin-bottom: 4px;
  }
  .drec-item:hover .drec-title { color: var(--color-primary); }
  .drec-meta { font-size: 10px; color: var(--color-text-muted); font-weight: 500; }

  /* ========== Toast ========== */
  .toast {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(24px);
    background: rgba(15,174,255,0.95);
    color: #fff; font-size: 13px; font-weight: 700;
    padding: 10px 24px; border-radius: var(--radius-full);
    opacity: 0; pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    box-shadow: 0 6px 24px rgba(15,174,255,0.35);
    white-space: nowrap;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  /* ========== Progress Bar ========== */
  .read-progress {
    position: fixed; top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    width: 0%; z-index: 9998;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(15,174,255,0.60);
  }

  /* ========== Responsive ========== */
  @media (max-width: 1024px) {
    .detail-layout { grid-template-columns: 1fr 260px; gap: 28px; }
    .article-content-card { padding: 36px 36px; }
  }
  @media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; padding: 32px var(--space-6) 60px; }
    .detail-sidebar { position: static; }
    .article-nav { grid-template-columns: 1fr; }
    .article-nav-item.nav-next { flex-direction: row; text-align: left; }
  }
  @media (max-width: 600px) {
    .bc-current { display: none; }
    .article-content-card { padding: 24px 20px; }
    .detail-layout { padding: 24px var(--space-4) 48px; gap: 24px; }
    .article-body { font-size: 15px; }
    .article-body h2 { font-size: 18px; }
    .article-body h3 { font-size: 16px; }
    .article-title { font-size: 20px !important; }
    .article-meta { gap: 12px; }
    .meta-sep { display: none; }
    .article-nav { gap: 10px; }
  }
