/* ==========================================================================
   JQ 插件库 - 网站首页样式
   纯静态 CSS，无外部字体/CDN；严格 CSP 下运行。
   ========================================================================== */

:root {
    --site-bg: #f2f4f7;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #7b8794;
    --line: #e3e7ec;
    --dark: #20262c;
    --dark-2: #2b3239;
    --accent: #e86f43;
    --accent-dark: #d85f33;
    --link: #3d8bd9;
    --link-dark: #2f6fae;
    --radius: 4px;
    --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

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

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--site-bg);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
    margin: 0;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.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;
}

::selection {
    background: rgba(61, 139, 217, .20);
}

/* 顶部导航 */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #1b2025;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1200px, calc(100% - 40px));
    height: 55px;
    margin: 0 auto;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #f8fafc;
    flex: 0 0 auto;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 7px;
    background: linear-gradient(135deg, #4f8edb, #26b3c9);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.logo-text {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .5px;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topnav a {
    padding: 7px 11px;
    border-radius: 4px;
    color: #aab4bf;
    font-size: 12.5px;
    transition: color .15s ease, background .15s ease;
}

.topnav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.topnav a.active {
    color: #fff;
    background: rgba(61, 139, 217, .22);
}

/* 首屏 */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    padding: 54px 20px 58px;
    background: #151a20;
    color: #fff;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg-frame {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
    opacity: .82;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 50% 20%, rgba(12, 18, 26, .08), transparent 52%),
        linear-gradient(180deg, rgba(9, 13, 18, .72), rgba(9, 13, 18, .58));
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
}

.hero h1 {
    font-size: clamp(34px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 400;
    letter-spacing: -.02em;
    color: #f8fafc;
}

.hero p {
    margin-top: 12px;
    color: #aab3bc;
    font-size: 13.5px;
}

.hero-search {
    display: flex;
    width: min(640px, 100%);
    height: 52px;
    margin: 26px auto 0;
    border-radius: 2px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0 18px;
    color: var(--text);
    background: #fff;
    outline: none;
    font-size: 14px;
}

.hero-search input::placeholder {
    color: #a0a8b1;
}

.hero-search button {
    flex: 0 0 128px;
    border: 0;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s ease;
}

.hero-search button:hover {
    background: var(--accent-dark);
}

.search-hint {
    margin-top: 12px;
    color: #cdd6df;
    font-size: 12.5px;
}

/* 分类条 */
.category-nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.category-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    width: min(1200px, calc(100% - 40px));
    height: 50px;
    margin: 0 auto;
}

.category-inner a {
    color: #5b6672;
    font-size: 13px;
    transition: color .15s ease;
}

.category-inner a:hover {
    color: var(--link);
}

.category-note {
    margin-left: auto;
    color: #9aa4ae;
    font-size: 11.5px;
}

/* 内容区 */
.page {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 26px 0 48px;
}

.content-section {
    margin-bottom: 34px;
    scroll-margin-top: 72px;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin-bottom: 14px;
}

.code-mark {
    color: #9aa4ae;
    font-family: Consolas, "Cascadia Code", monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -1px;
}

.section-head h2 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.section-head h2 small {
    margin-left: 4px;
    color: #9aa4ae;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .1px;
}

.section-link {
    margin-left: auto;
    color: #9aa4ae;
    font-size: 12px;
}

.section-link:hover {
    color: var(--link);
}

.show-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.show-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 210px;
    min-height: 42px;
    padding: 9px 26px;
    border: 1px solid #d5dce3;
    border-radius: 3px;
    background: #fff;
    color: #5b6672;
    font-size: 13px;
    font-weight: 500;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.show-more-button:hover {
    border-color: #b7c5d3;
    background: #fbfdff;
    color: #2f6fae;
}

.show-more-button span {
    font-size: 16px;
    line-height: 1;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

/* 卡片 */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e1e6eb;
    border-radius: var(--radius);
    background: var(--surface);
    transition: box-shadow .18s ease, transform .18s ease;
}

