/* ============================================================
   AIHub 导航主题 for Typecho
   卡片式 AI 工具导航 / SEO 友好 / 响应式
   ============================================================ */

:root {
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: rgba(0, 102, 255, .08);
    --text: #1d2129;
    --text-2: #4e5969;
    --text-3: #86909c;
    --bg: #f7f9fa;
    --card: #ffffff;
    --border: #eef0f3;
    --radius: 12px;
    --radius-s: 8px;
    --shadow: 0 2px 8px rgba(29, 33, 41, .04);
    --shadow-hover: 0 12px 32px rgba(0, 102, 255, .12);
    --header-h: 64px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; vertical-align: middle; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; font-size: 14px; outline: none; }

.wrapper { width: 1200px; max-width: calc(100% - 32px); margin: 0 auto; }

/* ============ 头部 & 头像 ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; height: var(--header-h); gap: 24px; }

.logo { display: flex; align-items: center; flex-shrink: 1; min-width: 0; font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.logo img { display: block; height: 36px; width: auto; }
.logo-ai { color: var(--primary); margin-right: 2px; flex-shrink: 0; }
.logo-hub {
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 300px; font-size: 19px;
}

.main-nav { flex: 1; min-width: 0; overflow: hidden; }
.main-nav ul { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-s);
    font-size: 15px;
    color: var(--text-2);
    white-space: nowrap;
}
.main-nav a:hover { color: var(--primary); background: var(--primary-light); }
.main-nav .current a { color: var(--primary); font-weight: 600; background: var(--primary-light); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-user .user-avatar { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); overflow: hidden; transition: border-color .2s; }
.header-user .user-avatar:hover { border-color: var(--primary); }
.header-user .user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 4px 2px 14px;
    transition: border-color .2s, box-shadow .2s;
}
.header-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); background: #fff; }
.header-search input { border: none; background: none; width: 140px; height: 30px; color: var(--text); }
.header-search button {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff;
    transition: background .2s;
}
.header-search button:hover { background: var(--primary-dark); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; background: #fff; border-bottom: 1px solid var(--border); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.blob.b1 { width: 420px; height: 420px; background: #dbeafe; top: -160px; left: -80px; }
.blob.b2 { width: 380px; height: 380px; background: #ede9fe; top: -100px; right: 5%; }
.blob.b3 { width: 300px; height: 300px; background: #cffafe; bottom: -160px; left: 40%; }

.hero-inner { position: relative; text-align: center; }
.hero-title {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.25;
    background: linear-gradient(120deg, #0066ff 10%, #7c3aed 55%, #00b8d9 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 16px;
}
.hero-desc { font-size: 17px; color: var(--text-2); margin-bottom: 32px; }

.hero-search {
    display: flex; align-items: center; gap: 8px;
    max-width: 560px; margin: 0 auto 24px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 6px 6px 6px 20px;
    color: var(--text-3);
    box-shadow: var(--shadow);
    transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.hero-search input { flex: 1; border: none; background: none; height: 38px; font-size: 15px; color: var(--text); min-width: 0; }
.hero-search button {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), #3385ff);
    color: #fff; font-size: 15px; font-weight: 600;
    height: 38px; padding: 0 28px; border-radius: 999px;
    transition: transform .2s, box-shadow .2s;
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 102, 255, .35); }

.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-tags a {
    font-size: 13px; color: var(--text-2);
    background: var(--bg); border: 1px solid var(--border);
    padding: 5px 14px; border-radius: 999px;
    transition: all .2s;
}
.hero-tags a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

/* ============ 分类区块 ============ */
.cat-section { padding: 40px 0 8px; }

.cat-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.cat-title { display: flex; align-items: center; font-size: 22px; font-weight: 700; }
.cat-dot {
    width: 6px; height: 22px; border-radius: 3px; margin-right: 10px;
    background: linear-gradient(180deg, var(--primary), #00b8d9);
}
.cat-count {
    font-style: normal; font-size: 12px; font-weight: 600;
    color: var(--primary); background: var(--primary-light);
    border-radius: 999px; padding: 2px 10px; margin-left: 10px;
}
.cat-desc { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.cat-more { display: flex; align-items: center; gap: 2px; font-size: 14px; color: var(--text-3); white-space: nowrap; }
.cat-more:hover { color: var(--primary); }

/* ============ AI工具 4栏大图卡片 ============ */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.tool-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s, border-color .25s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 102, 255, .35);
}

