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

/* === Banner 区域 === */
.article-banner {
    background: linear-gradient(135deg, #050508 0%, #0a0e27 50%, #050508 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 80px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    position: relative;
}

.article-banner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(86, 140, 214, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 30%, rgba(197, 134, 192, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.article-banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 200px;
    position: relative;
    z-index: 1;
}

.banner-info {
    flex: 1;
}

.banner-breadcrumb {
    font-size: 12px;
    color: #666;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.banner-breadcrumb a {
    color: #8b9bb4;
    text-decoration: none;
    transition: color 0.3s;
}

.banner-breadcrumb a:hover {
    color: var(--code-blue);
}

.breadcrumb-sep {
    color: #444;
}

.breadcrumb-current {
    color: var(--code-blue);
}

.banner-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #569cd6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-desc {
    font-size: 14px;
    color: #8b9bb4;
    font-weight: 300;
    line-height: 1.6;
}

.banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 40px;
}

.banner-btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.banner-btn-buy {
    background: linear-gradient(135deg, #569cd6, #c586c0);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(86, 140, 214, 0.3);
}

.banner-btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(86, 140, 214, 0.4);
}

.banner-btn-download {
    background: transparent;
    color: #569cd6;
    border: 2px solid rgba(86, 140, 214, 0.3);
}

.banner-btn-download:hover {
    background: rgba(86, 140, 214, 0.1);
    border-color: #569cd6;
}

.banner-btn-detail {
    display: inline-block;
    text-decoration: none;
    background: linear-gradient(135deg, #569cd6, #c586c0);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(86, 140, 214, 0.3);
}

.banner-btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(86, 140, 214, 0.4);
}

/* === 文章正文区域 === */
.article-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 60px;
    align-items: start;
}

/* === 侧边栏 === */
.article-sidebar {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(86, 140, 214, 0.15);
    border-radius: 12px;
    padding: 20px 16px;
}

.sidebar-heading {
    font-size: 14px;
    font-weight: 700;
    color: #d0d6e0;
    padding: 0 10px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    letter-spacing: 1px;
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #8b9bb4;
}

.meta-item i {
    width: 16px;
    height: 16px;
    color: #666;
    flex-shrink: 0;
}

/* === 侧边栏教程导航 === */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.sidebar-nav-item {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: #8b9bb4;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    line-height: 1.4;
}

.sidebar-nav-item:hover {
    color: #d0d6e0;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav-item.active {
    color: #fff;
    background: rgba(86, 140, 214, 0.12);
    border-left-color: var(--code-blue);
    font-weight: 500;
}

.sidebar-toc {
    display: flex;
    flex-direction: column;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    margin-left: 14px;
    margin-bottom: 4px;
}

.sidebar-toc-item {
    display: block;
    padding: 6px 12px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.sidebar-toc-item:hover {
    color: #d0d6e0;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-toc-item.active {
    color: var(--code-blue);
    background: rgba(86, 140, 214, 0.06);
}

.sidebar-toc-item.sub {
    padding-left: 24px;
    font-size: 11px;
}

/* === 文章正文 === */
.article-body {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 40px 36px;
}

.article-body h1 {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    line-height: 1.3;
    background: linear-gradient(135deg, #ffffff 0%, #d0d6e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

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

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

.meta-inline-sep {
    color: #444;
    margin: 0 4px;
}

.article-title-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 32px;
}

body.light-mode .article-meta-inline {
    color: #94a3b8;
}

body.light-mode .meta-inline-sep {
    color: #cbd5e1;
}

body.light-mode .article-title-divider {
    background: rgba(0, 0, 0, 0.06);
}

.article-lead {
    font-size: 16px;
    color: #8b9bb4;
    line-height: 1.8;
    padding: 24px;
    background: rgba(86, 140, 214, 0.05);
    border-left: 3px solid var(--code-blue);
    border-radius: 0 4px 4px 0;
    margin-bottom: 40px;
}

.article-body h2 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin-top: 48px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    letter-spacing: 0.3px;
}

.article-body h2:first-of-type {
    margin-top: 0;
}

.article-body p {
    font-size: 15px;
    color: #b0b8c4;
    line-height: 1.9;
    margin-bottom: 20px;
    font-weight: 300;
}

.article-body ul {
    margin: 16px 0 24px 24px;
    list-style: none;
}

.article-body ul li {
    font-size: 15px;
    color: #b0b8c4;
    line-height: 1.9;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
    font-weight: 300;
}

.article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--code-blue);
}

