:root {
    --bg: #0b1020;
    --card-bg: rgba(20, 26, 51, 0.7);
    --border: rgba(122, 162, 255, 0.18);
    --text: #e8ebff;
    --muted: #9aa3ff;
    --accent: #6cf2c2;
    --accent2: #7aa2ff;
}
:root[data-theme="light"] {
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #cbd5e1;
    --text: #1e293b;
    --muted: #64748b;
    --accent: #0284c7;
    --accent2: #2563eb;
}
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    transition: background 0.3s, color 0.3s;
}
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}
.reprint-notice {
    margin-bottom: 22px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(108, 242, 194, 0.08);
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.reprint-notice i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
}
:root[data-theme="light"] .reprint-notice {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 12px 24px;
    border-radius: 40px;
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
}
.header-bar a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
#theme-toggle:hover {
    background: var(--accent);
    color: #0b1020;
    border-color: var(--accent);
}
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 48px;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.tag {
    background: rgba(108, 242, 194, 0.15);
    color: var(--accent);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(108, 242, 194, 0.2);
}
.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 18px;
    display: flex;
    flex-wrap: gap: 6px;
    align-items: center;
}
.breadcrumb a {
    color: var(--accent2);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}
.article-content pre {
    background: #0d1117;
    padding: 16px 18px;
    border-radius: 10px;
    overflow-x: auto;
    color: #e6edf3;
    border: 1px solid rgba(122, 162, 255, 0.15);
    text-indent: 0 !important;
    margin-left: 2em;
}
.article-content code {
    font-family: ui-monospace, Consolas, Monaco, monospace;
    font-size: 0.92em;
}
.article-content :not(pre) > code {
    background: rgba(122, 162, 255, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent2);
}
.article-content h2,
.article-content h3 {
    color: var(--text);
    margin-top: 35px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.article-content a {
    color: var(--accent2);
}

/* 正文段落首行缩进 2 个汉字 */
.article-content > p,
.article-content p {
    text-indent: 2em;
    margin: 0.75em 0;
}
/* 列表不缩进 */
.article-content ul,
.article-content ol,
.article-content li,
.article-content li p,
.article-content ul p,
.article-content ol p {
    text-indent: 0 !important;
}
/* 标题、代码、引用不缩进 */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content pre,
.article-content blockquote {
    text-indent: 0 !important;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0 6px;
}
.post-nav-item a {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text);
    transition: 0.25s;
    height: 100%;
}
.post-nav-item a:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.post-nav-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 2px;
    font-weight: 600;
    line-height: 1.2;
}
.post-nav-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}
.post-nav-item.next {
    text-align: right;
}
.post-nav-item.disabled {
    background: var(--card-bg);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    opacity: 0.55;
}

footer {
    margin-top: 50px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    padding: 30px 0;
}
footer a {
    color: var(--accent2);
    text-decoration: none;
}
@media (max-width: 640px) {
    .glass-card {
        padding: 24px;
    }
    .post-nav {
        grid-template-columns: 1fr;
    }
    .post-nav-item.next {
        text-align: left;
    }
    .article-content pre {
        margin-left: 0;
    }
}