/* 博客列表 + 文章详情排版（沿用官网深色主题变量） */

/* ─── 列表页 ─── */
.blog-container { max-width: 860px; margin: 0 auto; }
.blog-sec { padding-top: 108px; }

.blog-empty { color: var(--txt2); font-size: 0.95rem; padding: 40px 0; }

/* 分类 Tab */
.blog-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-item {
    padding: 6px 14px; border-radius: 100px; font-size: 0.82rem; font-weight: 600;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--txt2);
    transition: all 0.2s;
}
.cat-item:hover { border-color: var(--border-hover); color: var(--txt); }
.cat-item.current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 分类徽标 */
.cat-badge {
    display: inline-block; padding: 2px 9px; border-radius: 100px;
    font-size: 0.7rem; font-weight: 600;
    background: var(--blue-dim); color: var(--blue);
    border: 1px solid rgba(255, 92, 157, 0.18);
}
a.cat-badge:hover { background: rgba(255, 92, 157, 0.18); }

.blog-list { display: flex; flex-direction: column; gap: 14px; }

.blog-card {
    display: grid; grid-template-columns: 220px 1fr; gap: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden; transition: all 0.25s;
}
.blog-card:hover {
    background: var(--bg-card-hover); border-color: var(--border-hover);
    transform: translateY(-2px);
}
.blog-card:not(:has(.blog-card-cover)) { grid-template-columns: 1fr; }

.blog-card-cover { background: #120b18; min-height: 100%; }
.blog-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.blog-card-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.blog-card-body h2 {
    font-size: 1.1rem; font-weight: 700; letter-spacing: -0.3px; line-height: 1.35;
}
.blog-card-body p {
    color: var(--txt2); font-size: 0.87rem; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-meta {
    margin-top: auto; padding-top: 10px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.76rem; color: var(--txt3);
}
.blog-card-meta > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.blog-card-more { color: var(--blue); font-weight: 600; }

/* 分页 */
.blog-pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.pager-item {
    min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 600;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--txt2);
    transition: all 0.2s;
}
.pager-item:hover { border-color: var(--border-hover); color: var(--txt); }
.pager-item.current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ─── FAQ 专区（手风琴 + 搜索） ─── */
.faq-search { margin-bottom: 16px; }
.faq-search input {
    width: 100%; padding: 12px 18px; border-radius: 12px; font-size: 0.92rem;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--txt);
    font-family: inherit; transition: border-color 0.2s;
}
.faq-search input:focus { outline: none; border-color: var(--blue); }
.faq-search input::placeholder { color: var(--txt3); }
.faq-search-empty { display: block; margin-top: 14px; color: var(--txt3); font-size: 0.88rem; }
.faq-search-empty[hidden] { display: none; }

.faq-acc { display: flex; flex-direction: column; gap: 10px; }
.faq-acc-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; transition: border-color 0.2s;
}
.faq-acc-item:hover { border-color: var(--border-hover); }
.faq-acc-item summary {
    padding: 16px 20px; font-weight: 600; font-size: 0.95rem;
    cursor: pointer; list-style: none; display: flex;
    align-items: center; justify-content: space-between; gap: 12px;
}
.faq-acc-item summary::-webkit-details-marker { display: none; }
.faq-acc-item summary::after {
    content: '+'; font-family: 'Outfit', sans-serif; font-size: 1.15rem;
    font-weight: 300; color: var(--txt3); flex-shrink: 0; transition: transform 0.2s;
}
.faq-acc-item[open] summary::after { transform: rotate(45deg); }
.faq-acc-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-acc-body {
    padding: 16px 20px; color: var(--txt2); font-size: 0.9rem; line-height: 1.75;
}
.faq-acc-body > * + * { margin-top: 0.8em; }
.faq-acc-body a { color: var(--blue); }
.faq-acc-body a:hover { text-decoration: underline; }
.faq-acc-body img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); }
.faq-acc-body ul, .faq-acc-body ol { padding-left: 1.4em; }
.faq-acc-body li { margin-top: 0.35em; }
.faq-acc-body code {
    font-family: 'JetBrains Mono', monospace; font-size: 0.85em;
    background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 5px;
}
.faq-acc-body pre {
    background: #120b18; border: 1px solid var(--border); border-radius: 10px;
    padding: 14px; overflow-x: auto;
}
.faq-acc-body pre code { background: none; padding: 0; }
.faq-acc-link { margin-top: 10px; }
.faq-acc-link a { font-weight: 600; font-size: 0.85rem; }

