/* ═══════════════════════════════════════════════════════════════
   article.css — Shared styles for all article pages on doball66.com
   Design tokens synced with index.html main site
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Variables ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark: #0a0e17;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --green: #22c55e;
    --red: #ef4444;
    --text: #e5e7eb;
    --text-dim: #9ca3af;
    --border: #1f2937;
    /* Typography */
    --font-th: 'Prompt', sans-serif;
    --font-ui: 'Inter', 'Prompt', sans-serif;
    --fs-xs: 11px;
    --fs-sm: 12px;
    --fs-base: 14px;
    --fs-md: 15px;
    --fs-lg: 18px;
    --fs-xl: 24px;
    --fs-2xl: 32px;
    /* Article-specific */
    --article-max: 800px;
    --article-wide: 1200px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-th);
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════════
   1. Header (sticky, dropdown nav + hamburger mobile)
   ═══════════════════════════════════════════════════════════════ */
.header {
    background: linear-gradient(135deg, #111827 0%, #1a1a2e 100%);
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--article-wide);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* ─── Desktop Nav ─── */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: var(--font-th);
    font-weight: 500;
    font-size: var(--fs-base);
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.12);
}

.nav-link.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-link .caret {
    font-size: 10px;
    transition: transform 0.2s;
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #111827;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item:hover .caret {
    transform: rotate(180deg);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: background 0.15s, color 0.15s;
}

.dropdown-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #fff;
}

.dropdown-link i {
    width: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--accent);
    opacity: 0.7;
}

.dropdown-link:hover i {
    opacity: 1;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 12px;
}

/* ─── Hamburger (Mobile) ─── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    z-index: 201;
    transition: border-color 0.2s;
}

.hamburger:hover {
    border-color: var(--accent);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Mobile Nav Panel ─── */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-nav-overlay.open {
    opacity: 1;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #111827;
    border-left: 1px solid var(--border);
    z-index: 200;
    overflow-y: auto;
    transition: right 0.3s ease;
    padding: 72px 0 32px;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-section {
    padding: 0 16px;
    margin-bottom: 8px;
}

.mobile-nav-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 8px 6px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: rgba(59, 130, 246, 0.1);
    color: #fff;
}

.mobile-nav-link.active {
    color: var(--accent);
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--accent);
    opacity: 0.7;
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 16px;
}


/* ═══════════════════════════════════════════════════════════════
   2. Breadcrumb
   ═══════════════════════════════════════════════════════════════ */
.breadcrumb {
    max-width: var(--article-wide);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-dim);
}

.breadcrumb a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .sep {
    color: var(--border);
    margin: 0 2px;
    font-size: 10px;
}

.breadcrumb .current {
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}


/* ═══════════════════════════════════════════════════════════════
   3. Article Hero
   ═══════════════════════════════════════════════════════════════ */
.article-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f2847 100%);
    padding: 48px 20px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 50%);
    opacity: 0.4;
    pointer-events: none;
}

.article-hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--article-max);
    margin: 0 auto;
}

.article-hero h1 {
    font-family: var(--font-th);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: var(--fs-sm);
    color: var(--text-dim);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta-item i {
    font-size: 13px;
    color: var(--accent);
}

.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: 500;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════
   4. Table of Contents
   ═══════════════════════════════════════════════════════════════ */
.toc {
    max-width: var(--article-max);
    margin: 24px auto;
    padding: 0 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    overflow: hidden;
}

.toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
    color: #fff;
    font-family: var(--font-th);
    font-size: var(--fs-md);
    font-weight: 600;
    transition: background 0.2s;
}

.toc-toggle:hover {
    background: var(--bg-card-hover);
}

.toc-toggle > .fa-list {
    color: var(--accent);
    margin-right: 8px;
}

.toc-arrow {
    color: var(--text-dim);
    font-size: 12px;
    transition: transform 0.3s;
    margin-left: auto;
}

.toc-list {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0 20px 16px;
    margin: 0;
}

.toc-list li {
    counter-increment: toc-counter;
}

.toc-list > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    color: var(--text);
    text-decoration: none;
    font-size: var(--fs-base);
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.toc-list > li > a::before {
    content: counter(toc-counter);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    border-radius: 8px;
    font-family: var(--font-ui);
    font-size: var(--fs-sm);
    font-weight: 700;
    flex-shrink: 0;
}

.toc-list > li > a:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--accent);
}

.toc-list > li > a:hover::before {
    background: rgba(59, 130, 246, 0.25);
}

/* Sub-items (H3) */
.toc-sub {
    list-style: none;
    padding-left: 34px;
}

.toc-sub li a {
    display: block;
    padding: 5px 0;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.2s;
    position: relative;
    padding-left: 14px;
}

.toc-sub li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--border);
    transform: translateY(-50%);
}