/* 大图区域 */
.tool-thumb {
    width: 100%;
    height: 160px;
    background: #f5f6fa;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}
.tool-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tool-card:hover .tool-thumb img { transform: scale(1.05); }
.tool-icon-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); color: #ccc;
    font-size: 40px; font-weight: bold;
}

.tool-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.tool-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tool-name {
    font-size: 15.5px; font-weight: 600; line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    overflow-wrap: anywhere;
    flex: 1;
}
.tool-date { font-size: 12px; color: var(--text-3); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }

.tool-badge {
    position: absolute; top: 12px; right: 12px;
    font-size: 11px; font-weight: 600;
    color: var(--primary); background: rgba(255,255,255,.9);
    border: 1px solid var(--primary-light);
    border-radius: 4px; padding: 2px 8px;
}
.tool-desc {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    overflow-wrap: anywhere;
    flex: 1;
    margin-bottom: 14px;
    min-height: 2.6em;
}
.tool-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border-top: 1px dashed var(--border);
    padding-top: 12px;
}
.tool-catname { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tool-go {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 13px; font-weight: 600; color: var(--primary);
    transition: gap .2s; flex-shrink: 0;
}
.tool-go:hover { gap: 6px; color: var(--primary-dark); }

/* ============ AI教程/资讯卡片加粗双栏 ============ */
.post-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.post-card {
    display: flex; flex-direction: column;
    background: var(--card);
    border: 2px solid #eaeaea; /* 加粗边框 */
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: rgba(0, 102, 255, .3); background: #fafcff; }

.post-card-thumb {
    width: 100%; height: 180px;
    border-radius: var(--radius-s);
    overflow: hidden;
    background: var(--bg);
    margin-bottom: 14px;
    flex-shrink: 0;
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }

.post-card-main { flex: 1; display: flex; flex-direction: column; }
.post-card-title {
    font-size: 18px; font-weight: 700; line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    overflow-wrap: anywhere;
}
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--primary); }
.post-card-desc {
    font-size: 13.5px; color: var(--text-2); line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    overflow-wrap: anywhere;
    flex: 1;
    margin-bottom: 12px;
}
.post-card-foot { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; border-top: 1px dashed var(--border); padding-top: 12px; }
.post-card-foot .sep { color: var(--border); }
.post-card-cat { color: var(--primary); }

/* ============ 面包屑 ============ */
.page-body { padding: 28px 0 56px; }
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--primary); }
.crumb-current { color: var(--text-2); }

/* ============ 归档页 ============ */
.archive-head { margin-bottom: 24px; }
.archive-title { font-size: 28px; font-weight: 800; }
.archive-desc { color: var(--text-2); margin-top: 8px; font-size: 14px; }

/* ============ 文章详情 ============ */
.post-detail { max-width: 860px; margin: 0 auto; }

.post-header-card {
    display: flex; align-items: center; gap: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.post-header-card .post-ico,
.post-header-card .tool-ico { width: 72px; height: 72px; border-radius: 18px; }
.post-header-card .tool-ico-letter { font-size: 34px; }
.post-header-card .tool-ico-emoji { font-size: 38px; }
.post-header-info { flex: 1; min-width: 200px; }
.post-title { font-size: 26px; font-weight: 800; line-height: 1.35; margin-bottom: 8px; word-break: break-all; overflow-wrap: anywhere; }
.post-sub { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-sub .sep { color: var(--border); }
.post-sub a { color: var(--primary); }

.visit-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--primary), #3385ff);
    color: #fff !important;
    font-size: 15px; font-weight: 600;
    padding: 12px 28px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(0, 102, 255, .3);
    transition: transform .2s, box-shadow .2s;
}
.visit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 102, 255, .4); }

.page-header-card { justify-content: center; text-align: center; }