/* 首页 FAQ「查看全部」 */
.faq-more { margin-top: 20px; text-align: center; }

/* ─── 详情页 ─── */
.article-container { max-width: 900px; margin: 0 auto; }

.article-breadcrumb { margin-bottom: 20px; }
.article-breadcrumb a { color: var(--txt2); font-size: 0.86rem; font-weight: 500; transition: color 0.2s; }
.article-breadcrumb a:hover { color: var(--blue); }

.article-head h1 {
    font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800;
    letter-spacing: -0.6px; line-height: 1.25; margin-bottom: 12px;
}
.article-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; color: var(--txt3); margin-bottom: 24px;
}

.article-cover {
    border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
    margin-bottom: 28px; background: #120b18;
}
.article-cover img { display: block; width: 100%; height: auto; }

/* 正文排版 */
.article-body { color: var(--txt); font-size: 0.98rem; line-height: 1.85; }
.article-body > * + * { margin-top: 1em; }
.article-body h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.4px; margin-top: 2em; line-height: 1.3; }
.article-body h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.2px; margin-top: 1.6em; }
.article-body h4 { font-size: 1rem; font-weight: 700; margin-top: 1.4em; }
.article-body p { color: var(--txt2); }
.article-body strong { color: var(--txt); }
.article-body a { color: var(--blue); }
.article-body a:hover { text-decoration: underline; }
.article-body img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); }
.article-body ul, .article-body ol { padding-left: 1.4em; color: var(--txt2); }
.article-body li { margin-top: 0.4em; }
.article-body blockquote {
    border-left: 3px solid var(--blue); padding: 8px 18px; border-radius: 0 10px 10px 0;
    background: var(--blue-dim); color: var(--txt2); font-style: italic;
}
.article-body code {
    font-family: 'JetBrains Mono', monospace; font-size: 0.85em;
    background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 5px;
}
.article-body pre {
    background: #120b18; border: 1px solid var(--border); border-radius: 10px;
    padding: 16px; overflow-x: auto;
}
.article-body pre code { background: none; padding: 0; font-size: 0.82rem; line-height: 1.7; }
.article-body table {
    width: 100%; border-collapse: collapse; font-size: 0.88rem;
    border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.article-body th, .article-body td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.article-body th { background: rgba(255,255,255,0.04); font-weight: 700; }
.article-body td { color: var(--txt2); }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* 上一篇/下一篇 */
.article-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border);
}
.article-nav-item {
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px 18px; border-radius: 10px;
    background: var(--bg-card); border: 1px solid var(--border);
    transition: all 0.2s;
}
.article-nav-item:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.article-nav-item.empty { background: none; border: none; pointer-events: none; }
.article-nav-item small { font-size: 0.72rem; color: var(--txt3); }
.article-nav-item span { font-size: 0.88rem; font-weight: 600; line-height: 1.4; }
.article-nav-item.next { text-align: right; }

/* 相关文章/相关问题（站内内链） */
.article-related {
    margin-top: 28px; padding: 20px 22px; border-radius: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
}
.article-related h2 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.article-related ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.article-related li { position: relative; padding-left: 16px; }
.article-related li::before {
    content: ''; position: absolute; left: 0; top: 0.55em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
}
.article-related a { color: var(--txt2); font-size: 0.9rem; line-height: 1.6; transition: color 0.2s; }
.article-related a:hover { color: var(--blue); }

/* 响应式 */
@media (max-width: 768px) {
    .blog-sec { padding-top: 92px; }
    .blog-card { grid-template-columns: 1fr; }
    .blog-card-cover { max-height: 180px; }
    .article-nav { grid-template-columns: 1fr; }
    .article-nav-item.next { text-align: left; }
}
