/* BiliTop - B站风格CSS */
:root {
    --primary: #15b6cb;
    --primary-light: #00b5e5;
    --pink: #fb7299;
    --pink-light: #fc9db8;
    --gold: #e6a23c;
    --bg: #f6f4f4;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --text: #212121;
    --text-primary: var(--text);
    --bg-color: var(--bg);
    --text-secondary: #666;
    --text-muted: #999;
    --border: #e3e5e7;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    --header-h: 56px;
    --max-w: 1200px;
    --sidebar-w: 300px;
}

.screen-reader-text {
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip:rect(0,0,0,0) !important;
    clip-path:inset(50%) !important;
    white-space:nowrap !important;
    border:0 !important;
}

/* ============ BILIBILI-STYLE ARTICLE DETAIL ============ */
.bilitop-single { padding:18px 0 48px; background:var(--bg); }
.bilitop-single .single-inner { max-width:var(--max-w); }
.bilitop-single .bilitop-breadcrumb { max-width:850px; margin:0 0 14px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.bilitop-single .single-layout { align-items:flex-start; gap:20px; }
.single-main-column { flex:1; min-width:0; display:flex; flex-direction:column; gap:20px; }
.bilitop-article-card,
.single-comments-card { background:var(--bg-card); border:1px solid rgba(0,0,0,.06); border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.035); }
.bilitop-article-card { width:100%; padding:34px 42px 30px; }
.single-channel { display:inline-flex; align-items:center; height:25px; margin-bottom:12px; padding:0 10px; border-radius:4px; background:rgba(0,174,236,.1); color:var(--primary); font-size:13px; }
.single-channel:hover { background:var(--primary); color:#fff; }
.bilitop-article-card .single-title { margin:0 0 12px; font-size:30px; font-weight:600; line-height:1.35; letter-spacing:.01em; color:var(--text); }
.bilitop-article-card .single-meta { gap:18px; margin:0 0 28px; padding:0 0 18px; border-bottom:1px solid var(--border); }
.bilitop-article-card .single-meta .meta-author { color:var(--text-secondary); font-weight:500; }
.bilitop-article-card .single-meta .meta-author img { width:24px; height:24px; border-radius:50%; }
.bilitop-article-card .meta-category { display:none; }
.bilitop-article-card .single-thumbnail { margin:0 auto 28px; border-radius:8px; }
.bilitop-article-card .single-thumbnail img { display:block; width:100%; height:auto; }
.bilitop-article-card .single-body { min-height:180px; font-size:16px; line-height:1.9; color:var(--text); word-break:break-word; }
.bilitop-article-card .single-body p { margin:0 0 1.25em; }
.bilitop-article-card .single-body h2 { margin:1.7em 0 .75em; padding-left:12px; border-left:4px solid var(--primary); font-size:24px; }
.bilitop-article-card .single-body h3 { margin:1.5em 0 .7em; font-size:20px; }
.bilitop-article-card .single-body blockquote { margin:22px 0; padding:15px 18px; border-left:4px solid var(--primary); border-radius:0 6px 6px 0; background:var(--bg); color:var(--text-secondary); }
.bilitop-article-card .single-body img { display:block; max-width:100%; height:auto; margin:20px auto; border-radius:6px; }
.bilitop-article-card .single-body a { color:var(--primary); }
.bilitop-article-card .single-footer { margin-top:34px; padding-top:18px; border-top:1px solid var(--border); }
.bilitop-article-card .single-tags { margin:0 0 18px; padding:0; border:0; }
.bilitop-article-card .single-tags .tag { height:26px; padding:3px 11px; border-radius:4px; background:var(--bg); color:var(--text-secondary); }
.bilitop-article-card .single-tags .tag:hover { background:rgba(0,174,236,.1); color:var(--primary); }
.bilitop-article-card .single-actions { justify-content:center; gap:30px; margin:0; padding:8px 0 2px; }
.bilitop-article-card .action-btn { position:relative; flex-direction:column; justify-content:center; gap:5px; min-width:66px; padding:0; border:0; border-radius:0; background:transparent; color:#9499a0; font-size:13px; }
.bilitop-article-card .action-btn svg { width:28px; height:28px; stroke-width:1.8; transition:transform .18s,color .18s,fill .18s; }
.bilitop-article-card .action-btn:hover { border:0; color:var(--primary); }
.bilitop-article-card .action-btn:hover svg { transform:translateY(-2px); }
.bilitop-article-card .action-btn.active { border:0; background:transparent; color:var(--primary); }
.bilitop-article-card .action-btn.active svg { fill:rgba(0,174,236,.16); stroke:var(--primary); }
.bilitop-article-card .btn-like.active { background:transparent; color:var(--primary); }
.bilitop-article-card .btn-like.active svg { fill:var(--primary); stroke:var(--primary); }
.bilitop-article-card .action-text { line-height:1; }
.bilitop-article-card .action-count { min-height:14px; font-size:12px; font-weight:400; line-height:1; }
.bilitop-article-card .share-result:not(:empty) { position:absolute; top:-30px; left:50%; width:max-content; transform:translateX(-50%); padding:5px 8px; border-radius:4px; background:#18191c; color:#fff; }
.bilitop-article-card .download-section { margin-top:28px; padding:22px; border-color:var(--border); border-radius:8px; background:var(--bg); }
.bilitop-article-card .download-section h3 { display:flex; align-items:center; gap:8px; color:var(--text); }
.bilitop-article-card .download-section h3::before { content:'⬇'; display:grid; place-items:center; width:27px; height:27px; border-radius:50%; background:var(--primary); color:#fff; font-size:14px; }
.single-comments-card { padding:0 34px; scroll-margin-top:86px; }
.single-comments-card .bilitop-comments { margin:0; padding:28px 0 34px; border:0; border-radius:0; box-shadow:none; background:transparent; }
.single-comments-card .comments-header { padding-bottom:16px; border-bottom:1px solid var(--border); }
.single-comments-card .comments-header h3 { margin:0; font-size:20px; font-weight:600; }
.single-comments-card .comment-body { background:transparent; }
.single-comments-card .comment-item { padding:22px 0; }
.comment-compose { display:flex; align-items:flex-start; gap:14px; padding:20px 0 24px; border-bottom:1px solid var(--border); }
.comment-compose-avatar { flex:0 0 48px; padding-top:1px; }
.comment-compose-avatar img { display:block; width:48px; height:48px; border-radius:50%; object-fit:cover; }
.comment-compose-main { flex:1; min-width:0; }
.comment-compose-main .comment-respond { margin:0; }
.comment-compose-main .comment-reply-title:empty { display:none; }
.comment-compose-main .comment-form-bilitop { display:grid; grid-template-columns:1fr auto; align-items:end; gap:10px 14px; margin:0; padding:0; border:0; background:transparent; box-shadow:none; }
.comment-compose-main .comment-editor-shell { display:contents; margin:0; }
.comment-compose-main .comment-form-bilitop textarea[name="comment"] { display:block; width:100%; min-height:50px; height:50px; padding:14px 16px; resize:none; overflow:hidden; border:1px solid #d8dadd; border-radius:7px; outline:0; background:#f1f2f3; color:var(--text); font-size:14px; line-height:20px; transition:height .18s,background .18s,border-color .18s; }
.comment-compose-main .comment-form-bilitop textarea[name="comment"] { grid-column:1 / -1; }
.comment-compose-main .comment-form-bilitop textarea[name="comment"]::placeholder { color:#9499a0; }
.comment-compose-main .comment-form-bilitop.is-focused textarea[name="comment"] { min-height:82px; height:auto; overflow:auto; border-color:#aeb3b8; background:var(--bg-card); }
.comment-compose-main .comment-form-bilitop.is-focused textarea[name="comment"]:focus { border-color:var(--primary); }
.comment-compose-main .comment-emoji-tools { grid-column:1; margin:0; }
.comment-compose-main .form-submit { grid-column:2; grid-row:2; margin:0; }
.single-comments-card .comment-compose-main .btn-comment-submit { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:70px; height:34px; padding:0 18px; border:0; border-radius:5px; background:var(--primary); font-weight:600; line-height:1; text-align:center; }
.comment-compose-main .btn-comment-submit:hover { background:#00a1d6; }
.comment-compose-main .comment-form-bilitop.is-collapsed .comment-emoji-tools,
.comment-compose-main .comment-form-bilitop.is-collapsed .form-submit,
.comment-compose-main .comment-form-bilitop.is-collapsed .comment-form-author,
.comment-compose-main .comment-form-bilitop.is-collapsed .comment-form-email,
.comment-compose-main .comment-form-bilitop.is-collapsed .comment-form-url,
.comment-compose-main .comment-form-bilitop.is-collapsed .comment-notes,
.comment-compose-main .comment-form-bilitop.is-collapsed .logged-in-as { display:none; }
.comment-compose-main .comment-form-author,
.comment-compose-main .comment-form-email,
.comment-compose-main .comment-form-url,
.comment-compose-main .comment-notes,
.comment-compose-main .logged-in-as { grid-column:1 / -1; margin:0; }
.comment-compose-main .comment-form-author input,
.comment-compose-main .comment-form-email input,
.comment-compose-main .comment-form-url input { width:100%; }
.comment-compose-main .cancel-reply-wrap { display:block; margin-bottom:8px; }
.single-comments-card .comment-list .comment-respond { margin:14px 0 6px; padding:14px; border-radius:8px; background:var(--bg); }
.single-comments-card .comment-list .comment-reply-title { display:flex; align-items:center; justify-content:flex-end; min-height:28px; margin:0 0 8px; font-size:13px; font-weight:400; }
.single-comments-card #cancel-comment-reply-link { display:inline-flex; align-items:center; justify-content:center; height:28px; padding:0 11px; border:1px solid var(--border); border-radius:5px; background:var(--bg-card); color:var(--text-secondary); font-size:12px; line-height:1; text-decoration:none; }
.single-comments-card #cancel-comment-reply-link:hover { border-color:var(--primary); color:var(--primary); }
.single-comments-card .comment-list .comment-form-bilitop { display:grid; grid-template-columns:1fr auto; align-items:end; gap:10px 14px; margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.single-comments-card .comment-list .comment-editor-shell { display:contents; }
.single-comments-card .comment-list .comment-form-bilitop textarea[name="comment"] { grid-column:1 / -1; display:block; width:100%; min-height:50px; height:50px; padding:14px 16px; resize:none; overflow:hidden; border:1px solid transparent; border-radius:7px; background:var(--bg); color:var(--text); font-size:14px; line-height:20px; }
.single-comments-card .comment-list .comment-form-bilitop.is-focused textarea[name="comment"] { min-height:82px; height:auto; overflow:auto; border-color:#c9ccd0; background:var(--bg-card); }
.single-comments-card .comment-list .comment-form-bilitop.is-focused textarea[name="comment"]:focus { border-color:var(--primary); }
.single-comments-card .comment-list .comment-emoji-tools { grid-column:1; margin:0; }
.single-comments-card .comment-list .form-submit { grid-column:2; grid-row:2; margin:0; }
.single-comments-card .comment-list .btn-comment-submit { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:70px; height:34px; padding:0 18px; line-height:1; text-align:center; }
.single-comments-card .comment-list .comment-form-bilitop.is-collapsed .comment-emoji-tools,
.single-comments-card .comment-list .comment-form-bilitop.is-collapsed .form-submit,
.single-comments-card .comment-list .comment-form-bilitop.is-collapsed .comment-form-author,
.single-comments-card .comment-list .comment-form-bilitop.is-collapsed .comment-form-email,
.single-comments-card .comment-list .comment-form-bilitop.is-collapsed .comment-form-url,
.single-comments-card .comment-list .comment-form-bilitop.is-collapsed .comment-notes,
.single-comments-card .comment-list .comment-form-bilitop.is-collapsed .logged-in-as { display:none; }
.single-comments-card .comment-list .comment-form-author,
.single-comments-card .comment-list .comment-form-email,
.single-comments-card .comment-list .comment-form-url,
.single-comments-card .comment-list .comment-notes,
.single-comments-card .comment-list .logged-in-as { grid-column:1 / -1; margin:0; }
.bilitop-single .single-sidebar { width:min(var(--sidebar-w), 40%); min-width:0; }
.bilitop-single .sidebar-card,
.bilitop-single .sidebar-widget { padding:18px; border:1px solid rgba(0,0,0,.06); border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.035); }
.bilitop-single .sidebar-card h3,
.bilitop-single .sidebar-widget .widget-title { border:0; font-size:16px; }
.bilitop-single .author-box img { width:58px; height:58px; }
.bilitop-single .author-name { color:#fb7299; }
.bilitop-single .related-item { padding:10px 0; line-height:1.5; }

@media (min-width: 901px) {
    .bilitop-single .single-sidebar { position:sticky; top:calc(var(--header-h) + 12px); align-self:flex-start; }
    .bilitop-header.is-banner ~ .bilitop-main .bilitop-single .single-sidebar { top:12px; }
}

@media (max-width: 900px) {
    .bilitop-single { padding-top:10px; }
    .bilitop-single .single-inner { padding:0 12px; }
    .bilitop-single .single-layout { flex-direction:column; }
    .single-main-column,
    .bilitop-single .single-sidebar { width:100%; }
    .bilitop-article-card { padding:24px 22px; }
    .bilitop-article-card .single-title { font-size:25px; }
}

@media (max-width: 600px) {
    .bilitop-single .bilitop-breadcrumb { margin-bottom:10px; }
    .bilitop-single .single-layout,
    .single-main-column { gap:12px; }
    .bilitop-article-card { padding:20px 16px; border-radius:8px; }
    .bilitop-article-card .single-title { font-size:22px; }
    .bilitop-article-card .single-meta { gap:9px 13px; margin-bottom:20px; }
    .bilitop-article-card .single-body { font-size:16px; line-height:1.82; }
    .bilitop-article-card .single-actions { justify-content:space-around; gap:4px; }
    .bilitop-article-card .action-btn { min-width:54px; }
    .bilitop-article-card .action-btn svg { width:25px; height:25px; }
    .single-comments-card { padding:0 16px; border-radius:8px; }
    .single-comments-card .bilitop-comments { padding:22px 0 26px; }
    .comment-compose { gap:9px; }
    .comment-compose-avatar { flex-basis:38px; }
    .comment-compose-avatar img { width:38px; height:38px; }
    .comment-compose-main .comment-form-bilitop { gap:8px; }
    .comment-compose-main .btn-comment-submit { min-width:62px; padding:0 13px; }
    .single-comments-card .comment-list .comment-respond { margin-left:-8px; margin-right:-8px; padding:12px; }
    .single-comments-card .comment-list .comment-form-bilitop { gap:8px; }
    .single-comments-card .comment-list .btn-comment-submit { min-width:62px; padding:0 13px; }
    .bilitop-single .single-sidebar { display:block; }
}

/* Dark Mode */
.dark {
    --bg: #17181a;
    --bg-white: #1e1f22;
    --bg-card: #252629;
    --text: #e0e0e0;
    --text-secondary: #aaa;
    --text-muted: #777;
    --border: #333;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.4);
}

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

body.bilitop-body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--text); text-decoration: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; border: none; }
a,button,[role="button"] { -webkit-user-drag:none; }

/* ============ HEADER ============ */
.bilitop-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.bilitop-header.is-static {
    position: relative;
}

.bilitop-header.is-static ~ .bilitop-main {
    margin-top: 0;
    padding-top: 0;
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.bilitop-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.bilitop-logo-image { display:block; max-height:42px; object-fit:contain; }
.bilitop-logo-text-icon { display:block; flex:0 0 auto; width:var(--logo-text-icon-width,40px); height:auto; max-height:42px; object-fit:contain; }

/* ============ HOME VISUAL MODULES ============ */
.bilitop-visual-section { padding:24px 0; }
.bilitop-slider { position:relative; isolation:isolate; aspect-ratio:2.4/1; overflow:hidden; border-radius:var(--radius-lg); background:#181a20; box-shadow:var(--shadow); }
.homepage-feature-layout { display:block; }
.homepage-feature-layout.has-announcements.has-slider { display:grid; height:clamp(330px,24vw,430px); grid-template-columns:minmax(0,2.2fr) minmax(300px,.8fr); gap:18px; align-items:stretch; }
.homepage-feature-layout.has-announcements.has-slider .bilitop-slider { height:100%; min-height:330px; aspect-ratio:auto; }
.homepage-announcements { min-width:0; height:100%; padding:20px; overflow:auto; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--bg-card); box-shadow:var(--shadow); scroll-margin-top:calc(var(--header-h) + 72px); }
.announcement-heading { display:flex; align-items:center; gap:9px; padding-bottom:14px; border-bottom:1px solid var(--border); }
.announcement-heading-icon { display:flex; color:var(--primary); }
.announcement-heading h2 { min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:18px; }
.announcement-more { flex:0 0 auto; margin-left:auto; color:var(--text-muted); font-size:12px; white-space:nowrap; }
.announcement-more:hover { color:var(--primary); }
.announcement-list { display:grid; margin-top:8px; }
.announcement-item { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:47px; padding:8px 4px; border-bottom:1px solid var(--border); color:var(--text-secondary); }
.announcement-item:last-child { border-bottom:0; }
.announcement-item span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.announcement-item time { flex:0 0 auto; color:var(--text-muted); font-size:12px; }
.announcement-item:hover span { color:var(--primary); }
.announcement-empty { padding:36px 4px; color:var(--text-muted); text-align:center; }
.homepage-feature-layout:not(.has-slider) .homepage-announcements { height:auto; }
.announcement-page { width:100%; max-width:1000px; margin:0 auto; padding:24px 20px 60px; }
.announcement-page .bilitop-breadcrumb { margin-bottom:22px; }
.announcement-page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:22px; }
.announcement-eyebrow { margin:0 0 6px; color:var(--primary); font-size:13px; }
.announcement-page-heading h1 { margin:0; font-size:30px; line-height:1.3; overflow-wrap:anywhere; }
.announcement-page-heading > p { margin:0 0 3px; color:var(--text-muted); font-size:14px; }
.announcement-archive-list { overflow:hidden; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--bg-card); }
.announcement-archive-item { display:flex; align-items:flex-start; gap:18px; padding:25px 28px; border-bottom:1px solid var(--border); }
.announcement-archive-item:last-child { border-bottom:0; }
.announcement-archive-icon { display:grid; flex:0 0 44px; height:44px; place-items:center; border-radius:12px; color:var(--primary); background:rgba(21,182,203,.09); }
.announcement-archive-main { flex:1; min-width:0; }
.announcement-archive-main h2 { margin:0 0 10px; font-size:19px; line-height:1.5; overflow-wrap:anywhere; }
.announcement-archive-main h2 a:hover { color:var(--primary); }
.announcement-archive-main > p { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; margin:0 0 13px; overflow:hidden; color:var(--text-secondary); font-size:14px; line-height:1.8; overflow-wrap:anywhere; }
.announcement-archive-main footer { display:flex; align-items:center; justify-content:space-between; gap:15px; font-size:13px; }
.announcement-archive-main time { color:var(--text-muted); }
.announcement-archive-main footer a, .announcement-article-footer a, .announcement-archive-empty a { color:var(--primary); }
.announcement-archive-empty { padding:65px 24px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--bg-card); text-align:center; }
.announcement-archive-empty h1, .announcement-archive-empty h2 { margin:0 0 12px; font-size:23px; }
.announcement-archive-empty p { margin:0; color:var(--text-muted); }
.announcement-pagination { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:28px; font-size:14px; }
.announcement-pagination a { padding:9px 17px; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); }
.announcement-pagination a:hover { color:var(--primary); border-color:var(--primary); }
.announcement-pagination span { color:var(--text-muted); }
.announcement-article-footer { margin-top:32px; padding-top:20px; border-top:1px solid var(--border); }
.announcement-comments { margin-top:22px; }
.announcement-article .single-title { overflow-wrap:anywhere; }
.announcement-article .single-body { overflow-wrap:anywhere; }
.announcement-article .single-body iframe, .announcement-article .single-body video { max-width:100%; }
.announcement-content-pages { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }
.announcement-password-form input { max-width:100%; }
.announcement-password-form input[type="password"] { padding:9px; border:1px solid var(--border); border-radius:6px; background:var(--bg-card); }
.announcement-password-form input[type="submit"] { padding:10px 16px; border:0; border-radius:6px; background:var(--primary); color:#fff; }
.bilitop-slide { position:absolute; inset:0; z-index:0; opacity:0; visibility:hidden; pointer-events:none; background:#181a20; transition:none; }
.bilitop-slide.is-active { z-index:1; opacity:1; visibility:visible; pointer-events:auto; }
/* Keep an opaque previous frame below the incoming image throughout the dissolve. */
.bilitop-slide.is-outgoing { z-index:1; opacity:1; visibility:visible; pointer-events:none; transition:none; }
.bilitop-slide.is-incoming { z-index:2; visibility:visible; transition:opacity .45s ease; }
.bilitop-slide-link, .bilitop-ad-item { position:relative; display:block; width:100%; height:100%; overflow:hidden; border-radius:var(--radius-lg); background:var(--bg-card); }
.bilitop-slide-link { background:transparent; }
.bilitop-slide-link img, .bilitop-ad-item img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.bilitop-slide-link:hover img, .bilitop-ad-item:hover img { transform:scale(1.025); }
.bilitop-slide-link span, .bilitop-ad-item span { position:absolute; left:0; right:0; bottom:0; padding:38px 18px 14px; color:#fff; font-weight:600; background:linear-gradient(transparent,rgba(0,0,0,.72)); }
.slider-prev,.slider-next { position:absolute; top:50%; transform:translateY(-50%); z-index:3; width:36px; height:48px; color:#fff; font-size:30px; background:rgba(0,0,0,.28); border-radius:7px; }
.slider-prev { left:14px; }.slider-next { right:14px; }
.slider-dots { position:absolute; z-index:3; left:50%; bottom:14px; transform:translateX(-50%); display:flex; gap:7px; }
.slider-dot { width:8px; height:8px; padding:0; border-radius:50%; background:rgba(255,255,255,.55); }
.slider-dot.is-active { width:22px; border-radius:6px; background:#fff; }
@media (prefers-reduced-motion:reduce) { .bilitop-slide.is-incoming,.bilitop-slide-link img { transition:none; } .bilitop-slide-link:hover img { transform:none; } }
.bilitop-ad-grid { display:grid; gap:12px; min-height:180px; }
.bilitop-ad-grid.layout-one_large_four_small { grid-template-columns:2fr 1fr 1fr; grid-template-rows:repeat(2,minmax(130px,1fr)); }
.bilitop-ad-grid.layout-one_large_four_small .item-0 { grid-row:1/3; }
.bilitop-ad-grid.layout-single { grid-template-columns:1fr; aspect-ratio:3/1; }
.bilitop-ad-grid.layout-two { grid-template-columns:repeat(2,1fr); aspect-ratio:3/1; }
.bilitop-ad-grid.layout-four { grid-template-columns:repeat(4,1fr); aspect-ratio:4/1; }

.header-nav {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}

.nav-item {
    display:inline-flex;
    align-items:center;
    gap:5px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
}
.nav-icon { flex:0 0 auto; }
.nav-icon-text { min-width:17px; font-size:15px; line-height:1; text-align:center; text-shadow:none; }

.nav-item:hover, .nav-item.active {
    color: var(--primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* Search */
.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    background: var(--bg-white);
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--text-muted);
    transition: var(--transition);
}

.search-btn:hover {
    color: var(--primary);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow);
    display: none;
    z-index: 100;
}

.search-suggestions.active {
    display: block;
}

.search-suggestions .suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.search-suggestions .suggestion-item:hover {
    background: var(--bg);
    color: var(--primary);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}
.header-popover-open { overflow:hidden; }
.header-popover-backdrop { position:fixed; z-index:2147483000; inset:0; display:block; pointer-events:auto; touch-action:none; overscroll-behavior:contain; background:rgba(0,0,0,.16); -webkit-tap-highlight-color:transparent; }
.header-popover-backdrop[hidden] { display:none!important; }
.header-popover-open .bilitop-header { z-index:2147483001; }
.header-user.is-open,.header-message-menu.is-open { position:relative; z-index:2; }

.btn-login, .btn-register {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
}

.btn-login {
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-login:hover {
    background: var(--primary);
    color: #fff;
}

.btn-register {
    background: var(--primary);
    color: #fff;
}

.btn-register:hover {
    background: var(--primary-light);
}

.header-user {
    position: relative;
}

.user-avatar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-avatar-link img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-size: 14px;
    color: var(--text);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 160px;
    display: none;
    z-index: 100;
    padding: 8px 0;
    pointer-events: auto;
    touch-action: manipulation;
}

.header-user:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--bg);
    color: var(--primary);
}

.dark-mode-toggle {
    background: transparent;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.dark-mode-toggle:hover {
    color: var(--gold);
    background: var(--bg);
}

/* ============ MAIN ============ */
.bilitop-main {
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

/* Bilibili-style customizable banner header */
.bilitop-header.is-banner {
    position:relative;
    height:var(--banner-height,180px);
    background-color:var(--banner-bg,#527f78);
    background-image:var(--banner-image,linear-gradient(120deg,#4c8b78,#80ad8c 48%,#315f4f));
    background-repeat:no-repeat;
    background-position:var(--banner-position,center);
    background-size:cover;
    border-bottom:0;
    backdrop-filter:none;
    overflow:visible;
}
.bilitop-header.is-banner::before { content:''; position:absolute; inset:0; z-index:0; background:linear-gradient(to bottom,rgba(0,0,0,var(--banner-overlay,.22)),rgba(0,0,0,.02) 70%,rgba(0,0,0,.08)); pointer-events:none; }
.bilitop-header.is-banner ~ .bilitop-main { margin-top:0; }
.bilitop-header.is-banner .header-inner { position:relative; z-index:1; max-width:none; align-items:flex-start; height:100%; padding:14px 22px; gap:18px; }
.bilitop-header.is-banner .bilitop-logo { position:absolute; left:var(--banner-logo-x,6%); top:var(--banner-logo-y,72%); bottom:auto; max-width:280px; color:var(--banner-text,#fff); font-size:26px; text-shadow:0 2px 8px rgba(0,0,0,.38); transform:translateY(-50%) scale(var(--banner-logo-scale,1)); transform-origin:left center; }
.bilitop-header.is-banner .bilitop-logo-image { max-height:66px; }
.bilitop-header.is-banner .header-nav { align-items:center; max-width:31vw; gap:17px; overflow:hidden; white-space:nowrap; }
.bilitop-header.is-banner .header-nav-right { justify-content:flex-end; margin-left:auto; max-width:24vw; }
.bilitop-header.is-banner .nav-item,
.bilitop-header.is-banner .user-name,
.bilitop-header.is-banner .dark-mode-toggle { color:var(--banner-text,#fff); text-shadow:0 1px 3px rgba(0,0,0,.55); }
.bilitop-header.is-banner .nav-item:hover,
.bilitop-header.is-banner .nav-item.active { color:#fff; opacity:.82; }
.bilitop-header.is-banner .nav-item.active::after { background:#fff; }
.bilitop-header.is-banner .header-search { flex:1 1 360px; max-width:500px; height:40px; margin:0 auto; transform:translateX(clamp(80px,5.2vw,110px)); }
.bilitop-header.is-banner .search-box { isolation:isolate; width:100%; height:40px; border:1px solid rgba(255,255,255,.28); background:rgba(255,255,255,.94); box-shadow:0 2px 8px rgba(0,0,0,.13); transition:border-color .2s,background-color .2s; }
.bilitop-header.is-banner .search-box input { position:relative; z-index:1; min-width:0; height:38px; }
.bilitop-header.is-banner .search-btn { position:relative; z-index:1; display:flex; flex:0 0 48px; width:48px; height:38px; align-items:center; justify-content:center; padding:0; }
.bilitop-header.is-banner .search-box:focus-within { border-color:var(--primary); background:var(--bg-card); }
.bilitop-header.is-banner .header-right { margin-left:0; }
.bilitop-header.is-banner .user-avatar-link img { border:2px solid rgba(255,255,255,.82); }
.bilitop-header.is-banner .user-dropdown { text-shadow:none; }
.bilitop-header.is-banner .user-dropdown a { color:var(--text-secondary); }
.bilitop-header.is-banner.is-banner-scrolled {
    position:fixed;
    height:var(--header-h);
    background:color-mix(in srgb,var(--bg-card) 94%,transparent);
    background-image:none;
    border-bottom:1px solid var(--border);
    box-shadow:0 3px 14px rgba(0,0,0,.1);
    backdrop-filter:none;
    overflow:visible;
}
.bilitop-header.is-banner.is-banner-scrolled::before { display:none; }
.bilitop-header.is-banner.is-banner-scrolled ~ .bilitop-main { margin-top:var(--banner-height,180px); }
.bilitop-header.is-banner.is-banner-scrolled .header-inner { max-width:var(--max-w); height:100%; align-items:center; padding:0 20px; gap:20px; }
.bilitop-header.is-banner.is-banner-scrolled .bilitop-logo {
    position:static;
    display:flex;
    max-width:180px;
    color:var(--text);
    font-size:18px;
    text-shadow:none;
    transform:none;
}
.bilitop-header.is-banner.is-banner-scrolled .bilitop-logo-image { max-height:42px; }
.bilitop-header.is-banner.is-banner-scrolled .header-nav { max-width:none; }
.bilitop-header.is-banner.is-banner-scrolled .header-nav-right { max-width:none; }
.bilitop-header.is-banner.is-banner-scrolled .nav-item,
.bilitop-header.is-banner.is-banner-scrolled .user-name,
.bilitop-header.is-banner.is-banner-scrolled .dark-mode-toggle,
.bilitop-header.is-banner.is-banner-scrolled .header-member-link,
.bilitop-header.is-banner.is-banner-scrolled .header-store-link,
.bilitop-header.is-banner.is-banner-scrolled .header-message-trigger { color:var(--text-secondary); text-shadow:none; }
.bilitop-header.is-banner.is-banner-scrolled .nav-item:hover,
.bilitop-header.is-banner.is-banner-scrolled .nav-item.active { color:var(--text); opacity:1; }
.bilitop-header.is-banner.is-banner-scrolled .nav-item.active::after { display:none; }
.bilitop-header.is-banner.is-banner-scrolled .header-search { flex:1; max-width:400px; height:40px; margin:0; transform:none; }
.bilitop-header.is-banner.is-banner-scrolled .search-box { border:2px solid transparent; background:var(--bg); box-shadow:none; }

.home-category-navigation {
    position:sticky;
    z-index:900;
    top:var(--header-h);
    padding:8px 0;
    border:0;
    background:transparent;
    box-shadow:none;
}
.home-category-navigation .categories-inner { display:flex; align-items:flex-start; gap:14px; }
.home-category-navigation .categories-inner > .section-title { flex:0 0 auto; margin:0; font-size:16px; }
.home-category-navigation .category-grid { display:flex; flex:1; flex-wrap:wrap; gap:8px; overflow:visible; scrollbar-width:none; transition:max-height .2s ease; }
.home-category-navigation .category-grid::-webkit-scrollbar { display:none; }
.home-category-navigation .category-card { flex:0 0 auto; grid-template-columns:1fr; min-width:82px; padding:7px 12px; background:var(--bg-card); text-align:center; }
.home-category-navigation .category-card:hover { transform:none; }
.home-category-navigation .category-icon,.home-category-navigation .category-count { display:none; }
.home-category-navigation.is-stuck {
    border-bottom:1px solid var(--border);
    background:rgba(246,247,248,.94);
    box-shadow:0 4px 14px rgba(0,0,0,.08);
    backdrop-filter:blur(12px);
}
.home-category-navigation.is-stuck .category-grid { flex-wrap:wrap; max-height:40px; overflow:hidden; }
.home-category-navigation.is-stuck:hover .category-grid,
.home-category-navigation.is-stuck:focus-within .category-grid,
.home-category-navigation.is-stuck.is-expanded .category-grid { max-height:min(45vh,260px); overflow-y:auto; }
.category-expand-toggle { display:none; flex:0 0 34px; width:34px; height:34px; align-items:center; justify-content:center; border-radius:7px; background:var(--bg-card); color:var(--text-secondary); }
.home-category-navigation.is-stuck .category-expand-toggle { display:flex; }
.category-expand-toggle svg { transition:transform .2s ease; }
.home-category-navigation.is-stuck:hover .category-expand-toggle svg,
.home-category-navigation.is-expanded .category-expand-toggle svg { transform:rotate(180deg); }
.category-expand-toggle:hover { color:var(--primary); }
.bilitop-back-to-top {
    position:fixed;
    z-index:980;
    right:22px;
    bottom:28px;
    display:flex;
    width:48px;
    height:54px;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:1px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--bg-card);
    box-shadow:0 5px 18px rgba(0,0,0,.12);
    color:var(--text-secondary);
    font-size:11px;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(12px);
    transition:opacity .2s,transform .2s,visibility .2s,color .2s,border-color .2s;
}
.bilitop-back-to-top.is-visible { opacity:1; visibility:visible; pointer-events:auto; transform:none; }
.bilitop-back-to-top:hover { border-color:var(--primary); color:var(--primary); }
.site-announcement-open { overflow:hidden; }
.site-announcement-modal { position:fixed; z-index:100200; inset:0; display:grid; place-items:center; padding:20px; opacity:0; transition:opacity .2s ease; }
.site-announcement-modal[hidden] { display:none; }
.site-announcement-modal.is-visible { opacity:1; }
.site-announcement-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.52); backdrop-filter:blur(4px); }
.site-announcement-dialog { position:relative; width:min(520px,100%); max-height:min(78vh,680px); padding:30px; overflow:auto; border:1px solid rgba(255,255,255,.7); border-radius:18px; background:var(--bg-card); box-shadow:0 24px 80px rgba(0,0,0,.3); color:var(--text); transform:translateY(12px) scale(.98); transition:transform .2s ease; }
.site-announcement-modal.is-visible .site-announcement-dialog { transform:none; }
.site-announcement-symbol { display:grid; width:50px; height:50px; margin:0 auto 14px; place-items:center; border-radius:50%; background:linear-gradient(135deg,rgba(0,174,236,.14),rgba(251,114,153,.16)); color:var(--primary); font-size:28px; font-weight:700; }
.site-announcement-dialog h2 { margin:0 0 16px; font-size:23px; text-align:center; }
.site-announcement-label { margin:0 0 8px; color:var(--primary); font-size:13px; text-align:center; }
.site-announcement-dialog h2 { overflow-wrap:anywhere; }
.site-announcement-date { display:block; margin:-6px 0 16px; color:var(--text-muted); font-size:12px; text-align:center; }
.site-announcement-date[hidden], .site-announcement-content[hidden] { display:none; }
.site-announcement-content { color:var(--text-secondary); line-height:1.8; overflow-wrap:anywhere; }
.site-announcement-content p + p { margin-top:10px; }
.site-announcement-content a { color:var(--primary); }
.site-announcement-read { display:inline-flex; align-items:center; gap:8px; margin-top:16px; color:var(--primary); font-size:14px; }
.site-announcement-confirm { display:block; width:100%; height:44px; margin-top:24px; border-radius:10px; background:var(--primary); color:#fff; font-size:15px; font-weight:600; }
.site-announcement-confirm:hover { filter:brightness(1.06); }
.header-submit-button { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-width:82px; height:36px; padding:0 16px; border-radius:8px; background:#fb7299; color:#fff!important; font-size:14px; font-weight:600; line-height:1; box-shadow:0 3px 10px rgba(251,114,153,.28); text-shadow:none!important; }
.header-submit-button:hover { background:#fc8bab; transform:translateY(-1px); }
.header-message-menu { position:relative; flex:0 0 auto; }
.header-member-link,.header-store-link { display:flex; flex:0 0 auto; flex-direction:column; align-items:center; justify-content:center; gap:1px; min-width:42px; height:42px; padding:0 4px; color:var(--text-secondary); font-size:12px; }
.header-member-link:hover,.header-store-link:hover { color:var(--primary); }
.bilitop-header.is-banner .header-member-link,.bilitop-header.is-banner .header-store-link { color:var(--banner-text,#fff); text-shadow:0 1px 3px rgba(0,0,0,.55); }
.header-message-trigger { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; min-width:42px; height:42px; padding:0 4px; border:0; background:transparent; color:var(--text-secondary); font-size:12px; cursor:pointer; }
.header-message-icon { position:relative; display:flex; }
.header-message-icon b { position:absolute; top:-9px; left:13px; min-width:17px; height:17px; padding:0 4px; border:2px solid rgba(255,255,255,.9); border-radius:9px; background:#fa5a57; color:#fff; font-size:10px; font-weight:600; line-height:13px; text-align:center; box-sizing:border-box; }
.header-message-dropdown { position:absolute; z-index:1300; top:calc(100% + 10px); right:-45px; width:210px; padding:9px; border:1px solid var(--border); border-radius:10px; background:var(--bg-card); box-shadow:0 10px 30px rgba(0,0,0,.18); color:var(--text); pointer-events:auto; touch-action:manipulation; }
.header-message-dropdown[hidden] { display:none; }
.header-message-dropdown::before { content:""; position:absolute; top:-10px; right:54px; width:48px; height:10px; }
.header-message-dropdown-title { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 9px 10px; border-bottom:1px solid var(--border); }
.header-message-dropdown-title span { color:#fa5a57; font-size:11px; }
.header-message-dropdown a { display:flex; align-items:center; justify-content:space-between; min-height:42px; margin-top:5px; padding:8px 10px; border-radius:7px; color:var(--text-secondary); }
.header-message-dropdown a:hover { background:var(--bg); color:var(--primary); }
.header-message-dropdown a b { min-width:19px; height:19px; padding:0 5px; border-radius:10px; background:#fa5a57; color:#fff; font-size:10px; line-height:19px; text-align:center; }
.bilitop-header.is-banner .header-message-trigger { color:var(--banner-text,#fff); text-shadow:0 1px 3px rgba(0,0,0,.55); }
.bilitop-header.is-banner .header-message-dropdown { text-shadow:none; }
.mobile-menu-toggle,.mobile-bottom-nav { display:none; }
.mobile-nav-overlay { position:fixed; inset:0; z-index:100100; background:rgba(0,0,0,.48); opacity:0; pointer-events:none; touch-action:none; overscroll-behavior:contain; user-select:none; -webkit-user-select:none; transition:opacity .22s; }
.mobile-nav-overlay[hidden] { display:none!important; }
.mobile-nav-drawer { position:fixed; z-index:100101; top:0; bottom:0; left:0; width:min(82vw,320px); padding:18px; background:var(--bg-card); color:var(--text); transform:translateX(-105%); transition:transform .22s ease; box-shadow:8px 0 30px rgba(0,0,0,.2); visibility:hidden; pointer-events:none; }
.mobile-nav-open { overflow:hidden; }
.mobile-nav-open .mobile-nav-overlay { opacity:1; pointer-events:auto; }
.mobile-nav-open .mobile-nav-drawer { transform:translateX(0); visibility:visible; pointer-events:auto; }
.mobile-nav-heading { display:flex; align-items:center; justify-content:space-between; padding:4px 2px 16px; border-bottom:1px solid var(--border); }
.mobile-nav-close { width:34px; height:34px; border-radius:50%; background:var(--bg); color:var(--text-secondary); font-size:24px; line-height:1; }
.mobile-nav-drawer nav { display:grid; gap:4px; padding-top:12px; }
.mobile-nav-drawer nav a { display:flex; align-items:center; gap:12px; min-height:44px; padding:9px 12px; border-radius:8px; color:var(--text-secondary); }
.mobile-nav-drawer nav a:hover { background:var(--bg); color:var(--primary); }
.bilitop-main .content-card a,
.bilitop-main .category-card,
.bilitop-main .bilitop-slide-link,
.bilitop-main .bilitop-ad-item,
.bilitop-main img { -webkit-user-drag:none; }

/* ============ CATEGORIES ============ */
.bilitop-categories,
.bilitop-archive {
    padding: 24px 0;
}

.categories-inner,
.archive-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
}

.archive-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text);
}
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.section-heading .section-title { margin-bottom:0; }
.section-inner > .section-title,.categories-inner > .section-title { margin-bottom:16px; }
.section-more { flex:0 0 auto; padding:5px 11px; border:1px solid var(--border); border-radius:6px; color:var(--text-secondary); font-size:13px; transition:var(--transition); }
.section-more:hover { color:var(--primary); border-color:var(--primary); }
.section-more span { font-size:18px; line-height:0; vertical-align:-1px; }
.section-refresh { padding:6px 12px; border:1px solid var(--border); border-radius:7px; background:var(--bg-card); color:var(--text-secondary); font-size:13px; transition:var(--transition); }
.section-refresh:hover { color:var(--primary); border-color:var(--primary); }
.section-refresh span { display:inline-block; font-size:17px; vertical-align:-1px; }
.section-refresh.is-loading span { animation:bilitopSpin .7s linear infinite; }
.random-content-grid { transition:opacity .18s ease; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 10px;
}

.category-card {
    display: grid;
    grid-template-columns:32px 1fr;
    align-items: center;
    gap: 2px 8px;
    padding: 9px 10px;
    background: transparent;
    border:1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow:none;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow:none;
    border-color:var(--primary);
    color: var(--primary);
}

.category-directory-grid .category-card { grid-template-columns:minmax(0,1fr) auto; padding:13px 15px; }
.category-directory-grid .category-name { min-width:0; font-weight:600; }
.category-directory-grid .category-count { white-space:nowrap; }
.category-directory-grid .category-desc { grid-column:1/-1; }

.category-icon {
    width: 32px;
    height: 32px;
    grid-row:1/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--pink));
    border-radius: 10px;
    color: #fff;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
}

.category-count {
    font-size: 12px;
    color: var(--text-muted);
}

.category-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============ CONTENT GRID ============ */
.bilitop-section {
    padding: 24px 0;
}

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

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 22px 16px;
}

@media (min-width:769px) {
    body.bilitop-front-page .bilitop-section .section-inner,
    body.bilitop-front-page .bilitop-visual-section .section-inner,
    body.bilitop-front-page .home-category-navigation .categories-inner {
        width:calc(100% - 40px);
        max-width:1600px;
        padding-right:0;
        padding-left:0;
    }
    body.bilitop-front-page .bilitop-slider-section .section-inner { max-width:1600px; }
}

@media (min-width:1200px) {
    body.bilitop-front-page .bilitop-section .content-grid {
        grid-template-columns:repeat(6,minmax(0,1fr));
    }
    .bilitop-archive.is-wide-grid .archive-inner {
        width:calc(100% - 40px);
        max-width:1600px;
        padding-right:0;
        padding-left:0;
    }
    .bilitop-archive.is-wide-grid .content-grid {
        grid-template-columns:repeat(6,minmax(0,1fr));
    }
}

.content-card {
    background: transparent;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow:none;
}

.content-card:hover {
    transform:translateY(-2px);
    box-shadow:none;
}

.content-card:hover .card-title {
    color: var(--primary);
}

.card-cover {
    position: relative;
    padding-top: 56.25%;
    border-radius:var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.card-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.content-card:hover .card-cover img {
    transform: scale(1.05);
}

.card-cover-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.card-badge.hot {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
}

.card-time {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
}

.card-info {
    padding: 9px 1px 0;
}

.card-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height:42px;
    margin-bottom:7px;
    color: var(--text);
    transition: var(--transition);
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.card-author {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.card-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-category {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background:rgba(0,161,214,.08);
    color: var(--primary);
}
.browse-tabs { display:flex; gap:8px; }
.browse-tabs a { padding:6px 14px; border-radius:18px; color:var(--text-secondary); background:var(--bg-card); border:1px solid var(--border); }
.browse-tabs a.active,.browse-tabs a:hover { color:#fff; background:var(--primary); border-color:var(--primary); }
.row-actions { display:flex; align-items:center; gap:10px; }
.row-actions button { padding:0; background:transparent; color:#f56c6c; font-size:13px; }

/* ============ USER CENTER ============ */
.bilitop-user-center {
    padding:24px 0;
    position:relative;
    background:transparent;
}
.bilitop-user-center::before {
    display:none;
}

.user-center-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    position:relative; z-index:1;
}

.user-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.user-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 0;
    text-align: center;
    box-shadow:0 10px 30px rgba(30,45,65,.09);
    border:1px solid var(--border);
    margin-bottom: 16px;
}

.user-card-profile {
    padding: 24px 22px 16px;
    overflow: hidden;
    border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 10px 10px;
    background: var(--bg-card);
    background-position: center;
    background-size: cover;
}

.user-card-profile.has-cover {
    background-image: linear-gradient(rgba(255,255,255,.84),rgba(255,255,255,.91)),var(--user-card-cover);
}

.dark .user-card-profile.has-cover,
body.dark-mode .user-card-profile.has-cover {
    background-image: linear-gradient(rgba(25,26,29,.74),rgba(25,26,29,.86)),var(--user-card-cover);
}

.user-avatar-large img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.user-display-name {
    font-size: 18px;
    margin: 12px 0 4px;
}

.user-level {
    margin-bottom: 16px;
}

.vip-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
}

.level-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg);
    color: var(--text-muted);
}

.user-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-checkin {
    width: calc(100% - 40px);
    min-height: 42px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    background: linear-gradient(135deg, var(--primary), var(--pink));
    color: #fff;
    transition: var(--transition);
    margin: 16px 20px 20px;
}

.btn-checkin:hover:not(.checked):not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-checkin.checked {
    /* Opaque completed state stays legible over custom/light profile covers. */
    background: #e4f3f5;
    background: color-mix(in srgb, var(--primary) 12%, #fff);
    border-color: #aad9de;
    border-color: color-mix(in srgb, var(--primary) 35%, #fff);
    color: #196573;
    color: color-mix(in srgb, var(--primary) 35%, #183039);
}

.btn-checkin:disabled {
    opacity: 1;
    cursor: default;
}

.btn-checkin:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.dark .btn-checkin.checked {
    background: #1c343b;
    background: color-mix(in srgb, var(--primary) 16%, #18252e);
    border-color: #3f707c;
    border-color: color-mix(in srgb, var(--primary) 45%, #35454f);
    color: #ace2e9;
    color: color-mix(in srgb, var(--primary) 25%, #f0f6fa);
}

/* ============ CAPTCHA ============ */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-canvas {
    width: 120px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    background: #f5f7fa;
    flex-shrink: 0;
}

.captcha-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text);
}

.captcha-input:focus {
    border-color: var(--primary);
    outline: none;
}

.captcha-refresh {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.captcha-refresh:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 签到验证码弹窗 */
.captcha-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-modal-inner {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    width: 340px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.captcha-modal-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.captcha-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.captcha-modal-actions .btn-primary,
.captcha-modal-actions .btn-secondary {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.checkin-question-list{display:grid;gap:10px}.checkin-question{display:block}.checkin-question span{display:block;padding:8px 10px;background:#fff9e8;color:#e66b18;font-size:12px;line-height:1.5}.checkin-question input{box-sizing:border-box;width:100%;height:36px;padding:0 10px;border:0;border-bottom:1px solid var(--border);outline:0;background:var(--bg-card);color:var(--text)}.checkin-question-loading{padding:20px;color:var(--text-muted);text-align:center}.dark .checkin-question span{background:rgba(230,162,60,.12)}

.captcha-modal-actions .btn-primary {
    background: var(--primary);
    color: #fff;
}

.captcha-modal-actions .btn-secondary {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* User Menu */
.user-menu {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:0 8px 24px rgba(30,45,65,.07);
    border:1px solid var(--border);
}

.user-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.user-menu .menu-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.user-menu .menu-item.active {
    color: var(--primary);
    background: rgba(0,161,214,0.06);
    border-left-color: var(--primary);
}

/* User Content */
.user-content {
    flex: 1;
    min-width: 0;
    background:var(--bg-card);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    padding:24px;
    box-shadow:0 10px 30px rgba(30,45,65,.07);
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.content-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.current-balance {
    font-size: 14px;
    color: var(--text-secondary);
}

.current-balance strong {
    color: var(--primary);
    font-size: 18px;
}

/* Account overview: scoped flat cards, no additional data queries. */
.user-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.user-info-grid .info-card { --info-accent:var(--primary); display:flex; flex-direction:column; min-width:0; gap:12px; padding:18px; border:1px solid var(--border); border-radius:10px; background:var(--bg); }
.user-info-grid .info-card-member { --info-accent:var(--pink); }
.user-info-grid .info-card-checkin { --info-accent:var(--gold); }
.user-info-grid .info-card-checkin.is-checked { --info-accent:#339b72; }
.user-info-grid .info-card-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.user-info-grid .info-label { margin:0; padding:0; color:var(--text-secondary); font-size:13px; font-weight:400; line-height:1.6; overflow-wrap:anywhere; }
.user-info-grid .info-icon { position:relative; isolation:isolate; display:flex; align-items:center; justify-content:center; flex:0 0 34px; width:34px; height:34px; border-radius:9px; color:var(--info-accent); }
.user-info-grid .info-icon::before { position:absolute; inset:0; z-index:-1; content:""; border-radius:inherit; background:currentColor; opacity:.1; }
.user-info-grid .info-icon svg { display:block; }
.user-info-grid .info-detail { flex:1; min-width:0; }
.user-info-grid .info-value { display:block; margin:0; color:var(--text); font-size:22px; font-weight:600; line-height:1.4; overflow-wrap:anywhere; }
.user-info-grid .info-value-number { font-size:28px; font-variant-numeric:tabular-nums; }
.user-info-grid .info-sub { display:block; color:var(--text-secondary); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.user-info-grid .info-detail > .info-sub { margin-top:6px; }
.user-info-grid .info-sub b { color:var(--text); font-weight:500; }
.user-info-grid .info-member-validity { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 7px; }
.user-info-grid .info-period { padding:0 5px; border:1px solid var(--border); border-radius:4px; background:var(--bg-card); font-size:11px; }
.user-info-grid .info-card-footer { display:flex; align-items:center; min-height:33px; margin-top:auto; padding-top:8px; border-top:1px solid var(--border); }
.user-info-grid .info-link { display:inline-flex; align-items:center; gap:7px; padding:2px 0; color:var(--primary); font-size:13px; line-height:20px; text-decoration:none; }
.user-info-grid .info-link > [aria-hidden="true"] { font-size:18px; line-height:1; }
.user-info-grid .info-link:hover { text-decoration:none; }
.user-info-grid .info-link:hover .info-link-label { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; text-decoration-skip-ink:none; }
.user-info-grid .info-link:focus-visible { outline:2px solid var(--primary); outline-offset:3px; border-radius:2px; }
@media(max-width:768px) {
    .user-info-grid { gap:10px; }
    .user-info-grid .info-card { position:relative; gap:7px; padding:14px 16px; }
    .user-info-grid .info-card-heading { padding-right:42px; min-height:21px; }
    .user-info-grid .info-icon { position:absolute; top:14px; right:16px; }
    .user-info-grid .info-detail { padding-right:42px; }
    .user-info-grid .info-value,.user-info-grid .info-value-number { font-size:22px; }
    .user-info-grid .info-card-footer { min-height:31px; padding-top:6px; }
}

/* /user/ home: shared account data, lighter sections and bounded recent lists. */
.user-home { min-width:0; }
.user-home-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:24px; padding-bottom:22px; border-bottom:1px solid var(--border); }
.user-home-welcome { flex:1; min-width:0; }
.user-home-welcome h2 { position:relative; margin:0 0 8px; padding-left:14px; font-size:20px; line-height:1.5; color:var(--text); }
.user-home-welcome h2::before { content:""; position:absolute; top:6px; bottom:6px; left:0; width:4px; border-radius:2px; background:var(--primary); }
.user-home-welcome p { display:flex; align-items:baseline; min-width:0; margin:0; color:var(--text-muted); font-size:13px; line-height:1.7; }
.user-home-welcome strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-secondary); font-weight:400; }
.user-home-actions { display:flex; flex-wrap:wrap; gap:10px; }
.user-home-actions a { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:38px; padding:0 14px; border:1px solid var(--border); border-radius:4px; color:var(--text-secondary); font-size:13px; }
.user-home-actions a:hover { color:var(--primary); border-color:var(--primary); }
.user-home .user-info-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:0; }
.user-home .user-info-grid .info-card { gap:12px; padding:18px; border-radius:6px; background:var(--bg-card); }
.user-home .user-info-grid .info-card-heading { min-height:28px; padding-right:0; }
.user-home .user-info-grid .info-icon { position:relative; top:auto; right:auto; flex-basis:30px; width:30px; height:30px; border-radius:6px; }
.user-home .user-info-grid .info-detail { padding-right:0; }
.user-home .user-info-grid .info-value { font-size:23px; font-weight:600; }
.user-home .user-info-grid .info-value-number { font-size:28px; letter-spacing:.3px; }
.user-home .info-wallet-balance { display:flex; flex-wrap:wrap; gap:4px 8px; margin-top:7px; color:var(--text-muted); font-size:12px; line-height:1.7; }
.user-home .info-wallet-balance strong { color:var(--text-secondary); font-weight:500; overflow-wrap:anywhere; }
.user-home .user-info-grid .info-card-footer { flex-wrap:wrap; gap:4px 14px; min-height:30px; padding-top:10px; }
.user-home .user-info-grid .info-link { font-size:12px; }
.user-home .center-level-progress { margin:16px 0 0; padding:12px 0; border:0; border-radius:0; background:transparent; }
.user-home-shortcuts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:24px 0; }
.user-home-shortcuts a { display:flex; align-items:center; min-width:0; gap:10px; min-height:68px; padding:12px; border:1px solid var(--border); border-radius:6px; color:var(--text-secondary); font-size:13px; transition:border-color .18s,color .18s; }
.user-home-shortcuts a:hover { border-color:var(--primary); color:var(--primary); }
.user-home-shortcut-icon { display:grid; place-items:center; flex:0 0 32px; height:32px; color:var(--primary); }
.user-home-shortcuts a:nth-child(3) .user-home-shortcut-icon { color:var(--gold); }
.user-home-shortcuts a:nth-child(4) .user-home-shortcut-icon { color:var(--pink); }
.user-home-shortcuts a > span:nth-child(2) { min-width:0; overflow-wrap:anywhere; }
.user-home-shortcut-arrow { margin-left:auto; color:var(--text-muted); font-size:18px; }
.user-home .membership-schedule-panel { margin:0 0 24px; border-color:var(--border); border-radius:6px; background:var(--bg-card); }
.user-home-activity { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; padding-top:4px; }
.user-home-section { min-width:0; }
.user-home-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:14px; border-bottom:1px solid var(--border); }
.user-home-section-heading h3 { margin:0; color:var(--text); font-size:16px; font-weight:600; }
.user-home-section-heading a { flex-shrink:0; display:flex; gap:6px; align-items:center; min-height:32px; color:var(--text-muted); font-size:12px; }
.user-home-section-heading a:hover { color:var(--primary); }
.user-home-records { margin:0; padding:0; list-style:none; }
.user-home-record { padding:16px 0; border-bottom:1px solid var(--border); }
.user-home-record:last-child { border-bottom:0; }
.user-home-record-title { display:-webkit-box; min-height:22px; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow-wrap:anywhere; color:var(--text); font-size:14px; line-height:22px; }
.user-home-record-title a { color:inherit; }
.user-home-record-title a:hover { color:var(--primary); }
.user-home-record-meta { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 10px; margin-top:9px; color:var(--text-muted); font-size:12px; line-height:1.6; }
.user-home-record-meta .status-badge { padding:1px 7px; border-radius:4px; font-size:11px; line-height:20px; }
.user-home-record-meta time { font-variant-numeric:tabular-nums; }
.user-home-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:210px; padding:24px 12px; text-align:center; color:var(--text-muted); }
.user-home-empty svg { opacity:.65; }
.user-home-empty p { margin:0; font-size:13px; line-height:1.8; }
.user-home-empty a { display:inline-flex; align-items:center; min-height:36px; gap:6px; font-size:13px; color:var(--primary); }
.user-home a:focus-visible { outline:2px solid var(--primary); outline-offset:3px; border-radius:4px; }
@media(max-width:900px) {
    .user-home-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .user-home-activity { grid-template-columns:minmax(0,1fr); gap:24px; }
}
@media(max-width:600px) {
    .user-home-header { align-items:flex-start; gap:14px; margin-bottom:18px; padding-bottom:18px; }
    .user-home-welcome { flex-basis:100%; }
    .user-home-actions a { min-height:40px; }
    .user-home .user-info-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .user-home .user-info-grid .info-card { padding:14px 12px; gap:10px; }
    .user-home .user-info-grid .info-card-credits { grid-column:1 / -1; }
    .user-home .user-info-grid .info-value { font-size:20px; }
    .user-home .user-info-grid .info-value-number { font-size:26px; }
    .user-home .info-card-credits .info-detail { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px 12px; }
    .user-home .info-card-credits .info-wallet-balance { margin-top:0; }
    .user-home-shortcuts { margin:18px 0 24px; gap:10px; }
    .user-home-shortcuts a { gap:8px; min-height:60px; padding:10px; }
    .user-home-shortcut-arrow { display:none; }
    .user-home-empty { min-height:180px; }
}
/* Table Lists */
.content-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow:none;
    border:1px solid var(--border);
}

.content-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.table-list {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow:none;
    border:1px solid var(--border);
}

.table-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    transition: var(--transition);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: var(--bg);
}

.row-title {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-amount {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.row-amount.positive { color: #67c23a; }
.row-amount.negative { color: #f56c6c; }

.payment-reconcile { line-height:1.6; color:var(--text-secondary); overflow-wrap:anywhere; }
.payment-reconcile button { min-height:36px; padding:5px 12px; border:1px solid var(--border); border-radius:6px; background:var(--bg-white); color:var(--text); font:inherit; cursor:pointer; }
.payment-reconcile button:hover { border-color:var(--primary); color:var(--primary); }
.payment-reconcile button:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.payment-reconcile button:disabled { cursor:default; opacity:.65; }

.row-balance {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.row-date {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.row-actions a {
    color: var(--primary);
    font-size: 13px;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-pending { background: #fdf6ec; color: #e6a23c; }
.status-published, .status-completed { background: #f0f9eb; color: #67c23a; }
.status-rejected, .status-cancelled { background: #fef0f0; color: #f56c6c; }
.status-draft { background: var(--bg); color: var(--text-muted); }
.status-paid { background: #ecf5ff; color: #409eff; }

.dark .status-pending { background: rgba(230,162,60,0.15); }
.dark .status-published, .dark .status-completed { background: rgba(103,194,58,0.15); }
.dark .status-rejected, .dark .status-cancelled { background: rgba(245,108,108,0.15); }
.dark .status-paid { background: rgba(64,158,255,0.15); }

.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

/* ============ RECHARGE ============ */
.recharge-section {
    margin-bottom: 24px;
}

.recharge-target-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.recharge-target {
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text);
    padding: 13px 16px;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.recharge-target strong,
.recharge-target span {
    display: block;
}

.recharge-target strong {
    font-size: 15px;
}

.recharge-target span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.recharge-target:hover,
.recharge-target.active {
    border-color: var(--primary);
}

.recharge-target:focus-visible,
.recharge-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.recharge-target:disabled,
.recharge-card:disabled {
    cursor: wait;
    opacity: .65;
}

.recharge-target.active {
    background: color-mix(in srgb, var(--primary) 8%, var(--bg-card));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 13%, transparent);
}

.recharge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.recharge-card {
    position: relative;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
}

.recharge-card:hover {
    border-color: var(--primary);
}

.recharge-card.selected {
    border-color: var(--primary);
    background: rgba(0, 161, 214, 0.06);
    box-shadow: 0 0 0 1px var(--primary);
}

.recharge-card.hot {
    border-color: #fb7299;
}

.recharge-card.hot.selected {
    border-color: #fb7299;
    background: rgba(251, 114, 153, 0.06);
    box-shadow: 0 0 0 1px #fb7299;
}

.hot-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: #fb7299;
    color: #fff;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 0 8px 0 8px;
}

.recharge-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.recharge-credits {
    font-size: 13px;
    color: var(--primary);
}

.recharge-tip {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.btn-recharge {
    display: inline-block;
    padding: 10px 32px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-recharge:hover:not(:disabled) {
    filter: brightness(1.1);
}

.btn-recharge:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ AUTH ============ */
.bilitop-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h));
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.auth-form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,161,214,0.1);
}

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.auth-links {
    text-align: center;
    margin-top: 16px;
}

.auth-links a {
    color: var(--primary);
    font-size: 14px;
}

.auth-form .captcha-refresh { width:44px; height:44px; border-radius:6px; }
.auth-form .captcha-canvas { height:44px; }
.auth-form .captcha-refresh:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
@media (max-width:480px) {
    .auth-card { padding:28px 24px; }
    .auth-form .captcha-row { display:grid; grid-template-columns:minmax(0,1fr) 44px; }
    .auth-form .captcha-canvas { grid-column:1; grid-row:1; }
    .auth-form .captcha-refresh { grid-column:2; grid-row:1; }
    .auth-form .captcha-input { grid-column:1 / -1; grid-row:2; }
}

/* ============ SUBMIT PAGE ============ */
.bilitop-submit {
    padding: 24px 0;
}

.submit-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
}

.submit-sidebar {
    width: 200px;
    flex-shrink: 0;
    align-self:flex-start;
    position:sticky;
    top:calc(var(--header-h) + 20px);
    padding:18px 12px;
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    background:var(--bg-card);
}

.submit-sidebar h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.submit-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.submit-menu .menu-item:hover, .submit-menu .menu-item.active {
    background: rgba(0,161,214,0.06);
    color: var(--primary);
}

.submit-content {
    flex: 1;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow:0 12px 34px rgba(30,45,65,.08);
    border:1px solid var(--border);
}
.submit-content .wp-editor-wrap { border:0; overflow:visible; background:transparent; }
.submit-content .wp-editor-tools { padding:0; margin-bottom:0; background:transparent; }
.submit-content .wp-editor-container { border:0; background:transparent; }
.submit-content .mce-top-part::before { box-shadow:none; }
.submit-content .mce-tinymce { border:0!important; background:transparent!important; box-shadow:none!important; }
.submit-content .mce-toolbar-grp,.submit-content .quicktags-toolbar { margin-bottom:0; border:1px solid var(--border)!important; border-radius:8px 8px 0 0; background:#f8fafc; overflow-x:auto; }
.submit-content .mce-toolbar-grp .mce-flow-layout { min-width:max-content; white-space:nowrap; }
.submit-content .mce-edit-area { border:1px solid var(--border)!important; border-top:0!important; border-radius:0 0 8px 8px; overflow:hidden; background:var(--bg-card); }
.dark .submit-content .mce-toolbar-grp,.dark .submit-content .quicktags-toolbar { background:#292b30; }
.submit-content-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.submit-content-heading h2 { margin:2px 0 0; padding:0; border:0; }
.submit-content-heading > a { padding:7px 13px; border:1px solid var(--border); border-radius:7px; color:var(--primary); font-size:13px; }
.submit-eyebrow { color:var(--primary); font-size:10px; letter-spacing:1.5px; font-weight:700; }
.submission-notice { display:flex; gap:12px; padding:14px 16px; margin-bottom:22px; border:1px solid rgba(230,162,60,.3); border-radius:9px; background:rgba(230,162,60,.08); color:var(--text-secondary); font-size:13px; line-height:1.7; }
.submission-notice strong { display:block; color:#c77c10; margin-bottom:2px; }
.submission-notice-icon { flex:0 0 24px; width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; background:#e6a23c; font-weight:700; }
.submit-form-message { margin:0 0 18px; padding:11px 14px; border:1px solid rgba(245,108,108,.35); border-radius:8px; background:rgba(245,108,108,.09); color:#e45656; font-size:14px; }
.submit-form-message[hidden] { display:none; }
.submit-field-message { margin-top:9px; padding:9px 12px; border:1px solid rgba(245,108,108,.35); border-radius:7px; background:rgba(245,108,108,.09); color:#e45656; font-size:13px; line-height:1.5; }
.submit-field-invalid { border-color:#e45656 !important; box-shadow:0 0 0 3px rgba(245,108,108,.1) !important; }
.download-provider-preview { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 14px; color:var(--text-muted); font-size:13px; }
.download-provider-preview strong { padding:4px 9px; border:1px solid color-mix(in srgb,var(--primary) 24%,var(--border)); border-radius:999px; background:color-mix(in srgb,var(--primary) 8%,var(--bg-card)); color:var(--primary); font-weight:600; }
.submit-editor-card { margin:0 -24px 22px; padding:20px 24px 24px; border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--bg); }
.submit-editor-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:0; padding:0 0 9px; }
.submit-editor-heading label { color:var(--text); font-weight:600; }
.submit-editor-heading span { color:var(--text-muted); font-size:12px; }
.submit-editor-media-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:0 0 9px; }
.submit-editor-media-button,.submit-editor-remote-cancel { min-height:32px; padding:5px 12px; border:1px solid var(--border); border-radius:6px; background:var(--bg-card); color:var(--text-secondary); cursor:pointer; }
.submit-editor-media-button:hover { color:var(--primary); border-color:var(--primary); }
.submit-editor-media-tools > .submit-editor-media-button { display:none; }
.submit-editor-media-tip { color:var(--text-muted); font-size:12px; }
.submit-editor-remote-panel { display:flex; align-items:center; flex:1 1 390px; gap:7px; }
.submit-editor-remote-panel[hidden] { display:none; }
.submit-editor-remote-panel input { flex:1; min-width:170px; height:34px; padding:5px 10px; border:1px solid var(--border); border-radius:6px; background:var(--bg-card); color:var(--text); }
.submit-editor-remote-panel .btn-primary { min-height:34px; padding:5px 13px; }
.submit-image-library-open { overflow:hidden; }
.submit-image-library { position:fixed; z-index:100150; inset:0; display:grid; place-items:center; padding:20px; opacity:0; transition:opacity .18s ease; }
.submit-image-library[hidden] { display:none; }
.submit-image-library.is-visible { opacity:1; }
.submit-image-library-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.52); backdrop-filter:blur(3px); }
.submit-image-library-dialog { position:relative; display:flex; width:min(820px,100%); max-height:min(82vh,760px); overflow:hidden; flex-direction:column; border:1px solid var(--border); border-radius:16px; background:var(--bg-card); box-shadow:0 24px 80px rgba(0,0,0,.28); transform:translateY(10px) scale(.985); transition:transform .18s ease; }
.submit-image-library.is-visible .submit-image-library-dialog { transform:none; }
.submit-image-library-dialog > header { display:flex; align-items:center; justify-content:space-between; min-height:62px; padding:0 20px; border-bottom:1px solid var(--border); }
.submit-image-library-dialog > header h2 { margin:0; font-size:20px; }
.submit-image-library-close { width:36px; height:36px; border-radius:50%; background:var(--bg); color:var(--text-secondary); font-size:26px; line-height:1; }
.submit-image-library-tabs { display:flex; gap:24px; padding:0 20px; border-bottom:1px solid var(--border); }
.submit-image-library-tabs button { position:relative; height:48px; background:transparent; color:var(--text-secondary); font-size:14px; }
.submit-image-library-tabs button.active { color:var(--primary); font-weight:600; }
.submit-image-library-tabs button.active::after { content:''; position:absolute; right:0; bottom:0; left:0; height:2px; background:var(--primary); }
.submit-image-library-panel { display:none; min-height:360px; padding:20px; overflow:auto; }
.submit-image-library-panel.active { display:block; }
.submit-image-upload-zone { display:flex; min-height:280px; align-items:center; justify-content:center; flex-direction:column; gap:9px; border:2px dashed var(--border); border-radius:12px; background:var(--bg); color:var(--text-secondary); cursor:pointer; transition:border-color .2s,color .2s; }
.submit-image-upload-zone:hover { border-color:var(--primary); color:var(--primary); }
.submit-image-upload-icon { display:grid; width:54px; height:54px; place-items:center; border-radius:50%; background:var(--bg-card); font-size:30px; }
.submit-image-upload-zone small,.submit-image-upload-rule { color:var(--text-muted); }
.submit-image-upload-rule { margin:12px 0 0; font-size:12px; text-align:center; }
.submit-image-library-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.submit-image-library-item { min-width:0; padding:0; overflow:hidden; border:2px solid transparent; border-radius:9px; background:var(--bg); color:var(--text-secondary); text-align:left; }
.submit-image-library-item:hover { border-color:var(--primary); }
.submit-image-library-item.selected { position:relative; border-color:var(--primary); box-shadow:0 0 0 2px rgba(0,174,236,.13); }
.submit-image-library-item.selected::after { content:'✓'; position:absolute; top:6px; right:6px; display:grid; width:23px; height:23px; place-items:center; border:2px solid #fff; border-radius:50%; background:var(--primary); color:#fff; font-size:13px; font-weight:700; box-shadow:0 2px 6px rgba(0,0,0,.2); }
.submit-image-library-item img { display:block; width:100%; aspect-ratio:1/1; object-fit:cover; }
.submit-image-library-item span { display:block; padding:7px 8px; overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.submit-image-library-status { padding:70px 10px; color:var(--text-muted); text-align:center; }
.submit-image-library-more { display:block; min-width:120px; height:38px; margin:18px auto 0; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); color:var(--text-secondary); }
.submit-image-library-more:hover { border-color:var(--primary); color:var(--primary); }
.submit-network-image-form { max-width:620px; margin:34px auto; }
.submit-network-image-form label { display:block; margin-bottom:9px; color:var(--text); font-weight:600; }
.submit-network-image-form input { width:100%; height:44px; padding:0 13px; border:1px solid var(--border); border-radius:8px; background:var(--bg); color:var(--text); outline:0; }
.submit-network-image-form input:focus { border-color:var(--primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent); }
.submit-network-image-form p { margin:8px 0 22px; color:var(--text-muted); font-size:12px; }
.submit-network-image-form > div { display:flex; justify-content:flex-end; gap:10px; }
.submit-network-image-form button { min-width:100px; min-height:40px; }
.submit-image-library-actions { position:sticky; bottom:-20px; display:flex; align-items:center; justify-content:space-between; gap:14px; margin:18px -20px -20px; padding:13px 20px; border-top:1px solid var(--border); background:var(--bg-card); box-shadow:0 -5px 16px rgba(0,0,0,.06); }
.submit-image-library-actions span { color:var(--text-secondary); font-size:13px; }
.submit-image-library-actions .btn-primary { min-width:150px; min-height:40px; }
.submit-image-library-actions .btn-primary:disabled { opacity:.45; cursor:not-allowed; }

/* Wide resource-submission workspace */
@media (min-width:769px) {
    .bilitop-submit { padding:18px 0 40px; }
    .bilitop-submit .submit-inner { display:block; width:calc(100% - 40px); max-width:1600px; padding:0; }
    .bilitop-submit .submit-sidebar { display:none; }
    .bilitop-submit .submit-content { width:100%; padding:0 38px 34px; border-radius:2px; box-shadow:0 5px 24px rgba(30,45,65,.045); }
    .bilitop-submit .submit-content-heading { min-height:64px; margin:0 -38px; padding:0 38px; border-bottom:1px solid var(--border); }
    .bilitop-submit .submit-content-heading > div { align-self:stretch; display:flex; align-items:center; }
    .bilitop-submit .submit-content-heading h2 { position:relative; margin:0; padding:0; border:0; color:var(--primary); font-size:18px; }
    .bilitop-submit .submit-content-heading h2::after { content:''; position:absolute; right:0; bottom:-20px; left:0; height:2px; background:var(--primary); }
    .bilitop-submit .submit-eyebrow { display:none; }
    .bilitop-submit .submit-content-heading > a { border-color:color-mix(in srgb,var(--primary) 35%,transparent); color:var(--primary); }
    .bilitop-submit .submission-notice { align-items:center; margin:0 -38px 14px; padding:10px 18px; border:0; border-radius:0; background:color-mix(in srgb,var(--primary) 10%,transparent); color:var(--primary); }
    .bilitop-submit .submission-notice-icon { display:none; }
    .bilitop-submit .submission-notice strong { display:inline; margin-right:7px; color:var(--primary); }
    .bilitop-submit .submission-notice strong + div { display:inline; }
    .bilitop-submit #bilitop-submit-form { padding-top:8px; }
    .bilitop-submit #bilitop-submit-form > .form-group:first-of-type { display:grid; grid-template-columns:130px minmax(0,1fr); align-items:center; margin:8px 0 18px; }
    .bilitop-submit #bilitop-submit-form > .form-group:first-of-type > label { margin:0; padding-right:20px; text-align:right; }
    .bilitop-submit #bilitop-submit-form > .form-group:first-of-type input { height:42px; border-radius:4px; background:var(--bg-card); }
    .bilitop-submit .submit-editor-card { margin:0 0 18px; padding:0; border:1px solid var(--border); border-radius:3px; background:var(--bg-card); }
    .bilitop-submit .submit-editor-heading { min-height:44px; padding:0 14px; border-bottom:1px solid var(--border); }
    .bilitop-submit .submit-editor-heading label { font-size:14px; }
    .bilitop-submit .submit-editor-media-tools { padding:9px 12px; border-bottom:1px solid var(--border); background:var(--bg); }
    .bilitop-submit .submit-content .mce-toolbar-grp,
    .bilitop-submit .submit-content .quicktags-toolbar { border:0!important; border-bottom:1px solid var(--border)!important; border-radius:0; }
    .bilitop-submit .submit-content .mce-edit-area { border:0!important; border-radius:0; }
    .bilitop-submit .submit-editor-card textarea#submit-editor { min-height:340px; border:0; border-radius:0; }
    .bilitop-submit .submit-collapsible { border-radius:4px; }
    .bilitop-submit .form-actions { justify-content:flex-end; }
    .bilitop-submit .form-actions .btn-primary { min-width:160px; height:42px; border-radius:4px; background:var(--primary); }
    .bilitop-submit .form-actions .btn-primary:hover { background:var(--primary-light); }
    .bilitop-submit .form-actions .btn-secondary { min-width:120px; border-radius:4px; }
}

/* User relationships and private messages */
.bilitop-author-page { padding:28px 16px 48px; background:var(--bg); }
.author-space-shell { width:min(1500px,100%); margin:auto; }
.author-space-hero { position:relative; isolation:isolate; min-height:270px; margin:0; overflow:hidden; background:linear-gradient(135deg,#7fd6f5,#8f9eea 55%,#f2a8c2); background-position:center; background-size:cover; }
.author-space-hero::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,rgba(0,0,0,.04) 30%,rgba(0,0,0,.66) 100%); }
.author-space-identity { position:absolute; left:34px; right:250px; bottom:24px; display:flex; align-items:center; gap:18px; min-width:0; }
.author-space-avatar { flex:0 0 104px; width:104px; height:104px; padding:3px; border-radius:50%; background:rgba(255,255,255,.92); box-shadow:0 3px 14px rgba(0,0,0,.2); }
.author-space-avatar img { display:block; width:100%; height:100%; border-radius:50%; object-fit:cover; }
.author-space-hero .author-profile-main h1 { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 8px; color:#fff; font-size:28px; text-shadow:0 2px 5px rgba(0,0,0,.45); }
.author-space-hero .author-profile-main p { overflow:hidden; margin:0; color:rgba(255,255,255,.92); line-height:1.6; text-overflow:ellipsis; white-space:nowrap; text-shadow:0 1px 3px rgba(0,0,0,.5); }
.author-space-hero .author-social-actions,.author-cover-manage { position:absolute; right:28px; bottom:28px; }
.author-space-hero .author-social-actions { justify-content:flex-end; max-width:calc(100% - 56px); }
.author-space-hero .author-social-actions > button,.author-space-hero .author-social-actions > a,.author-cover-manage { display:inline-flex; align-items:center; justify-content:center; min-width:110px; max-width:150px; min-height:38px; padding:8px 16px; border:1px solid transparent; border-radius:6px; color:#fff; font-weight:600; }
.author-space-hero .author-social-actions > .btn-social-follow,
.author-space-hero .author-social-actions > .btn-social-message { box-sizing:border-box; flex:0 0 120px; width:120px; min-width:120px; max-width:120px; height:38px; min-height:38px; padding:0 14px; line-height:1; }
.author-space-hero .author-social-actions .btn-social-follow { border-color:var(--primary); background:var(--primary); color:#fff; }
.author-space-hero .author-social-actions .btn-social-follow:hover { border-color:#26bbed; background:#26bbed; }
.author-space-hero .author-social-actions .btn-social-message { border-color:rgba(255,255,255,.35); background:rgba(255,255,255,.18); color:#fff; backdrop-filter:blur(6px); }
.author-more-actions { position:relative; flex:0 0 auto; }
.author-more-toggle { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; width:40px; height:38px; padding:0; border:1px solid rgba(255,255,255,.4); border-radius:6px; background:rgba(255,255,255,.16); cursor:pointer; backdrop-filter:blur(6px); }
.author-more-toggle i { display:block; width:3px; height:3px; border-radius:50%; background:#fff; }
.author-more-menu { position:absolute; z-index:100; right:0; left:auto; bottom:calc(100% + 8px); width:max-content; min-width:112px; max-width:calc(100vw - 28px); padding:6px; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); box-shadow:0 8px 24px rgba(0,0,0,.18); pointer-events:auto; touch-action:manipulation; }
.author-more-menu[hidden] { display:none; }
.author-more-menu .btn-social-block { width:100%; border:0; background:transparent; text-align:center; white-space:nowrap; }
.author-more-menu .btn-social-block:hover { background:var(--bg); }
.author-space-nav-wrap { display:flex; align-items:stretch; justify-content:space-between; gap:20px; min-height:66px; padding:0 28px; border:1px solid var(--border); border-top:0; background:var(--bg-card); }
.author-space-nav { display:flex; align-items:stretch; gap:28px; overflow-x:auto; }
.author-space-nav a { position:relative; display:flex; align-items:center; flex:none; color:var(--text-secondary); font-size:15px; }
.author-space-nav a.active { color:var(--primary); font-weight:600; }
.author-space-nav a.active::after { content:""; position:absolute; right:0; bottom:0; left:0; height:3px; border-radius:3px 3px 0 0; background:var(--primary); }
.author-space-nav small { margin-left:5px; color:var(--text-muted); font-size:11px; }
.author-space-stats { display:flex; align-items:center; gap:28px; flex:none; }
.author-space-stats span,.author-space-stat-link { display:grid; gap:3px; min-width:44px; color:var(--text-muted); text-align:center; font-size:12px; }
.author-space-stats b { color:var(--text); font-size:16px; }
.author-space-stat-link { border-radius:6px; transition:color .18s,background .18s; }
.author-space-stat-link:hover { background:var(--bg); color:var(--primary); }
.author-space-body { display:grid; grid-template-columns:minmax(0,1fr) 280px; align-items:start; gap:18px; padding-top:24px; }
.author-space-body:not(.author-space-tab-home) { grid-template-columns:minmax(0,1fr); }
.author-space-content,.author-space-panel,.author-creator-entry { border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-card); }
.author-space-content { min-width:0; padding:22px; }
.author-space-section-heading { display:flex; align-items:baseline; gap:9px; margin-bottom:18px; border-bottom:1px solid var(--border); }
.author-space-section-heading h2 { margin:0; padding:0 0 13px; color:var(--text); font-size:22px; }
.author-space-section-heading span { color:var(--text-muted); font-size:12px; }
.author-space-sidebar { display:grid; gap:14px; }
.author-following-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.author-following-card { display:flex; align-items:center; gap:12px; min-width:0; padding:14px; border-radius:8px; background:var(--bg); color:var(--text); }
.author-following-card img { flex:0 0 56px; width:56px; height:56px; border-radius:50%; object-fit:cover; }
.author-following-card span { display:flex; align-items:center; gap:6px; min-width:0; }
.author-following-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.author-profile-detail > p { margin:0 0 22px; color:var(--text-secondary); line-height:1.8; }
.author-profile-detail dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; margin:0; }
.author-profile-detail dl div { padding:14px; border-radius:8px; background:var(--bg); }
.author-profile-detail dt { color:var(--text-muted); font-size:12px; }
.author-profile-detail dd { margin:5px 0 0; color:var(--text); font-size:16px; font-weight:600; }
.author-space-panel { padding:20px; }
.author-space-panel h3 { margin:0 0 15px; color:var(--text); font-size:17px; }
.author-space-panel p { margin:0 0 17px; color:var(--text-secondary); line-height:1.75; overflow-wrap:anywhere; }
.author-space-panel dl { margin:0; padding-top:12px; border-top:1px solid var(--border); }
.author-space-panel dl div { display:flex; justify-content:space-between; gap:12px; padding:6px 0; }
.author-space-panel dt { color:var(--text-muted); }.author-space-panel dd { margin:0; color:var(--text); }
.author-creator-entry { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:18px 20px; color:var(--primary); }
.author-creator-entry span { color:var(--text-muted); font-size:12px; }
.user-space-entry .menu-external-icon { width:13px; height:13px; margin-left:auto; opacity:.55; }
.author-profile-card { position:relative; isolation:isolate; display:flex; align-items:center; gap:18px; min-height:160px; padding:24px; margin-bottom:22px; overflow:hidden; border:1px solid var(--border); border-radius:var(--radius-lg); background-color:var(--bg-card); background-position:center; background-size:cover; }
.author-profile-card.has-cover::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,rgba(0,0,0,.58),rgba(0,0,0,.22)); }
.author-profile-card.has-cover .author-profile-main h1,.author-profile-card.has-cover .author-profile-main p { color:#fff; text-shadow:0 1px 3px rgba(0,0,0,.45); }
.author-profile-card > img { flex:0 0 96px; width:96px; height:96px; border-radius:50%; object-fit:cover; }
.author-profile-main { flex:1; min-width:0; }
.author-profile-main h1 { margin:0 0 8px; color:var(--text); }
.author-profile-main p { margin:0; color:var(--text-muted); }
.profile-cover-preview { width:180px; min-width:180px; height:100px; border:1px solid var(--border); border-radius:10px; background:linear-gradient(135deg,rgba(0,161,214,.16),rgba(251,114,153,.15)); background-position:center; background-size:cover; }
.profile-cover-settings form { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.author-social-actions,.social-user-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.author-space-hero .author-social-actions { display:flex; align-items:center; flex-wrap:nowrap; width:auto; white-space:nowrap; }
.author-space-hero .author-social-actions > .btn-social-follow,
.author-space-hero .author-social-actions > .btn-social-message,
.author-space-hero .author-social-actions > .author-more-actions { flex:0 0 auto; }
.author-card-social { display:flex; align-items:center; gap:7px; margin-top:14px; }
.author-card-social > .btn-social-follow,.author-card-social > .btn-social-message { flex:1 1 0; min-width:0; }
.author-card-social > .author-more-actions { flex:0 0 34px; }
.author-card-social .author-more-toggle { width:34px; height:34px; border-color:var(--border); background:var(--bg-card); backdrop-filter:none; }
.author-card-social .author-more-toggle i,.single-mobile-social .author-more-toggle i { background:var(--text-muted); }
.author-card-social .author-more-menu { bottom:calc(100% + 6px); }
.author-avatar-link { flex:0 0 58px; }
.author-name { color:var(--text); font-weight:600; }
.author-login-social { display:flex; align-items:center; justify-content:center; min-height:36px; margin-top:13px; border-radius:7px; background:rgba(0,161,214,.1); color:var(--primary); font-size:13px; }
.single-mobile-social { display:none; }
.single-body.is-login-preview { position:relative; max-height:520px; overflow:hidden; pointer-events:none; user-select:none; -webkit-mask-image:linear-gradient(#000 0%,#000 62%,transparent 100%); mask-image:linear-gradient(#000 0%,#000 62%,transparent 100%); }
.single-body.is-login-preview img { filter:blur(2px); }
.content-login-gate { position:relative; z-index:2; margin-top:-100px; padding:72px 0 8px; background:linear-gradient(180deg,transparent 0%,var(--bg-card) 65%,var(--bg-card) 100%); }
.content-login-gate-card { display:grid; grid-template-columns:48px minmax(0,1fr); align-items:start; gap:16px; width:100%; max-width:600px; margin:0 auto; padding:24px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--bg); text-align:left; }
.content-login-gate-icon { display:flex; align-items:center; justify-content:center; width:48px; height:48px; border:1px solid var(--border); border-radius:12px; background:var(--bg-card); color:var(--primary); }
.content-login-gate-icon svg { display:block; flex-shrink:0; }
.content-login-gate-copy { min-width:0; }
.content-login-gate h2 { margin:0 0 6px; padding:0; border:0; color:var(--text); font-size:18px; font-weight:600; line-height:1.5; }
.content-login-gate p { margin:0; color:var(--text-secondary); font-size:13px; line-height:1.8; overflow-wrap:anywhere; }
.content-login-gate-actions { grid-column:2; display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.content-login-gate .btn-primary,.content-login-gate .content-login-register { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:112px; min-height:40px; margin:0; padding:8px 20px; border:1px solid transparent; border-radius:6px; font-size:14px; font-weight:500; line-height:22px; text-decoration:none; }
.content-login-gate .btn-primary { background:var(--primary); color:#fff; }
.content-login-gate .btn-primary:hover { background:var(--primary); filter:brightness(.94); }
.content-login-gate .content-login-register { border-color:var(--border); background:var(--bg-card); color:var(--text-secondary); }
.content-login-gate .content-login-register:hover { border-color:var(--primary); color:var(--primary); }
.content-login-gate a:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
.single-ad-bottom + .content-login-gate { margin-top:0; padding-top:16px; background:none; }
@media (max-width:600px) {
    .content-login-gate-card { grid-template-columns:42px minmax(0,1fr); gap:14px 12px; padding:18px 16px; border-radius:10px; }
    .content-login-gate-icon { width:42px; height:42px; border-radius:10px; }
    .content-login-gate-icon svg { width:32px; height:32px; }
    .content-login-gate h2 { font-size:17px; }
    .content-login-gate-actions { grid-column:1 / -1; }
    .content-login-gate .btn-primary,.content-login-gate .content-login-register { flex:1 1 84px; min-width:0; min-height:44px; padding:10px 12px; }
}

/* Maintenance and shared article helpers. 404 artwork loads separately. */
.bilitop-maintenance{min-height:100vh;display:grid;place-items:center;margin:0;background:#f4f5f7;color:#18191c;font-family:system-ui,sans-serif}.bilitop-maintenance main{text-align:center;padding:40px 20px}.bilitop-maintenance h1{margin:22px 0 8px}.bilitop-maintenance p{color:#61666d}
.single-ad{margin:18px 0;overflow:hidden;border-radius:var(--radius)}.single-copyright{margin:22px 0;padding:15px 18px;border:1px dashed var(--border);border-radius:var(--radius);background:var(--bg);line-height:1.8}.single-prev-next{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:22px}.single-prev-next div:last-child{text-align:right}.single-prev-next a{display:block;padding:12px 15px;border:1px solid var(--border);border-radius:var(--radius);color:var(--text)}.single-prev-next span{display:block;margin-bottom:4px;color:var(--text-muted);font-size:12px}
/* Legacy shortcode cards must not inherit the full-width form button layout. */
.bilitop-legacy-file {
    display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
    gap:8px 16px; min-width:0; margin:14px 0; padding:16px;
    border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-card);
}
.bilitop-legacy-file > strong { grid-column:1; min-width:0; margin:0; line-height:1.6; overflow-wrap:anywhere; }
.bilitop-legacy-file > div { grid-column:1; display:flex; flex-wrap:wrap; gap:8px 16px; min-width:0; color:var(--text-secondary); font-size:13px; line-height:1.9; }
.bilitop-legacy-file > div:empty { display:none; }
.bilitop-legacy-file > div > span { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.bilitop-legacy-file code { color:var(--text); white-space:normal; overflow-wrap:anywhere; }
.bilitop-legacy-file > a.btn-primary,
.bilitop-article-card .single-body .bilitop-legacy-file > a.btn-primary {
    grid-column:2; grid-row:1 / span 2; display:inline-flex; align-items:center; justify-content:center;
    width:auto; min-width:88px; max-width:100%; min-height:44px; padding:10px 20px;
    color:#fff; line-height:1.5; white-space:nowrap; text-decoration:none;
}
.bilitop-legacy-file.is-locked { grid-template-columns:minmax(0,1fr); }
.bilitop-legacy-file.is-locked > span { min-width:0; color:var(--text-secondary); font-size:13px; overflow-wrap:anywhere; }
.bilitop-legacy-hidden { min-width:0; margin:14px 0; padding:16px; border-radius:var(--radius); }
.bilitop-legacy-hidden.is-unlocked { border:1px dashed var(--border); background:var(--bg); }
.bilitop-legacy-hidden.is-locked { border:1px solid rgba(230,162,60,.28); background:rgba(230,162,60,.09); color:#b7791f; text-align:center; }
.bilitop-legacy-downloads { margin-top:20px; }
@media (max-width:600px) {
    .bilitop-legacy-file { grid-template-columns:minmax(0,1fr); gap:12px; padding:14px; }
    .bilitop-legacy-file > a.btn-primary,
    .bilitop-article-card .single-body .bilitop-legacy-file > a.btn-primary { grid-column:1; grid-row:auto; width:100%; }
}
.bilitop-image-lightbox{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:40px;background:rgba(0,0,0,.86);cursor:zoom-out}.bilitop-image-lightbox img{max-width:96vw;max-height:92vh;object-fit:contain;cursor:default}.bilitop-image-lightbox button{position:fixed;right:24px;top:18px;border:0;background:transparent;color:#fff;font-size:38px}.single-body.has-image-lightbox img:not(a img),[data-image-lightbox] img{cursor:zoom-in}.comment-top-notice{margin:0 0 18px;padding:12px 15px;border-radius:var(--radius);background:var(--bg);color:var(--text-secondary)}
.comment-image-url{display:inline-flex;align-items:center;gap:5px;padding:6px 10px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-secondary);font-size:13px;line-height:1;cursor:pointer}.comment-image-url:hover{border-color:var(--primary);color:var(--primary)}.comment-image-url svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.comment-uploaded-image{display:block;max-width:min(420px,100%);max-height:420px;margin-top:10px;border-radius:var(--radius);object-fit:contain}.user-profile-description{margin:7px 0;color:var(--text-muted);font-size:13px;line-height:1.5}
@media(max-width:768px){.bilitop-footer.hide-mobile-footer-links .footer-inner{display:none}.single-prev-next{grid-template-columns:1fr}.single-prev-next div:last-child{text-align:left}.bilitop-image-lightbox{padding:12px}.bilitop-pagination{gap:12px;padding:18px 0}.pagination-links{width:100%;flex-wrap:nowrap}.pagination-links .page-numbers{min-width:32px;height:32px;padding:0 8px}.pagination-jump{width:100%;justify-content:center;margin-left:0}.pagination-jump input,.pagination-jump button{height:34px}}
@media(max-width:768px){.profile-cover-settings{align-items:stretch;flex-direction:column;gap:12px;padding:14px}.profile-cover-preview{width:100%;min-width:0;height:120px;flex:none}.profile-cover-settings .profile-avatar-copy{width:100%;min-width:0}.profile-cover-settings form{display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px}.profile-cover-settings .avatar-file-name{width:auto;max-width:100%;order:initial}.profile-cover-settings .btn-cover-save{grid-column:1/-1;width:100%;min-height:40px}.user-sidebar .user-card{padding:14px 16px;margin-bottom:10px}.user-sidebar .user-avatar-large img{width:64px;height:64px}.user-sidebar .user-display-name{margin-top:7px;font-size:16px}.user-sidebar .user-profile-description{margin:3px 0;font-size:12px}.user-sidebar .user-level{margin-bottom:9px}.user-sidebar .user-stats{padding:9px 0;margin-bottom:10px}.user-sidebar .stat-value{font-size:17px}.user-sidebar .btn-checkin{padding:8px}}
@media(max-width:768px){.header-message-trigger{min-width:32px;width:32px;height:34px;padding:0}.header-message-trigger>span:last-child{display:none}.header-member-link,.header-store-link{min-width:32px;width:32px;height:34px;padding:0}.header-member-link span,.header-store-link span{display:none}.header-message-dropdown{position:fixed;top:58px;right:10px;width:min(260px,calc(100vw - 20px))}.header-message-dropdown::before{display:none}}
.error-tv { position:relative; width:184px; height:132px; margin-bottom:10px; border:7px solid #61666d; border-radius:24px; background:#fff; transform:rotate(-2deg); }
.error-tv::before,.error-tv::after { content:''; position:absolute; top:-29px; width:5px; height:30px; border-radius:4px; background:#61666d; transform-origin:bottom; }
.error-tv::before { left:64px; transform:rotate(-34deg); }
.error-tv::after { right:64px; transform:rotate(34deg); }
.error-tv-screen { display:flex; align-items:center; justify-content:center; width:100%; height:100%; border:7px solid #dff5fc; border-radius:16px; background:#eefaff; color:var(--primary); font-size:35px; font-weight:700; }
.error-tv i,.error-tv b { position:absolute; bottom:-19px; width:35px; height:7px; border-radius:6px; background:#61666d; }
.error-tv i { left:22px; transform:rotate(-10deg); }.error-tv b { right:22px; transform:rotate(10deg); }
.btn-social-follow,.btn-social-message,.btn-social-block,.social-user-actions a,.social-user-actions button { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; height:34px; min-height:34px; padding:0 13px; border:1px solid var(--border); border-radius:6px; background:var(--bg-card); color:var(--text-secondary); font-size:12px; line-height:1; white-space:nowrap; cursor:pointer; }
.author-card-social .btn-social-follow,.single-mobile-social .btn-social-follow { border-color:var(--primary); background:var(--primary); color:#fff; }
.author-card-social .btn-social-message,.single-mobile-social .btn-social-message { background:var(--bg-card); color:var(--text-secondary); }
.social-user-actions .btn-social-message { background:var(--bg-card); color:var(--text-secondary); }
.btn-social-block.is-blocked { color:#f56c6c; border-color:rgba(245,108,108,.45); }
.social-block-notice,.message-follow-required { padding:18px; border:1px solid rgba(245,108,108,.3); border-radius:9px; background:rgba(245,108,108,.08); color:#e45656; }
.author-post-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.social-user-list { display:grid; gap:10px; }
.social-user-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; border:1px solid var(--border); border-radius:9px; background:var(--bg-card); }
.social-user-main { display:flex; align-items:center; gap:11px; min-width:0; color:var(--text); }
.social-user-name,.message-peer-name { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; }
.social-user-name strong,.message-peer-name strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.social-identity-badge,.message-identity-badge { min-height:18px; padding:2px 6px; font-size:8px; }
.social-user-main img { flex:0 0 48px; width:48px; height:48px; border-radius:50%; object-fit:cover; }
.content-header-note { color:var(--text-muted); font-size:12px; }
.submission-search-form { display:flex; align-items:center; gap:8px; margin:0 0 16px; }
.submission-search-form input { flex:1; min-width:0; height:40px; padding:8px 12px; border:1px solid var(--border); border-radius:7px; background:var(--bg-card); color:var(--text); }
.submission-search-form button { height:40px; padding:0 18px; border:0; border-radius:7px; background:var(--primary); color:#fff; cursor:pointer; }
.submission-search-form a { flex:none; color:var(--text-muted); font-size:13px; }
.submission-row-thumb { display:grid; place-items:center; flex:0 0 88px; width:88px; height:54px; margin-right:12px; overflow:hidden; border-radius:6px; background:var(--bg); color:var(--text-muted); }
.submission-row-thumb img { display:block; width:100%; height:100%; object-fit:cover; }
.submission-row-thumb svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:1.5; }
.redeem-section { margin-bottom:16px; }
@media(max-width:600px){.submission-search-form{flex-wrap:wrap}.submission-search-form input{flex-basis:calc(100% - 78px)}.submission-search-form button{padding:0 14px}.submission-search-form a{width:100%}.submission-row{display:grid;grid-template-columns:72px minmax(0,1fr) auto;grid-template-areas:"thumb title status" "thumb date date" "actions actions actions";column-gap:9px;row-gap:4px;align-items:center}.submission-row-thumb{grid-area:thumb;align-self:start;flex-basis:72px;width:72px;height:45px;margin-right:0}.submission-row .row-title{grid-area:title;display:-webkit-box;min-width:0;max-height:42px;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;line-height:21px;text-overflow:ellipsis}.submission-row .status-badge{grid-area:status;align-self:start;margin-top:1px}.submission-row .row-date{grid-area:date;min-width:0;overflow:hidden;text-overflow:ellipsis}.submission-row .row-actions{grid-area:actions;justify-self:start;margin-top:5px}}
.private-message-layout { display:grid; grid-template-columns:250px minmax(0,1fr); width:100%; min-height:640px; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.message-peer-list { border-right:1px solid var(--border); background:var(--bg); }
.message-peer { display:flex; align-items:center; gap:9px; padding:12px; border-bottom:1px solid var(--border); color:var(--text); }
.message-peer.active { background:rgba(0,161,214,.1); }
.message-peer img { flex:0 0 40px; width:40px; height:40px; border-radius:50%; object-fit:cover; }
.message-peer span { min-width:0; }
.message-peer-copy { display:block; min-width:0; }
.message-peer strong,.message-peer small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.message-peer-name strong { display:inline; }
.message-peer small { margin-top:3px; color:var(--text-muted); font-size:10px; }
.message-thread { position:relative; display:flex; flex-direction:column; width:100%; min-width:0; min-height:640px; background:var(--bg-card); }
.message-thread > header { display:flex; align-items:center; gap:7px; flex:0 0 auto; min-height:52px; padding:15px 18px; border-bottom:1px solid var(--border); font-weight:600; }
.message-bubbles { flex:1 1 auto; min-height:360px; max-height:540px; overflow-y:auto; padding:20px; }
.message-bubble { width:fit-content; max-width:78%; margin:0 0 12px; }
.message-bubble > div { padding:9px 12px; border-radius:4px 12px 12px; background:var(--bg); color:var(--text); overflow-wrap:anywhere; }
.message-bubble.mine { margin-left:auto; text-align:right; }
.message-bubble.mine > div { border-radius:12px 4px 12px 12px; background:rgba(0,161,214,.14); }
.message-bubble small { color:var(--text-muted); font-size:10px; }
.private-message-form { position:relative; z-index:2; display:flex; align-items:flex-end; width:100%; gap:12px; padding:16px; border-top:1px solid var(--border); background:var(--bg-card); pointer-events:auto; }
.private-message-form textarea { display:block; flex:1 1 auto; width:100%; min-width:0; min-height:112px; padding:13px 14px; border:1px solid var(--border); border-radius:8px; outline:0; resize:vertical; background:var(--bg); color:var(--text); font-size:15px; line-height:1.6; pointer-events:auto; }
.private-message-form textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(0,161,214,.1); }
.private-message-form .btn-primary { flex:0 0 96px; width:96px; min-height:44px; padding:10px 14px; cursor:pointer; }
.submit-collapsible { margin:0 0 14px; border:1px solid var(--border); border-radius:10px; background:var(--bg-card); overflow:hidden; }
.submit-collapsible > summary { position:relative; display:flex; align-items:center; gap:10px; padding:14px 42px 14px 16px; color:var(--text); cursor:pointer; list-style:none; user-select:none; }
.submit-collapsible > summary::-webkit-details-marker { display:none; }
.submit-collapsible > summary::after { content:'+'; position:absolute; right:16px; top:50%; translate:0 -50%; color:var(--primary); font-size:21px; font-weight:400; }
.submit-collapsible[open] > summary::after { content:'−'; }
.submit-collapsible > summary span { font-weight:600; }
.submit-collapsible > summary small { color:var(--text-muted); font-size:12px; }
.submit-collapsible[open] > summary { border-bottom:1px solid var(--border); background:var(--bg); }
.submit-collapsible-body { padding:16px; }
.submit-collapsible-body > :last-child { margin-bottom:0; }
.form-section-title.compact-title { margin-top:20px; }
.member-tier-options { display:flex; flex-wrap:wrap; gap:10px; }
.member-tier-options label { margin:0; cursor:pointer; }
.member-tier-options input { position:absolute; opacity:0; pointer-events:none; }
.member-tier-options span { display:inline-flex; padding:8px 14px; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); color:var(--text-secondary); }
.member-tier-options input:checked + span { border-color:var(--tier-color,var(--primary)); color:var(--tier-color,var(--primary)); box-shadow:0 0 0 2px color-mix(in srgb,var(--tier-color,var(--primary)) 15%,transparent); }

.submit-content h2 {
    font-size: 20px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text);
    transition: var(--transition);
    font-family: inherit;
}

.form-group textarea {
    min-height:110px;
    line-height:1.75;
    resize:vertical;
}

.submit-editor-card textarea#submit-editor {
    width:100%;
    min-height:360px;
    padding:16px;
    border:1px solid var(--border);
    border-top:0;
    border-radius:0 0 8px 8px;
    background:var(--bg-card);
    color:var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color:#aeb3bb;
}

.form-group input[type="file"] {
    padding:8px;
    background:var(--bg-card);
    border:1px solid var(--border);
    color:var(--text-secondary);
    cursor:pointer;
}

.form-group input[type="file"]::file-selector-button {
    appearance:none;
    margin-right:12px;
    padding:8px 15px;
    border:0;
    border-radius:6px;
    background:linear-gradient(135deg,var(--primary),var(--primary-light));
    color:#fff;
    font-family:inherit;
    font-size:13px;
    cursor:pointer;
    transition:filter .2s ease,transform .2s ease;
}

.form-group input[type="file"]::file-selector-button:hover {
    filter:brightness(1.06);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,161,214,0.1);
}

.form-group select {
    appearance:none;
    padding-right:38px;
    background-color:var(--bg-card);
    background-image:linear-gradient(45deg,transparent 50%,var(--text-muted) 50%),linear-gradient(135deg,var(--text-muted) 50%,transparent 50%);
    background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;
    background-size:5px 5px,5px 5px;
    background-repeat:no-repeat;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-actions .btn-primary {
    width: auto;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background:linear-gradient(180deg,var(--bg-card),rgba(0,161,214,.025));
}

.upload-area:hover {
    border-color: var(--primary);
    background:rgba(0,161,214,.04);
}

.upload-placeholder {
    color: var(--text-muted);
}

.upload-placeholder p {
    margin-top: 8px;
    font-size: 14px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 28px 0 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text);
}

.form-section-title:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.access-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.radio-card:hover {
    border-color: var(--primary-light);
}

.radio-card.active {
    border-color: var(--primary);
    background: rgba(0,161,214,0.04);
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.radio-card-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.conditional-field {
    margin-bottom: 20px;
}

.settings-form {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-upload img {
    border-radius: 50%;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-form input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
}

.inline-form input:focus {
    outline: none;
    border-color: var(--primary);
}
.redeem-notice { max-width:100%; margin:0 0 14px; padding:12px 14px; border:1px solid rgba(0,161,214,.22); border-radius:8px; background:rgba(0,161,214,.06); color:var(--text-secondary); line-height:1.7; overflow-wrap:anywhere; }
.redeem-notice a { color:var(--primary); text-decoration:underline; }
#bilitop-redeem-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; align-items:center; }
#bilitop-redeem-form > .form-error { grid-column:1 / -1; width:100%; min-width:0; margin:0; }
#bilitop-redeem-form > input { width:100%; min-width:0; min-height:42px; }
#bilitop-redeem-form > button { width:auto; min-width:100px; min-height:42px; margin:0; }
@media (max-width:600px) {
    #bilitop-redeem-form { grid-template-columns:minmax(0,1fr); }
    #bilitop-redeem-form > button { width:100%; }
}

/* ============ SEARCH PAGE ============ */
.bilitop-search-page {
    padding: 24px 0;
}

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

.search-form-large {
    display: flex;
    max-width: 600px;
    margin: 0 auto 24px;
}

.search-form-large input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    background: var(--bg-card);
    color: var(--text);
}

.search-form-large input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-form-large button {
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.search-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.search-filters select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text);
}

.sort-options {
    display: flex;
    gap: 16px;
}

.sort-options a {
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px 0;
    transition: var(--transition);
}

.sort-options a.active, .sort-options a:hover {
    color: var(--primary);
}

.search-result-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.search-result-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.result-cover {
    width: 180px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.result-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg);
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text);
}

.search-result-item:hover h3 {
    color: var(--primary);
}

.result-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============ FOOTER ============ */
.bilitop-footer {
    background: var(--bg-white);
    border-top: 0;
    padding: 12px 0 8px;
    margin-top: 18px;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 18px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    border-radius: 6px;
    background: var(--bg);
}

.footer-widget-col .footer-widget {
    margin-bottom: 20px;
}

.footer-widget-col h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text);
}

.footer-widget-col a {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
    transition: var(--transition);
}

.footer-widget-col a:hover {
    color: var(--primary);
}

.footer-widget-col p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-widget-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget-col ul li {
    margin-bottom: 6px;
}

.footer-widget-col ul li a {
    font-size: 14px;
    color: var(--text-muted);
}

/* 搜索右侧菜单 */
.header-nav-right {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.header-nav-right .nav-item {
    font-size: 13px;
    padding: 6px 10px;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text);
}

.footer-section a {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 7px 0 0;
    border-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    text-align: left;
    font-size: 13px;
    color: var(--text-muted);
}

.bilitop-footer.has-footer-widgets .footer-bottom { margin-top: 8px; }
.footer-bottom p { margin: 0; }
.footer-meta { margin-left: auto; text-align: right; }
.dark .bilitop-footer { background-color:var(--bg-white) !important; }

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
}

.pagination-links { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:7px; min-width:0; }
.pagination-links .page-numbers { display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 10px; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); color:var(--text-secondary); font-size:14px; line-height:1; }
.pagination-links .page-numbers.current,.pagination-links .page-numbers:hover { border-color:var(--primary); background:var(--primary); color:#fff; }
.pagination-links .page-numbers.dots { border-color:transparent; background:transparent; box-shadow:none; }
.pagination-jump { display:flex; align-items:center; gap:7px; margin-left:8px; color:var(--text-muted); font-size:13px; }
.pagination-jump label { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.pagination-jump input { width:62px; height:36px; padding:5px 7px; border:1px solid var(--border); border-radius:7px; background:var(--bg-card); color:var(--text); text-align:center; }
.pagination-jump button { height:36px; padding:0 12px; border:0; border-radius:7px; background:var(--primary); color:#fff; cursor:pointer; }

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-secondary);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.page-link:hover, .page-link.active {
    background: var(--primary);
    color: #fff;
}

/* ============ SINGLE PAGE ============ */
.bilitop-single {
    padding: 24px 0;
}

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

.bilitop-breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.bilitop-breadcrumb a {
    color: var(--text-secondary);
}

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

.bilitop-breadcrumb .separator {
    margin: 0 8px;
}

.single-layout {
    display: flex;
    gap: 24px;
}

.single-content {
    flex: 1;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.single-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.single-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.single-meta .meta-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.single-thumbnail {
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
}

.single-body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
}

.single-body img {
    border-radius: var(--radius);
    margin: 12px 0;
}

.single-body p {
    margin-bottom: 12px;
}

.single-body pre, .single-body code {
    background: var(--bg);
    border-radius: 4px;
}

.single-body pre {
    padding: 16px;
    overflow-x: auto;
}

.single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.single-tags .tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.single-tags .tag:hover {
    background: var(--primary);
    color: #fff;
}

.single-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.sidebar-card h3 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* 侧边栏小工具样式 */
.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.sidebar-widget .widget-title {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget ul li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
}

.sidebar-widget ul li a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-widget ul li a:hover {
    color: var(--primary);
}

.sidebar-widget p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.related-item {
    display: block;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.related-item:last-child {
    border-bottom: none;
}

.related-item:hover {
    color: var(--primary);
}

/* Download Section */
.download-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.download-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.download-links { display:flex; flex-wrap:wrap; gap:10px; }
.attachment-downloads { display:grid; gap:8px; width:100%; }
.attachment-downloads a { display:flex; align-items:center; gap:9px; padding:9px 12px; border:1px solid var(--border); border-radius:7px; background:var(--bg-card); color:var(--text-secondary); font-size:13px; }
.attachment-downloads a:hover { color:var(--primary); border-color:var(--primary); }
.attachment-downloads a span { padding:2px 6px; border-radius:4px; background:rgba(0,161,214,.09); color:var(--primary); font-size:11px; }

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 10px 24px;
}

.download-code {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.download-code .code-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.download-code .code-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    font-family: "SF Mono", "Fira Code", monospace;
    letter-spacing: 0.5px;
}

.download-code .btn-copy {
    margin-left: auto;
    padding: 4px 12px;
    font-size: 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    transition: var(--transition);
}

.download-code .btn-copy:hover {
    background: var(--primary-light);
}

.download-notice {
    padding: 16px;
    border-radius: var(--radius);
    font-size: 14px;
}

.download-notice.login-required {
    background: rgba(0,161,214,0.08);
    border: 1px solid rgba(0,161,214,0.2);
}

.download-notice.credits-required {
    background: rgba(230,162,60,0.08);
    border: 1px solid rgba(230,162,60,0.2);
}

.download-notice.member-required {
    background: rgba(251,114,153,0.08);
    border: 1px solid rgba(251,114,153,0.2);
}
.download-notice.blacklisted-required,
.comment-restriction-notice { padding:14px 16px; border:1px solid rgba(245,108,108,.28); border-radius:8px; background:rgba(245,108,108,.1); color:#f56c6c; font-size:14px; }
.comment-restriction-notice { margin:16px 0; }
.comment-closed-notice { margin:16px 0; padding:18px; border:1px solid var(--border); border-radius:8px; background:var(--bg); color:var(--text-muted); text-align:center; }
.download-node-list { display:grid; gap:14px; }
.download-node { padding:16px; border:1px solid var(--border); border-radius:10px; background:var(--bg-card); }
.download-node[hidden], .download-node-add[hidden] { display:none!important; }
.download-node-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; color:var(--text); }
.download-node-remove { padding:5px 10px; border:1px solid rgba(245,108,108,.35); border-radius:6px; background:rgba(245,108,108,.08); color:#f56c6c; }
.download-node-add { display:inline-flex; align-items:center; gap:6px; margin-top:12px; padding:9px 14px; border:1px dashed var(--primary); border-radius:7px; background:rgba(0,161,214,.06); color:var(--primary); }
.download-node-add span { font-size:19px; line-height:1; }
.download-node-results { display:grid; gap:10px; }
.download-node-result { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px; border:1px solid var(--border); border-radius:8px; background:var(--bg); }
.download-node-result span { color:var(--text-secondary); font-size:13px; }
.download-node-result code { padding:3px 7px; border-radius:4px; background:var(--bg-card); color:var(--text); }
.user-blacklist-notice { margin:0 0 18px; padding:14px 16px; color:#b42318; background:#fff1f0; border:1px solid #ffccc7; border-radius:var(--radius); line-height:1.7; }
[data-theme="dark"] .user-blacklist-notice { color:#ffb4ab; background:#3b1718; border-color:#6d292c; }

.download-notice.credits-purchase {
    background: rgba(230,162,60,0.08);
    border: 1px solid rgba(230,162,60,0.2);
    text-align: center;
}

.download-notice.credits-purchase p {
    margin-bottom: 12px;
    font-size: 15px;
}

.btn-purchase-resource {
    display: inline-block;
    padding: 12px 36px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e6a23c, #f0c78a);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-purchase-resource:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230,162,60,0.35);
}

.btn-purchase-resource:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.credits-insufficient {
    margin-top: 8px;
}

.insufficient-text {
    color: #f56c6c;
    margin-bottom: 10px;
    font-size: 14px;
}

.purchase-success-text {
    margin-top: 10px;
    color: #67c23a;
    font-size: 13px;
}

/* ============ SINGLE ACTIONS (Like & Favorite) ============ */
.single-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.single-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn.active {
    background: rgba(0,161,214,0.08);
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn.active svg {
    fill: var(--primary);
    stroke: var(--primary);
}

.action-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.action-count {
    font-weight: 600;
    font-size: 13px;
}

.btn-like.active {
    background: rgba(251,114,153,0.08);
    border-color: var(--pink);
    color: var(--pink);
}

.btn-like.active svg {
    fill: var(--pink);
    stroke: var(--pink);
}

/* ============ AUTHOR INFO ============ */
.author-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-box img {
    border-radius: 50%;
    flex-shrink: 0;
}

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

.author-name {
    display: block;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 4px;
}

.author-desc {
    font-size: 12px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-stats {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

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

.author-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.author-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}
.bilitop-single .sidebar-author-card { padding:0; }
.sidebar-author-header { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:46px; padding:8px 14px; }
.bilitop-single .sidebar-author-header h3 { flex:1; min-width:0; margin:0; padding:0; border:0; font-size:15px; }
.sidebar-author-profile { margin:0 10px; padding:12px; overflow:hidden; border:1px solid var(--border); border-radius:9px; background:var(--bg); background-position:center; background-size:cover; }
.sidebar-author-card.has-cover .sidebar-author-profile { background-image:linear-gradient(rgba(255,255,255,.82),rgba(255,255,255,.9)),var(--author-card-cover); }
.dark .sidebar-author-card.has-cover .sidebar-author-profile,
body.dark-mode .sidebar-author-card.has-cover .sidebar-author-profile { background-image:linear-gradient(rgba(25,26,29,.72),rgba(25,26,29,.84)),var(--author-card-cover); }
.bilitop-single .sidebar-author-profile .author-box img { width:52px; height:52px; border:2px solid color-mix(in srgb,var(--primary) 55%,#fff); }
.sidebar-author-profile .author-avatar-link { flex-basis:52px; }
.sidebar-author-profile .author-name { margin-bottom:3px; color:var(--text); font-size:15px; }
.sidebar-author-profile .author-desc { color:var(--text-secondary); line-height:1.5; }
.sidebar-author-card .author-stats { margin:12px 0 0; padding:11px 10px; border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--bg); }
.sidebar-author-posts { display:grid; gap:2px; padding:10px 14px; }
.sidebar-author-posts a { display:flex; align-items:center; min-width:0; gap:5px; padding:5px 0; color:var(--text-secondary); font-size:12px; line-height:1.45; }
.sidebar-author-posts a:hover { color:var(--primary); }
.sidebar-author-posts span { flex:none; color:var(--primary); }
.sidebar-author-posts b { min-width:0; overflow:hidden; font-weight:400; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-author-all-posts { display:flex; align-items:center; justify-content:center; min-height:39px; padding:4px 12px; border-top:1px solid var(--border); border-radius:0 0 var(--radius-lg) var(--radius-lg); color:var(--primary); font-size:13px; font-weight:600; }
.sidebar-author-all-posts:hover { background:var(--bg); color:var(--primary); }
.sidebar-author-header .author-card-social { flex:0 0 auto; gap:3px; margin:0; }
.sidebar-author-header .author-card-social > .btn-social-follow,
.sidebar-author-header .author-card-social > .btn-social-message { flex:none; width:auto; min-width:0; height:28px; min-height:28px; padding:0 5px; border:0; background:transparent; color:var(--primary); }
.sidebar-author-header .author-card-social .author-more-toggle { width:28px; height:28px; border:0; background:transparent; }
.sidebar-author-header .author-login-social { min-height:28px; margin:0; padding:0 5px; background:transparent; color:var(--primary); white-space:nowrap; }

/* ============ COMMENTS UI ============ */
.bilitop-comments {
    margin-top:32px;
    padding:24px;
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    background:var(--bg-card);
}

.comments-header h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-list .children { list-style:none; margin:12px 0 0 52px; padding-left:16px; border-left:2px solid rgba(0,161,214,.13); }

.comment-item {
    margin-bottom: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-inner {
    display: flex;
    gap: 12px;
}

.comment-avatar img {
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
    padding:12px 14px;
    border-radius:10px;
    background:var(--bg);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.comment-author a {
    color: var(--text);
}

.comment-author a:hover {
    color: var(--primary);
}

.comment-date {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.comment-avatar { flex:0 0 40px; width:40px; }
.comment-avatar img { display:block; width:40px!important; height:40px!important; min-width:40px; aspect-ratio:1; object-fit:cover; }

.comment-content p {
    margin-bottom: 8px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-actions {
    margin-top: 8px;
}

.comment-reply a {
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
}

.comment-reply a:hover {
    color: var(--primary);
}
.comment-pinned-badge { display:inline-flex; align-items:center; height:20px; padding:0 6px; border-radius:3px; background:rgba(0,174,236,.1); color:var(--primary); font-size:11px; font-weight:500; }
.comment-pin-button { margin-left:12px; padding:0; border:0; background:transparent; color:var(--text-muted); font-size:13px; line-height:1.4; }
.comment-pin-button:hover,
.comment-pin-button.is-pinned { color:var(--primary); }
.comment-pin-button:disabled { opacity:.5; cursor:wait; }

.no-comments {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg);
    border-radius: var(--radius);
}

.comment-form-bilitop {
    margin-top: 24px;
    padding:18px;
    border-radius:10px;
    background:var(--bg);
}

.comment-form-bilitop .form-group {
    margin-bottom: 16px;
}

.comment-form-bilitop textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background:var(--bg-card);
    color: var(--text);
    resize: vertical;
    transition: var(--transition);
}
.comment-editor-shell { position:relative; }
.comment-emoji-tools { position:relative; display:flex; align-items:center; gap:6px; margin-top:9px; }
.comment-emoji-toggle { padding:6px 11px; border:1px solid var(--border); border-radius:6px; background:var(--bg-card); color:var(--text-secondary); font-size:13px; }
.comment-emoji-toggle:hover { color:var(--primary); border-color:var(--primary); }
.comment-emoji-tools.is-panel-open { margin-bottom:var(--comment-emoji-panel-space,267px)!important; }
.comment-emoji-panel { position:absolute; left:0; top:calc(100% + 7px); z-index:20; width:min(390px,82vw); max-height:min(250px,calc(100dvh - 120px)); overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; display:grid; grid-template-columns:repeat(8,1fr); gap:5px; padding:10px; border:1px solid var(--border); border-radius:10px; background:var(--bg-card); box-shadow:0 12px 35px rgba(0,0,0,.14); }
.comment-emoji-panel[hidden] { display:none; }
.comment-emoji-item { display:flex; align-items:center; justify-content:center; min-width:34px; height:34px; padding:3px; border-radius:6px; background:transparent; font-size:21px; }
.comment-emoji-item:hover { background:var(--bg); transform:scale(1.08); }
.comment-emoji-item.is-sticker { grid-column:span 1; height:40px; padding:2px; }
.comment-emoji-item img { width:100%; height:100%; object-fit:contain; }
.comment-sticker { display:inline-block; width:auto; height:24px; max-width:24px; max-height:24px; margin:0 2px; border-radius:4px; object-fit:contain; vertical-align:-6px; }

.comment-form-bilitop textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,161,214,0.1);
}

.comment-form-bilitop .btn-comment-submit {
    width: auto;
    padding: 10px 24px;
}
.comment-form-bilitop .comment-form-author,
.comment-form-bilitop .comment-form-email,
.comment-form-bilitop .comment-form-url { margin-bottom:12px; }
.comment-form-bilitop .comment-form-author label,
.comment-form-bilitop .comment-form-email label,
.comment-form-bilitop .comment-form-url label { display:block; margin-bottom:5px; color:var(--text-secondary); font-size:13px; }
.comment-form-bilitop .comment-form-author input,
.comment-form-bilitop .comment-form-email input,
.comment-form-bilitop .comment-form-url input { width:100%; padding:10px 13px; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); color:var(--text); font:inherit; }
.comment-form-bilitop .comment-form-author input:focus,
.comment-form-bilitop .comment-form-email input:focus,
.comment-form-bilitop .comment-form-url input:focus { outline:0; border-color:var(--primary); box-shadow:0 0 0 3px rgba(0,161,214,.1); }
.comment-form-bilitop .logged-in-as { margin-bottom:12px; color:var(--text-muted); font-size:13px; }
.comment-form-bilitop .logged-in-as a { color:var(--primary); }

.comment-form-bilitop .comment-form-cookies-consent {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.comment-form-bilitop .comment-form-cookies-consent input {
    margin-right: 6px;
}

.comment-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
}

.comment-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: var(--transition);
}

.comment-pagination .page-numbers.current,
.comment-pagination .page-numbers:hover {
    background: var(--primary);
    color: #fff;
}

/* ============ USER CENTER - FAVORITES ============ */
.btn-unfav {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:82px;
    height:32px;
    padding:0 14px;
    background:rgba(251,114,153,.08);
    border:1px solid rgba(251,114,153,.22);
    color:#fb7299;
    border-radius:16px;
    font-size:13px;
    line-height:1;
    cursor: pointer;
    transition: var(--transition);
}

.btn-unfav:hover {
    border-color:#fb7299;
    background:#fb7299;
    color:#fff;
}
.btn-unfav:disabled { opacity:.55; cursor:wait; }
.table-row { transition:opacity .22s,transform .22s; }
.table-row.is-removing { opacity:0; transform:translateX(12px); }

/* Bilibili-inspired account settings: flat sections, aligned labels, compact actions. */
.profile-settings-header { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; padding-bottom:20px; border-bottom:1px solid var(--border); }
.profile-settings-header h2 { position:relative; padding-left:14px; font-size:20px; }
.profile-settings-header h2::before { content:""; position:absolute; left:0; top:5px; bottom:5px; width:4px; border-radius:2px; background:var(--primary); }
.profile-settings-header p { margin:0; font-size:13px; line-height:1.7; color:var(--text-muted); }
.profile-settings { min-width:0; padding:0 12px; }
.profile-settings > .settings-form,
.profile-settings > .profile-appearance-settings { min-width:0; margin:0; padding:28px 0; border:0; border-bottom:1px solid var(--border); border-radius:0; background:transparent; box-shadow:none; overflow:visible; }
.profile-settings > :first-child { padding-top:4px; }
.profile-settings > :last-child { padding-bottom:8px; border-bottom:0; }
.profile-settings .settings-section-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 14px; margin-bottom:24px; }
.profile-settings .settings-section-heading h3 { margin:0; font-size:16px; font-weight:600; line-height:1.5; color:var(--text); }
.profile-settings .settings-section-heading p { margin:0; color:var(--text-muted); font-size:12px; line-height:1.7; }
.profile-settings .form-group { display:grid; grid-template-columns:96px minmax(0,460px); align-items:start; gap:0 20px; margin:0 0 20px; }
.profile-settings .form-group label { margin:0; padding-top:11px; font-size:14px; line-height:22px; font-weight:400; text-align:right; color:var(--text-secondary); }
.profile-settings .form-group input,
.profile-settings .form-group textarea { min-width:0; box-sizing:border-box; border:1px solid var(--border); border-radius:4px; box-shadow:none; background:var(--bg-card); color:var(--text); font-family:inherit; font-size:14px; }
.profile-settings .form-group input { height:44px; padding:0 12px; }
.profile-settings .form-group textarea { min-height:100px; padding:10px 12px; line-height:1.7; }
.profile-settings .form-group input[readonly] { background:var(--bg); color:var(--text-muted); }
.profile-settings .form-group input:focus,
.profile-settings .form-group textarea:focus { border-color:var(--primary); outline:0; box-shadow:0 0 0 2px rgba(0,174,236,.08); }
.profile-settings .form-hint { grid-column:2; margin:7px 0 0; font-size:12px; line-height:1.7; color:var(--text-muted); }
.profile-settings .settings-form-actions { padding-left:116px; }
.profile-settings .btn-primary,
.profile-settings .avatar-file-button { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; width:auto; min-width:104px; height:44px; min-height:44px; margin:0; padding:0 18px; border:1px solid transparent; border-radius:4px; font-family:inherit; font-size:14px; font-weight:400; line-height:20px; text-align:center; white-space:nowrap; cursor:pointer; transition:background .18s,border-color .18s,color .18s; }
.profile-settings .settings-form-actions .btn-primary { min-width:120px; }
.profile-settings .btn-primary:hover { transform:none; }
.profile-settings .btn-primary:disabled { cursor:wait; opacity:.65; }
.profile-settings .avatar-file-button { position:relative; border-color:var(--border); background:var(--bg-card); color:var(--text-secondary); }
.profile-settings .avatar-file-button:hover { border-color:var(--primary); color:var(--primary); background:rgba(0,174,236,.04); }
.profile-settings .avatar-file-button:focus-within,
.profile-settings .btn-primary:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
.profile-settings .profile-avatar-settings { display:grid; grid-template-columns:96px 144px minmax(0,1fr); align-items:center; gap:20px; margin:0; padding:0; border:0; background:transparent; }
.profile-settings .profile-avatar-settings + .profile-avatar-settings { margin-top:28px; }
.profile-settings .profile-upload-label { margin:0; color:var(--text-secondary); font-size:14px; font-weight:400; line-height:1.6; text-align:right; }
.profile-settings .profile-avatar-preview { display:grid; place-items:center; min-width:0; }
.profile-settings .profile-avatar-preview img { display:block; width:80px; height:80px; border:1px solid var(--border); border-radius:50%; object-fit:cover; box-shadow:none; }
.profile-settings .profile-cover-preview { width:144px; min-width:0; height:82px; border:1px solid var(--border); border-radius:4px; }
.profile-settings .profile-avatar-copy { min-width:0; }
.profile-settings .profile-avatar-copy p { margin:0 0 12px; color:var(--text-muted); font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.profile-settings .profile-upload-cost { display:block; }
.profile-settings #bilitop-avatar-form,
.profile-settings #bilitop-cover-form { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.profile-settings .avatar-file-name { flex-basis:100%; order:3; width:auto; min-width:0; max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:var(--text-muted); font-size:12px; line-height:1.6; }
.profile-settings .avatar-change-disabled { margin:0; }
@media (max-width:640px) {
    .profile-settings-header { display:block; padding-bottom:16px; }
    .profile-settings-header p { margin-top:8px; padding-left:14px; font-size:12px; }
    .profile-settings { padding:0; }
    .profile-settings > .settings-form,
    .profile-settings > .profile-appearance-settings { padding:24px 0; }
    .profile-settings > :first-child { padding-top:0; }
    .profile-settings .settings-section-heading { display:block; margin-bottom:18px; }
    .profile-settings .settings-section-heading p { margin-top:4px; }
    .profile-settings .form-group { grid-template-columns:minmax(0,1fr); gap:8px; margin-bottom:18px; }
    .profile-settings .form-group label { padding:0; text-align:left; }
    .profile-settings .form-hint { grid-column:1; margin:0; }
    .profile-settings .settings-form-actions { padding-left:0; }
    .profile-settings .profile-avatar-settings { grid-template-columns:88px minmax(0,1fr); gap:12px; }
    .profile-settings .profile-upload-label { grid-column:1 / -1; text-align:left; }
    .profile-settings .profile-avatar-copy { display:contents; }
    .profile-settings .profile-avatar-copy p { margin:0; }
    .profile-settings .profile-avatar-preview img { width:72px; height:72px; }
    .profile-settings .profile-cover-preview { width:88px; height:56px; }
    .profile-settings #bilitop-avatar-form,
    .profile-settings #bilitop-cover-form { grid-column:1 / -1; margin-top:2px; }
}
.table-row a {
    color: var(--text);
    transition: var(--transition);
}

.table-row a:hover {
    color: var(--primary);
}

/* ============ VIP / MEMBERSHIP PAGE ============ */
.bilitop-vip {
    padding: 24px 0;
}

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

.vip-hero {
    text-align: center;
    padding: 40px 0 24px;
}

.vip-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pink), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.vip-subtitle {
    font-size: 15px;
    color: var(--text-muted);
}

.current-vip-card {
    background: linear-gradient(135deg, var(--pink), var(--gold));
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-vip-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vip-badge-lg {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.vip-expire {
    font-size: 14px;
    opacity: 0.9;
}
.membership-schedule-panel{margin:14px 0 18px;padding:16px 18px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 7%,var(--bg-card)),var(--bg-card));border:1px solid color-mix(in srgb,var(--primary) 16%,var(--border));border-radius:12px}.membership-schedule-heading{display:flex;align-items:center;gap:10px;margin-bottom:12px}.membership-schedule-heading h3{margin:0 0 2px;font-size:15px}.membership-schedule-heading p{margin:0;color:var(--text-secondary);font-size:12px}.membership-schedule-icon{display:grid;place-items:center;width:36px;height:36px;color:#fff;background:var(--primary);border-radius:10px;font-size:10px;font-weight:800}.membership-schedule-list{display:flex;flex-direction:column;gap:8px}.membership-schedule-row{display:grid;grid-template-columns:max-content minmax(72px,1fr) auto 22px auto max-content;align-items:center;gap:8px;padding:9px 11px;background:color-mix(in srgb,var(--bg-card) 86%,transparent);border-radius:8px;color:var(--text-secondary);font-size:12px}.membership-schedule-row strong{color:var(--text)}.membership-schedule-row em{color:var(--primary);font-size:11px;font-style:normal;white-space:nowrap}.membership-schedule-period{display:inline-flex;justify-content:center;padding:2px 7px;color:var(--primary);background:color-mix(in srgb,var(--primary) 11%,transparent);border-radius:999px;font-weight:700}.membership-schedule-row i{position:relative;height:1px;background:var(--border)}.membership-schedule-row i::after{content:'';position:absolute;right:0;top:-3px;border-width:3px 0 3px 5px;border-style:solid;border-color:transparent transparent transparent var(--border)}
@media(max-width:700px){.membership-schedule-panel{padding:13px}.membership-schedule-row{grid-template-columns:max-content 1fr;gap:5px 8px}.membership-schedule-row i{display:none}.membership-schedule-row>span:nth-of-type(2),.membership-schedule-row>span:last-of-type,.membership-schedule-row em{grid-column:2}.membership-schedule-row strong{align-self:end}}

/* Period Toggle */
.period-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 32px;
    background: var(--bg);
    border-radius: 24px;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.period-btn {
    padding: 10px 28px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    color: var(--text-secondary);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.period-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,161,214,0.3);
}

.period-btn:disabled,
.btn-plan-purchase:disabled {
    cursor: not-allowed;
    opacity: .55;
}

@media (max-width: 600px) {
    .period-toggle {
        width: 100%;
        gap: 2px;
    }

    .period-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 9px 4px;
        white-space: nowrap;
    }

    .period-btn .save-tag {
        display: none;
    }
}

.save-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    background: var(--pink);
    color: #fff;
    margin-left: 4px;
}

/* Plan Cards */
.vip-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.vip-plan-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.vip-plan-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.vip-plan-card.featured {
    border: 2px solid var(--pink);
    transform: scale(1.02);
}

.vip-plan-card.featured:hover {
    transform: scale(1.02) translateY(-6px);
}

.plan-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    background: var(--pink);
    color: #fff;
}

.plan-header {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 3px solid var(--border);
}

.plan-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 4px;
}

.price-symbol {
    font-size: 18px;
    font-weight: 600;
}

.price-amount {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
}

.price-period {
    font-size: 14px;
    color: var(--text-muted);
}

.price-yearly {
    font-size: 13px;
    color: var(--text-muted);
}

.plan-features {
    list-style: none;
    padding: 20px 24px;
    margin: 0;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.plan-features li svg {
    color: var(--primary);
    flex-shrink: 0;
}

.btn-plan-purchase {
    display: block;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-plan-purchase:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-plan-purchase:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Privileges */
.vip-privileges {
    padding: 40px 0;
    text-align: center;
}

.vip-privileges h2 {
    font-size: 22px;
    margin-bottom: 32px;
}

.privileges-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.privilege-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}

.privilege-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.privilege-item h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.privilege-item p {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .bilitop-categories.hide-on-mobile { display:none; }
    .bilitop-slider { aspect-ratio:1.75/1; }
    .bilitop-ad-grid.layout-one_large_four_small { grid-template-columns:repeat(2,1fr); grid-template-rows:auto; }
    .bilitop-ad-grid.layout-one_large_four_small .item-0 { grid-column:1/3; grid-row:auto; aspect-ratio:2/1; }
    .bilitop-ad-grid.layout-four { grid-template-columns:repeat(2,1fr); aspect-ratio:auto; }
    .privileges-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vip-plan-card.featured { transform: none; }
    .vip-plan-card.featured:hover { transform: translateY(-6px); }
}

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

/* ============ DARK MODE AUDIT ============ */
html.dark { color-scheme:dark; }
.dark body.bilitop-body { background:var(--bg); color:var(--text); }
.dark .bilitop-header:not(.is-banner) { background:rgba(30,31,34,.94); }
.dark .bilitop-header.is-banner::before { background:linear-gradient(to bottom,rgba(0,0,0,.58),rgba(0,0,0,.24) 72%,rgba(0,0,0,.48)); }
.dark .bilitop-header.is-banner .search-box,
.dark .bilitop-header.is-banner .search-box:focus-within { border-color:rgba(255,255,255,.14); background:rgba(30,31,34,.9); }
.dark .bilitop-header.is-banner .search-box input { color:#f1f2f3; }
.dark .bilitop-header.is-banner .search-box input::placeholder { color:#aeb2b7; }
.dark .search-suggestions,
.dark .user-dropdown { background:var(--bg-card); border:1px solid var(--border); }
.dark .search-suggestions .suggestion-item:hover,
.dark .user-dropdown a:hover { background:var(--bg); }
.dark .bilitop-header.is-banner .user-dropdown a { color:var(--text-secondary); }
.dark .bilitop-article-card,
.dark .single-comments-card,
.dark .bilitop-single .sidebar-card,
.dark .bilitop-single .sidebar-widget { border-color:var(--border); box-shadow:0 2px 12px rgba(0,0,0,.28); }
.dark .bilitop-article-card .single-body blockquote,
.dark .bilitop-article-card .single-tags .tag,
.dark .bilitop-article-card .download-section,
.dark .single-comments-card .comment-list .comment-respond,
.dark .comment-compose-main .comment-form-bilitop textarea[name="comment"],
.dark .single-comments-card .comment-list .comment-form-bilitop textarea[name="comment"] { background:#202124; color:var(--text); border-color:var(--border); }
.dark .comment-compose-main .comment-form-bilitop.is-focused textarea[name="comment"],
.dark .single-comments-card .comment-list .comment-form-bilitop.is-focused textarea[name="comment"] { background:var(--bg-card); }
.dark .user-card { border-color:var(--border); box-shadow:0 10px 30px rgba(0,0,0,.25); }
.dark .profile-avatar-preview img { border-color:var(--bg-card); }
.dark .status-pending { background:rgba(230,162,60,.15); }
.dark .status-published,
.dark .status-completed { background:rgba(103,194,58,.14); }
.dark .status-rejected,
.dark .status-cancelled { background:rgba(245,108,108,.14); }
.dark .status-paid { background:rgba(64,158,255,.14); }
.dark .submit-content .wp-editor-wrap,
.dark .submit-content .wp-editor-tools,
.dark .submit-content .mce-panel,
.dark .submit-content .mce-toolbar-grp,
.dark .submit-content .quicktags-toolbar { background:#252629; border-color:var(--border); color:var(--text); }
.dark .submit-content .mce-btn { background:#2d2f34; border-color:#3a3c42; }
.dark .submit-content .mce-btn button,
.dark .submit-content .mce-btn i { color:#d6d7d9; }
.dark input,
.dark textarea,
.dark select { color-scheme:dark; }
.dark .bilitop-section,
.dark .bilitop-categories,
.dark .bilitop-visual-section { background:var(--bg); color:var(--text); }
.dark .home-category-navigation { background:transparent; }
.dark .home-category-navigation.is-stuck { background:rgba(30,31,34,.94); }
.dark .category-card,
.dark .content-card,
.dark .section-more,
.dark .section-refresh { color:var(--text-secondary); border-color:var(--border); }
.dark .category-card:hover,
.dark .section-more:hover,
.dark .section-refresh:hover { color:var(--primary); border-color:var(--primary); }
.dark .card-title,
.dark .section-title,
.dark .category-name { color:var(--text); }
.dark .card-cover,
.dark .card-cover-placeholder,
.dark .bilitop-slider,
.dark .bilitop-slide-link,
.dark .bilitop-ad-item { background:var(--bg-card); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .header-inner { gap:12px; padding:0 14px; }
    .header-nav { gap:12px; }
    .header-search { min-width:140px; }
    .section-inner, .categories-inner, .archive-inner { padding-left:14px; padding-right:14px; }
    .bilitop-ad-grid.layout-one_large_four_small { grid-template-columns:1.6fr 1fr 1fr; }
    .homepage-feature-layout.has-announcements.has-slider { grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr); gap:14px; }
}

@media (max-width: 768px) {
    :root { --header-h:52px; }
    .homepage-feature-layout.has-announcements.has-slider { display:block; height:auto; }
    .homepage-feature-layout.has-announcements.has-slider .bilitop-slider { min-height:0; aspect-ratio:2.15/1; }
    .homepage-announcements { margin-top:12px; padding:15px; }
    .homepage-feature-layout:not(.has-slider) .homepage-announcements { margin-top:0; }
    .announcement-page { padding:16px 12px 40px; }
    .announcement-page-heading { display:block; margin-bottom:18px; }
    .announcement-page-heading h1 { font-size:26px; }
    .announcement-page-heading > p { margin-top:10px; }
    .announcement-archive-item { gap:12px; padding:20px 16px; }
    .announcement-archive-icon { flex-basis:34px; height:34px; border-radius:9px; }
    .announcement-archive-icon svg { width:19px; height:19px; }
    .announcement-archive-main h2 { font-size:17px; }
    .announcement-article.bilitop-article-card { padding:24px 20px; }
    .announcement-article.bilitop-article-card .single-title { font-size:25px; }
    .bilitop-back-to-top { right:12px; bottom:74px; width:42px; height:46px; border-radius:9px; }
    .site-announcement-modal { align-items:end; padding:12px; }
    .site-announcement-dialog { max-height:82vh; padding:24px 20px 20px; border-radius:18px; }
    .home-category-navigation .category-grid,
    .home-category-navigation.is-stuck .category-grid,
    .home-category-navigation.is-stuck:hover .category-grid,
    .home-category-navigation.is-stuck:focus-within .category-grid { flex-wrap:nowrap; max-height:none; overflow-x:auto; overflow-y:hidden; }
    .home-category-navigation .category-expand-toggle { display:none; }
    .bilitop-header { height:var(--header-h); }
    .header-inner { width:100%; min-width:0; gap:8px; padding:0 10px; }
    .header-nav { display: none; }
    .bilitop-logo { max-width:32%; min-width:0; gap:5px; font-size:15px; }
    .bilitop-logo svg { width:30px; height:auto; flex:0 0 auto; }
    .bilitop-logo-text-icon { width:min(var(--logo-text-icon-width,40px),30px); max-height:30px; }
    .bilitop-logo span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
    .bilitop-logo-image { max-width:100%; max-height:36px; }
    .header-search { flex:1 1 auto; min-width:0; max-width:none; }
    .search-box input { width:100%; min-width:0; padding:7px 9px; }
    .search-btn { padding:7px 9px; }
    .header-right { flex:0 0 auto; justify-content:flex-end; gap:6px; margin-left:auto; }
    .bilitop-header.is-banner .header-right { margin-left:auto; }
    .btn-login,.btn-register { padding:5px 9px; }
    .btn-register { display:none; }
    .dark-mode-toggle { padding:4px; }
    .mobile-menu-toggle { display:flex; width:30px; height:30px; padding:6px; flex-direction:column; justify-content:center; gap:4px; border-radius:6px; background:rgba(255,255,255,.16); }
    .mobile-menu-toggle span { display:block; width:100%; height:2px; border-radius:2px; background:var(--text); }
    .bilitop-header.is-banner .mobile-menu-toggle span { background:var(--banner-text,#fff); }
    .bilitop-header.is-banner.is-banner-scrolled .mobile-menu-toggle { background:var(--bg); }
    .bilitop-header.is-banner.is-banner-scrolled .mobile-menu-toggle span { background:var(--text); }
    .user-name { display: none; }
    .header-submit-button { display:none; }
    .bilitop-header.is-banner { position:sticky; height:var(--header-h); overflow:visible; background-position:center; }
    .bilitop-header.is-banner::before { background:rgba(0,0,0,.16); }
    .bilitop-header.is-banner ~ .bilitop-main { margin-top:0; }
    .bilitop-header.is-banner.is-banner-scrolled ~ .bilitop-main { margin-top:0; }
    .bilitop-main > .bilitop-visual-section:first-child,
    .bilitop-main > .bilitop-section:first-child,
    .bilitop-main > .bilitop-categories:first-child { padding-top:10px; }
    .bilitop-main > .bilitop-single:first-child,
    .bilitop-main > .bilitop-archive:first-child,
    .bilitop-main > .bilitop-user-center:first-child { margin-top:0; padding-top:10px; }
    .bilitop-header.is-banner .header-inner { align-items:center; padding:0 10px; gap:8px; }
    .bilitop-header.is-banner .bilitop-logo { position:static; max-width:32%; color:var(--banner-text,#fff); font-size:15px; text-shadow:0 1px 3px rgba(0,0,0,.45); transform:none; }
    .bilitop-header.is-banner .bilitop-logo-image { max-height:36px; }
    .bilitop-header.is-banner .header-search { flex:1 1 auto; margin:0; }
    .bilitop-header.is-banner .search-box { background:rgba(255,255,255,.9); }
    .bilitop-header .header-search,.bilitop-header.is-banner .header-search { display:none; }
    body.mobile-search-open { overflow:hidden; }
    body.mobile-search-open::before { display:none; }
    .mobile-search-backdrop { position:fixed; z-index:2147483000; inset:0; display:block; pointer-events:auto !important; touch-action:none; overscroll-behavior:contain; user-select:none; -webkit-user-select:none; background:rgba(0,0,0,.46); backdrop-filter:blur(2px); }
    .mobile-search-backdrop[hidden] { display:none; }
    body.mobile-search-open .bilitop-header { pointer-events:none; }
    body.mobile-search-open .bilitop-header .header-search,
    body.mobile-search-open > .header-search { position:fixed; z-index:2147483001; top:12px; right:12px; left:12px; box-sizing:border-box; display:block; width:auto; max-width:none; margin:0; transform:none !important; pointer-events:auto; }
    body.mobile-search-open .mobile-bottom-nav { pointer-events:none; }
    body.mobile-search-open .bilitop-header .header-search { position:fixed; z-index:1250; top:12px; right:12px; left:12px; box-sizing:border-box; display:block; width:auto; max-width:none; margin:0; transform:none !important; }
    body.mobile-search-open .bilitop-header .search-box { min-height:46px; border-color:var(--primary); background:var(--bg-card); box-shadow:0 12px 36px rgba(0,0,0,.25); }
    body.mobile-search-open .bilitop-header .search-box input { padding:11px 13px; font-size:16px; }
    body.mobile-search-open .bilitop-header .search-suggestions { max-height:calc(100vh - 82px); overflow-y:auto; }
    .header-user:hover .user-dropdown { display:none; }
    .header-user.is-open .user-dropdown { display:block; }
    .header-user .user-dropdown { top:calc(100% + 10px); right:-12px; min-width:124px; padding:6px 0; border:1px solid var(--border); box-shadow:0 5px 18px rgba(0,0,0,.12); }
    .header-user .user-dropdown::before { content:''; position:absolute; top:-10px; right:10px; width:42px; height:10px; }
    .header-user .user-dropdown a { padding:9px 13px; font-size:13px; white-space:nowrap; }
    .user-avatar-link img { width:30px; height:30px; }

    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .content-grid { grid-template-columns: repeat(2, 1fr); }

    .user-center-inner, .submit-inner { flex-direction: column; }
    .user-sidebar, .submit-sidebar { width: 100%; }
    .submit-sidebar { display:none; }
    .user-content,.submit-content { padding:16px; }
    .submit-editor-card { margin-left:-16px; margin-right:-16px; padding-left:16px; padding-right:16px; }
    .submit-editor-media-tools { align-items:stretch; }
    .submit-editor-media-tip { flex:1 0 100%; }
    .submit-editor-remote-panel { flex-basis:100%; flex-wrap:wrap; }
    .submit-editor-remote-panel input { flex-basis:100%; }
    .submit-image-library { align-items:end; padding:8px; }
    .submit-image-library-dialog { width:100%; max-height:88vh; border-radius:16px; }
    .submit-image-library-panel { min-height:330px; padding:14px; }
    .submit-image-library-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
    .submit-image-upload-zone { min-height:240px; }
    .submit-image-library-actions { bottom:-14px; margin:14px -14px -14px; padding:11px 14px; }
    .bilitop-author-page { padding:16px 0 34px; }
    .author-space-hero { min-height:210px; }
    .author-space-identity { left:16px; right:16px; bottom:58px; gap:12px; }
    .author-space-avatar { flex-basis:76px; width:76px; height:76px; }
    .author-space-hero .author-profile-main h1 { margin-bottom:4px; font-size:20px; }
    .author-space-hero .author-profile-main p { font-size:12px; }
    .author-space-hero .author-social-actions,.author-cover-manage { right:14px; bottom:13px; }
    .author-space-hero .author-social-actions { left:14px; width:auto; max-width:none; justify-content:flex-end; flex-wrap:nowrap; gap:7px; }
    .author-space-hero .author-social-actions > .btn-social-follow,
    .author-space-hero .author-social-actions > .btn-social-message { flex:1 1 0; width:0; min-width:0; max-width:none; height:32px; min-height:32px; padding:0 8px; font-size:12px; }
    .author-space-hero .author-social-actions > .author-more-actions { flex:0 0 34px; width:34px; }
    .author-cover-manage { min-width:82px; min-height:32px; padding:5px 11px; font-size:12px; }
    .author-more-toggle { width:34px; height:32px; }
    .author-more-menu { right:0; left:auto; }
    .author-space-nav-wrap { display:block; min-height:0; padding:0; }
    .author-space-nav { gap:22px; height:52px; padding:0 16px; scrollbar-width:none; }
    .author-space-nav::-webkit-scrollbar { display:none; }
    .author-space-stats { justify-content:space-around; gap:8px; padding:11px 12px; border-top:1px solid var(--border); }
    .author-space-body { grid-template-columns:1fr; gap:12px; padding:12px; }
    .author-space-content { padding:14px 12px; }
    .author-space-section-heading { margin-bottom:13px; }
    .author-space-section-heading h2 { font-size:18px; }
    .author-space-sidebar { order:2; }
    .author-space-panel { padding:15px; }
    .author-post-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .single-mobile-social { display:flex; align-items:center; flex-wrap:nowrap; width:100%; gap:7px; margin:10px 0 2px; }
    .single-mobile-social > .btn-social-follow,.single-mobile-social > .btn-social-message,.single-mobile-social > a:not(.btn-social-message) { flex:1 1 0; min-width:0; }
    .single-mobile-social > .author-more-actions { flex:0 0 34px; }
    .single-mobile-social > .author-more-actions:only-child { margin-left:auto; }
    .single-mobile-social .author-more-menu { right:0; left:auto; min-width:112px; max-width:calc(100vw - 24px); }
    .single-mobile-social .author-more-toggle { width:34px; height:34px; border-color:var(--border); background:var(--bg-card); backdrop-filter:none; }
    .single-mobile-social .btn-social-login { box-sizing:border-box; display:inline-flex; height:34px; min-height:34px; align-items:center; justify-content:center; padding:0 13px; border:1px solid var(--primary); border-radius:6px; background:var(--primary); color:#fff; font-size:12px; line-height:1; white-space:nowrap; }
    .social-user-row { align-items:flex-start; flex-direction:column; }
    .private-message-layout { grid-template-columns:1fr; }
    .message-peer-list { display:flex; overflow-x:auto; border-right:0; border-bottom:1px solid var(--border); }
    .message-peer { flex:0 0 170px; border-bottom:0; border-right:1px solid var(--border); }
    .message-bubbles { max-height:430px; }
    .private-message-layout,.message-thread { min-height:560px; }
    .private-message-form { align-items:stretch; flex-direction:column; padding:12px; }
    .private-message-form textarea { min-height:124px; font-size:16px; }
    .private-message-form .btn-primary { width:100%; flex-basis:auto; min-height:44px; }
    .error-tv { scale:.82; margin-bottom:-2px; }
    .submit-content .mce-toolbar-grp,
    .submit-content .quicktags-toolbar { overflow-x:visible; }
    .submit-content .mce-toolbar-grp .mce-flow-layout {
        min-width:0;
        white-space:normal;
    }
    .submit-content .mce-toolbar-grp .mce-flow-layout-item {
        display:inline-block;
        float:none;
        vertical-align:top;
    }
    .submit-collapsible > summary { align-items:flex-start; flex-direction:column; gap:2px; padding-top:12px; padding-bottom:12px; }
    .submit-collapsible-body { padding:13px; }
    .bilitop-user-center { padding-top:18px; }
    .bilitop-comments { padding:16px; }
    .comment-list .children { margin-left:20px; padding-left:10px; }
    .comment-emoji-panel { grid-template-columns:repeat(6,1fr); }
    .user-menu { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:8px; overflow:visible; box-shadow:none; }
    .user-menu .menu-item { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-width:0; min-height:68px; padding:10px 4px; border:0; border-radius:6px; text-align:center; font-size:12px; line-height:18px; white-space:normal; }
    .user-menu .menu-item > svg { flex:none; width:20px; height:20px; }
    .user-menu .menu-label { max-width:100%; overflow-wrap:anywhere; }
    .user-menu .menu-item.active { border:0; background:rgba(0,161,214,.09); color:var(--primary); font-weight:600; }
    .user-menu .menu-item:focus-visible { outline:2px solid var(--primary); outline-offset:-2px; }
    .user-menu .user-space-entry .menu-external-icon { display:none; }
    .settings-form,.content-section { max-width:100%; overflow:hidden; }
    .inline-form { width:100%; flex-direction:column; align-items:stretch; }
    .inline-form input,.inline-form button { width:100%; max-width:100%; min-width:0; }

    .user-info-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .bilitop-footer { margin-top:14px; padding:8px 14px 10px; }
    .footer-inner { grid-template-columns:1fr; gap:18px; padding:18px; }
    .footer-bottom { align-items:flex-start; flex-direction:column; gap:4px; padding-top:6px; }
    .footer-meta { margin-left:0; text-align:left; }

    .search-result-item { flex-direction: column; }
    .result-cover { width: 100%; height: 160px; }

    .table-row { flex-wrap: wrap; }

    .single-layout { flex-direction: column; }
    .single-sidebar { width: 100%; }
    .bilitop-single .single-sidebar { display:none!important; }
    .access-type-selector { grid-template-columns: 1fr; }
    .bilitop-visual-section,.bilitop-section,.bilitop-categories { padding:14px 0; }
    .bilitop-slider { aspect-ratio:1.75/1; border-radius:8px; }
    .slider-prev,.slider-next { width:30px; height:40px; font-size:24px; }
    .bilitop-slide-link span,.bilitop-ad-item span { padding:28px 10px 9px; font-size:13px; }
    .bilitop-ad-grid.layout-two { grid-template-columns:1fr; aspect-ratio:auto; }
    .bilitop-ad-grid.layout-two .bilitop-ad-item { aspect-ratio:2/1; }
    body.bilitop-body.has-mobile-bottom-nav { padding-bottom:62px; }
    .mobile-bottom-nav { position:fixed; z-index:1100; left:0; right:0; bottom:0; height:58px; display:flex; align-items:stretch; justify-content:space-around; padding:3px 4px max(3px,env(safe-area-inset-bottom)); border-top:1px solid var(--border); background:rgba(255,255,255,.95); box-shadow:0 -3px 14px rgba(0,0,0,.08); backdrop-filter:blur(12px); }
    .mobile-bottom-nav a { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--text-muted); font-size:10px; line-height:1.1; }
    .mobile-bottom-nav .nav-icon { width:20px; height:20px; font-size:18px; }
    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:hover { color:var(--primary); }
    .dark .mobile-bottom-nav { background:rgba(30,31,34,.95); }
}

@media (max-width: 480px) {
    .bilitop-logo { max-width:27%; }
    .bilitop-logo svg,.bilitop-logo-text-icon { display:none; }
    .btn-login { padding:5px 7px; font-size:13px; }
    .search-box input { font-size:13px; }
    .search-box input::placeholder { font-size:0; }
    .search-box input::placeholder { color:transparent; }
    .content-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap:16px 10px; }
    .content-card .card-title { display:-webkit-box; height:35px; min-height:35px; max-height:35px; margin-bottom:6px; overflow:hidden; font-size:13px; line-height:17.5px; overflow-wrap:anywhere; word-break:break-word; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; }
    .content-card .card-meta { gap:5px; font-size:11px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .section-heading { align-items:flex-start; gap:8px; }
    .section-more { padding:4px 8px; }
    .browse-tabs a { padding:5px 10px; }
    .bilitop-ad-grid.layout-one_large_four_small,
    .bilitop-ad-grid.layout-four { grid-template-columns:1fr; }
    .bilitop-ad-grid.layout-one_large_four_small .item-0 { grid-column:auto; aspect-ratio:1.8/1; }
    .bilitop-ad-item { min-height:120px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn-primary { width: 100%; }
    .submit-content-heading { align-items:flex-start; }
    .submission-notice { padding:12px; }
    .user-content,.submit-content { padding:13px; }
    .submit-editor-card { margin-left:-13px; margin-right:-13px; padding-left:13px; padding-right:13px; }
    .submit-editor-heading { align-items:flex-start; flex-direction:column; gap:3px; }
    .submit-editor-card textarea#submit-editor { min-height:210px; }
    .recharge-target-switch { grid-template-columns:1fr; gap:8px; }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bilitopSpin { to { transform:rotate(360deg); } }

.content-card { animation: fadeInUp 0.4s ease forwards; }
.content-card:nth-child(2) { animation-delay: 0.05s; }
.content-card:nth-child(3) { animation-delay: 0.1s; }
.content-card:nth-child(4) { animation-delay: 0.15s; }
.content-card:nth-child(5) { animation-delay: 0.2s; }
.content-card:nth-child(6) { animation-delay: 0.25s; }

/* Scrollbar */
.dark ::-webkit-scrollbar { width: 6px; }
.dark ::-webkit-scrollbar-track { background: var(--bg); }
.dark ::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb:hover { background: #555; }

/* Global queued operation notices */
.bilitop-toast-host{position:fixed;z-index:100000;top:82px;right:20px;width:min(380px,calc(100vw - 40px));pointer-events:none}
.bilitop-toast{--toast-accent:var(--primary);position:relative;display:grid;grid-template-columns:32px minmax(0,1fr) auto 28px;align-items:center;gap:10px;min-height:58px;padding:11px 10px 11px 12px;overflow:hidden;color:#18191c;background:rgba(255,255,255,.97);border:1px solid rgba(0,0,0,.08);border-radius:13px;box-shadow:0 12px 36px rgba(0,0,0,.16);opacity:0;transform:translate3d(18px,0,0) scale(.98);transition:opacity .2s ease,transform .2s ease;pointer-events:auto}
.bilitop-toast.is-visible{opacity:1;transform:translate3d(0,0,0) scale(1)}
.bilitop-toast-icon{display:grid;place-items:center;width:32px;height:32px;color:#fff;background:var(--toast-accent);border-radius:50%;font-size:17px;font-weight:700;line-height:1}
.bilitop-toast-message{min-width:0;overflow-wrap:anywhere;font-size:14px;font-weight:500;line-height:1.55}
.bilitop-toast-count{min-width:30px;padding:3px 7px;color:var(--toast-accent);background:rgba(0,174,236,.1);border-radius:999px;font-size:12px;font-weight:700;text-align:center}
.bilitop-toast-count[hidden]{display:none}
.bilitop-toast-close{display:grid;place-items:center;width:28px;height:28px;padding:0;color:#9499a0;background:transparent;border:0;border-radius:7px;font-size:20px;line-height:1;cursor:pointer}
.bilitop-toast-close:hover{color:#18191c;background:#f1f2f3}
.bilitop-toast-progress{position:absolute;right:0;bottom:0;left:0;height:3px;background:var(--toast-accent);transform-origin:left}
.bilitop-toast-success{--toast-accent:#00b578}.bilitop-toast-error{--toast-accent:#f56c6c}.bilitop-toast-warning{--toast-accent:#e6a23c}.bilitop-toast-info{--toast-accent:var(--primary)}
.bilitop-toast-success .bilitop-toast-count{background:rgba(0,181,120,.1)}.bilitop-toast-error .bilitop-toast-count{background:rgba(245,108,108,.1)}.bilitop-toast-warning .bilitop-toast-count{background:rgba(230,162,60,.1)}
@keyframes bilitop-toast-progress{from{transform:scaleX(1)}to{transform:scaleX(0)}}
.dark .bilitop-toast,body.dark-mode .bilitop-toast{color:#f1f2f3;background:rgba(30,31,34,.97);border-color:rgba(255,255,255,.12);box-shadow:0 12px 38px rgba(0,0,0,.42)}
.dark .bilitop-toast-close:hover,body.dark-mode .bilitop-toast-close:hover{color:#fff;background:rgba(255,255,255,.1)}
@media(max-width:768px){.bilitop-toast-host{top:64px;right:12px;left:12px;width:auto}.bilitop-toast{grid-template-columns:30px minmax(0,1fr) auto 26px;min-height:54px;padding:9px 8px 9px 10px;border-radius:12px;transform:translate3d(0,-12px,0) scale(.98)}.bilitop-toast.is-visible{transform:translate3d(0,0,0) scale(1)}.bilitop-toast-icon{width:30px;height:30px}}
@media(prefers-reduced-motion:reduce){.bilitop-toast{transition:none}.bilitop-toast-progress{animation:none!important}}


/* Single sidebar thumbnail recommendations */
.sidebar-related-card{padding-bottom:12px}.sidebar-related-list{display:flex;flex-direction:column;gap:4px}.bilitop-single .sidebar-related-card .related-item{display:grid;grid-template-columns:92px minmax(0,1fr);gap:11px;align-items:center;padding:8px 0;border-bottom:0;color:var(--text-primary)}
.related-thumb{position:relative;display:block;width:92px;aspect-ratio:16/10;overflow:hidden;background:linear-gradient(135deg,#eef1f5,#dfe5ec);border-radius:7px}.related-thumb img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}.related-item:hover .related-thumb img{transform:scale(1.05)}.related-thumb.no-image::before{content:'暂无封面';position:absolute;inset:0;display:grid;place-items:center;color:#9499a0;font-size:11px}
.related-info{display:flex;min-width:0;height:58px;flex-direction:column;justify-content:space-between}.related-title{display:-webkit-box;overflow:hidden;color:var(--text-primary);font-size:13px;font-weight:500;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:2}.related-item:hover .related-title{color:var(--primary)}.related-meta{display:flex;gap:8px;color:#9499a0;font-size:11px;line-height:1.2}
.related-top-badge{position:absolute;z-index:1;top:0;left:0;padding:3px 7px;color:#fff;background:#fb7299;border-radius:7px 0 7px 0;font-size:10px;font-weight:800;font-style:italic;line-height:1.25;box-shadow:1px 1px 4px rgba(0,0,0,.18)}.related-top-badge.top-2{background:#ff9f1c}.related-top-badge.top-3{background:#168cff}
.dark .related-thumb,body.dark-mode .related-thumb{background:linear-gradient(135deg,#303238,#25262a)}

/* Administrator and membership identity badges */
.identity-badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:20px;padding:2px 7px;color:#fff;background:var(--identity-color,#e6a23c);border:1px solid rgba(255,255,255,.3);border-radius:999px;box-shadow:0 2px 7px color-mix(in srgb,var(--identity-color,#e6a23c) 28%,transparent);font-size:10px;font-weight:700;line-height:1.2;vertical-align:middle;white-space:nowrap}.identity-badge-admin::before{content:'◆';margin-right:3px;font-size:8px}.identity-badge-member::before{content:attr(data-period-label);margin-right:4px;font-size:8px;font-weight:900;letter-spacing:-.2px}
.author-profile-main h1{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.profile-identity-badge{font-size:11px}.author-name-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.author-name-row .author-name{margin-bottom:0}.sidebar-identity-badge{min-height:18px;padding:2px 6px;font-size:9px}
/* Comment accents use the same server-resolved palette as identity badges. */
.comment-header{flex-wrap:wrap;gap:6px}
.comment-item[class*="comment-identity-"] > .comment-inner{background:transparent;background:color-mix(in srgb,var(--identity-color) 6%,transparent);box-shadow:inset 2px 0 0 var(--identity-color)}
.comment-item[class*="comment-identity-"] > .comment-inner > .comment-body > .comment-header .comment-author,
.comment-item[class*="comment-identity-"] > .comment-inner > .comment-body > .comment-header .comment-author a{color:var(--identity-font-color,var(--identity-color))}
.dark .comment-item[class*="comment-identity-"] > .comment-inner,
body.dark-mode .comment-item[class*="comment-identity-"] > .comment-inner{background:color-mix(in srgb,var(--identity-color) 12%,transparent)}
.dark .comment-item[class*="comment-identity-"] > .comment-inner > .comment-body > .comment-header .comment-author,
.dark .comment-item[class*="comment-identity-"] > .comment-inner > .comment-body > .comment-header .comment-author a{color:color-mix(in srgb,var(--identity-color) 70%,#fff)}
@media(max-width:600px){.identity-badge{max-width:160px;overflow:hidden;text-overflow:ellipsis}}

/* Bilibili-inspired LV0-LV6 user levels */
.user-level-badge{--level-color:#a7abb3;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;height:18px;padding:0 5px;color:var(--level-color);background:color-mix(in srgb,var(--level-color) 10%,#fff);border:1px solid color-mix(in srgb,var(--level-color) 48%,transparent);border-radius:3px;font-size:11px;font-weight:900;font-style:italic;line-height:16px;letter-spacing:-.3px;vertical-align:middle;white-space:nowrap}.user-level-badge i{margin-right:1px;font-size:8px;font-weight:800;font-style:italic}.user-level-0{--level-color:#9da2ab}.user-level-1{--level-color:#58a8dd}.user-level-2{--level-color:#38b9ac}.user-level-3{--level-color:#75b943}.user-level-4{--level-color:#e2a52e}.user-level-5{--level-color:#ef6b8c}.user-level-6{--level-color:#df405b}.comment-level-badge,.sidebar-level-badge{height:17px;padding:0 4px;font-size:10px}.comment-level-badge i,.sidebar-level-badge i{font-size:7px}
.user-level-progress{width:min(520px,100%);margin-top:10px}.user-level-progress-head{display:flex;align-items:center;gap:8px;min-width:0;color:var(--text-muted);font-size:12px}.user-level-progress-head span:not(.user-level-badge){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-level-progress-head b{margin-left:auto;color:var(--text-primary);font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}.user-level-progress-track{height:5px;margin-top:7px;overflow:hidden;background:rgba(148,153,160,.2);border-radius:999px}.user-level-progress-track>i{display:block;height:100%;background:linear-gradient(90deg,var(--primary),#fb7299);border-radius:inherit;transition:width .3s ease}.author-level-progress{max-width:380px}.author-space-hero.has-cover .author-level-progress-head,.author-space-hero.has-cover .author-level-progress-head b{color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.35)}.author-space-hero.has-cover .user-level-progress-track{background:rgba(255,255,255,.32)}.center-level-progress{box-sizing:border-box;width:100%;max-width:none;margin:14px 0 0;padding:14px 18px;border:1px solid var(--border);border-radius:12px;background:var(--bg-card)}
.dark .user-level-badge,body.dark-mode .user-level-badge{background:color-mix(in srgb,var(--level-color) 16%,#202226)}
@media(max-width:600px){.user-level-progress-head{gap:6px}.user-level-progress-head b{font-size:10px}.author-level-progress{max-width:100%}}

/* Personal task center */
.task-center-header{align-items:flex-start}.task-center-header h2{margin-bottom:5px}.task-center-header p{margin:0;color:var(--text-muted);font-size:13px}.task-center-header>a{flex:0 0 auto;padding:7px 12px;color:var(--primary);border:1px solid color-mix(in srgb,var(--primary) 45%,transparent);border-radius:8px;font-size:12px}.task-center-summary{display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:16px 18px;border:1px solid rgba(0,174,236,.2);border-radius:12px;background:linear-gradient(100deg,rgba(0,174,236,.09),rgba(251,114,153,.06))}.task-summary-icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;color:#fff;background:linear-gradient(135deg,var(--primary),#fb7299);border-radius:12px;font-size:20px;font-weight:900}.task-center-summary strong{font-size:16px}.task-center-summary p{margin:3px 0 0;color:var(--text-muted);font-size:12px}.task-center-list{display:grid;gap:12px}.task-center-card{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:15px;padding:18px;border:1px solid var(--border);border-radius:12px;background:var(--bg-card);transition:border-color .2s,box-shadow .2s}.task-center-card:hover{border-color:color-mix(in srgb,var(--primary) 36%,var(--border));box-shadow:0 8px 24px rgba(0,0,0,.055)}.task-center-card.is-complete{background:linear-gradient(90deg,rgba(0,181,120,.055),var(--bg-card))}.task-card-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px}.task-card-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.task-icon-checkin{color:#f5a623;background:rgba(245,166,35,.11)}.task-icon-submit{color:var(--primary);background:rgba(0,174,236,.1)}.task-icon-comment{color:#fb7299;background:rgba(251,114,153,.1)}.task-card-main{min-width:0}.task-card-title{display:flex;align-items:center;gap:10px}.task-card-title h3{margin:0;font-size:16px}.task-card-title span{padding:2px 7px;color:var(--text-muted);background:var(--bg);border-radius:999px;font-size:10px}.task-center-card.is-complete .task-card-title span{color:#00a86b;background:rgba(0,181,120,.1)}.task-card-main>p{margin:5px 0 9px;color:var(--text-muted);font-size:12px}.task-card-main>small{display:block;margin-top:7px;color:var(--text-muted);font-size:11px}.task-card-reward{display:flex;flex-wrap:wrap;gap:8px 18px}.task-card-reward b{color:#f28c18;font-size:13px}.task-progress-lines{display:flex;flex-wrap:wrap;gap:5px 18px;margin-top:8px;color:var(--text-secondary);font-size:11px;font-variant-numeric:tabular-nums}.task-card-action{min-width:68px;padding:8px 13px;color:#fff;background:var(--primary);border-radius:8px;font-size:12px;text-align:center;white-space:nowrap}.task-center-card.is-complete .task-card-action{color:#00a86b;background:rgba(0,181,120,.1);pointer-events:none}.task-card-action:hover{color:#fff;filter:brightness(.94)}.message-tabs a{display:inline-flex;align-items:center;gap:5px}.message-tabs a b{display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;color:#fff;background:#fb7299;border-radius:999px;font-size:9px;line-height:1}
.dark .task-center-card,body.dark-mode .task-center-card{background:#18191c}.dark .task-center-card.is-complete,body.dark-mode .task-center-card.is-complete{background:linear-gradient(90deg,rgba(0,181,120,.08),#18191c)}
@media(max-width:700px){.task-center-header{gap:10px}.task-center-header>a{padding:6px 9px}.task-center-card{grid-template-columns:42px minmax(0,1fr);gap:11px;padding:14px}.task-card-icon{width:42px;height:42px}.task-card-action{grid-column:1/-1;width:100%;box-sizing:border-box}.task-card-title{align-items:flex-start;flex-direction:column;gap:4px}.task-center-summary{padding:14px}.task-progress-lines{display:grid;gap:3px}}

/* Make nested reply relationships explicit */
.comment-item{scroll-margin-top:88px}.comment-reply-target{display:inline-flex;align-items:center;min-width:0;max-width:220px;padding:2px 7px;color:var(--primary);background:rgba(0,161,214,.09);border-radius:999px;font-size:11px;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comment-reply-target span{margin-right:2px;color:var(--text-muted);font-weight:500}.comment-reply-target:hover{color:#fff;background:var(--primary)}.comment-reply-target:hover span{color:rgba(255,255,255,.82)}
.comment-list .children{position:relative}.comment-list .children::before{content:'↳';position:absolute;top:8px;left:-2px;padding:0 2px;color:var(--primary);background:var(--bg-card);font-size:13px;font-weight:700;line-height:1}.dark .comment-reply-target,body.dark-mode .comment-reply-target{background:rgba(0,174,236,.15)}
@media(max-width:600px){.comment-reply-target{max-width:145px;padding:2px 5px;font-size:10px}.comment-list .children::before{top:7px;left:-3px}.comment-date{margin-left:auto}}

/* Comment likes, personal dislikes and sorting */
.comments-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.comment-sort-tabs{display:flex;align-items:center;gap:4px;padding:3px;background:var(--bg);border-radius:999px}.comment-sort-tabs a{padding:5px 11px;color:var(--text-muted);border-radius:999px;font-size:12px;font-weight:600}.comment-sort-tabs a:hover{color:var(--primary)}.comment-sort-tabs a.active{color:#fff;background:var(--primary);box-shadow:0 3px 9px rgba(0,161,214,.2)}
.comment-actions{display:flex;align-items:center;gap:10px}.comment-vote-button{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 5px;color:var(--text-muted);background:transparent;border:0;border-radius:6px;font-size:12px;line-height:1;cursor:pointer;transition:color .18s ease,background .18s ease,transform .18s ease}.comment-vote-button:hover{color:var(--primary);background:rgba(0,161,214,.08)}.comment-vote-button.active{color:var(--primary);background:rgba(0,161,214,.11);font-weight:700}.comment-vote-button:active{transform:scale(.94)}.comment-vote-button:disabled{opacity:.5;cursor:wait}.comment-dislike-button:hover{color:#f56c6c;background:rgba(245,108,108,.09)}.comment-like-count{min-width:8px;font-variant-numeric:tabular-nums}.comment-item{transition:opacity .2s ease,transform .2s ease,max-height .22s ease}.comment-item.is-hiding{opacity:0;transform:translateX(12px);pointer-events:none}
.dark .comment-sort-tabs,body.dark-mode .comment-sort-tabs{background:rgba(255,255,255,.06)}
@media(max-width:600px){.comments-header{align-items:center}.comment-sort-tabs a{padding:4px 8px;font-size:11px}.comment-actions{gap:6px}.comment-vote-button{padding:0 3px}.comment-dislike-button span{font-size:11px}}

/* Recover comments hidden by the current user's dislike */
.comment-hidden-toggle{display:inline-flex;align-items:center;gap:4px;padding:5px 9px;color:#9499a0;background:transparent;border:1px solid var(--border);border-radius:999px;font-size:11px;cursor:pointer}.comment-hidden-toggle span{display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;color:#fff;background:#f56c6c;border-radius:999px;font-size:10px}.comment-hidden-toggle:hover,.comment-hidden-toggle.active{color:#f56c6c;border-color:rgba(245,108,108,.45);background:rgba(245,108,108,.07)}
.comment-item.is-user-hidden{display:none}.bilitop-comments.show-hidden-comments .comment-item.is-user-hidden{display:list-item;opacity:.72}.bilitop-comments.show-hidden-comments .comment-item.is-user-hidden>.comment-inner{outline:1px dashed rgba(245,108,108,.42);outline-offset:-1px}.comment-hidden-badge{display:inline-flex;align-items:center;height:18px;padding:0 6px;color:#f56c6c;background:rgba(245,108,108,.1);border-radius:4px;font-size:10px;font-weight:600}.comment-dislike-button.active{color:#f56c6c;background:rgba(245,108,108,.1)}
@media(max-width:600px){.comments-header{flex-wrap:wrap;gap:8px}.comment-hidden-toggle{padding:4px 7px}.comment-sort-tabs{margin-left:auto}}

/* Bilibili-style outline vote icons */
.comment-vote-button svg{display:block;width:17px;height:17px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.comment-like-button.active svg{filter:drop-shadow(0 2px 3px rgba(0,161,214,.2))}.comment-dislike-label:empty{display:none}.comment-dislike-label{font-size:11px;font-weight:600}.comment-actions .comment-vote-button{gap:3px;color:#9499a0}.comment-actions .comment-vote-button:hover,.comment-actions .comment-like-button.active{color:var(--primary);background:transparent}.comment-actions .comment-dislike-button:hover,.comment-actions .comment-dislike-button.active{color:#f56c6c;background:transparent}
@media(max-width:600px){.comment-vote-button svg{width:16px;height:16px}}
/* ===== Virtual store and lottery (v2.14) ===== */
.store-page{min-height:calc(100vh - 180px);padding:34px 20px 72px;background:var(--bg-color,#f4f5f7)}
.store-shell{width:min(1200px,100%);margin:0 auto}
.store-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:30px 34px;border-radius:18px;background:linear-gradient(135deg,var(--primary) 0%,#6ec8ff 46%,#fb7299 100%);box-shadow:0 10px 30px rgba(0,174,236,.16);color:#fff}
.store-hero h1{margin:0 0 8px;font-size:30px;line-height:1.2;color:#fff}.store-hero p{margin:0;color:rgba(255,255,255,.9)}
.store-balance{flex:0 0 auto;min-width:150px;padding:14px 20px;border:1px solid rgba(255,255,255,.3);border-radius:14px;background:rgba(255,255,255,.16);text-align:center;backdrop-filter:blur(8px)}
.store-balance strong{display:block;margin-top:3px;font-size:28px;line-height:1.15;color:#fff}
.store-login-link{display:flex;flex:0 0 auto;flex-direction:column;align-items:center;justify-content:center;min-width:150px;padding:13px 20px;border:1px solid rgba(255,255,255,.34);border-radius:14px;background:rgba(255,255,255,.16);color:#fff;text-align:center;backdrop-filter:blur(8px)}.store-login-link span{font-size:12px;opacity:.9}.store-login-link strong{margin-top:2px;color:#fff;font-size:21px}.store-login-link:hover{background:rgba(255,255,255,.25);color:#fff}.store-tab-login{display:inline-flex;align-items:center;margin-left:auto;padding:10px 18px;border-radius:9px;color:var(--primary);font-size:14px}.store-tab-login:hover{background:#f1faff;color:#0097c7}.dark .store-tab-login:hover{background:#25272b}
.store-notice{margin:18px 0 0;padding:14px 18px;border:1px solid #ffe6a7;border-radius:12px;background:#fff8e5;color:#946200}
.store-tabs{display:flex;gap:8px;margin:24px 0 18px;padding:5px;border-radius:12px;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.store-tabs button{min-width:112px;padding:11px 20px;border:0;border-radius:9px;background:transparent;color:#61666d;font-size:15px;cursor:pointer;transition:.2s}
.store-tabs button:hover{color:var(--primary);background:#f1faff}.store-tabs button.active{color:#fff;background:var(--primary);box-shadow:0 4px 12px rgba(0,174,236,.24)}
.store-panel{display:none}.store-panel.active{display:block}.store-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.store-card{min-width:0;overflow:hidden;border:1px solid #e3e5e7;border-radius:14px;background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.045);transition:transform .2s,box-shadow .2s}
.store-card:hover{transform:translateY(-3px);box-shadow:0 10px 26px rgba(0,0,0,.09)}.store-card>img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;background:#eef1f4}
.store-card-body{padding:16px}.store-card-body h3{margin:0 0 8px;overflow:hidden;color:#18191c;font-size:17px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.store-card-body p{display:-webkit-box;height:42px;margin:0 0 16px;overflow:hidden;color:#9499a0;font-size:13px;line-height:21px;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.store-card-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}.store-card-foot b{color:#fb7299;font-size:16px}.store-card-foot button,.lottery-wheel-wrap>#lottery-draw{border:0;border-radius:9px;background:var(--primary);color:#fff;cursor:pointer;transition:.2s}
.store-card-foot button{padding:9px 14px;white-space:nowrap}.store-card-foot button:hover,.lottery-wheel-wrap>#lottery-draw:hover{background:#0097c7}.store-card-foot button:disabled,#lottery-draw:disabled{cursor:not-allowed;opacity:.55}
.store-empty{grid-column:1/-1;margin:0;padding:70px 20px;border-radius:14px;background:#fff;color:#9499a0;text-align:center}
.lottery-layout{display:grid;grid-template-columns:380px minmax(0,1fr);align-items:center;gap:48px;padding:36px;border:1px solid #e3e5e7;border-radius:18px;background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.045)}
.lottery-layout h2{margin:0 0 10px;font-size:26px}.lottery-layout p{color:#61666d}.lottery-layout ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:20px 0 0;padding:0;list-style:none}.lottery-layout li{padding:10px 12px;border-radius:8px;background:#f6f7f8;color:#61666d}
.lottery-wheel-wrap{position:relative;width:330px;height:330px;margin:auto;filter:drop-shadow(0 10px 22px rgba(251,114,153,.2))}.lottery-wheel{position:absolute;inset:0;border:8px solid #fff;border-radius:50%;background:conic-gradient(#fb7299 0 12.5%,#ffd36b 0 25%,var(--primary) 0 37.5%,#8bd3c7 0 50%,#fb7299 0 62.5%,#ffd36b 0 75%,var(--primary) 0 87.5%,#8bd3c7 0);box-shadow:0 0 0 2px #e3e5e7;transition:transform .9s cubic-bezier(.2,.8,.2,1)}
.lottery-wheel.spinning{transform:rotate(1080deg)}.lottery-wheel span{position:absolute;left:50%;top:50%;width:110px;color:#fff;font-size:13px;font-weight:600;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.22);transform:rotate(calc(360deg / var(--n) * var(--i))) translateY(-126px) rotate(calc(-360deg / var(--n) * var(--i)));transform-origin:0 0}
.lottery-wheel-wrap>#lottery-draw{position:absolute;z-index:2;left:50%;top:50%;width:94px;height:94px;padding:0;border:5px solid rgba(255,255,255,.86);border-radius:50%;font-size:17px;font-weight:700;transform:translate(-50%,-50%);box-shadow:0 5px 18px rgba(0,0,0,.18)}
.lottery-wheel-wrap>#lottery-draw small{font-size:11px;font-weight:400}.store-panel[data-panel=records]>h2{margin:24px 0 12px}.store-records{display:grid;gap:10px}.store-records>div{padding:16px 18px;border:1px solid #e3e5e7;border-radius:11px;background:#fff}.store-records span{float:right;color:#9499a0;font-size:13px}.store-records p{clear:both;margin:10px 0 0;padding:10px;border-radius:7px;background:#f6f7f8;word-break:break-all}
.store-result{position:fixed;z-index:100001;inset:0;display:grid;place-items:center;padding:20px;background:rgba(0,0,0,.52);backdrop-filter:blur(3px)}.store-result[hidden]{display:none}.store-result>div{position:relative;width:min(440px,100%);padding:28px;border-radius:16px;background:#fff;box-shadow:0 18px 60px rgba(0,0,0,.25)}.store-result h3{margin:0 30px 14px 0}.store-result section{color:#61666d;line-height:1.7;word-break:break-all}.store-result button{position:absolute;right:12px;top:8px;width:34px;height:34px;border:0;background:transparent;color:#9499a0;font-size:26px;cursor:pointer}
.dark .store-page{background:#0f1012}.dark .store-tabs,.dark .store-card,.dark .lottery-layout,.dark .store-empty,.dark .store-records>div,.dark .store-result>div{border-color:#303238;background:#18191c;color:#e5e7eb}.dark .store-card-body h3,.dark .lottery-layout h2,.dark .store-result h3{color:#e5e7eb}.dark .store-tabs button{color:#b8bac0}.dark .store-tabs button:hover{background:#25272b}.dark .lottery-layout p,.dark .store-result section{color:#aeb1b7}.dark .lottery-layout li,.dark .store-records p{background:#24262a;color:#c7c9ce}
@media(max-width:900px){.store-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.lottery-layout{grid-template-columns:330px minmax(0,1fr);gap:24px;padding:24px}.lottery-wheel-wrap{width:300px;height:300px}.lottery-wheel span{transform:rotate(calc(360deg / var(--n) * var(--i))) translateY(-112px) rotate(calc(-360deg / var(--n) * var(--i)))}}
@media(max-width:640px){.store-page{padding:16px 12px 92px}.store-hero{align-items:flex-start;padding:20px;border-radius:14px}.store-hero h1{font-size:24px}.store-hero p{font-size:13px}.store-balance{min-width:100px;padding:10px 12px}.store-balance strong{font-size:22px}.store-tabs{margin:16px 0 12px;overflow-x:auto}.store-tabs button{min-width:auto;flex:0 0 auto;padding:9px 15px}.store-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.store-card{border-radius:10px}.store-card-body{padding:10px}.store-card-body h3{font-size:14px}.store-card-body p{height:36px;margin-bottom:10px;font-size:12px;line-height:18px}.store-card-foot{align-items:flex-start;flex-direction:column}.store-card-foot b{font-size:14px}.store-card-foot button{width:100%;padding:8px}.lottery-layout{display:block;padding:18px}.lottery-wheel-wrap{width:270px;height:270px;margin-bottom:26px}.lottery-wheel span{width:92px;font-size:11px;transform:rotate(calc(360deg / var(--n) * var(--i))) translateY(-100px) rotate(calc(-360deg / var(--n) * var(--i)))}.lottery-wheel-wrap>#lottery-draw{width:82px;height:82px}.lottery-layout h2{font-size:22px}.lottery-layout ul{grid-template-columns:1fr 1fr}.store-records span{float:none;display:block;margin-top:4px}.store-result>div{padding:23px}}

/* Keep prize labels centered in their wheel sectors instead of growing outside the circle. */
.lottery-wheel{overflow:hidden}
.lottery-wheel span{display:-webkit-box;margin-left:-55px;overflow:hidden;line-height:1.25;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2;transform-origin:50% 0}
@media(max-width:640px){.lottery-wheel span{margin-left:-46px}}
.comment-image-url{box-sizing:border-box;justify-content:center;width:auto;height:27px;padding:0 8px;gap:4px;font-size:12px;vertical-align:middle}.comment-image-url svg{width:14px;height:14px}.password-settings-form h3{margin:0 0 20px}.settings-form input[readonly]{cursor:default;background:var(--bg);color:var(--text-muted)}
.search-login-required{display:flex;min-height:420px;flex-direction:column;align-items:center;justify-content:center;padding:48px 20px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg-card);box-shadow:var(--shadow);text-align:center}.search-login-icon{display:grid;place-items:center;width:68px;height:68px;margin-bottom:18px;border-radius:50%;background:rgba(0,174,236,.1);color:var(--primary)}.search-login-icon svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.search-login-required h1{margin:0 0 10px;font-size:24px}.search-login-required p{margin:0 0 22px;color:var(--text-muted)}.search-login-required .btn-primary{min-width:120px;padding:10px 22px;text-align:center}