.card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--radius);
}

.card-overlay:focus-visible {
    outline: 3px solid rgba(61, 139, 217, .45);
    outline-offset: -3px;
}

.card:hover {
    box-shadow: 0 12px 28px rgba(31, 41, 55, .10);
    transform: translateY(-2px);
}

.card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .025) 0 50%, transparent 50% 100%),
        linear-gradient(145deg, #101419, #181d23);
    color: #d6dde5;
    font-size: 12.5px;
    letter-spacing: .08em;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 13px 0;
}

.card-category {
    display: block;
    overflow: hidden;
    color: #3d8bd9;
    font-size: 11.5px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 3px;
    color: #27313b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 37px;
    margin-top: 5px;
    color: #88939e;
    font-size: 12px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    padding: 8px 0 9px;
    border-top: 1px solid #eef1f4;
    color: #9aa4ae;
    font-size: 11px;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-icon {
    color: #b6bec7;
    font-size: 12px;
    line-height: 1;
}

.download {
    margin-left: auto;
    color: #b6bec7;
    font-size: 13px;
}

.card:hover .download {
    color: var(--link);
}

.empty {
    padding: 30px;
    border: 1px dashed #d5dbe2;
    border-radius: var(--radius);
    background: #fafbfc;
    color: #9aa4ae;
    text-align: center;
    font-size: 13px;
}

.load-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #f0c7bd;
    border-radius: var(--radius);
    background: #fff6f3;
    color: #a9442c;
    font-size: 13px;
}

/* 详情页 */
.detail-wrap {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0 48px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #9aa4ae;
    font-size: 12px;
}

.breadcrumb a {
    color: #6c7884;
}

.breadcrumb a:hover {
    color: var(--link);
}

.breadcrumb span:last-child {
    overflow: hidden;
    max-width: 480px;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #7b8794;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 22px;
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
}

.detail-heading,
.browser-row,
.detail-actions,
.detail-panel,
.related-section,
.comments-section {
    border: 1px solid #e1e6eb;
    border-radius: var(--radius);
    background: #fff;
}

.detail-heading {
    padding: 20px 22px;
}

.detail-category {
    color: #9aa4ae;
    font-size: 12px;
}

.detail-heading h1 {
    margin-top: 7px;
    color: #26313b;
    font-size: clamp(22px, 2.4vw, 29px);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -.02em;
}

.detail-stats {
    display: flex;
    align-items: center;
    gap: 17px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: #88939e;
    font-size: 12px;
}

.detail-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.detail-stats span > span {
    color: #b6bec7;
}

.detail-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .025) 0 50%, transparent 50% 100%),
        linear-gradient(145deg, #101419, #181d23);
    color: #d6dde5;
    font-size: 14px;
    letter-spacing: .08em;
}

.browser-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 11px 16px;
}

.browser-note {
    color: #9aa4ae;
    font-size: 12px;
}

.browser-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6f7b86;
    font-size: 12px;
}

.browser-chip i {
    color: #3fa66a;
    font-style: normal;
    font-weight: 700;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 14px 16px;
}

.site-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 15px;
    border: 1px solid #d5dce3;
    border-radius: 3px;
    background: #fff;
    color: #5b6672;
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

a.site-button:hover {
    border-color: var(--link);
    color: var(--link);
}

.site-button.primary {
    border-color: #42a86b;
    background: #42a86b;
    color: #fff;
}

.site-button.primary:hover {
    background: #348d58;
}

.site-button.download-button {
    border-color: #e3aaa2;
    background: #e45b47;
    color: #fff;
}

.site-button.download-button:hover {
    background: #c94f3d;
}

.site-button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.detail-note {
    color: #9aa4ae;
    font-size: 11.5px;
}

.detail-panel {
    padding: 22px;
    color: #46515c;
    font-size: 13.5px;
    line-height: 1.85;
}