.toc-sub li a:hover {
    color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════════
   5. Article Body — Typography
   ═══════════════════════════════════════════════════════════════ */
.article-body {
    max-width: var(--article-max);
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.article-body h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin: 32px 0 16px;
}

.article-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin: 40px 0 16px;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
    scroll-margin-top: 80px;
}

.article-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin: 28px 0 12px;
    scroll-margin-top: 80px;
}

.article-body h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin: 24px 0 10px;
    scroll-margin-top: 80px;
}

.article-body p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
}

.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.article-body a:hover {
    color: #60a5fa;
}

.article-body strong {
    color: #fff;
    font-weight: 600;
}

.article-body em {
    font-style: italic;
    color: var(--text);
}

/* Lists */
.article-body ul,
.article-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-body ul {
    list-style: none;
}

.article-body ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

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

.article-body ol {
    list-style: none;
    counter-reset: ol-counter;
}

.article-body ol li {
    counter-increment: ol-counter;
    position: relative;
    padding-left: 32px;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.article-body ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0;
    top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    border-radius: 50%;
    font-family: var(--font-ui);
    font-size: var(--fs-xs);
    font-weight: 700;
}

/* Nested lists */
.article-body ul ul,
.article-body ol ol,
.article-body ul ol,
.article-body ol ul {
    margin: 8px 0 4px;
}

/* Blockquote */
.article-body blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--accent);
    background: rgba(17, 24, 39, 0.7);
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.article-body blockquote p {
    margin-bottom: 0;
}

.article-body blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-dim);
    font-style: normal;
}

/* Horizontal rule */
.article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

/* Inline code */
.article-body code {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* Code block */
.article-body pre {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-body pre code {
    background: none;
    padding: 0;
    font-size: 13px;
    line-height: 1.6;
}

/* Table */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: var(--fs-base);
}

.article-body table th,
.article-body table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-body table th {
    background: var(--bg-card);
    color: #fff;
    font-weight: 600;
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-body table tr:hover td {
    background: rgba(59, 130, 246, 0.04);
}


/* ═══════════════════════════════════════════════════════════════
   6. Images
   ═══════════════════════════════════════════════════════════════ */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin: 20px 0;
    display: block;
}

.article-body figure {
    margin: 24px 0;
}

.article-body figure img {
    margin-bottom: 8px;
}

.article-body figcaption {
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
    font-style: italic;
    line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════════
   7. HowTo Section — Numbered Steps
   ═══════════════════════════════════════════════════════════════ */
.howto-steps {
    margin: 24px 0;
    position: relative;
    padding-left: 40px;
}

/* Connecting line */
.howto-steps::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    background: var(--border);
}

.howto-step {
    position: relative;
    margin-bottom: 28px;
}

.howto-step:last-child {
    margin-bottom: 0;
}

.howto-step-number {
    position: absolute;
    left: -40px;
    top: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    font-weight: 700;
    color: #fff;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.howto-step-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    margin-top: 0;
}

.howto-step-content p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 8px;
}

.howto-step-content img {
    margin-top: 12px;
}


/* ═══════════════════════════════════════════════════════════════
   8. FAQ Section — Accordion
   ═══════════════════════════════════════════════════════════════ */
.faq-section {
    margin: 32px 0;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    gap: 12px;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-card-hover);
}

.faq-question h3 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.faq-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    font-size: 14px;
    flex-shrink: 0;
    transition: transform 0.3s, background 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background: rgba(59, 130, 246, 0.2);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 20px 16px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.faq-answer-inner p {
    margin-bottom: 10px;
}

.faq-answer-inner p:last-child {
    margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════════
   9. Author Box
   ═══════════════════════════════════════════════════════════════ */
.author-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin: 40px 0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    font-size: 11px;
    color: #fff;
}

.author-bio {
    font-size: var(--fs-base);
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 12px;
}

.author-socials {
    display: flex;
    gap: 8px;
}

.author-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.author-socials a:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════════
   10. Social Share Buttons
   ═══════════════════════════════════════════════════════════════ */

/* Desktop: fixed sidebar */
.share-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 90;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn--line {
    background: #06C755;
    box-shadow: 0 2px 10px rgba(6, 199, 85, 0.3);
}

.share-btn--facebook {
    background: #1877F2;
    box-shadow: 0 2px 10px rgba(24, 119, 242, 0.3);
}

.share-btn--twitter {
    background: #000;
    border: 1px solid #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.share-btn--copy {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.share-btn--copy:hover {
    color: #fff;
    border-color: var(--accent);
}

.share-btn--copy.copied {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

/* Mobile: bottom bar */
.share-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 10px 20px;
    z-index: 90;
    justify-content: center;
    gap: 12px;
}

.share-bottom .share-btn {
    width: 48px;
    height: 42px;
    border-radius: 10px;
    font-size: 17px;
}


/* ═══════════════════════════════════════════════════════════════
   11. Related Articles — 3-column Grid
   ═══════════════════════════════════════════════════════════════ */
