/* esoushe.com - 仿 esoua.com 界面 */
* { margin: 0; padding: 0; box-sizing: border-box; }
/* 深色主题(默认,仿主站) */
:root {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-soft: rgba(129, 140, 248, 0.12);
    --primary-border: rgba(129, 140, 248, 0.35);
    --bg: #0a0a0a;
    --card-bg: #121212;
    --card-muted: #1b1b1b;
    --text: #d4d4d8;
    --text-strong: #fafafa;
    --text-dim: #a1a1aa;
    --text-faint: #71717a;
    --border: #26262a;
    --border-soft: rgba(255, 255, 255, 0.09);
    --input-bg: #1b1b1b;
    --header-bg: #101014;
    --hover-overlay: rgba(255, 255, 255, 0.06);
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    --radius: 8px;
    color-scheme: dark;
}
/* 浅色主题(仿主站) */
:root[data-theme='light'] {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-soft: rgba(79, 70, 229, 0.08);
    --primary-border: rgba(79, 70, 229, 0.3);
    --bg: #fafaf9;
    --card-bg: #ffffff;
    --card-muted: #f4f4f5;
    --text: #52525b;
    --text-strong: #09090b;
    --text-dim: #71717a;
    --text-faint: #a1a1aa;
    --border: #e4e4e7;
    --border-soft: rgba(24, 24, 27, 0.08);
    --input-bg: #ffffff;
    --header-bg: #ffffff;
    --hover-overlay: rgba(0, 0, 0, 0.04);
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
    color-scheme: light;
}
body {
    font-family: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    transition: background .3s, color .3s;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: #38bdf8; }
.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 20px; }
.logo { font-size: 20px; font-weight: 700; color: var(--text); }
.logo:hover { color: var(--primary); }
.main-nav { display: flex; gap: 16px; }
.main-nav a { color: var(--text-dim); font-size: 14px; }
.main-nav a:hover { color: var(--primary); }
.header-right { margin-left: auto; flex: 1; max-width: 480px; }
/* 顶部快捷导航卡片:精品资源/社区交流/站点公告(纯文字,无图标无描述) */
.header-nav { display: flex; align-items: center; gap: 8px; margin-left: 16px; }
.header-nav-card {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    white-space: nowrap;
    transition: all .18s ease;
}
.header-nav-card:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-soft);
}
.theme-toggle {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .3s;
}
.theme-toggle:hover { border-color: var(--primary); }
.main-nav { display: flex; gap: 16px; margin-left: 16px; }
.main-nav a { color: var(--text-dim); font-size: 14px; text-decoration: none; }
.main-nav a:hover { color: var(--primary); }
.header-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-user-name { font-size: 14px; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-user-avatar { font-size: 16px; line-height: 1; }
.header-user-link { font-size: 14px; color: var(--primary); text-decoration: none; }
.header-user-link:hover { text-decoration: underline; }
.header-user-reg { color: var(--primary); }
.search-form { display: flex; gap: 0; }
.search-form input {
    flex: 1;
    padding: 9px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text);
    font-size: 14px;
    outline: none;
}
.search-form input:focus { border-color: var(--primary); }
.search-form button {
    padding: 9px 20px;
    background: var(--primary);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.search-form button:hover { background: var(--primary-dark); }

/* Hero */
.hero-section { text-align: center; padding: 120px 0 24px; }
.hero-title { font-size: 36px; margin-bottom: 12px; }
.hero-desc { color: var(--text-dim); font-size: 16px; margin-bottom: 30px; }
/* 搜索框(完全仿主站 HomeSearchBox) */
.hero-search { width: 100%; max-width: 42rem; margin: 0 auto 30px; }
.hero-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--input-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color .12s, box-shadow .12s;
}
:root[data-theme="light"] .hero-search-box { box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03); }
.hero-search-box:focus-within {
    border-color: var(--primary-border);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-icon {
    color: var(--text-faint);
    flex-shrink: 0;
    display: flex;
}
.hero-search-box input {
    min-width: 0;
    height: 2.5rem;
    font-size: 16px;
    color: var(--text);
    background: transparent;
    border: none;
    outline: none;
    flex: 1;
}
.hero-search-box input::placeholder { color: var(--text-faint); }
.hero-search-box button {
    border-radius: 999px;
    background: var(--primary);
    width: 2.625rem;
    height: 2.625rem;
    min-height: 2.625rem;
    color: var(--primary-contrast, #fff);
    cursor: pointer;
    transition: background .12s;
    border: none;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}
.hero-search-box button:hover { background: var(--primary-dark); }
/* 深色主题下按钮图标色(主站 accent-contrast #08070f) */
:root[data-theme="dark"] .hero-search-box button { color: #08070f; }
.hot-tags { color: var(--text-dim); font-size: 14px; }
.hot-tags a { margin: 0 6px; color: var(--text-dim); }
.hot-tags a:hover { color: var(--primary); }

/* Nav tabs(仿 esoua.com) */
.nav-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    padding: 8px 0 0;
}
.nav-tabs .tab {
    padding: 10px 22px;
    color: var(--text-dim);
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.nav-tabs .tab:hover { color: var(--primary); }
.nav-tabs .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.friend-links .links-wrap { display: flex; flex-wrap: wrap; gap: 12px; }
.friend-links .links-wrap a {
    color: var(--text-dim);
    font-size: 13px;
    text-decoration: none;
    transition: color .2s;
}
.friend-links .links-wrap a:hover { color: var(--primary); text-decoration: underline; }

/* Sections */
.section { margin: 30px 0; }
.section.friend-links { margin-top: 24px; }
.site-footer .friend-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.site-footer .friend-label {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.friend-icon { flex-shrink: 0; opacity: .8; }
.site-footer .links-wrap { justify-content: center; }
.section-title { font-size: 20px; margin-bottom: 16px; padding-left: 12px; border-left: 4px solid var(--primary); }
.notice-banner { background: #1a2a3a; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 20px; margin: 20px 0; }
.notice-banner a { color: var(--warning); font-size: 14px; }

/* Disk cards */
.disk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.disk-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color .2s;
}
.disk-card:hover { border-color: var(--primary); }
.disk-name {
    color: var(--text);
    font-size: 15px;
    display: block;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.disk-name:hover { color: var(--primary); }
.disk-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.share-user { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Type badges */
.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.type-quark { background: #7c3aed22; color: #a78bfa; border: 1px solid #7c3aed55; }
.type-bdy { background: #2563eb22; color: #93c5fd; border: 1px solid #2563eb55; }
.type-aly { background: #dc262622; color: #fca5a5; border: 1px solid #dc262655; }
.type-xunlei { background: #05966922; color: #6ee7b7; border: 1px solid #05966955; }
.type-uc { background: #d9770622; color: #fcd34d; border: 1px solid #d9770655; }

/* Search results */
.result-header { margin: 30px 0 20px; }
.result-title { font-size: 24px; margin-bottom: 8px; }
.result-count { color: var(--text-dim); font-size: 14px; }
.result-list { display: flex; flex-direction: column; gap: 12px; }

/* ===== 达人页 ===== */
.talent-page { padding: 10px 0 40px; }
.talent-header { text-align: center; padding: 20px 0 8px; }
.talent-title { font-size: 24px; margin-bottom: 6px; }
.talent-search { max-width: 620px; margin: 12px auto 24px; }
.talent-search-form { display: flex; gap: 8px; }
.talent-search-input {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text);
    outline: none;
}
.talent-search-input:focus { border-color: var(--primary, #2170ff); }
.talent-search-btn {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--primary, #2170ff);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}
.talent-search-btn:hover { opacity: 0.9; }
@media (max-width: 768px) {
    .talent-search { margin: 10px 12px 18px; }
    .talent-search-input { padding: 9px 12px; font-size: 13px; }
    .talent-search-btn { padding: 9px 16px; font-size: 13px; }
}

.result-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.result-name { font-size: 16px; color: var(--text); font-weight: 500; }
.result-name:hover { color: var(--primary); }
.result-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 13px; }
.disk-size { color: var(--text-dim); }
.result-files { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.file-tag {
    background: var(--card-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--text-dim);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 30px 0; }
.pagination a {
    padding: 8px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.page-info { color: var(--text-dim); font-size: 14px; }

/* Detail */
.detail-header { margin: 30px 0 20px; }
.detail-title { font-size: 26px; margin-bottom: 10px; word-break: break-all; }
.detail-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-dim); flex-wrap: wrap; }
.detail-body { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.link-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.link-box h3, .file-list h3, .related-box h3, .side-box h3 { font-size: 15px; margin-bottom: 12px; }
/* SEO 优化:资源信息/文件目录标题用 H2(h3 样式同步) */
.info-box h2.info-title, .file-list h2.file-title { font-size: 15px; margin-bottom: 12px; }
.action-links { display: flex; gap: 14px; flex-wrap: wrap; }
.action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
}
.action-link:hover { border-color: var(--primary); background: rgba(14, 165, 233, 0.08); }
.action-icon { font-style: normal; font-size: 15px; }
.pass-row { font-size: 14px; margin-top: 12px; }
.transfer-box { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.btn-transfer {
    padding: 10px 24px;
    background: linear-gradient(135deg, #7c3aed, #0ea5e9);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn-transfer:hover { opacity: .9; }
.btn-transfer:disabled { opacity: .5; cursor: not-allowed; }
.transfer-status { margin-left: 12px; font-size: 13px; color: var(--text-dim); }
.transfer-result { margin-top: 10px; font-size: 13px; }
.transfer-result a { color: var(--success); }

.file-list, .related-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.file-list ul {
    list-style: none;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 8px;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: #6b7280 transparent;
}
.file-list ul::-webkit-scrollbar { width: 8px; }
.file-list ul::-webkit-scrollbar-track { background: transparent; }
.file-list ul::-webkit-scrollbar-thumb { background: #52525b; border-radius: 4px; }
.file-list ul::-webkit-scrollbar-thumb:hover { background: #6b7280; }
.file-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-dim);
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 6px;
}
.file-icon { flex-shrink: 0; }

/* 资源信息表 */
.info-qr-row { display: flex; align-items: stretch; gap: 0; }
.info-qr-box {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 10px 12px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    line-height: 1.2;
    min-width: 132px;
}
.info-qr-img { display: block; width: 112px; height: 112px; }
.info-qr-text { color: #333; font-size: 12px; font-weight: 600; margin: 0; white-space: nowrap; }

.info-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.info-box h3 { font-size: 15px; margin-bottom: 12px; }
.info-box h2.info-title { font-size: 15px; margin-bottom: 12px; }
.info-table { width: 85%; border-collapse: collapse; font-size: 14px; }
.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 10px 8px; white-space: nowrap; }
.info-label {
    width: 110px;
    color: var(--text-dim);
    font-size: 13px;
    white-space: nowrap;
}
.info-value { color: var(--text); }
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}
.status-valid { color: var(--success); background-color: color-mix(in srgb, var(--success) 15%, transparent); border: 1px solid color-mix(in srgb, var(--success) 45%, transparent); }
.status-invalid { color: var(--danger); background-color: color-mix(in srgb, var(--danger) 15%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.status-checking { color: var(--info); background-color: color-mix(in srgb, var(--info) 15%, transparent); border: 1px solid color-mix(in srgb, var(--info) 45%, transparent); }
.status-pending { color: var(--warning); background-color: color-mix(in srgb, var(--warning) 15%, transparent); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); }
.spinner-icon { font-style: normal; font-size: 12px; }
.spin {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-top-color: var(--info);
    border-radius: 50%;
    animation: status-spin 0.8s linear infinite;
}
@keyframes status-spin { to { transform: rotate(360deg); } }
.share-user-link { color: var(--success); text-decoration: none; }
.share-user-link:hover { text-decoration: underline; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-item { font-size: 14px; }

.side-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}
.side-box a { display: block; padding: 6px 0; font-size: 13px; color: var(--text-dim); }
.side-box a:hover { color: var(--primary); }
.tip-text { font-size: 13px; color: var(--text-dim); }

/* 侧边栏资源链接(最新入库/热门资源/相似推荐) */
.side-links { display: flex; flex-direction: column; gap: 4px; }
.side-link {
    display: block;
    padding: 7px 0;
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.side-link:hover { color: var(--primary); }
.side-empty { font-size: 13px; color: var(--text-dim); padding: 6px 0; display: block; }

/* 移动端专用区块:桌面隐藏,移动显示在文件目录下方 */
.detail-side-mobile { display: none; }
@media (max-width: 768px) {
    .detail-side-mobile { display: block; margin-top: 20px; }
    .detail-side { display: none; }
}

/* Empty/error */
.empty-box, .error-box {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.empty-box h1 { color: var(--text); margin-bottom: 12px; }
.error-box { color: #fca5a5; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}

/* Admin */
.admin-login-box { max-width: 400px; margin: 60px auto; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.admin-login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.admin-login-form input { padding: 10px 14px; background: var(--header-bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.admin-login-form button { padding: 10px; background: var(--primary); border: none; border-radius: var(--radius); color: #fff; cursor: pointer; }
.admin-panel { max-width: 800px; margin: 40px auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.stat-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-item span { display: block; color: var(--text-dim); font-size: 13px; }
.stat-item strong { display: block; font-size: 24px; margin-top: 8px; }

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; }
    .header-right { max-width: 100%; order: 3; flex-basis: 100%; }
    /* 登录/用户名+头像固定在顶部最右端(theme-toggle 在左侧) */
    .header-user { margin-left: auto; order: 4; flex-shrink: 0; gap: 6px; }
    .header-user-name { font-size: 13px; max-width: 80px; }
    .theme-toggle { order: 3; flex-shrink: 0; width: 34px; height: 34px; }
    .logo { flex-shrink: 0; }
    .logo-pic { height: 30px; }
    /* 顶部快捷导航卡片:移动端整行居中(放最后,logo/切换/登录保持首行) */
    .header-nav { order: 5; flex-basis: 100%; justify-content: center; gap: 6px; margin-left: 0; }
    .header-nav-card { padding: 4px 14px; font-size: 13px; }
    .detail-body { grid-template-columns: 1fr; }
    .disk-grid { grid-template-columns: 1fr; }

    /* 移动端:hero 上移,标题/搜索框更紧凑 */
    .hero-section { padding: 50px 0 14px; }
    .hero-title { font-size: 28px; margin-bottom: 8px; }
    .hero-desc { font-size: 14px; margin-bottom: 20px; }
    .hero-search { margin: 0 auto 20px; }
    .section.friend-links { margin-top: 20px; }

    /* 移动端资源信息:二维码缩小、去空白、表格文字不换行 */
    .info-qr-row { gap: 10px; }
    .info-qr-box { padding: 6px 6px 8px; gap: 6px; min-width: 104px; }
    .info-qr-img { width: 88px; height: 88px; }
    .info-qr-text { font-size: 10px; }
    .info-box { padding: 14px; }
    .info-table { font-size: 12px; }
    .info-table td { padding: 8px 4px; }
    .info-label { width: 72px; font-size: 12px; white-space: nowrap; }
    .info-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .status-pill { font-size: 11px; padding: 1px 6px; white-space: nowrap; }
    .share-user-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; vertical-align: bottom; }
}

/* 搜索筛选栏(仿主站:可折叠) */
.filter-bar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}
.filter-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text);
    transition: background .2s;
}
.filter-header:hover { background: rgba(14,165,233,.06); }
.filter-header-icon { font-style: normal; font-size: 15px; }
.filter-header-title { font-weight: 600; }
.filter-header-arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-dim);
    transition: transform .2s;
}
.filter-strip { padding: 0 18px 14px; border-top: 1px solid var(--border); }
.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px 0;
}
.filter-row + .filter-row { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.filter-label {
    color: var(--text-dim);
    font-size: 13px;
    margin-right: 8px;
    white-space: nowrap;
}
.filter-item {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    transition: all .2s;
}
.filter-item:hover { color: var(--primary); }
.filter-item.active {
    background: rgba(14,165,233,.12);
    color: var(--primary);
    font-weight: 600;
}
.filter-sep { width: 1px; height: 16px; background: var(--border); margin: 0 8px; }

/* 搜索页顶部搜索框与统计 */
.search-top { padding-top: 40px; }
.search-top .hero-search { margin: 0 auto 8px; }
.search-result-text {
    font-size: 14px;
    color: var(--text-dim);
    margin: 0 0 16px;
    text-align: left;
}
.search-result-text strong { color: var(--text-strong); font-weight: 600; }
.search-result-text .hl-keyword { color: var(--primary); }

/* 搜索关键词高亮(仿主站 em class=h) */
em.h {
    color: #f59e0b;
    font-style: normal;    font-weight: 600;
}

/* ===== 文章板块 ===== */
.article-page { padding: 24px 0 40px; }
.article-header { text-align: center; margin-bottom: 32px; }
.article-page-title { font-size: 30px; color: var(--text-strong); margin-bottom: 8px; }
.article-page-desc { color: var(--text-dim); font-size: 15px; }
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.article-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s, transform .2s;
    text-decoration: none;
    color: var(--text);
}
.article-card:hover { border-color: var(--primary-border); transform: translateY(-2px); }
.article-cover img { width: 100%; height: 170px; object-fit: cover; display: block; }
.article-card-body { padding: 16px; }
.article-card-title { font-size: 17px; color: var(--text-strong); margin-bottom: 8px; line-height: 1.4; }
.article-card-summary {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}
.article-card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-faint); }
.article-cat {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.article-date { color: var(--text-faint); }
.article-views { color: var(--text-faint); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 32px; }
.page-btn {
    padding: 8px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-info { color: var(--text-dim); font-size: 14px; }

/* 文章详情页 */
.article-detail {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 0 48px;
}
.article-detail-header { margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.article-detail-title { font-size: 30px; color: var(--text-strong); line-height: 1.4; margin-bottom: 12px; }
.article-detail-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-faint); }
.article-detail-summary {
    background: var(--card-muted);
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}
.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text);
    word-break: break-word;
}
.article-content h2, .article-content h3 {
    color: var(--text-strong);
    margin: 24px 0 12px;
    line-height: 1.4;
}
.article-content h2 { font-size: 22px; }
.article-content h3 { font-size: 18px; }
.article-content p { margin-bottom: 16px; }
.article-content img { max-width: 100%; border-radius: var(--radius); }
.article-content a { color: var(--primary); }
.article-content ul, .article-content ol { margin: 0 0 16px 24px; }
.article-content blockquote {
    border-left: 3px solid var(--primary);
    background: var(--card-muted);
    padding: 12px 16px;
    color: var(--text-dim);
    margin: 16px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}
/* 文章正文:资源文件目录块(带类型图标) */
.art-file-list {
    list-style: none !important;
    margin: 12px 0 16px !important;
    padding: 14px 18px !important;
    background: var(--card-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 320px;
    overflow-y: auto;
}
.art-file-list li {
    padding: 5px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
    color: var(--text-dim);
    word-break: break-all;
}
.art-file-list li:last-child { border-bottom: none; }
.art-file-list .file-icon { margin-right: 6px; }
.art-file-more { font-size: 12px; color: var(--text-faint); margin: 8px 0 0; }
.article-content code {
    background: var(--card-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}
.article-content pre {
    background: var(--card-muted);
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 16px 0;
}
.article-back { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.article-back a { color: var(--primary); font-size: 14px; text-decoration: none; }
.article-back a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .article-grid { grid-template-columns: 1fr; }
    .article-detail-title { font-size: 22px; }
    .article-content { font-size: 15px; }
}

/* ===== 移动端滚动适配(全局兜底:防横向溢出/页面回弹/iOS缩放) ===== */
html, body { max-width: 100%; overflow-x: hidden; }
/* 注意:overscroll-behavior-y:contain 在部分手机浏览器(Edge/WebView)会冻结整页滚动,已移除 */
img, video, iframe, canvas, embed, object { max-width: 100%; height: auto; }
table { max-width: 100%; }
pre { max-width: 100%; overflow-x: auto; }
a, button, input[type="submit"], select, textarea { touch-action: manipulation; }
.file-list ul { -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
    .container { padding-left: 16px; padding-right: 16px; }
    input, select, textarea { font-size: 16px; }
    .hero-search { padding: 0 4px; }
    .result-name, .disk-name, .file-tag, .pagination a { overflow-wrap: break-word; }
}
/* ===== LOGO 图片 ===== */
.logo-img { display: inline-flex; align-items: center; gap: 8px; }
.logo-pic { height: 38px; width: auto; display: block; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--text); white-space: nowrap; }
.logo-text:hover { color: var(--primary); }
@media (max-width: 768px) {
    .logo-pic { height: 32px; }
    .logo-text { font-size: 17px; }
}
/* ===== 资源详情:操作按钮(复制/转存/分享)对齐二维码下方 ===== */
.info-qr-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-top: 6px;
    padding-top: 0;
    border-top: none;
    flex: 1;
    min-height: 0;
    justify-content: center;
}
.info-qr-actions .action-link {
    width: 100%;
    justify-content: center;
    padding: 7px 8px;
    font-size: 13px;
    gap: 5px;
    white-space: nowrap;
    flex: 1;
}
/* 资源已禁用:灰色不可点击占位(无超链接) */
.info-qr-actions .action-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 7px 8px;
    font-size: 13px;
    white-space: nowrap;
    flex: 1;
    color: #999;
    background: #f2f2f2;
    border: 1px dashed #d5d5d5;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}
.info-qr-pass { color: #333; font-size: 12px; font-weight: 600; margin: 2px 0 0; white-space: nowrap; }
@media (max-width: 768px) {
    .info-qr-actions { gap: 4px; margin-top: 6px; padding-top: 0; }
    .info-qr-actions .action-link { padding: 6px 4px; font-size: 11px; gap: 3px; flex: none; }
    .info-qr-actions .action-disabled { padding: 6px 4px; font-size: 11px; gap: 3px; flex: none; }
    .info-qr-pass { font-size: 10px; }
}
/* ===== 资源详情:资源标签 ===== */
.info-value-tags { white-space: normal; overflow: visible; }
.tag-pills {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
}
.tag-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 45%, transparent);
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}
a.tag-pill:hover {
    background: var(--success);
    color: #ffffff;
    border-color: var(--success);
}
/* 表格单元格宽度固定:标签不撑开方框,超出横向滚动 */
.info-table td.info-value-tags {
    max-width: 0;
    width: auto;
    overflow: hidden;
}
/* ===== 移动端:资源标签保持一行(超出横向滑动) ===== */
@media (max-width: 768px) {
    .info-value-tags { white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tag-pills {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .tag-pills::-webkit-scrollbar { display: none; }
    .tag-pill { flex-shrink: 0; }
}
/* ===== 首页 hero 标题 LOGO ===== */
.hero-title { display: flex; align-items: center; justify-content: center; gap: 12px; }
.hero-logo { height: 42px; width: auto; display: block; }
@media (max-width: 768px) {
    .hero-title { gap: 8px; }
    .hero-logo { height: 32px; }
}
/* ===== 搜索页推荐位 ===== */
.search-rec-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 16px;
    background: var(--card-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
}
.search-rec-wrap-bottom { margin-top: 16px; margin-bottom: 0; }
.search-rec-label { font-size: 12px; color: var(--text-faint); flex-shrink: 0; }
.search-rec {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    line-height: 1.5;
}
.search-rec:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }
/* ===== 首页广告位 ===== */
.home-top-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.home-top-link { font-size: 13px; color: var(--text-dim); text-decoration: none; }
.home-top-link:hover { color: var(--primary); }
.home-quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0;
    margin: 14px 0 0;
    background: transparent;
    border: none;
    border-radius: 0;
    position: relative;
    z-index: 5;
}
.home-quick-links .home-quick-link {
    font-size: 14px;
    color: var(--text-dim);
    text-decoration: none;
    background: var(--card-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 12px;
    line-height: 1.6;
    white-space: nowrap;
    transition: all .18s ease;
}
.home-quick-links .home-quick-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-soft);
    text-decoration: none;
}
/* 首页中部广告:移动端自适应(缩小间距/内边距/字号,多链接换行居中) */
@media (max-width: 768px) {
    .home-quick-links { gap: 10px; padding: 0; margin: 10px 0 0; width: 100%; }
    .home-quick-links .home-quick-link { font-size: 13px; padding: 3px 10px; }
}
/* 搜索页推荐条:移动端每个推荐独占一行(竖排) */
@media (max-width: 768px) {
    .search-rec-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 12px;
    }
    .search-rec { font-size: 13px; line-height: 1.5; padding: 2px 10px; }
}
/* ===== 搜索页顶部推荐:仿搜索结果卡片 ===== */
.rec-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.rec-result-item { padding: 14px 16px; }
.rec-result-title-row { display: flex; align-items: center; gap: 10px; }
.rec-tag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
}
.rec-result-title { font-size: 15px; }
.rec-result-url {
    color: var(--text-faint);
    font-size: 12px;
    word-break: break-all;
}
/* ===== 首页最新/热门资源 ===== */
.home-resources {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));  /* 强制三列等宽,长内容不撑宽列 */
    gap: 16px;
    margin-top: 6px;         /* 减小与上方广告的距离 */
    max-width: 980px;        /* 收窄容器宽度 */
    margin-left: auto;
    margin-right: auto;
}
.home-res-block {
    min-width: 0;            /* 允许子元素缩略,防止被内容撑宽 */
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.home-res-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.home-res-list { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.home-res-item {
    display: block;          /* 纯链接列表 */
    min-width: 0;
    padding: 6px 4px;
    border-radius: 6px;
    text-decoration: none;
    transition: background .15s;
}
.home-res-item:hover { background: var(--primary-soft); }
.home-res-name {
    display: block;
    min-width: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    /* 单行缩略:文字多时省略号截断,不换行 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 768px) {
    .home-resources { grid-template-columns: 1fr; gap: 14px; margin-top: 4px; max-width: 100%; }
    .home-res-block { padding: 12px 14px; }
    .home-res-name { font-size: 13px; }
}
/* ===== SEO H1(文章列表/搜索页) ===== */
.art-page-h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
    line-height: 1.3;
}
.search-result-h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
    line-height: 1.3;
}
.search-result-h1 .hl-keyword { color: var(--primary); }
@media (max-width: 768px) {
    .art-page-h1 { font-size: 18px; margin-bottom: 10px; }
    .search-result-h1 { font-size: 16px; }
}
/* ===== 404 页面 ===== */
.notfound-box { text-align: center; padding: 60px 20px; }
.notfound-box h1 { font-size: 32px; color: var(--text); margin-bottom: 12px; }
.notfound-box p { color: var(--text-faint); margin: 6px 0; }
.notfound-tip { margin-top: 18px !important; }
.notfound-search {
    display: flex; justify-content: center; gap: 8px;
    max-width: 480px; margin: 14px auto;
}
.notfound-input {
    flex: 1; padding: 10px 14px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--card-bg);
    color: var(--text); font-size: 14px;
}
.notfound-btn {
    padding: 10px 20px; border-radius: 8px; border: none;
    background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer;
}
.notfound-actions { display: flex; justify-content: center; gap: 16px; margin-top: 22px; }
.notfound-link {
    padding: 8px 16px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--card-bg);
    color: var(--primary); font-size: 14px; text-decoration: none;
}
.notfound-link:hover { border-color: var(--primary); }
@media (max-width: 768px) {
    .notfound-box { padding: 40px 14px; }
    .notfound-box h1 { font-size: 24px; }
    .notfound-actions { flex-wrap: wrap; gap: 10px; }
}
/* ===== 404 页最新/热门资源 ===== */
.notfound-resources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 900px;
    margin: 30px auto 10px;
    padding: 0 20px;
    text-align: left;
}
.notfound-res-block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.notfound-res-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.notfound-res-list { display: flex; flex-direction: column; gap: 3px; }
.notfound-res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 6px;
    text-decoration: none;
}
.notfound-res-item:hover { background: var(--primary-soft); }
.notfound-res-name {
    flex: 1;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notfound-res-meta {
    flex-shrink: 0;
    min-width: 60px;      /* 固定宽度,类型标签右对齐 */
    text-align: right;
    font-size: 11px;
    color: var(--text-faint);
    white-space: nowrap;
}
@media (max-width: 768px) {
    .notfound-resources { grid-template-columns: 1fr; gap: 12px; margin-top: 20px; padding: 0 14px; }
    .notfound-res-block { padding: 12px 14px; }
}

/* ===== 界面美化增强(2026-08-27) ===== */

/* 1. 背景微光渐变:告别纯色生硬感(深色/浅色各自适配) */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 500px;
    background: radial-gradient(ellipse at 50% 0%, var(--primary-soft) 0%, rgba(0,0,0,0) 60%);
    pointer-events: none;
    z-index: 0;
}
:root[data-theme='light'] body::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.08) 0%, rgba(0,0,0,0) 60%);
}
main { position: relative; z-index: 1; }
.site-header { position: relative; z-index: 100; }