.detail-panel h2 {
    margin: 0 0 9px;
    color: #2a343e;
    font-size: 16px;
    font-weight: 600;
}

.detail-panel h2:not(:first-child) {
    margin-top: 22px;
}

.detail-desc {
    color: #6f7b86;
    font-size: 13px;
    line-height: 1.8;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: 3px;
    background: #f7f9fb;
}

.detail-meta div {
    display: flex;
    gap: 8px;
    font-size: 12.5px;
}

.detail-meta dt {
    color: #9aa4ae;
}

.detail-meta dd {
    margin: 0;
    color: #52606d;
}

.rich-content {
    overflow-wrap: anywhere;
    color: #46515c;
    font-size: 13.5px;
    line-height: 1.9;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
    margin: 20px 0 8px;
    color: #2a343e;
    font-weight: 600;
    line-height: 1.4;
}

.rich-content h3 {
    font-size: 15px;
}

.rich-content h4 {
    font-size: 14px;
}

.rich-content p {
    margin: 8px 0;
}

.rich-content ul,
.rich-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.rich-content a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.rich-content blockquote {
    margin: 10px 0;
    padding: 8px 14px;
    border-left: 3px solid #d5dce3;
    background: #f8fafc;
    color: #6f7b86;
}

.rich-content pre {
    overflow-x: auto;
    margin: 10px 0;
    padding: 13px 15px;
    border: 1px solid #e5eaf0;
    border-radius: 3px;
    background: #f6f8fa;
    color: #34404b;
    font-family: Consolas, "Cascadia Code", "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.code-block {
    position: relative;
    margin: 12px 0;
}

.code-block pre {
    margin: 0;
    padding-right: 84px;
}

.copy-code-button {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    min-height: 27px;
    padding: 3px 9px;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    background: rgba(255, 255, 255, .94);
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.copy-code-button:hover {
    border-color: #9fc3e5;
    background: #fff;
    color: #2563a7;
}

.copy-code-button.copied {
    border-color: #a7d7b9;
    background: #ecfdf3;
    color: #15803d;
}

.copy-fallback {
    position: fixed;
    left: -9999px;
    top: 0;
    opacity: 0;
}

.rich-content code {
    padding: 1px 5px;
    border-radius: 3px;
    background: #f1f4f7;
    color: #34404b;
    font-family: Consolas, "Cascadia Code", monospace;
    font-size: 12.5px;
}

.detail-keywords {
    margin-top: 16px;
    color: #9aa4ae;
    font-size: 12px;
}

.prev-next {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
}

.prev-next a {
    display: grid;
    gap: 4px;
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e1e6eb;
    border-radius: var(--radius);
    background: #fff;
}

.prev-next a:hover {
    border-color: #c8ddf0;
    background: #fbfdff;
}

.prev-next a.next {
    text-align: right;
}

.prev-next-label {
    color: #a5afb9;
    font-size: 10px;
    letter-spacing: .12em;
}

.prev-next-title {
    overflow: hidden;
    color: #52606d;
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-section,
.comments-section {
    padding: 20px 22px 22px;
}

.related-section .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.related-section .card-title {
    font-size: 13px;
}

.related-section .card-desc {
    min-height: 34px;
    font-size: 11.5px;
}

.comments-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.comments-head h2 {
    color: #2a343e;
    font-size: 17px;
    font-weight: 600;
}

.comments-head p {
    color: #9aa4ae;
    font-size: 11.5px;
}

.comment-list {
    display: grid;
    gap: 0;
}

.comment {
    display: flex;
    gap: 11px;
    padding: 16px 0;
    border-top: 1px solid #eef1f4;
}

.comment:first-child {
    border-top: 0;
    padding-top: 0;
}

.comment-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    color: #3d6f9e;
    font-size: 14px;
    font-weight: 700;
}

.comment-avatar.small {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    font-size: 11px;
}

.comment-main {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.comment-header strong {
    color: #52606d;
    font-size: 12.5px;
    font-weight: 600;
}

.comment-header time {
    color: #a5afb9;
    font-size: 11px;
}

.comment-body {
    overflow-wrap: anywhere;
    margin-top: 5px;
    color: #6f7b86;
    font-size: 12.5px;
    line-height: 1.75;
}

.comment-body a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.comment-body img {
    max-width: 100%;
    height: auto;
}

.reply-list {
    display: grid;
    gap: 10px;
    margin-top: 11px;
    padding: 11px 13px;
    border-left: 2px solid #edf1f5;
    background: #fafbfc;
}

.reply {
    display: flex;
    gap: 9px;
}

.reply-main {
    flex: 1;
    min-width: 0;
}

.comment-readonly {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eef1f4;
    color: #a5afb9;
    font-size: 11.5px;
}

.detail-sidebar {
    position: sticky;
    top: 72px;
    display: grid;
    gap: 14px;
}

.side-card {
    padding: 17px 16px;
    border: 1px solid #e1e6eb;
    border-radius: var(--radius);
    background: #fff;
}

.side-card h3 {
    margin: 0 0 10px;
    color: #3e4954;
    font-size: 13px;
    font-weight: 600;
}

.author-card {
    text-align: center;
}

.author-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    color: #3d6f9e;
    font-size: 22px;
    font-weight: 700;
}

.author-card h2 {
    overflow: hidden;
    margin: 0;
    color: #3e4954;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-card .muted {
    margin-top: 4px;
    font-size: 11.5px;
}

.side-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--link);
    font-size: 12px;
}