.related-section {
    max-width: var(--article-wide);
    margin: 0 auto;
    padding: 40px 20px;
}

.related-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-section h2 i {
    color: var(--accent);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.related-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--bg-card-hover);
}

.related-card-body {
    padding: 16px;
}

.related-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ═══════════════════════════════════════════════════════════════
   12. Footer (rich SEO footer with links)
   ═══════════════════════════════════════════════════════════════ */
.footer {
    background: linear-gradient(180deg, #0d1117 0%, #111827 100%);
    border-top: 1px solid var(--border);
    padding: 0;
}

.footer-main {
    max-width: var(--article-wide);
    margin: 0 auto;
    padding: 48px 20px 32px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand .logo {
    display: inline-flex;
    width: fit-content;
}

.footer-brand-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-col h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col h3 i {
    color: var(--accent);
    font-size: 13px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 20px;
    text-align: center;
}

.footer-bottom-inner {
    max-width: var(--article-wide);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-copyright {
    color: var(--text-dim);
    font-size: var(--fs-sm);
    font-weight: 300;
    letter-spacing: 0.02em;
}

.footer-legal {
    display: flex;
    gap: 16px;
}

.footer-legal a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════════
   13. Responsive — Mobile First
   ═══════════════════════════════════════════════════════════════ */

/* ─── Mobile ≤ 899px: hamburger, hide desktop nav ─── */
@media (max-width: 899px) {
    .desktop-nav { display: none; }
    .hamburger { display: flex; }
    .mobile-nav,
    .mobile-nav-overlay { display: block; }

    .header-inner { padding: 10px 14px; }

    .logo-img { height: 34px; }

    .breadcrumb { padding: 10px 14px; font-size: 11px; }
    .breadcrumb .current { max-width: 180px; }

    .article-hero { padding: 32px 14px 28px; }
    .article-hero h1 { font-size: 22px; }
    .article-meta { gap: 10px; font-size: 11px; }

    .toc { padding: 0 14px; margin: 16px auto; }

    .article-body { padding: 24px 14px 36px; }
    .article-body h2 { font-size: 19px; }
    .article-body h3 { font-size: 16px; }

    /* HowTo */
    .howto-steps { padding-left: 32px; }
    .howto-step-number { left: -32px; width: 30px; height: 30px; font-size: 13px; }
    .howto-steps::before { left: 14px; }

    /* Author box stack */
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
    }
    .author-name { justify-content: center; }
    .author-socials { justify-content: center; }

    /* Share: hide sidebar, show bottom bar */
    .share-sidebar { display: none; }
    .share-bottom { display: flex; }

    /* Related: single column */
    .related-grid { grid-template-columns: 1fr; gap: 14px; }
    .related-section { padding: 28px 14px; }
    .related-section h2 { font-size: 19px; }

    /* Footer: 2-column grid on mobile */
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        padding: 32px 16px 24px;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand-desc { max-width: 100%; }
    .footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
    }
    .footer-legal { gap: 12px; }

    /* Bottom padding for share bar */
    .footer-bottom { padding-bottom: 72px; }
}

/* ─── Small Mobile ≤ 480px ─── */
@media (max-width: 480px) {
    .header-inner { padding: 8px 12px; }
    .logo-img { height: 30px; }

    .article-hero { padding: 20px 12px; }
    .article-hero h1 { font-size: 20px; }

    .article-body { padding: 20px 12px 32px; }

    .mobile-nav { width: 280px; }

    /* Footer: single column */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 28px 14px 20px;
    }
    .footer-col h3 { font-size: 13px; margin-bottom: 12px; }
    .footer-col ul li a { font-size: 12px; }
    .footer-copyright { font-size: 11px; }
}

/* ─── Tablet 900-1023px ─── */
@media (min-width: 900px) and (max-width: 1023px) {
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .share-sidebar { left: 10px; }
    .share-btn { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }

    .footer-main {
        grid-template-columns: 1.2fr 1fr 1fr 1fr;
        gap: 28px;
    }
}

/* ─── Desktop ≥ 1024px ─── */
@media (min-width: 1024px) {
    .article-hero h1 { font-size: 32px; }
    .article-body h1 { font-size: 30px; }
    .article-body h2 { font-size: 24px; }
    .article-body h3 { font-size: 20px; }
}


/* ═══════════════════════════════════════════════════════════════
   14. Utility Classes
   ═══════════════════════════════════════════════════════════════ */

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Anchor offset for scroll-margin */
.anchor-offset {
    scroll-margin-top: 80px;
}

/* Text utilities */
.text-accent { color: var(--accent); }
.text-dim { color: var(--text-dim); }
.text-white { color: #fff; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; }
.mb-1 { margin-bottom: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; }
.mb-3 { margin-bottom: 24px; }

/* Flex helpers */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