/* 2. 卡片阴影 + 悬浮动效(资源区块/搜索结果/文章卡片/404资源) */
.home-res-block,
.result-item,
.article-card,
.notfound-res-block {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
:root[data-theme='light'] .home-res-block,
:root[data-theme='light'] .result-item,
:root[data-theme='light'] .article-card,
:root[data-theme='light'] .notfound-res-block {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.home-res-block:hover,
.result-item:hover,
.article-card:hover,
.notfound-res-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    border-color: var(--primary-border);
}
:root[data-theme='light'] .home-res-block:hover,
:root[data-theme='light'] .result-item:hover,
:root[data-theme='light'] .article-card:hover,
:root[data-theme='light'] .notfound-res-block:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* 3. 首页三列区块标题装饰:图标圆底 + 渐变分隔线 */
.home-res-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    position: relative;
}
.home-res-title::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-soft), rgba(0,0,0,0));
}

/* 4. hover 统一动效(链接/条目/分页/按钮) */
.home-res-item,
.result-name,
.pagination a,
.home-quick-link,
.friend-links a,
.article-card-title,
.detail-header a {
    transition: color .18s ease, background .18s ease, transform .18s ease, border-color .18s ease;
}
.home-res-item:hover { transform: translateX(2px); }
.result-item:hover .result-name { color: var(--primary); }