.side-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-list a,
.side-tools a {
    color: #6f7b86;
    font-size: 12.5px;
}

.side-list a:hover,
.side-tools a:hover {
    color: var(--link);
}

.side-tools {
    display: grid;
    gap: 8px;
}

.side-search {
    display: flex;
    height: 34px;
    border: 1px solid #d5dce3;
    border-radius: 3px;
    overflow: hidden;
}

.side-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 0 9px;
    color: #46515c;
    font-size: 12px;
    outline: none;
}

.side-search button {
    flex: 0 0 50px;
    border: 0;
    background: #f4f6f8;
    color: #6f7b86;
    font-size: 11.5px;
}

.side-search button:hover {
    background: #edf1f5;
    color: var(--link);
}

.detail-empty {
    max-width: 520px;
    margin: 80px auto;
    padding: 40px 20px;
    border: 1px solid #e1e6eb;
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
}

.detail-empty-mark {
    color: #b6c0c9;
    font-family: Consolas, monospace;
    font-size: 22px;
    font-weight: 700;
}

.detail-empty h1 {
    margin: 8px 0;
    color: #3e4954;
    font-size: 22px;
    font-weight: 600;
}

.detail-empty > p:not(.detail-empty-mark) {
    margin-bottom: 18px;
    color: #9aa4ae;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-section .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .detail-wrap {
        width: min(100% - 28px, 1200px);
        padding-top: 14px;
    }

    .detail-heading,
    .detail-panel,
    .related-section,
    .comments-section {
        padding: 16px;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        grid-template-columns: 1fr;
    }

    .related-section .card-grid {
        grid-template-columns: 1fr;
    }

    .prev-next {
        flex-direction: column;
    }

    .detail-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-note {
        line-height: 1.6;
    }
}

/* 插件列表页 */
.listing-hero {
    padding: 28px 20px 30px;
    background:
        radial-gradient(circle at 20% 0%, rgba(61, 139, 217, .10), transparent 42%),
        linear-gradient(180deg, #2c3238, #262c31);
    color: #fff;
    text-align: center;
}

.listing-hero-inner {
    width: min(760px, 100%);
    margin: 0 auto;
}

.listing-eyebrow {
    color: #8fa4b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
}

.listing-hero h1 {
    margin-top: 5px;
    color: #f8fafc;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -.02em;
}

.listing-hero-inner > p:not(.listing-eyebrow):not(.search-hint) {
    margin-top: 5px;
    color: #9daab6;
    font-size: 12px;
}

.listing-search {
    height: 46px;
    margin-top: 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
}

.listing-search button {
    flex-basis: 96px;
    font-size: 13px;
}

.listing-page-body {
    padding-top: 18px;
}

.listing-breadcrumb {
    margin-bottom: 14px;
}

.listing-page-count {
    margin-left: auto;
    color: #9aa4ae;
    font-size: 11.5px;
}

.listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-bottom: 8px;
}

