/* ========== 文章详情页 - 极简黑白 ========== */
.post-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 文章卡片 */
.post-card {
    background: #fff;
    border: 0px solid #f0f0f0;
    border-radius: 16px;
    padding: 52px 72px;
    margin-top: 40px;
    margin-bottom: 24px;
}

/* 文章头部 */
.post-header {
    text-align: center;
    margin-bottom: 40px;
}
.post-category {
    display: inline-block;
    color: #111;
    font-weight: 700;
    background: #f2f2f2;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 12px;
    letter-spacing: .5px;
    text-decoration: none;
    margin-bottom: 18px;
}
.post-category:hover {
    background: #111;
    color: #fff;
}
.post-title {
    font-size: 34px;
    font-weight: 800;
    color: #111;
    margin: 0 0 20px;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

/* 头部信息行 - 与首页卡片页脚同款 */
.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #999;
    flex-wrap: wrap;
}
.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}
.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
}
.author-avatar-text {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.author-name {
    color: #444;
    font-weight: 500;
}
.post-author-link {
    color: #444;
    text-decoration: none;
    transition: color .2s;
}
.post-author-link:hover {
    color: #111;
}

/* 封面图：1100px 大图（超出正文栏，视口居中）+ 圆角 + 完整显示（不裁切） */
.post-cover {
    width: min(900px, 94vw);
    max-width: none;   /* 关键：解除全局 img{max-width:100%} 的钳制 */
    height: auto;
    display: block;
    margin: 0 auto 40px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px;
    cursor: pointer;
}

/* 文章内容 */
.post-content {
    font-size: 17px;
    line-height: 1.85;
    color: #333;
}
.post-content p {
    margin: 0 0 22px;
}
.post-content h2,
.post-content h3,
.post-content h4 {
    color: #111;
    font-weight: 700;
    margin: 40px 0 18px;
    line-height: 1.35;
}
.post-content h2 { font-size: 26px; }
.post-content h3 { font-size: 22px; }
.post-content h4 { font-size: 19px; }
.post-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 28px 0;
    cursor: pointer;
}
.post-content blockquote {
    border-left: 3px solid #111;
    padding-left: 20px;
    margin: 28px 0;
    color: #666;
    font-style: italic;
}
.post-content code {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 15px;
    color: #c62828;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}

/* ========== Mac 样式代码框 ========== */
.post-content pre {
    background: #1e1e1e;
    color: #eaeaea;
    padding: 56px 20px 20px 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 28px 0;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid #2a2a2a;
    max-width: 100%;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-all;
    position: relative;
}
/* Mac 标题栏 */
.post-content pre::before {
    content: '';
    display: block;
    height: 38px;
    background: #2d2d2d;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #3a3a3a;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
}
/* 三个圆点 */
.post-content pre .mac-dots {
    position: absolute;
    top: 0;
    left: 14px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
    pointer-events: none;
}
.post-content pre .mac-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}
.post-content pre .mac-dots span:nth-child(1) { background: #ff5f56; }
.post-content pre .mac-dots span:nth-child(2) { background: #ffbd2e; }
.post-content pre .mac-dots span:nth-child(3) { background: #27c93f; }

/* 代码内容区域 */
.post-content pre code {
    display: block;
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* 代码块滚动条 */
.post-content pre::-webkit-scrollbar {
    height: 5px;
    border-radius: 3px;
}
.post-content pre::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}
.post-content pre::-webkit-scrollbar-track {
    background: transparent;
}

/* ========== 一键复制按钮（始终显示） ========== */
.copy-btn {
    position: absolute;
    top: 7px;
    right: 12px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.1);
    color: #bbb;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    z-index: 4;
}
.copy-btn:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
.copy-btn.copied {
    background: rgba(34,197,94,0.2) !important;
    color: #4ade80 !important;
    border-color: rgba(74,222,128,0.35) !important;
}

.post-content ul,
.post-content ol {
    margin: 0 0 22px;
    padding-left: 24px;
}
.post-content li {
    margin-bottom: 8px;
}
.post-content a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-content a:hover {
    opacity: .6;
}
.post-content .ql-align-center {
    text-align: center !important;
}
.post-content .ql-align-right {
    text-align: right !important;
}
.post-content .ql-align-justify {
    text-align: justify !important;
}
.post-content .ql-align-center img {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}
.post-content hr {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 40px 0;
}

/* ========== 关键词标签 ========== */
.post-keywords {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.post-keywords-label {
    font-size: 13px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-keywords-list a {
    display: inline-block;
    padding: 5px 14px;
    background: #f5f5f5;
    color: #555;
    font-size: 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: all .2s;
    border: 1px solid transparent;
}
.post-keywords-list a:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ========= 图片弹窗预览样式 ========= */
.img-preview-mask {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.85);
    z-index: 99999;
    cursor: pointer;
}
.img-preview-mask img {
    max-width: 92vw;
    max-height: 92vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

/* 评论区域 */
.comments-card {
    background: #fff;
    border: 0px solid #f0f0f0;
    border-radius: 16px;
    padding: 44px 72px;
    margin-bottom: 60px;
}
.comments-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin: 0 0 28px;
}

/* 评论表单 */
.comment-form {
    margin-bottom: 36px;
}
.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: all .2s;
    font-family: inherit;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #ccc;
    background: #fff;
}
.comment-form textarea {
    min-height: 110px;
    resize: vertical;
    margin-bottom: 14px;
}
.comment-form button {
    padding: 12px 28px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.comment-form button:hover {
    opacity: .75;
}

/* 评论列表 */
.comments-list {
    display: flex;
    flex-direction: column;
}
.comment-item {
    padding: 24px 0;
    border-bottom: 1px solid #f5f5f5;
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #555;
    flex-shrink: 0;
}
.comment-author {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}
.comment-time {
    font-size: 12px;
    color: #bbb;
    margin-top: 2px;
}
.comment-body {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    padding-left: 50px;
}

/* 楼层号 */
.comment-floor {
    margin-left: auto;
    font-size: 12px;
    color: #ccc;
    font-weight: 600;
    background: #f8f8f8;
    padding: 2px 10px;
    border-radius: 10px;
}

/* 回复按钮 */
.comment-actions {
    padding-left: 50px;
    margin-top: 10px;
}
.comment-actions button {
    font-size: 13px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color .2s;
}
.comment-actions button:hover {
    color: #111;
}

/* 回复表单 */
.reply-form {
    margin-top: 14px;
    padding: 16px;
    background: #fafafa;
    border-radius: 10px;
    display: none;
}
.reply-form.show {
    display: block;
}
.reply-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    outline: none;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
    box-sizing: border-box;
    font-family: inherit;
}
.reply-form textarea:focus {
    border-color: #ccc;
}
.reply-form button[type="submit"] {
    padding: 8px 20px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.reply-form button[type="submit"]:hover {
    opacity: .75;
}
.reply-form button[type="button"] {
    padding: 8px 20px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    margin-left: 8px;
}

/* 嵌套回复列表 */
.replies-list {
    margin-top: 16px;
    margin-left: 50px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 10px;
}
.reply-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.reply-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    flex-shrink: 0;
}
.reply-body {
    flex: 1;
}
.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.reply-author {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}
.reply-time {
    font-size: 11px;
    color: #bbb;
}
.reply-to {
    font-size: 12px;
    color: #999;
}
.reply-content {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* 空评论提示 */
.no-comments {
    text-align: center;
    padding: 40px 0;
    color: #bbb;
    font-size: 15px;
}

/* ========== 面包屑导航（Schema.org BreadcrumbList）========== */
.flash-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
    flex-wrap: wrap;
    line-height: 1.5;
}
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}
.breadcrumb-item a {
    color: #888;
    text-decoration: none;
    transition: all .2s;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
}
.breadcrumb-item a:hover {
    color: #111;
    background: #f5f5f5;
}
.breadcrumb-sep {
    color: #ddd;
    font-size: 11px;
    user-select: none;
    padding: 0 2px;
}
.breadcrumb-item.active {
    color: #555;
    font-weight: 600;
    padding: 2px 6px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.breadcrumb-item.active span {
    cursor: default;
}

/* 快讯页头部 */
.flash-hero h1 {
    font-size: 40px;
    font-weight: 800;
    color: #111;
    margin: 0 0 14px;
    letter-spacing: -0.8px;
    line-height: 1.15;
}
.flash-hero p {
    font-size: 16px;
    color: #888;
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
}

/* ==================== 黑夜模式 - 完整覆盖 ==================== */
html.dark body { background: #0a0a0a !important; }

html.dark .post-card {
    background: #0a0a0a !important;
    border-color: #1a1a1a !important;
    box-shadow: none !important;
}

html.dark .post-header {
    background: #111 !important;
    border: 1px solid #222 !important;
    border-radius: 16px !important;
    padding: 40px 48px !important;
    margin-bottom: 32px !important;
}

html.dark .post-title { color: #f0f0f0 !important; }
html.dark .post-meta { color: #666 !important; }
html.dark .author-name,
html.dark .post-author-link { color: #aaa !important; }
html.dark .post-author-link:hover { color: #f0f0f0 !important; }
html.dark .author-avatar-text { background: #f0f0f0 !important; color: #111 !important; }
html.dark .post-category { background: #222 !important; color: #ccc !important; }
html.dark .post-category:hover { background: #f0f0f0 !important; color: #111 !important; }

/* 文章内容 */
html.dark .post-content { color: #ccc !important; }
html.dark .post-content h2,
html.dark .post-content h3,
html.dark .post-content h4 { color: #f0f0f0 !important; }
html.dark .post-content blockquote { border-left-color: #444 !important; color: #999 !important; }
html.dark .post-content code { background: #2d1f1f !important; color: #ff7b72 !important; }

/* Mac 代码框黑夜 */
html.dark .post-content pre {
    background: #161b22 !important;
    border-color: #30363d !important;
}
html.dark .post-content pre::before {
    background: #21262d !important;
    border-bottom-color: #30363d !important;
}
html.dark .post-content pre::-webkit-scrollbar-thumb {
    background: #555 !important;
}
html.dark .copy-btn {
    background: rgba(255,255,255,0.08) !important;
    color: #999 !important;
    border-color: rgba(255,255,255,0.12) !important;
}
html.dark .copy-btn:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #e6edf3 !important;
}

html.dark .post-content a { color: #f0f0f0 !important; }
html.dark .post-content hr { border-top-color: #222 !important; }

/* 关键词标签 */
html.dark .post-keywords { border-top-color: #222 !important; }
html.dark .post-keywords-label { color: #666 !important; }
html.dark .post-keywords-list a { background: #1a1a1a !important; color: #aaa !important; border-color: transparent !important; }
html.dark .post-keywords-list a:hover { background: #f0f0f0 !important; color: #111 !important; border-color: #f0f0f0 !important; }

/* 评论大卡片同样融入背景 */
html.dark .comments-card {
    background: #0a0a0a !important;
    border-color: #1a1a1a !important;
    box-shadow: none !important;
}
html.dark .comments-title { color: #f0f0f0 !important; }

/* 评论表单 */
html.dark .comment-form input,
html.dark .comment-form textarea {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #f0f0f0 !important;
}
html.dark .comment-form input:focus,
html.dark .comment-form textarea:focus {
    border-color: #444 !important;
    background: #1a1a1a !important;
}
html.dark .comment-form input::placeholder,
html.dark .comment-form textarea::placeholder {
    color: #555 !important;
}
html.dark .comment-form button {
    background: #f0f0f0 !important;
    color: #111 !important;
}

/* 评论列表 */
html.dark .comment-item { border-bottom-color: #222 !important; }
html.dark .comment-avatar { background: #222 !important; color: #aaa !important; }
html.dark .comment-author { color: #f0f0f0 !important; }
html.dark .comment-time { color: #666 !important; }
html.dark .comment-body { color: #b0b0b0 !important; }
html.dark .comment-floor { color: #666 !important; background: #1a1a1a !important; }
html.dark .comment-actions button { color: #888 !important; }
html.dark .comment-actions button:hover { color: #f0f0f0 !important; }

/* 回复 */
html.dark .reply-form { background: #1a1a1a !important; }
html.dark .reply-form textarea { background: #222 !important; border-color: #333 !important; color: #f0f0f0 !important; }
html.dark .reply-form button[type="submit"] { background: #f0f0f0 !important; color: #111 !important; }
html.dark .reply-form button[type="button"] { background: #333 !important; color: #aaa !important; }
html.dark .replies-list { background: #1a1a1a !important; }
html.dark .reply-item { border-bottom-color: #2a2a2a !important; }
html.dark .reply-avatar { background: #333 !important; color: #888 !important; }
html.dark .reply-author { color: #f0f0f0 !important; }
html.dark .reply-time { color: #666 !important; }
html.dark .reply-content { color: #b0b0b0 !important; }

/* 登录提示 & 空评论 */
html.dark .login-prompt { background: #1a1a1a !important; }
html.dark .login-prompt p { color: #888 !important; }
html.dark .login-prompt .btn-login { background: #f0f0f0 !important; color: #111 !important; }
html.dark .login-prompt .btn-register { background: #333 !important; color: #aaa !important; }
html.dark .no-comments { color: #555 !important; }

/* 黑夜面包屑 */
html.dark .flash-breadcrumb { color: #666; }
html.dark .breadcrumb-item a { color: #888; }
html.dark .breadcrumb-item a:hover { color: #f0f0f0; background: #222; }
html.dark .breadcrumb-sep { color: #444; }
html.dark .breadcrumb-item.active { color: #bbb; }

/* ========== 评论区上方广告 ========== */
.post-ads-section { margin-bottom: 24px; }
.post-ad-item {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
    font-size: 0;
}
.post-ad-item + .post-ad-item { margin-top: 16px; }
.post-ad-item a { display: block; }
.post-ad-item img { display: block; width: 100%; height: auto; }
.post-ad-code { line-height: 1.6; font-size: 14px; text-align: center; padding: 12px; overflow: hidden; }
.post-ad-code ins { margin: 0 auto; }
html.dark .post-ad-item { background: #0a0a0a !important; border-color: #1a1a1a !important; }

/* ========== macOS 风格相关文章 ========== */
.related-wrap {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

/* 外层容器 - 去掉底层白框，直接融入页面 */
.related-card {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.related-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}
.related-title svg {
    width: 20px;
    height: 20px;
    color: #1d1d1f;
    flex-shrink: 0;
}

/* macOS 风格网格 */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* 单个卡片 - macOS App Store / Finder 风格 */
.related-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 0.5px 1px rgba(0,0,0,0.04),
        0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}
.related-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    pointer-events: none;
    z-index: 1;
}
.related-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 4px 16px rgba(0,0,0,0.08),
        0 12px 40px rgba(0,0,0,0.06);
    border-color: rgba(0, 0, 0, 0.1);
}
.related-item:active {
    transform: translateY(-1px) scale(0.995);
    transition-duration: 0.1s;
}

/* 图片区域 - macOS 大圆角 */
.related-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}
.related-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0c0c0;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 信息区域 */
.related-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}
.related-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 43px;
    letter-spacing: -0.2px;
}
.related-item:hover .related-item-title {
    color: #000;
}
.related-item-meta {
    font-size: 14px;
    color: #86868b;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
}
.related-item-meta svg {
    width: 13px;
    height: 13px;
    vertical-align: -2px;
    flex-shrink: 0;
    opacity: 0.6;
}

/* 关联阅读作者信息 */
.related-author {
    display: flex;
    align-items: center;
    gap: 6px;
}
.related-author-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}
.related-author-avatar-text {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.related-author-name {
    color: #555;
    font-weight: 500;
}
.related-category {
    display: inline-block;
    padding: 2px 8px;
    background: #f5f5f5;
    color: #888;
    font-size: 13px;
    border-radius: 4px;
    font-weight: 500;
}

/* 黑夜模式 - 关联阅读作者 */
html.dark .related-author-avatar { background: #333 !important; }
html.dark .related-author-avatar-text { background: #f0f0f0 !important; color: #111 !important; }
html.dark .related-author-name { color: #aaa !important; }
html.dark .related-category { background: #222 !important; color: #666 !important; }

/* ========== 黑夜模式 - macOS Dark Glass ========== */
html.dark .related-card {
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}
html.dark .related-title { color: #f5f5f7 !important; }
html.dark .related-title svg { color: #f5f5f7 !important; }

html.dark .related-item {
    background: rgba(40, 40, 40, 0.7) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 0.5px 1px rgba(0,0,0,0.3),
        0 2px 8px rgba(0,0,0,0.2);
}
html.dark .related-item::before {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
html.dark .related-item:hover {
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 4px 20px rgba(0,0,0,0.4),
        0 12px 48px rgba(0,0,0,0.35) !important;
}
html.dark .related-thumb {
    background: #2a2a2a !important;
}
html.dark .related-thumb-placeholder {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%) !important;
    color: #555 !important;
}
html.dark .related-item-title { color: #f5f5f7 !important; }
html.dark .related-item:hover .related-item-title { color: #fff !important; }
html.dark .related-item-meta { color: #8e8e93 !important; }

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .post-card {
        padding: 32px 24px;
        margin-top: 24px;
    }
    .post-cover {
        width: 100%;
        left: 0;
        transform: none;
    }
    .post-title {
        font-size: 24px;
    }
    .post-meta {
        gap: 12px;
        font-size: 13px;
    }
    .comments-card {
        padding: 32px 24px;
    }
    .comment-form-grid {
        grid-template-columns: 1fr;
    }
    .comment-body {
        padding-left: 0;
    }
    .post-content {
        font-size: 16px;
    }
    .post-content h2 { font-size: 22px; }
    .post-content h3 { font-size: 19px; }
    .post-content pre {
        padding: 50px 16px 16px 16px;
        border-radius: 10px;
    }
    .post-content pre::before {
        border-radius: 10px 10px 0 0;
    }
    .copy-btn {
        padding: 4px 10px;
        font-size: 11px;
        top: 6px;
        right: 8px;
    }
    .post-content pre .mac-dots {
        left: 10px;
        gap: 6px;
    }
    .post-content pre .mac-dots span {
        width: 10px;
        height: 10px;
    }
    /* 移动端标题卡片适配 */
    html.dark .post-header {
        padding: 28px 24px !important;
        margin-bottom: 24px !important;
        border-radius: 12px !important;
    }
    .related-card {
        padding: 0;
    }
    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .related-info { padding: 14px 14px 16px; }
    .related-item-title { font-size: 14px; min-height: 40px; }
    .related-item { border-radius: 14px; }
    .related-item::before { border-radius: 14px; }
}

@media (max-width: 480px) {
    .post-wrap { padding: 0 18px; }
    .post-card { padding: 24px 20px; border-radius: 14px; }
    .post-cover {
        width: 100%;
        left: 0;
        transform: none;
    }
    .post-title { font-size: 22px; }
    .post-header { margin-bottom: 28px; }
    .related-wrap { padding: 0 18px; margin-bottom: 40px; }
    .related-card { padding: 0; }
    .related-grid { grid-template-columns: 1fr; }
    .related-item-title { min-height: auto; }
}