/* 5. 搜索框聚焦光晕增强 */
.hero-search-box:focus-within {
    box-shadow: 0 0 0 4px var(--primary-soft), 0 4px 14px rgba(0,0,0,0.2);
}

/* 6. 分页按钮柔和化 */
.pagination a {
    border-radius: 8px;
    transition: all .18s ease;
}
.pagination a:hover { transform: translateY(-1px); }

/* 7. 首页快捷入口(精品资源等)胶囊化(已恢复为广告标签样式,4px 圆角) */
.home-quick-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* 8. 移动端:卡片悬浮效果减弱(触屏无 hover,保留阴影层次即可) */
@media (max-width: 768px) {
    .home-res-block:hover,
    .result-item:hover,
    .article-card:hover,
    .notfound-res-block:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    }
    .home-res-item:hover { transform: none; }
}

/* ===== 第二梯队美化(2026-08-27) ===== */

/* 9. hero 标题渐变文字 */
.hero-title-text {
    background: linear-gradient(120deg, var(--primary) 0%, #22d3ee 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 1px;
}
@media (max-width: 768px) {
    .hero-title-text { font-size: 32px; }
}

/* 10. 首页资源条目:类型图标 */
.home-res-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 6px;
    border-radius: 8px;
}
.home-res-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--card-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.home-res-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 11. 首页热门文章:封面缩略图 */
.home-res-item-art { align-items: flex-start; gap: 10px; padding: 6px; }
.home-res-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--card-muted);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-res-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-res-thumb-empty { font-size: 16px; color: var(--text-faint); }
.home-res-art-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.home-res-cat {
    font-size: 11px;
    color: var(--text-faint);
    background: var(--card-muted);
    border-radius: 4px;
    padding: 1px 6px;
    align-self: flex-start;
}