.page-number,
.page-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid #d5dce3;
    border-radius: 3px;
    background: #fff;
    color: #64748b;
    font-size: 12.5px;
    text-decoration: none;
}

.page-number:hover,
.page-nav:hover {
    border-color: #9fc3e5;
    color: var(--link);
}

.page-number.active {
    border-color: #3d8bd9;
    background: #3d8bd9;
    color: #fff;
    font-weight: 600;
}

.page-nav {
    padding-left: 13px;
    padding-right: 13px;
}

.page-nav.disabled {
    cursor: not-allowed;
    opacity: .45;
    background: #f7f9fb;
}

.page-ellipsis {
    padding: 0 3px;
    color: #a5afb9;
    font-size: 12px;
}

.listing-empty {
    max-width: 540px;
    margin: 50px auto;
    padding: 38px 20px;
    border: 1px solid #e1e6eb;
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
}

.listing-empty h1 {
    margin: 8px 0;
    color: #3e4954;
    font-size: 22px;
    font-weight: 600;
}

.listing-empty > p:not(.detail-empty-mark) {
    margin-bottom: 18px;
    color: #9aa4ae;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .listing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .listing-hero h1 {
        font-size: 25px;
    }

    .listing-page-count {
        display: none;
    }
}

@media (max-width: 480px) {
    .listing-grid {
        grid-template-columns: 1fr;
    }

    .listing-hero {
        padding: 24px 14px 26px;
    }
}

.site-footer {
    background: #1b2025;
    color: #7f8b96;
}

.footer-inner {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 30px;
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}