.post-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    font-size: 15.5px;
    line-height: 1.9;
    color: var(--text);
    word-wrap: break-word;
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { margin: 1.4em 0 .6em; line-height: 1.4; font-weight: 700; }
.post-content h2 { font-size: 22px; padding-left: 12px; border-left: 4px solid var(--primary); }
.post-content h3 { font-size: 18px; }
.post-content p { margin-bottom: 1em; }
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-content img { border-radius: var(--radius-s); margin: 8px 0; }
.post-content ul, .post-content ol { padding-left: 1.6em; margin-bottom: 1em; }
.post-content ul li { list-style: disc; }
.post-content ol li { list-style: decimal; }
.post-content blockquote {
    margin: 1em 0; padding: 14px 18px;
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-s) var(--radius-s) 0;
    color: var(--text-2);
}
.post-content code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    background: #f2f3f5;
    padding: 2px 6px;
    border-radius: 4px;
}
.post-content pre {
    background: #282c34; color: #abb2bf;
    padding: 16px 18px; border-radius: var(--radius-s);
    overflow-x: auto; margin-bottom: 1em;
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1em; font-size: 14px; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.post-content th { background: var(--bg); }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

.post-footer { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.post-tags a {
    display: inline-block;
    font-size: 12.5px; color: var(--text-2);
    background: #fff; border: 1px solid var(--border);
    border-radius: 999px; padding: 4px 14px; margin-right: 8px;
    transition: all .2s;
}
.post-tags a:hover { color: var(--primary); border-color: var(--primary); }
.post-update { font-size: 12.5px; color: var(--text-3); }

/* ============ 相关推荐 ============ */
.related-section { margin-top: 48px; }
.related-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; }
.related-title::before { content: ""; width: 6px; height: 20px; border-radius: 3px; margin-right: 10px; background: linear-gradient(180deg, var(--primary), #00b8d9); }
.related-section .tool-grid { grid-template-columns: repeat(3, 1fr); }

/* ============ 评论 ============ */
.comments-area { max-width: 860px; margin: 48px auto 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.comments-title, .respond-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.comment-list { list-style: none; }
.comment-item { display: flex; gap: 12px; padding: 16px 0; }
.comment-avatar img { width: 44px; height: 44px; border-radius: 50%; }
.comment-main { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.comment-author { font-weight: 600; font-size: 14px; }
.comment-by-author .comment-author::after { content: "作者"; font-size: 11px; color: #fff; background: var(--primary); border-radius: 4px; padding: 1px 6px; margin-left: 6px; font-weight: 400; }
.comment-date { color: var(--text-3); }
.comment-reply a { color: var(--primary); font-size: 13px; }
.comment-text { font-size: 14.5px; color: var(--text); line-height: 1.7; }
.comment-text p { margin-bottom: .5em; }
.comment-awaiting { color: #f97316; font-size: 13px; }
.comment-children { margin-left: 56px; border-left: 2px solid var(--border); padding-left: 16px; }
.comment-pagination { margin-top: 8px; }

.respond { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 24px; }
.cancel-comment-reply { text-align: right; font-size: 13px; }
.cancel-comment-reply a { color: #ef4444; }
.comment-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.comment-fields input, .respond textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    background: var(--bg);
    padding: 10px 14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.comment-fields input:focus, .respond textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-light); }
.respond textarea { resize: vertical; margin-bottom: 14px; }
.submit {
    background: linear-gradient(135deg, var(--primary), #3385ff);
    color: #fff; font-size: 14.5px; font-weight: 600;
    padding: 10px 32px; border-radius: 999px;
    transition: transform .2s, box-shadow .2s;
}
.submit:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 102, 255, .35); }
.comment-login { font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; }
.comment-login a { color: var(--primary); }
.comment-closed { color: var(--text-3); font-size: 14px; }

/* ============ 分页 ============ */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 36px 0 12px; flex-wrap: wrap; }
.pagination li { display: inline-block; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-s);
    font-size: 14px; color: var(--text-2);
    transition: all .2s;
}
.pagination a:hover { color: var(--primary); border-color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ============ 空状态 / 404 ============ */
.empty-box { text-align: center; padding: 64px 0; }
.empty-box > p { color: var(--text-3); margin-bottom: 24px; }
.nf-code { font-size: 88px !important; font-weight: 800; line-height: 1; background: linear-gradient(120deg, var(--primary), #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent !important; margin-bottom: 8px !important; }
.nf-text { font-size: 17px; color: var(--text-2) !important; }
.nf-home { display: inline-block; margin-top: 20px; color: var(--primary); font-weight: 600; }
.empty-box .hero-search { margin-bottom: 0; }

/* ============ 页脚 ============ */
.site-footer { background: #161b26; color: #9aa4b8; margin-top: 48px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 48px 0 36px;
}
.footer-logo { font-size: 22px; margin-bottom: 12px; }
.footer-logo .logo-hub { color: #fff; }
.footer-desc { font-size: 13.5px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #9aa4b8; font-size: 13.5px; transition: color .2s; display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer-col a:hover { color: #fff; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.footer-bottom a { color: #9aa4b8; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .sep { margin: 0 8px; opacity: .4; }

/* ============ 返回顶部 ============ */
.back-top {
    position: fixed; right: 24px; bottom: 32px; z-index: 90;
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; color: var(--text-2);
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(29, 33, 41, .12);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: all .3s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { color: var(--primary); border-color: var(--primary); }

/* ============ 入场动画 ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.tool-card { animation: fadeUp .5s ease both; }
.tool-grid > .tool-card:nth-child(2) { animation-delay: .05s; }
.tool-grid > .tool-card:nth-child(3) { animation-delay: .1s; }
.tool-grid > .tool-card:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) {
    .tool-card { animation: none; }
    html { scroll-behavior: auto; }
}

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
    .tool-grid { grid-template-columns: repeat(3, 1fr); }
    .related-section .tool-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
    .post-list { grid-template-columns: 1fr; } /* 教程双栏在平板上改为一栏更好看 */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 860px) {
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
    .related-section .tool-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 52px 0 44px; }
    .hero-title { font-size: 32px; }
    .hero-desc { font-size: 15px; }
    .header-search input { width: 100px; }
    .post-content { padding: 24px 20px; }
    .logo-hub { max-width: 200px; }
}
@media (max-width: 640px) {
    .header-search { display: none; }
    .nav-toggle { display: flex; flex-shrink: 0; }
    .main-nav {
        position: absolute;
        top: var(--header-h); left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(29, 33, 41, .08);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .main-nav.open { max-height: 480px; }
    .main-nav ul { flex-direction: column; padding: 12px 16px 16px; gap: 2px; overflow: visible; }
    .main-nav a { padding: 10px 14px; }
    .tool-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .tool-thumb { height: 120px; }
    .tool-body { padding: 14px; }
    .tool-ico { width: 40px; height: 40px; border-radius: 10px; }
    .tool-name { font-size: 14.5px; }
    .hero-title { font-size: 26px; }
    .hero-search button { padding: 0 18px; }
    .post-header-card { padding: 20px; gap: 14px; }
    .post-header-card .post-ico, .post-header-card .tool-ico { width: 56px; height: 56px; border-radius: 14px; }
    .post-title { font-size: 20px; word-break: break-all; overflow-wrap: anywhere; }
    .visit-btn { width: 100%; justify-content: center; }
    .comment-fields { grid-template-columns: 1fr; }
    .comment-children { margin-left: 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 36px 0 24px; }
    .footer-bottom-inner { justify-content: center; text-align: center; }
    .related-section .tool-grid { grid-template-columns: 1fr; }
    .cat-title { font-size: 19px; }
    .archive-title { font-size: 23px; word-break: break-all; overflow-wrap: anywhere; }
    .post-card { padding: 16px; }
    .post-card-thumb { height: 140px; }
    .post-card-title { font-size: 15.5px; -webkit-line-clamp: 2; }
    .logo-hub { max-width: 150px; font-size: 17px; }
}

/* ============ 无图情况下占位符样式 ============ */
.tool-icon-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f0f3f7, #e5e8ef);
    color: #cdd2d9;
    font-size: 42px; font-weight: bold;
}

.post-card-thumb {
    position: relative;
    background: var(--bg);
    border-radius: var(--radius-s);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.post-card-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}
.post-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #eef2f7;
    color: #b0b7c5;
    font-size: 38px; font-weight: bold;
    position: absolute; inset: 0;
}
.post-card-thumb img:not([src=""]) + .post-card-placeholder {
    display: none; /* 如果图片加载成功，隐藏占位块 */
}