/* 12. 搜索页结果条目:图标 */
.result-title-row { display: flex; align-items: center; gap: 10px; }
.result-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--card-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.result-title-row .result-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 13. 自定义滚动条 */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
    border: 2px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* 14. 移动端调整 */
@media (max-width: 768px) {
    .home-res-thumb { width: 48px; height: 34px; }
    .result-item-icon { width: 28px; height: 28px; font-size: 14px; }
}

/* 15. SEO 视觉隐藏:元素在 HTML 中保留(利于 SEO/屏幕阅读器),但视觉上不可见 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 16. 资源详情页快捷入口按钮(移动端热门资源下方) */
.detail-quick-nav {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.detail-quick-btn {
    flex: 1;
    min-width: 90px;
    text-align: center;
    padding: 10px 8px;
    font-size: 14px;
    color: var(--text-strong);
    background: var(--card-bg);
    border: 1px solid var(--primary-border);
    border-radius: 10px;
    text-decoration: none;
    transition: all .18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    white-space: nowrap;  /* 按钮文字不换行 */
}
.detail-quick-btn:hover {
    transform: translateY(-2px);
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
:root[data-theme='light'] .detail-quick-btn {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
@media (max-width: 768px) {
    .detail-quick-btn { padding: 9px 6px; font-size: 13px; min-width: 0; flex: 1 1 0; }
}

/* 桌面端侧边栏版本:竖排按钮(侧边栏较窄) */
.detail-quick-nav-side {
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}
.detail-quick-nav-side .detail-quick-btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 10px 12px;
    font-size: 14px;
    text-align: center;
    flex: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 首页 SEO 模块(热门分类导航 + 站内简介) ===== */
/* sr-only 隐藏时消除自带 margin/padding 的空白间隙(视觉完全不可见,HTML 保留供蜘蛛爬行) */
.home-cat-nav.sr-only,
.home-seo-desc.sr-only {
    margin: 0 !important;
    padding: 0 !important;
}
.home-cat-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 18px 0 4px;
    padding: 0;
}
.home-cat-link {
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    background: var(--card-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 16px;
    transition: all .18s ease;
}
.home-cat-link:hover { color: var(--primary); border-color: var(--primary); }
.home-seo-desc {
    max-width: 860px;
    margin: 26px auto 6px;
    padding: 0 16px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.9;
}
.home-seo-desc p { margin: 0; }
.home-seo-desc strong { color: var(--text); font-weight: 600; }
@media (max-width: 768px) {
    .home-cat-nav { gap: 8px; margin: 14px 0 2px; }
    .home-cat-link { font-size: 13px; padding: 5px 12px; }
    .home-seo-desc { font-size: 12px; line-height: 1.8; margin: 18px auto 4px; }
}

/* ===== 搜索页热词落地页内容段 ===== */
.search-seo-box {
    max-width: 860px;
    margin: 16px auto 4px;
    padding: 14px 18px;
    background: var(--card, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
}
.search-seo-intro {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-dim, #64748b);
}
.search-hot-words {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.search-hot-label {
    font-size: 13px;
    color: var(--text, #1a1a2e);
    font-weight: 600;
}
.search-hot-link {
    font-size: 12px;
    color: var(--primary, #0ea5e9);
    text-decoration: none;
    background: var(--card-muted, #f1f5f9);
    border-radius: 4px;
    padding: 3px 10px;
    line-height: 1.6;
    transition: all .18s ease;
}
.search-hot-link:hover { background: var(--primary, #0ea5e9); color: #fff; }
@media (max-width: 768px) {
    .search-seo-box { margin: 12px 8px 4px; padding: 12px 14px; }
    .search-seo-intro { font-size: 13px; line-height: 1.8; }
    .search-hot-link { font-size: 12px; padding: 3px 8px; }
}