/* shihuijun.com 博客前台样式 — 浅色卡片式, 参考 jspang 观感 */

:root {
    --color-bg: #f5f6f8;
    --color-surface: #ffffff;
    --color-text: #2c3e50;
    --color-text-light: #909399;
    --theme: #f56c6c;              /* 主题色, 可后台配置(site-settings.js 注入覆盖) */
    --color-primary: var(--theme); /* 主色跟随主题色 */
    --color-primary-dark: color-mix(in srgb, var(--theme) 78%, #000);  /* hover 深色, 自动算 */
    --color-border: #ebeef5;
    --color-tag-bg: color-mix(in srgb, var(--theme) 12%, #fff);        /* 标签浅底, 自动算 */
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.1);
    --max-width: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 顶部导航 ===== */
.site-header {
    background: var(--color-surface);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 40px;
}
.logo { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-size: 20px; font-weight: 700; color: var(--color-primary); }
.logo-sub { font-size: 11px; color: var(--color-text-light); letter-spacing: 1px; }
.main-nav { flex: 1; }
.main-nav ul { display: flex; list-style: none; gap: 28px; }
.main-nav a {
    font-size: 15px;
    color: var(--color-text);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.search-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    background: #f2f3f5; border: none; border-radius: 8px; cursor: pointer;
    color: #5a6672; transition: background .15s, color .15s;
}
.search-btn:hover { background: #e4e7ed; color: var(--theme); }
/* 搜索按钮 + 社交链接同一行 */
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ===== 主体双栏 ===== */
.main-layout {
    display: flex;
    gap: 28px;
    padding-top: 28px;
    padding-bottom: 40px;
    align-items: flex-start;
}
.content-col { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; align-self: stretch; }

/* ===== 文章卡片 ===== */
.post-list { display: flex; flex-direction: column; gap: 20px; }
.post-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    transition: box-shadow .25s, transform .25s;
}
.post-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.post-card-body { flex: 1; padding: 20px 22px; min-width: 0; }
.post-card-thumb {
    width: 200px; flex-shrink: 0;
    background: #f0f0f0;
    background-size: cover; background-position: center;
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-title {
    font-size: 19px; font-weight: 600; margin-bottom: 10px;
    color: var(--color-text);
    transition: color .2s;
}
.post-card:hover .post-title { color: var(--color-primary); }

.post-meta {
    display: flex; align-items: center; gap: 14px;
    font-size: 12px; color: var(--color-text-light);
    margin-bottom: 10px; flex-wrap: wrap;
}
.post-meta .cat-tag {
    background: var(--color-tag-bg);
    color: var(--color-primary);
    padding: 2px 10px; border-radius: 20px; font-size: 12px;
}
.post-meta .top-badge {
    background: var(--color-primary);
    color: #fff;
    padding: 2px 8px; border-radius: 4px; font-size: 11px;
}
.post-summary {
    font-size: 14px; color: #5a6672;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 侧边栏 widget ===== */
.widget {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.author-card { text-align: center; }
.avatar {
    width: 80px; height: 80px; border-radius: 50%;
    object-fit: cover; margin-bottom: 12px;
    border: 3px solid var(--color-tag-bg);
    transition: transform .3s cubic-bezier(.4,0,.2,1), border-color .3s, box-shadow .3s;
}
.avatar:hover {
    transform: scale(1.08) rotate(5deg);
    border-color: var(--color-primary);
    box-shadow: 0 8px 20px rgba(245,108,108,.25);
}
.author-bio { font-size: 13px; color: var(--color-text-light); }
.widget-title {
    font-size: 15px; font-weight: 600; margin-bottom: 14px;
    padding-left: 10px; border-left: 3px solid var(--color-primary);
}
.latest-list, .category-list { list-style: none; }
.latest-list li { margin-bottom: 10px; font-size: 14px; }
.latest-list a { color: #5a6672; transition: color .2s; }
.latest-list a:hover { color: var(--color-primary); }
.category-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 10px; font-size: 14px; margin: 0 -10px;
    border-bottom: 1px dashed var(--color-border);
    border-radius: 6px;
    transition: background .2s ease, transform .2s ease, padding .2s ease;
}
.category-list li:last-child { border-bottom: none; }
.category-list li:hover {
    background: var(--color-tag-bg, var(--color-tag-bg));
    transform: translateX(4px);
    border-bottom-color: transparent;
}
.category-list a { transition: color .2s ease; display: block; flex: 1; }
.category-list a:hover { color: var(--color-primary); }
.category-list li:hover a { color: var(--color-primary); }
.category-list .count { color: var(--color-text-light); font-size: 12px; transition: color .2s ease; }
.category-list li:hover .count { color: var(--color-primary); }

/* ===== 文章目录 TOC (两级树, 可折叠, 仿 jspang) ===== */
.toc-widget { position: sticky; top: 84px; max-height: calc(100vh - 120px); overflow-y: auto; }
.toc-list, .toc-children { list-style: none; }
.toc-item { line-height: 1.4; }
.toc-row { display: flex; align-items: center; }
.toc-link {
    display: block; flex: 1; min-width: 0;
    font-size: 13px; color: #5a6672;
    padding: 5px 8px; border-left: 2px solid transparent;
    transition: color .2s, border-color .2s, background .2s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toc-link:hover { color: var(--color-primary); }
.toc-link.active {
    color: var(--color-primary); border-left-color: var(--color-primary);
    background: var(--color-tag-bg); font-weight: 600;
}
/* 折叠箭头 */
.toc-toggle {
    flex-shrink: 0; width: 20px; height: 24px; padding: 0;
    border: none; background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: #b0b4bb;
}
.toc-toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.toc-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.toc-toggle:hover { color: var(--color-primary); }
.toc-toggle-placeholder { flex-shrink: 0; width: 20px; }
/* 子级列表: 折叠时隐藏 */
.toc-children { overflow: hidden; }
.toc-children.collapsed { display: none; }
.toc-level-3 .toc-link { font-size: 12px; color: #8a94a0; padding-left: 6px; }

/* ===== 上一篇/下一篇 ===== */
.post-nav {
    display: flex; gap: 16px; margin-top: 32px;
}
.post-nav-item {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px;
    background: var(--color-surface); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 16px 18px;
    transition: box-shadow .2s, transform .2s;
}
.post-nav-item.next { text-align: right; align-items: flex-end; }
a.post-nav-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.post-nav-item.empty { background: none; box-shadow: none; }
.post-nav .nav-label { font-size: 12px; color: var(--color-text-light); }
.post-nav .nav-title {
    font-size: 14px; color: var(--color-text); font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
a.post-nav-item:hover .nav-title { color: var(--color-primary); }
@media (max-width: 640px) { .post-nav { flex-direction: column; } .post-nav-item.next { text-align: left; align-items: flex-start; } }

/* 相关推荐 */
.related-posts { margin: 36px 0 10px; }
.related-title { font-size: 18px; color: var(--color-text); margin: 0 0 16px; padding-left: 10px; border-left: 3px solid var(--color-primary); }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #ebeef5; border-radius: 10px; overflow: hidden; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.related-thumb { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #f2f3f5; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-thumb-placeholder { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 600; background: linear-gradient(135deg, #f78ca0 0%, var(--theme) 100%); }
.related-info { padding: 12px 14px; }
.related-card-title { font-size: 15px; color: var(--color-text); font-weight: 600; margin: 0 0 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card:hover .related-card-title { color: var(--color-primary); }
.related-meta { font-size: 12px; color: var(--color-text-light); display: flex; gap: 10px; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }

/* 文章底部广告位 */
.post-ad { margin: 30px 0 10px; text-align: center; }
.post-ad-link { display: inline-block; max-width: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s; }
.post-ad-link[href]:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.post-ad-img { display: block; max-width: 100%; height: auto; }

/* ===== 详情页增强(仿 jspang) ===== */
/* 阅读进度条 */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 1000; }
.reading-progress-bar { height: 100%; width: 0; background: var(--color-primary); transition: width .1s linear; }
/* 返回顶部 */
.back-to-top {
    position: fixed; right: 28px; bottom: 28px; width: 44px; height: 44px;
    border: none; border-radius: 50%; background: var(--color-surface); color: var(--color-primary);
    box-shadow: var(--shadow-hover); cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s; z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-primary); color: #fff; }
/* 代码块: 复制 + 折叠 */
.code-block-wrap { position: relative; }
.copy-code-btn {
    position: absolute; top: 8px; right: 8px; padding: 3px 10px; font-size: 12px;
    border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: rgba(0,0,0,.35); color: #eee;
    cursor: pointer; opacity: 0; transition: opacity .2s; z-index: 2;
}
.code-block-wrap:hover .copy-code-btn { opacity: 1; }
.copy-code-btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.code-foldable.is-collapsed { max-height: 400px; overflow: hidden; }
.code-foldable.is-collapsed::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 60px;
    background: linear-gradient(transparent, rgba(0,0,0,.55)); pointer-events: none;
}
.code-fold-toggle {
    position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 3px 14px; font-size: 12px;
    border: none; border-radius: 12px; background: var(--color-primary); color: #fff; cursor: pointer; z-index: 3;
}
/* 字号调节 */
.post-meta-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.font-btn {
    width: 28px; height: 24px; border: 1px solid var(--color-border); border-radius: 6px;
    background: var(--color-surface); color: var(--color-text-light); cursor: pointer; font-size: 12px; line-height: 1;
}
.font-btn.active { border-color: var(--color-primary); color: var(--color-primary); }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
/* 分享 */
.post-share { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--color-border); flex-wrap: wrap; }
.share-label { font-size: 13px; color: var(--color-text-light); }
.share-btn { padding: 5px 14px; font-size: 13px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); color: var(--color-text); cursor: pointer; transition: all .2s; }
.share-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.share-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.share-modal { background: #fff; border-radius: var(--radius); padding: 28px 32px; text-align: center; position: relative; }
.share-modal-close { position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 22px; color: var(--color-text-light); cursor: pointer; line-height: 1; }
.share-modal-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.share-qrcode img { display: block; border-radius: 8px; }
.share-tip { margin-top: 12px; font-size: 12px; color: var(--color-text-light); }
/* 页内搜索 */
.inpage-search {
    position: fixed; top: 70px; right: 24px; display: none; align-items: center; gap: 6px;
    background: var(--color-surface); box-shadow: var(--shadow-hover); border-radius: 10px; padding: 8px 10px; z-index: 1500;
}
.inpage-search.visible { display: flex; }
.inpage-search input { border: 1px solid var(--color-border); border-radius: 6px; padding: 5px 10px; font-size: 13px; width: 160px; outline: none; }
.inpage-search input:focus { border-color: var(--color-primary); }
.inpage-search-count { font-size: 12px; color: var(--color-text-light); min-width: 42px; text-align: center; }
.inpage-search-btn { width: 26px; height: 26px; border: none; background: var(--color-bg); border-radius: 6px; cursor: pointer; color: var(--color-text-light); font-size: 12px; }
.inpage-search-btn:hover { background: var(--color-tag-bg); color: var(--color-primary); }
mark.inpage-hit { background: #ffe58f; color: inherit; padding: 0 1px; border-radius: 2px; }
mark.inpage-hit.current { background: var(--color-primary); color: #fff; }
/* 阅读位置记忆提示 */
.read-pos-prompt {
    position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); display: flex; align-items: center; gap: 12px;
    background: var(--color-text); color: #fff; padding: 12px 18px; border-radius: 24px; box-shadow: var(--shadow-hover);
    opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s; z-index: 1600; font-size: 14px;
}
.read-pos-prompt.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.read-pos-go { border: none; background: var(--color-primary); color: #fff; padding: 5px 14px; border-radius: 14px; cursor: pointer; font-size: 13px; }
.read-pos-dismiss { border: none; background: none; color: rgba(255,255,255,.7); font-size: 18px; cursor: pointer; line-height: 1; }
@media (max-width: 640px) { .inpage-search { right: 10px; left: 10px; } .inpage-search input { flex: 1; width: auto; } }
/* 代码块语言标签(左上角) */
.code-lang-label {
    position: absolute; top: 8px; left: 10px; font-size: 11px; letter-spacing: .5px;
    color: rgba(255,255,255,.5); text-transform: uppercase; pointer-events: none; z-index: 1;
}
.code-block-wrap { padding-top: 6px; }
/* 正文图片: 可点放大 + lightbox */
.post-content img.zoomable { cursor: zoom-in; }
.img-lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none;
    align-items: center; justify-content: center; z-index: 2100;
}
.img-lightbox.visible { display: flex; }
.img-lb-img { max-width: 90vw; max-height: 85vh; border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.img-lb-close { position: absolute; top: 20px; right: 28px; width: 40px; height: 40px; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; border-radius: 50%; cursor: pointer; line-height: 1; }
.img-lb-close:hover { background: rgba(255,255,255,.25); }
.img-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; border-radius: 50%; cursor: pointer; line-height: 1; }
.img-lb-nav:hover { background: rgba(255,255,255,.25); }
.img-lb-prev { left: 24px; }
.img-lb-next { right: 24px; }
.img-lb-caption { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-size: 13px; padding: 0 20px; }

/* ===== 提示 ===== */
.loading-tip, .end-tip {
    text-align: center; color: var(--color-text-light);
    font-size: 13px; padding: 20px;
}

/* ===== 页脚 ===== */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    text-align: center;
    color: var(--color-text-light);
    font-size: 13px;
}
.site-footer .icp { margin-top: 6px; }
.site-footer .icp a { color: var(--color-text-light); }
.site-footer .icp a:hover { color: var(--color-primary); }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .post-card-thumb { width: 130px; }
    .main-nav ul { gap: 18px; }
    .header-inner { gap: 20px; }
}
@media (max-width: 600px) {
    .post-card { flex-direction: column-reverse; }
    .post-card-thumb { width: 100%; height: 160px; }
    .logo-sub { display: none; }
}

/* ===== 文章详情页 ===== */
.post-detail {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 40px;
}
.post-detail .detail-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
    color: var(--color-text);
}
.post-detail .detail-meta {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    font-size: 13px; color: var(--color-text-light);
    padding-bottom: 20px; margin-bottom: 28px;
    border-bottom: 1px solid var(--color-border);
}
.post-detail .detail-meta .cat-tag {
    background: var(--color-tag-bg); color: var(--color-primary);
    padding: 2px 10px; border-radius: 20px;
}

/* 正文排版 (Markdown 渲染结果) */
.post-content {
    font-size: 16px;
    line-height: 1.9;
    color: #3a4553;
    word-wrap: break-word;
}
.post-content h1, .post-content h2, .post-content h3,
.post-content h4 { margin: 28px 0 14px; line-height: 1.4; color: var(--color-text); }
.post-content h1 { font-size: 24px; }
.post-content h2 { font-size: 21px; padding-left: 12px; border-left: 4px solid var(--color-primary); }
.post-content h3 { font-size: 18px; }
.post-content p { margin: 14px 0; }
.post-content a { color: var(--color-primary); border-bottom: 1px solid transparent; }
.post-content a:hover { border-bottom-color: var(--color-primary); }
.post-content ul, .post-content ol { margin: 14px 0; padding-left: 26px; }
.post-content li { margin: 6px 0; }
.post-content img { max-width: 100%; border-radius: 6px; margin: 16px 0; }
.post-content blockquote {
    margin: 18px 0; padding: 12px 18px;
    background: #f8f9fb; border-left: 4px solid var(--color-primary);
    color: #5a6672; border-radius: 0 6px 6px 0;
}
.post-content code {
    background: #f2f3f5; color: #d63384;
    padding: 2px 6px; border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
}
.post-content pre {
    margin: 18px 0; border-radius: 8px; overflow: auto;
    background: #f6f8fa;
}
.post-content pre code {
    display: block; padding: 16px 18px;
    background: transparent; color: inherit;
    font-size: 14px; line-height: 1.6;
}
.post-content table {
    width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px;
}
.post-content th, .post-content td {
    border: 1px solid var(--color-border); padding: 8px 12px; text-align: left;
}
.post-content th { background: #f8f9fb; }

.detail-error { text-align: center; padding: 60px 20px; color: var(--color-text-light); }
.detail-error a { color: var(--color-primary); }

/* 分类筛选提示条 */
.filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #5a6672;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.filter-banner a { color: var(--theme); }
.filter-right { display: flex; align-items: center; gap: 14px; }
.filter-count {
    color: #909399; font-size: 13px; font-weight: normal;
    background: #f5f7fa; border-radius: 12px; padding: 2px 10px;
}

/* 文章资料下载区(仿 jspang) */
.download-box {
    background: #fafbfc; border: 1px solid #eef0f3; border-radius: 10px;
    padding: 16px 18px; margin: 18px 0 24px;
}
.download-title {
    font-size: 16px; font-weight: 600; color: #2c3e50; margin: 0 0 8px;
    padding-left: 10px; border-left: 3px solid var(--color-primary);
}
.download-tip { font-size: 13px; color: #909399; margin: 0 0 12px; }
.download-list { list-style: none; margin: 0; padding: 0; }
.download-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 8px; background: #fff;
    border: 1px solid #eef0f3; margin-bottom: 8px;
}
.download-item:last-child { margin-bottom: 0; }
.dl-icon { font-size: 18px; flex-shrink: 0; }
.dl-name { flex: 1; color: #2c3e50; font-size: 14px; word-break: break-all; }
.dl-size { color: #909399; font-size: 12px; flex-shrink: 0; }
.dl-count {
    color: #909399; font-size: 12px; flex-shrink: 0;
    background: #f5f7fa; border-radius: 10px; padding: 2px 8px;
}
.dl-btn {
    flex-shrink: 0; background: var(--color-primary); color: #fff;
    font-size: 13px; padding: 5px 16px; border-radius: 6px;
    text-decoration: none; transition: background .15s;
}
.dl-btn:hover { background: var(--color-primary-dark); }
@media (max-width: 600px) {
    .download-item { flex-wrap: wrap; }
    .dl-name { flex-basis: 100%; }
}

/* 关于页(双栏布局下填满左栏) */
.about-page {
    background: #fff; border-radius: 10px;
    padding: 32px 40px; margin: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.about-content { font-size: 15px; line-height: 1.9; color: #3a3f45; }
@media (max-width: 600px) {
    .about-page { padding: 24px 18px; }
}

/* RSS 订阅入口(页脚, 与备案号同行) */
.footer-line {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; flex-wrap: wrap;
}
.footer-line .icp { margin: 0; }
.footer-line .sep { color: #c0c4cc; }
.footer-rss {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--color-primary); font-size: 13px; text-decoration: none;
}
.footer-rss:hover { color: var(--color-primary-dark); }
.footer-rss svg { display: block; }

/* 归档页 */
.archive-title { font-size: 26px; color: #2c3e50; margin-bottom: 6px; }
.archive-count { color: #909399; font-size: 14px; margin-bottom: 28px; }
.archive-year { margin-bottom: 30px; }
.archive-year > h2 {
    font-size: 22px; color: var(--theme); border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px; margin-bottom: 16px;
}
.archive-month { margin-bottom: 18px; }
.archive-month > h3 { font-size: 15px; color: #5a6672; margin: 12px 0 8px; }
.archive-month ul { list-style: none; padding-left: 10px; }
.archive-month li {
    display: flex; align-items: center; gap: 12px; padding: 7px 0;
    border-bottom: 1px dashed #eee;
}
.archive-date { color: #c0c4cc; font-size: 13px; font-family: monospace; min-width: 46px; }
.archive-month li a { color: #2c3e50; text-decoration: none; flex: 1; }
.archive-month li a:hover { color: var(--theme); }
.archive-cat {
    background: #f2f3f5; color: #909399; font-size: 12px;
    padding: 2px 8px; border-radius: 10px;
}

/* 内联搜索框(导航栏展开式, 仿 jspang) */
.search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f2f3f5;
    border-radius: 20px;
    padding: 4px 6px 4px 14px;
}
.search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 180px;
    color: #2c3e50;
}
.search-submit {
    display: inline-flex; align-items: center; justify-content: center;
    border: none;
    background: var(--theme);
    cursor: pointer;
    width: 30px; height: 30px;
    padding: 0;
    border-radius: 50%;
    line-height: 1;
    color: #fff;
    flex-shrink: 0;
    transition: background .15s;
}
.search-submit:hover { background: var(--color-primary-dark); }
.search-close {
    display: inline-flex; align-items: center; justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    line-height: 1;
    color: #909399;
}
.search-close:hover { color: var(--theme); }

/* 文章卡片标签 */
.post-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-tag {
    font-size: 12px; color: #7a8699; text-decoration: none;
    background: #f2f3f5; padding: 2px 8px; border-radius: 10px;
}
.post-tag:hover { color: var(--theme); background: var(--color-tag-bg); }

/* 侧栏标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    font-size: 13px; color: #5a6672; text-decoration: none;
    background: #f2f3f5; padding: 4px 10px; border-radius: 14px;
    transition: all .15s;
}
.tag-chip span { color: #c0c4cc; font-size: 12px; }
.tag-chip:hover { background: var(--color-tag-bg); color: var(--theme); }
.tag-chip.active { background: var(--theme); color: #fff; }
.tag-chip.active span { color: var(--color-tag-bg); }

/* 详情页标签 */
.detail-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid #f0f0f0; }

/* 评论区 */
.comments { margin-top: 40px; padding-top: 24px; border-top: 2px solid #f0f0f0; }
.comments-title { font-size: 20px; color: #2c3e50; margin-bottom: 18px; }
.comment-form { margin-bottom: 28px; }
.comment-form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.comment-form-row input { flex: 1; }
.comment-form input, .comment-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #dcdfe6;
    border-radius: 8px; font-size: 14px; box-sizing: border-box;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--theme); }
.comment-form textarea { resize: vertical; margin-bottom: 10px; }
.comment-form-actions { display: flex; align-items: center; justify-content: space-between; }
.comment-msg { font-size: 13px; color: #909399; }
.comment-list { list-style: none; padding: 0; }
.comment-item { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.comment-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.comment-nick { font-weight: 600; color: #2c3e50; font-size: 14px; }
.comment-time { color: #c0c4cc; font-size: 12px; }
.comment-body { color: #5a6672; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.comment-empty { color: #909399; font-size: 14px; padding: 12px 0; }

/* 相册页 */
.album-main { max-width: 1040px; margin: 30px auto; padding: 0 20px; }
.album-page-title { font-size: 28px; color: #2c3e50; margin-bottom: 8px; font-weight: 700; }
.album-desc { color: #909399; font-size: 14px; margin-bottom: 20px; }
.album-back { color: #909399; font-size: 14px; text-decoration: none; display: inline-block; margin-bottom: 10px; }
.album-back:hover { color: var(--theme); }

/* 相册网格 */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; margin-top: 20px; }
.album-card {
    position: relative; text-decoration: none; border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06); background: #fff;
    transition: transform .2s, box-shadow .2s;
}
.album-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.album-cover {
    aspect-ratio: 4/3; background-size: cover; background-position: center;
    background-color: #f2f3f5; position: relative;
}
.album-cover::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.45) 100%);
    opacity: 0; transition: opacity .2s;
}
.album-card:hover .album-cover::after { opacity: 1; }
.album-card-info {
    padding: 12px 16px; display: flex; flex-direction: column; gap: 4px;
}
.album-card-info h3 { font-size: 16px; color: #2c3e50; margin: 0; font-weight: 600; }
.album-card-info .album-card-date {
    font-size: 12px; color: #c0c4cc;
}

/* 照片墙 */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 20px; }
.photo-item {
    position: relative; cursor: pointer; border-radius: 10px; overflow: hidden;
    aspect-ratio: 1; background: #f2f3f5; box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.photo-item::after {
    content: '🔍'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 22px; background: rgba(0,0,0,.35); color: #fff; opacity: 0; transition: opacity .2s;
}
.photo-item:hover img { transform: scale(1.08); }
.photo-item:hover::after { opacity: 1; }

/* 灯箱 */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 999; }
.lightbox img { max-width: 90%; max-height: 82%; border-radius: 8px; box-shadow: 0 4px 40px rgba(0,0,0,.6); }
.lightbox-caption { color: #eee; margin-top: 16px; font-size: 14px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 32px; cursor: pointer; line-height: 1; }
.lightbox-close:hover { color: var(--theme); }
.lightbox { opacity: 0; transition: opacity .2s; }
.lightbox.open { opacity: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; border-radius: 50%; cursor: pointer; line-height: 1; z-index: 1; }
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-prev { left: 28px; }
.lightbox-next { right: 28px; }
@media (max-width: 640px) { .lightbox-prev { left: 10px; } .lightbox-next { right: 10px; } .lightbox-nav { width: 40px; height: 40px; font-size: 24px; } }

/* 评论回复(楼中楼) */
.comment-actions { margin-top: 4px; }
.comment-reply-btn {
    border: none; background: transparent; color: #909399; cursor: pointer;
    font-size: 12px; padding: 2px 0;
}
.comment-reply-btn:hover { color: var(--theme); }
.reply-box {
    margin: 12px 0 6px;
    padding: 16px;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border: 1px solid #ebeef5;
    border-left: 3px solid var(--theme);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.reply-box .comment-form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.reply-box .comment-form-row input { flex: 1; }
.reply-box input,
.reply-box textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.reply-box input:focus,
.reply-box textarea:focus {
    outline: none;
    border-color: var(--theme);
    box-shadow: 0 0 0 3px rgba(245,108,108,.12);
}
.reply-box textarea { resize: vertical; margin-bottom: 10px; }
.reply-box .comment-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.reply-box .rMsg { font-size: 13px; color: #909399; margin-right: auto; }
.reply-box .btn-primary {
    padding: 7px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(245,108,108,.25);
}
.comment-replies { list-style: none; margin: 10px 0 0; padding-left: 20px; border-left: 2px solid #f0f0f0; }
.comment-item.is-reply { padding: 10px 0; border-bottom: none; }
.comment-author-badge {
    display: inline-block; background: var(--theme); color: #fff;
    font-size: 11px; padding: 1px 7px; border-radius: 9px; margin-left: 8px;
}

/* 顶部社交链接 */
.social-links { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.social-link {
    font-size: 12px; color: #5a6672; text-decoration: none;
    padding: 4px 10px; border: 1px solid #e4e7ed; border-radius: 14px;
    transition: all .15s; white-space: nowrap;
}
.social-link:hover { color: #fff; background: var(--theme); border-color: var(--theme); }

/* 视频页 */
.video-main { padding: 30px 0 60px; }
.video-hero {
    text-align: center; padding: 40px 20px 36px;
    background: linear-gradient(135deg, var(--color-tag-bg) 0%, var(--color-tag-bg) 100%);
    border-radius: 16px; margin-bottom: 32px;
}
.video-hero-tag {
    display: inline-block; background: var(--theme); color: #fff;
    font-size: 12px; padding: 3px 12px; border-radius: 12px; margin-bottom: 14px;
}
.video-page-title { font-size: 28px; color: #2c3e50; margin: 0 0 10px; }
.video-page-sub { color: #7a8699; font-size: 15px; margin: 0; }
.video-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.video-card {
    background: #fff; border: 1px solid #ebeef5; border-radius: 12px;
    overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.video-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.video-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #f2f3f5; }
.video-card-body { padding: 14px 16px; }
.video-card-title { font-size: 15px; color: #2c3e50; margin: 0 0 6px; font-weight: 600; }
.video-card-meta { font-size: 12px; color: #a0a6ad; }

/* 作者卡-创作进度统计 */
.author-stats {
    display: flex; justify-content: space-around; margin-top: 16px;
    padding-top: 16px; border-top: 1px solid #f0f0f0;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--theme); line-height: 1; }
.stat-label { font-size: 12px; color: #a0a6ad; }

/* ===== 相册详情: 轮播 + 照片列表(仿 jspang) ===== */
.album-detail-meta { display: flex; gap: 16px; color: #909399; font-size: 14px; margin: 8px 0; }
.album-detail-meta span::before { content: ''; }

/* 大图轮播 */
.album-carousel { margin: 20px 0 32px; }
.carousel-stage {
    position: relative; width: 100%; aspect-ratio: 16/9; max-height: 520px;
    background: #1a1a1a; border-radius: 14px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
}
.carousel-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.carousel-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: #fff; font-size: 14px; padding: 30px 20px 14px; text-align: center;
}
.carousel-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border: none; border-radius: 50%;
    background: rgba(0,0,0,.4); color: #fff; font-size: 28px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.carousel-nav:hover { background: rgba(245,108,108,.85); }
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }
.carousel-controls {
    position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 12px;
}
.carousel-play {
    width: 34px; height: 34px; border: none; border-radius: 50%;
    background: rgba(0,0,0,.45); color: #fff; cursor: pointer; font-size: 13px;
}
.carousel-play:hover { background: rgba(245,108,108,.85); }
.carousel-counter {
    background: rgba(0,0,0,.45); color: #fff; font-size: 13px;
    padding: 5px 12px; border-radius: 14px;
}

/* 照片列表标题 */
.photo-list-title {
    font-size: 20px; color: #2c3e50; font-weight: 700; margin: 24px 0 16px;
    padding-left: 12px; border-left: 4px solid var(--theme);
}
/* 缩略图带说明 + 选中态 */
.photo-item-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5); color: #fff; font-size: 12px; padding: 4px 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.photo-item.active { outline: 3px solid var(--theme); outline-offset: -3px; }

/* 相册列表卡: 封面角标 + 日期 */
.album-cover { position: relative; }
.album-cover-count {
    position: absolute; right: 10px; top: 10px;
    background: rgba(0,0,0,.55); color: #fff; font-size: 12px;
    padding: 3px 10px; border-radius: 12px; backdrop-filter: blur(2px);
}
.album-card-date { font-size: 12px; color: #c0c4cc; }

/* ===== 相册留言 ===== */
.album-comments { margin-top: 36px; padding-top: 8px; }
.album-comment-form {
    background: #fafbfc; border: 1px solid #ebeef5; border-radius: 12px; padding: 16px; margin-bottom: 20px;
}
.album-comment-form .acf-row { display: flex; gap: 12px; margin-bottom: 12px; }
.album-comment-form .acf-row input { flex: 1; }
.album-comment-form input,
.album-comment-form textarea {
    width: 100%; padding: 9px 12px; border: 1px solid #dcdfe6; border-radius: 8px;
    font-size: 14px; box-sizing: border-box; background: #fff;
    transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.album-comment-form input:focus,
.album-comment-form textarea:focus {
    outline: none; border-color: var(--theme); box-shadow: 0 0 0 3px rgba(245,108,108,.12);
}
.album-comment-form textarea { resize: vertical; margin-bottom: 12px; }
.album-comment-form .acf-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.album-comment-form .acf-msg { font-size: 13px; color: #909399; margin-right: auto; }

.album-comment-list { list-style: none; padding: 0; margin: 0; }
.album-comment-list .ac-item { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.album-comment-list .ac-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.album-comment-list .ac-nick { font-weight: 600; color: #2c3e50; font-size: 14px; }
.album-comment-list .ac-time { font-size: 12px; color: #c0c4cc; }
.album-comment-list .ac-body { color: #5a6672; font-size: 14px; line-height: 1.7; }
.album-comment-list .ac-empty { color: #909399; font-size: 14px; padding: 12px 0; }

/* ===== 视频栏目墙(仿jspang) ===== */
.video-hero { margin-bottom: 24px; padding: 8px 0 0; background: none; border-radius: 0; text-align: left; }
.video-hero .video-hero-tag {
    display: inline-block; background: none; color: #b0b4bb; padding: 0;
    font-size: 12px; letter-spacing: 1.5px; margin-bottom: 6px; font-weight: 600;
}
.video-hero .video-page-title { font-size: 26px; margin: 0 0 6px; text-align: left; }
.video-hero .video-page-sub { color: #909399; font-size: 14px; margin: 0; text-align: left; }
.video-series-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .video-series-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-series-grid { grid-template-columns: 1fr; } }
.video-series-card {
    display: block; text-decoration: none; background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s;
}
.video-series-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.vsc-cover { position: relative; aspect-ratio: 16/9; background-size: cover; background-position: center; background-color: #f2f3f5; }
.vsc-count {
    position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.6); color: #fff;
    font-size: 12px; padding: 3px 10px; border-radius: 12px; backdrop-filter: blur(2px);
}
.vsc-info { padding: 14px 16px; }
.vsc-name { font-size: 17px; color: #2c3e50; font-weight: 700; margin: 0 0 8px; }
.vsc-desc { font-size: 13px; color: #7a8699; margin: 0 0 10px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vsc-meta { display: flex; align-items: center; justify-content: space-between; }
.vsc-eps { font-size: 12px; color: var(--theme); background: var(--color-tag-bg); padding: 3px 10px; border-radius: 10px; }
.vsc-dur { font-size: 13px; color: #909399; font-variant-numeric: tabular-nums; }

/* 栏目详情 */
.video-detail-head { display: flex; gap: 20px; margin-bottom: 10px; align-items: flex-start; }
.video-detail-cover { flex-shrink: 0; width: 240px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #f2f3f5; }
.video-detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-detail-info { flex: 1; min-width: 0; }
.video-detail-meta { color: #909399; font-size: 14px; margin-top: 6px; }
.vl-count { font-size: 13px; color: #909399; font-weight: normal; margin-left: 8px; }
@media (max-width: 640px) { .video-detail-head { flex-direction: column; } .video-detail-cover { width: 100%; } }

/* 集数列表 */
.episode-list { list-style: none; padding: 0; margin: 16px 0 0; }
.episode-item { border-bottom: 1px solid #f0f0f0; }
.episode-item a {
    display: flex; align-items: center; gap: 14px; padding: 14px 8px;
    text-decoration: none; color: #2c3e50; transition: background .15s;
}
.episode-item a:hover { background: #fafbfc; }
.episode-item a:hover .ep-title { color: var(--theme); }
.ep-num { font-size: 14px; font-weight: 700; color: #c0c4cc; min-width: 28px; }
.ep-title { flex: 1; font-size: 15px; }
.ep-dur { font-size: 13px; color: #909399; }

/* ===== 工具栏页 ===== */
.tools-page { padding: 32px 20px 60px; }
.tools-title { font-size: 26px; color: #2c3e50; margin-bottom: 6px; }
.tools-desc { color: #909399; font-size: 14px; margin-bottom: 24px; }
.tools-layout { display: flex; gap: 24px; align-items: flex-start; }
.tools-nav { flex: 0 0 200px; padding: 20px; }
.tools-nav ul { list-style: none; }
.tools-nav a {
    display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px;
    color: #5a6672; transition: background .15s, color .15s;
}
.tools-nav a:hover, .tools-nav a.active {
    background: var(--color-tag-bg); color: var(--color-primary); font-weight: 600;
}
.tool-panel { flex: 1; min-width: 0; padding: 24px; }
.tool-panel-title { font-size: 20px; margin-bottom: 8px; }
.tool-panel-desc { font-size: 14px; color: #909399; margin-bottom: 20px; line-height: 1.6; }
.tool-panel-desc code {
    font-size: 13px; background: #f5f6f8; padding: 2px 6px; border-radius: 4px;
    color: var(--color-primary); word-break: break-all;
}
.tool-settings {
    margin-bottom: 20px; border: 1px solid var(--color-border); border-radius: 8px;
    background: #fafbfc;
}
.tool-settings-summary {
    padding: 12px 16px; font-size: 14px; font-weight: 600; color: #5a6672;
    cursor: pointer; user-select: none; list-style: none;
}
.tool-settings-summary::-webkit-details-marker { display: none; }
.tool-settings-badge {
    display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 500; color: var(--color-primary);
    background: var(--color-tag-bg); vertical-align: middle;
}
.tool-cache-note {
    font-size: 12px; color: #909399; margin-bottom: 14px; padding: 8px 10px;
    background: #fff; border-radius: 6px; border: 1px dashed var(--color-border); line-height: 1.5;
}
.tool-settings-body { padding: 0 16px 16px; }
.tool-setting-item { margin-bottom: 16px; }
.tool-setting-item:last-of-type { margin-bottom: 12px; }
.tool-hint { font-size: 12px; color: #909399; margin: 4px 0 8px; line-height: 1.5; }
.tool-textarea-sm { min-height: 72px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tool-setting-row { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 12px; }
.tool-check { font-size: 13px; color: #5a6672; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tool-settings-actions { display: flex; align-items: center; gap: 12px; }
.tool-btn-sm { padding: 5px 14px; font-size: 13px; }
.tool-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tool-label-row .tool-label { margin-bottom: 0; }
.tool-count {
    font-size: 12px; font-weight: 600; color: var(--color-primary);
    background: var(--color-tag-bg); padding: 2px 10px; border-radius: 10px;
}
.tool-stats {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
    margin-bottom: 16px; padding: 10px 14px; background: #fafbfc;
    border: 1px solid var(--color-border); border-radius: 8px; font-size: 13px; color: #5a6672;
}
.tool-stat strong { color: var(--color-primary); font-size: 15px; margin: 0 2px; }
.tool-stat-sep { color: #c0c4cc; }
.tool-stat-muted { color: #909399; font-size: 12px; }
.tool-io { display: flex; gap: 20px; margin-bottom: 12px; }
.tool-io-col { flex: 1; min-width: 0; }
.tool-label { display: block; font-size: 13px; font-weight: 600; color: #5a6672; margin-bottom: 8px; }
.tool-textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--color-border);
    border-radius: 8px; font-size: 14px; line-height: 1.6; font-family: inherit;
    resize: vertical; transition: border-color .15s, box-shadow .15s;
}
.tool-textarea:focus {
    outline: none; border-color: var(--theme);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme) 15%, transparent);
}
.tool-textarea-readonly { background: #fafbfc; color: #2c3e50; }
.tool-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tool-status { font-size: 13px; color: #909399; }
.tool-btns { display: flex; gap: 10px; }
.tool-btn {
    padding: 8px 20px; border-radius: 8px; font-size: 14px; cursor: pointer;
    border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.tool-btn-primary {
    background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
.tool-btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.tool-btn-ghost { background: #fff; color: #5a6672; border-color: var(--color-border); }
.tool-btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
@media (max-width: 768px) {
    .tools-layout { flex-direction: column; }
    .tools-nav { flex: none; width: 100%; }
    .tool-io { flex-direction: column; }
}