.footer-links a {
    color: #aab4bf;
    font-size: 12px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-inner p {
    font-size: 11.5px;
    color: #6f7b86;
}

/* 响应式 */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .topbar-inner,
    .category-inner,
    .page,
    .footer-inner {
        width: min(100% - 28px, 1200px);
    }

    .topnav a {
        padding: 6px 7px;
        font-size: 11.5px;
    }

    .logo-text {
        display: none;
    }

    .hero {
        min-height: 300px;
        padding: 44px 16px 46px;
    }

    .hero h1 {
        font-size: 31px;
    }

    .hero p {
        font-size: 12px;
        line-height: 1.7;
    }

    .hero-search {
        height: 48px;
    }

    .hero-search button {
        flex-basis: 104px;
        font-size: 13px;
    }

    .category-note {
        display: none;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .section-head h2 {
        font-size: 17px;
    }

    .section-link {
        display: none;
    }
}

@media (max-width: 480px) {
    .topnav a:not(.active) {
        display: none;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .card-media {
        aspect-ratio: 16 / 9;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* 插件图片：plugins.pic -> /plugin/{pic} */
.card-media {
    position: relative;
    overflow: hidden;
}

.card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-media {
    overflow: hidden;
}

.detail-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 插件详情页浏览器兼容图片 */
.browser-row .thumbile {
    display: block;
    width: 100%;
    max-width: 801px;
    height: auto;
}
/* 插件详情页作者卡片与下载 */
.author-card {
    text-align: left;
}

.author-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.author-card .author-avatar {
    display: block;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    margin: 0;
    object-fit: cover;
    background: #e5eaf0;
}

.author-heading {
    min-width: 0;
}

.author-role {
    margin: 0 0 2px;
    color: #9aa4ae;
    font-size: 10px;
    letter-spacing: .08em;
}

.author-heading h2 {
    overflow: hidden;
    margin: 0;
    color: #3e4954;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-region {
    overflow: hidden;
    margin: 4px 0 0;
    color: #8c98a6;
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-region i {
    margin-right: 2px;
    color: #e0a11b;
}

.author-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.author-action-form {
    display: block;
    margin: 0;
}

.author-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid #d6dde5;
    border-radius: 3px;
    background: #fff;
    color: #5f6b78;
    font-size: 12.5px;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
}

.author-action-btn:hover {
    border-color: #9fb6cc;
    color: #1677ff;
    background: #f8fbff;
}

.author-action-btn span {
    color: #8c98a6;
    font-size: 15px;
    line-height: 1;
}

.author-card .side-link {
    margin-top: 12px;
}

.download-form {
    display: inline-flex;
    margin: 0;
}

.detail-download-message {
    margin: 8px 0 0;
    padding: 0 16px;
    color: #3f8a5a;
    font-size: 12px;
}

.detail-download-message.error {
    color: #c65454;
}
.comment-limit-note {
    margin: 0 0 12px;
    color: #8c98a6;
    font-size: 12px;
}
.more-comments-link {
    display: inline-flex;
    align-items: center;
    margin: 4px 0 14px;
    color: #1677ff;
    font-size: 13px;
    text-decoration: none;
}

.more-comments-link:hover {
    text-decoration: underline;
}
/* 留言/回复内容防溢出 */
.comments-section,
.message-card,
.comment,
.comment-main,
.reply,
.reply-main,
.reply-list {
    min-width: 0;
    max-width: 100%;
}

.comment-body,
.reply-main .comment-body {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.comment-body a,
.reply-main .comment-body a {
    overflow-wrap: anywhere;
    word-break: break-all;
}

.comment-body pre,
.comment-body code,
.reply-main .comment-body pre,
.reply-main .comment-body code {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.reply-list {
    overflow: hidden;
}
/* 让内容较少的页面把 footer 固定到视口底部，避免中间出现大块留白 */
body.home-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body.home-page > main {
    flex: 1 0 auto;
}

body.home-page > .site-footer {
    flex-shrink: 0;
    margin-top: auto;
}
/* 插件搜索页 */
.search-summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    color: #8c98a6;
    font-size: 12px;
}

.search-summary strong {
    color: #34404b;
    font-size: 14px;
}
/* 插件详情侧栏：发布资源入口 */
.side-publish-text {
    margin: 0 0 12px;
    color: #7c8794;
    font-size: 12px;
    line-height: 1.7;
}

.side-publish-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 6px;
    background: #202833;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: background .18s ease;
}

.side-publish-btn:hover {
    background: #2d3948;
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-frame {
        display: none;
    }
}

/* 插件详情：查看演示 / 立即下载 操作区 */
.detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(180deg, #fbfcfd, #f7f9fb);
}

.detail-actions .download-form {
    display: flex;
    width: 100%;
}

.detail-actions .site-button {
    width: 100%;
    min-height: 50px;
    gap: 8px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .01em;
    justify-content: center;
}

.detail-actions .site-button i {
    font-size: 15px;
    line-height: 1;
}

.detail-actions .demo-button {
    border-color: #d4dbe3;
    background: #fff;
    color: #2f3a46;
    box-shadow: 0 1px 2px rgba(20, 30, 45, .03);
}

.detail-actions .demo-button:not(:disabled):hover {
    border-color: #202833;
    background: #202833;
    color: #fff;
}

.detail-actions .download-button {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(232, 111, 67, .18);
}

.detail-actions .download-button:hover {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
    color: #fff;
}

.detail-actions .site-button:disabled {
    border-color: #e0e5eb;
    background: #f4f6f8;
    color: #a8b1bb;
    box-shadow: none;
}

@media (max-width: 620px) {
    .detail-actions {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .detail-actions .site-button {
        min-height: 48px;
    }
}