.article-body ul li strong {
    color: #d0d6e0;
    font-weight: 500;
}

/* === 代码块 === */
.article-code-block {
    margin: 24px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
}

.code-dots i:first-child { background: #ff5f57; }
.code-dots i:nth-child(2) { background: #ffbd2e; }
.code-dots i:last-child { background: #28ca42; }

.code-lang {
    font-size: 12px;
    color: #666;
    letter-spacing: 0.5px;
}

.article-code-block pre {
    padding: 20px;
    overflow-x: auto;
}

.article-code-block code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #d0d6e0;
    line-height: 1.8;
}

/* === 提示框 === */
.article-tip,
.article-warning {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
    align-items: flex-start;
}

.article-tip {
    background: rgba(86, 140, 214, 0.06);
    border: 1px solid rgba(86, 140, 214, 0.15);
}

.article-warning {
    background: rgba(206, 145, 120, 0.06);
    border: 1px solid rgba(206, 145, 120, 0.15);
}

.tip-icon,
.warning-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1.4;
}

.tip-content,
.warning-content {
    font-size: 14px;
    color: #b0b8c4;
    line-height: 1.7;
}

.tip-content strong,
.warning-content strong {
    color: #d0d6e0;
    font-weight: 600;
}

/* === 文章底部导航 === */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-prev,
.nav-next {
    text-decoration: none;
    max-width: 45%;
}

.nav-prev {
    color: #444;
}

.nav-next {
    text-align: right;
    color: inherit;
    transition: all 0.3s ease;
}

.nav-next:hover .nav-title {
    color: var(--code-blue);
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.nav-title {
    display: block;
    font-size: 15px;
    color: #8b9bb4;
    transition: color 0.3s;
}

/* ============================================ */
/* Light Mode                                   */
/* ============================================ */

body.light-mode .article-banner {
    background: linear-gradient(135deg,
        rgba(248, 250, 252, 0.8) 0%,
        rgba(226, 232, 240, 0.6) 40%,
        rgba(102, 126, 234, 0.15) 70%,
        rgba(118, 75, 162, 0.12) 100%
    );
    border-bottom-color: rgba(102, 126, 234, 0.1);
}

body.light-mode .article-banner::before {
    background: radial-gradient(ellipse at 30% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 30%, rgba(118, 75, 162, 0.06) 0%, transparent 50%);
}

body.light-mode .banner-breadcrumb a {
    color: #64748b;
}

body.light-mode .banner-breadcrumb a:hover {
    color: #667eea;
}

body.light-mode .breadcrumb-sep {
    color: #cbd5e1;
}

body.light-mode .breadcrumb-current {
    color: #667eea;
}

body.light-mode .banner-title {
    background: linear-gradient(135deg, #2c3e50 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .banner-desc {
    color: #64748b;
}

body.light-mode .banner-btn-buy {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35),
                0 0 40px rgba(118, 75, 162, 0.2);
}

body.light-mode .banner-btn-buy:hover {
    box-shadow: 0 6px 28px rgba(102, 126, 234, 0.45),
                0 0 60px rgba(118, 75, 162, 0.3);
}

body.light-mode .banner-btn-download {
    border-color: rgba(102, 126, 234, 0.4);
    color: #667eea;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

body.light-mode .banner-btn-download:hover {
    background: rgba(102, 126, 234, 0.12);
    border-color: #667eea;
}

body.light-mode .meta-item {
    color: #64748b;
}

body.light-mode .meta-item i {
    color: #94a3b8;
}

body.light-mode .sidebar-nav-item {
    color: #64748b;
}

body.light-mode .sidebar-nav-item:hover {
    color: #475569;
    background: rgba(102, 126, 234, 0.05);
}

body.light-mode .sidebar-nav-item.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
}

body.light-mode .sidebar-toc {
    border-left-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .sidebar-toc-item {
    color: #94a3b8;
}

body.light-mode .sidebar-toc-item:hover {
    color: #475569;
    background: rgba(102, 126, 234, 0.05);
}

body.light-mode .sidebar-toc-item.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

body.light-mode .article-sidebar {
    background: rgba(241, 245, 249, 0.7);
    border-color: rgba(102, 126, 234, 0.2);
}

body.light-mode .sidebar-heading {
    color: #475569;
    border-bottom-color: rgba(102, 126, 234, 0.12);
}

body.light-mode .article-body {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .article-body h1 {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .article-lead {
    color: #475569;
    background: rgba(102, 126, 234, 0.05);
    border-left-color: #667eea;
}

body.light-mode .article-body h2 {
    color: #1e293b;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .article-body p {
    color: #475569;
}

body.light-mode .article-body ul li {
    color: #475569;
}

body.light-mode .article-body ul li::before {
    background: #667eea;
}

body.light-mode .article-body ul li strong {
    color: #1e293b;
}

body.light-mode .article-code-block {
    background: #f8fafc;
    border-color: rgba(102, 126, 234, 0.12);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.06);
}

body.light-mode .code-header {
    background: #f1f5f9;
    border-bottom-color: rgba(102, 126, 234, 0.1);
}

body.light-mode .code-lang {
    color: #94a3b8;
}

body.light-mode .article-code-block code {
    color: #475569;
}

body.light-mode .article-tip {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.15);
}

body.light-mode .article-warning {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.15);
}

body.light-mode .tip-content,
body.light-mode .warning-content {
    color: #475569;
}

body.light-mode .tip-content strong,
body.light-mode .warning-content strong {
    color: #1e293b;
}

body.light-mode .article-nav {
    border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .nav-prev {
    color: #cbd5e1;
}

body.light-mode .nav-label {
    color: #94a3b8;
}

body.light-mode .nav-title {
    color: #64748b;
}

body.light-mode .nav-next:hover .nav-title {
    color: #667eea;
}

body.light-mode .article-meta {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* ============================================ */
/* Responsive                                   */
/* ============================================ */

@media (max-width: 768px) {
    .article-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 20px;
        gap: 20px;
    }

    .banner-actions {
        margin-left: 0;
        width: 100%;
    }

    .banner-btn {
        flex: 1;
        text-align: center;
        padding: 10px 16px;
    }

    .banner-title {
        font-size: 22px;
    }

    .article-content {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        gap: 32px;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding: 16px;
    }

    body.light-mode .article-sidebar {
        border-bottom-color: rgba(0, 0, 0, 0.06);
    }

    .article-toc {
        grid-column: 1 / -1;
    }

    .article-body h1 {
        font-size: 28px;
    }

    .article-body {
        padding: 24px 20px;
    }

    .article-body h2 {
        font-size: 20px;
    }

    .article-nav {
        flex-direction: column;
        gap: 24px;
    }

    .nav-prev,
    .nav-next {
        max-width: 100%;
    }

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

/* ===== Bilibili Player ===== */
.bilibili-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin: 20px 0;
    background: #000;
}

.bilibili-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Markdown Content ===== */
.article-body h2 {
    font-size: 1.4em;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.article-body h3 {
    font-size: 1.2em;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}

.article-body p {
    margin-bottom: 1em;
    line-height: 1.8;
}

.article-body ul, .article-body ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.article-body li {
    margin-bottom: 0.4em;
    line-height: 1.7;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-color, #6366f1);
    padding: 0.8em 1.2em;
    margin: 1em 0;
    background: var(--card-bg, #f9fafb);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary, #6b7280);
}

.article-body pre {
    background: #0d1117;
    border: 1px solid rgba(86, 140, 214, 0.15);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    margin: 1.5em 0;
    position: relative;
}

.article-body pre code {
    display: block;
    background: none;
    padding: 20px 24px;
    font-size: 13px;
    color: #c9d1d9;
    line-height: 1.7;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    tab-size: 4;
    white-space: pre;
}

.article-body pre code::-webkit-scrollbar {
    height: 6px;
}

.article-body pre code::-webkit-scrollbar-track {
    background: transparent;
}

.article-body pre code::-webkit-scrollbar-thumb {
    background: rgba(86, 140, 214, 0.3);
    border-radius: 3px;
}

.article-body code {
    background: rgba(86, 140, 214, 0.12);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.88em;
    color: #79c0ff;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

.article-body a {
    color: var(--link-color, #6366f1);
    text-decoration: underline;
}

.article-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1em 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.article-body th, .article-body td {
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 0.6em 0.8em;
    text-align: left;
}

.article-body th {
    background: var(--card-bg, #f9fafb);
    font-weight: 600;
}

.article-body hr {
    border: none;
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin: 2em 0;
}

/* Dark theme */
[data-theme="dark"] .article-body h2 {
    border-bottom-color: #374151;
}

[data-theme="dark"] .article-body blockquote {
    background: #1f2937;
}

[data-theme="dark"] .article-body code {
    background: rgba(86, 140, 214, 0.12);
    color: #79c0ff;
}

body.light-mode .article-body code {
    background: rgba(86, 140, 214, 0.1);
    color: #0969da;
}

[data-theme="dark"] .article-body th {
    background: #1f2937;
}

[data-theme="dark"] .article-body th,
[data-theme="dark"] .article-body td {
    border-color: #374151;
}

.case-rel-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 40px 0;
}

.case-rel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.case-rel-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #121417;
    border: 1px solid #1e2229;
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.case-rel-card:hover {
    transform: translateY(-3px);
    border-color: rgba(86, 156, 214, 0.45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.case-rel-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e2530 0%, #141820 100%);
    border: 1px solid #232830;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5b6572;
}

.case-rel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-rel-thumb i {
    width: 26px;
    height: 26px;
}

.case-rel-info {
    flex: 1;
    min-width: 0;
}

.case-rel-name {
    font-size: 15px;
    font-weight: 600;
    color: #e6edf3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-rel-desc {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.5;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-rel-go {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #569cd6;
}

body.light-mode .case-rel-card {
    background: #ffffff;
    border-color: #e6e9ef;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.light-mode .case-rel-card:hover {
    border-color: rgba(102, 126, 234, 0.45);
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1);
}

body.light-mode .case-rel-thumb {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

body.light-mode .case-rel-name {
    color: #1e293b;
}

body.light-mode .case-rel-desc {
    color: #64748b;
}

body.light-mode .case-rel-go {
    color: #4f46e5;
}

/* 案例封面图 */
.case-detail-cover {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.case-detail-cover img {
    width: 100%;
    display: block;
    object-fit: cover;
}

body.light-mode .case-detail-cover {
    border-color: rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
    .case-rel-wrap {
        padding: 16px 16px 0;
    }

    .case-rel-grid {
        grid-template-columns: 1fr;
    }
}


/* 案例页紧凑横幅：仅面包屑，消除标题移除后的空白 */
.article-banner-compact .article-banner-inner {
    min-height: 0;
    display: block;
    padding: 18px 40px 22px;
}

.article-banner-compact .banner-breadcrumb {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .article-banner-compact .article-banner-inner {
        padding: 14px 20px 18px;
    }
}

/* 移动端：目录默认折叠，点击标题展开 */
@media (max-width: 768px) {
    .article-sidebar {
        display: block;
    }

    .article-sidebar .sidebar-nav {
        display: none;
    }

    .article-sidebar.open .sidebar-nav {
        display: block;
    }

    .sidebar-heading {
        position: relative;
        padding-right: 26px;
        margin-bottom: 0;
        cursor: pointer;
        user-select: none;
    }

    .sidebar-heading::after {
        content: '';
        position: absolute;
        right: 10px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-70%) rotate(45deg);
        transition: transform 0.25s;
        opacity: 0.6;
    }

    .article-sidebar.open .sidebar-heading::after {
        transform: translateY(-30%) rotate(-135deg);
    }
}
