/* ============================================================
   PicHub 前台样式 - 极简响应式
   ============================================================ */
:root {
    --primary: #4F6FED;
    --primary-light: #EEF2FF;
    --bg: #F7F8FA;
    --card: #FFFFFF;
    --text: #1A1A1A;
    --text2: #6B7280;
    --text3: #9CA3AF;
    --border: #E5E7EB;
    --dark: #1A1A2E;
    --shadow: 0 1px 3px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.08);
    --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-main { flex: 1; padding: 20px 0 40px; }

/* ---------- Header ---------- */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; height: 62px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-icon {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 9px;
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 700;
}
.logo-text { font-size: 19px; font-weight: 700; }

.nav-menu { display: flex; gap: 4px; margin-left: 18px; flex: 1; }
.nav-item {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text2);
    transition: all .2s;
    white-space: nowrap;
}
.nav-item:hover { color: var(--primary); background: var(--primary-light); }
.nav-item.active { color: var(--primary); font-weight: 600; }

.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* ---------- 用户下拉菜单 ---------- */
.user-menu { position: relative; }
.user-chip {
    font-size: 13px; color: var(--text2);
    background: var(--bg);
    padding: 4px 12px 4px 4px; border-radius: 20px;
    white-space: nowrap;
    display: inline-flex; align-items: center; gap: 7px;
}
.user-chip-btn {
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border .2s;
    font-family: inherit;
}
.user-chip-btn:hover, .user-menu.open .user-chip-btn { border-color: var(--primary); }
.avatar-circle {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.caret { color: var(--text3); transition: transform .2s; }
.user-menu.open .caret { transform: rotate(180deg); }
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    padding: 6px;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all .18s;
}
.user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-head {
    font-size: 12px; color: var(--text3);
    padding: 8px 12px 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--text);
    transition: background .15s;
}
.dropdown-item:hover { background: var(--bg); color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.admin-tag {
    font-style: normal;
    font-size: 11px;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: 1px;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px; font-weight: 500;
    border: none; cursor: pointer;
    transition: all .2s;
    gap: 6px;
    text-align: center;
}
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #3D5BDB; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Flash ---------- */
.flash { padding: 12px 0; font-size: 14px; }
.flash-success { background: #ECFDF5; color: #065F46; border-bottom: 1px solid #A7F3D0; }
.flash-error { background: #FEF2F2; color: #B91C1C; border-bottom: 1px solid #FECACA; }

/* ---------- 分类栏 ---------- */
.category-bar {
    display: flex; gap: 8px;
    padding: 14px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.category-bar::-webkit-scrollbar { display: none; }
.cat-tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: var(--card);
    color: var(--text2);
    border: 1px solid var(--border);
    transition: all .2s;
    white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px;
}
.cat-tag:hover { border-color: var(--primary); color: var(--primary); }
.cat-tag.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-count { font-size: 11px; opacity: .75; }

/* ---------- 素材网格 ---------- */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.image-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: block;
}
.image-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.image-thumb {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    background-color: #EDEEF0;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
.thumb-file { background: linear-gradient(135deg, #EEF2FF, #F5F3FF); }
.file-badge {
    font-size: 13px; font-weight: 700; letter-spacing: 1px;
    color: var(--primary);
    background: rgba(255,255,255,.9);
    padding: 10px 16px; border-radius: 10px;
    box-shadow: var(--shadow);
}
.thumb-views {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,.55);
    color: #fff; font-size: 11px;
    padding: 3px 8px; border-radius: 12px;
    backdrop-filter: blur(4px);
}
.image-info { padding: 10px 12px 12px; }
.image-title {
    font-size: 13px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.image-meta {
    display: flex; justify-content: space-between; gap: 8px;
    font-size: 11px; color: var(--text3);
    margin-top: 5px;
}

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.page-btn {
    min-width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text2);
    transition: all .2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; color: var(--text2); }
.empty-state .empty-sub { font-size: 13px; color: var(--text3); margin: 6px 0 20px; }

/* ---------- 详情页 ---------- */
.breadcrumb { font-size: 13px; color: var(--text3); margin-bottom: 16px; }
.breadcrumb a { color: var(--text2); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: var(--border); }
.detail-card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    overflow: hidden;
}
.detail-preview {
    background: #111;
    min-height: 320px;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.detail-preview img { max-height: 70vh; border-radius: 4px; cursor: zoom-in; }
.detail-file-icon { text-align: center; color: #8B8FA3; }
.file-badge-lg {
    font-size: 40px; font-weight: 700; letter-spacing: 2px;
    color: #fff;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    padding: 30px 40px; border-radius: 16px;
    display: inline-block;
    margin-bottom: 16px;
}
.detail-file-icon p { font-size: 13px; }
.detail-info { padding: 28px; }
.detail-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; word-break: break-all; }
.detail-tags { display: flex; gap: 8px; margin-bottom: 18px; }
.detail-tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
}
.detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}
.meta-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.meta-item:nth-child(odd) { border-right: 1px solid var(--border); }
.meta-item:nth-last-child(-n+2) { border-bottom: none; }
.meta-label { display: block; font-size: 11px; color: var(--text3); margin-bottom: 2px; }
.meta-value { font-size: 13px; font-weight: 500; word-break: break-all; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-note {
    font-size: 12px; color: var(--text3);
    background: var(--bg);
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.7;
}

/* ---------- 上传页 ---------- */
.upload-card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px;
    max-width: 760px;
    margin: 0 auto;
}
.page-title { font-size: 20px; font-weight: 700; }
.page-sub { font-size: 13px; color: var(--text2); margin: 6px 0 22px; }
.upload-denied {
    text-align: center;
    padding: 40px 20px 30px;
}
.upload-denied-icon { font-size: 44px; margin-bottom: 14px; }
.upload-denied p { font-size: 16px; font-weight: 600; color: var(--text); }
.upload-denied-sub { font-size: 13px; color: var(--text2); margin-top: 8px; font-weight: 400 !important; }
.upload-denied-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 46px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--bg);
}
.upload-zone:hover, .upload-zone.dragging { border-color: var(--primary); background: var(--primary-light); }
.upload-icon { font-size: 40px; margin-bottom: 10px; }
.upload-text { font-size: 15px; color: var(--text2); }
.upload-hint { font-size: 12px; color: var(--text3); margin-top: 6px; }
.upload-form { margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-group input[type=text], .form-group input[type=password], .form-group input[type=number],
.form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: border .2s;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,111,237,.12); }
.upload-queue { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.queue-item {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
}
.queue-icon { font-size: 16px; }
.queue-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-size { color: var(--text3); font-size: 12px; flex-shrink: 0; }
.queue-status { font-size: 12px; flex-shrink: 0; }
.queue-status.done { color: #059669; }
.queue-status.fail { color: #DC2626; }
.queue-status.uploading { color: var(--primary); }
.queue-del {
    width: 22px; height: 22px;
    border: none; border-radius: 50%;
    background: transparent; color: var(--text3);
    cursor: pointer; font-size: 15px;
    flex-shrink: 0;
}
.queue-del:hover { background: #FEE2E2; color: #DC2626; }

/* ---------- 登录注册 ---------- */
.auth-wrap { display: flex; justify-content: center; padding-top: 40px; }
.auth-card {
    width: 100%; max-width: 400px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 32px;
}
.auth-title { font-size: 22px; font-weight: 700; text-align: center; }
.auth-sub { font-size: 13px; color: var(--text3); text-align: center; margin: 6px 0 24px; }
.auth-card .btn-block { margin-top: 4px; }
.auth-links { text-align: center; font-size: 13px; color: var(--text3); margin-top: 18px; }
.auth-links a { color: var(--primary); }
.form-error {
    background: #FEF2F2; color: #B91C1C;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark);
    color: #8B8FA3;
    padding: 30px 0;
    text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-info { font-size: 12px; line-height: 1.9; }
.footer-badges { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.footer-badges a { color: #6B7280; }
.footer-badges a:hover { color: #fff; }
.footer-badges .dot { color: #4B5563; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 1000;
    display: none;
    align-items: center; justify-content: center;
    padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 92vh; border-radius: 6px; }
.lightbox-close {
    position: absolute; top: 16px; right: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.12);
    color: #fff; font-size: 22px;
    cursor: pointer;
    transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* ---------- 汉堡菜单 ---------- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 38px; height: 38px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-left: auto;
    padding: 0 8px;
}
.menu-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: all .25s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
    .image-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .container { padding: 0 14px; }
    .site-main { padding: 14px 0 30px; }

    /* 移动端导航 */
    .menu-toggle { display: flex; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 62px; left: 0; right: 0;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 10px 14px 14px;
        gap: 2px;
        box-shadow: var(--shadow-lg);
    }
    .nav-menu.open { display: flex; }
    .nav-item { padding: 11px 12px; font-size: 15px; }
    .header-right { display: none; }

    .image-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .image-info { padding: 8px 10px 10px; }
    .image-title { font-size: 12px; }
    .image-meta { font-size: 10px; }

    .detail-card { grid-template-columns: 1fr; }
    .detail-preview { min-height: 240px; }
    .detail-info { padding: 20px; }
    .detail-title { font-size: 17px; }

    .form-row { grid-template-columns: 1fr; }
    .upload-card { padding: 20px; }
    .auth-wrap { padding-top: 24px; }
    .auth-card { padding: 26px 22px; }
    .btn-lg { padding: 11px 22px; }
}

@media (max-width: 420px) {
    .image-grid { grid-template-columns: repeat(2, 1fr); }
    .logo-text { font-size: 17px; }
    .logo-icon { width: 30px; height: 30px; font-size: 15px; }
}

/* ---------- 防采集：图片保护 ---------- */
.site-main img {
    -webkit-user-drag: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: auto;
}

/* ============================================================
   文章系统
   ============================================================ */
.article-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}
.article-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.article-style-switch { display: flex; gap: 8px; }
.style-btn {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text2);
    background: var(--card);
    transition: all .2s;
}
.style-btn:hover { border-color: var(--primary); color: var(--primary); }
.style-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 卡片网格样式 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.article-card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all .25s;
    display: block;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.1); border-color: transparent; }
.article-card-thumb {
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: #EDEEF0;
    position: relative;
}
.article-card-body { padding: 14px 16px 16px; }
.article-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card-summary {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text3);
}
.article-top-tag {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

/* 横幅卡片样式 */
.article-banner-list { display: flex; flex-direction: column; gap: 16px; }
.article-banner {
    display: flex;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all .25s;
}
.article-banner:hover { box-shadow: 0 10px 26px rgba(0,0,0,.09); border-color: transparent; }
.article-banner-thumb {
    width: 34%;
    min-height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #EDEEF0;
    flex-shrink: 0;
    position: relative;
}
.article-banner-body { padding: 18px 22px; flex: 1; display: flex; flex-direction: column; }
.article-banner-title {
    font-size: 18px;
    font-weight: 600;
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-banner-summary {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-banner .article-card-meta { margin-top: auto; }

/* 侧边栏 */
.article-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.sidebar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.sidebar-list { list-style: none; }
.sidebar-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
    line-height: 1.5;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--text); transition: color .2s; }
.sidebar-list a:hover { color: var(--primary); }
.sidebar-empty { color: var(--text3); font-size: 12px; }
.sidebar-card .btn-block { margin-top: 4px; }

/* 详情页 */
.article-detail-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}
.article-detail-card {
    background: var(--card);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 30px 34px;
}
.article-detail-title { font-size: 24px; font-weight: 700; line-height: 1.4; margin-bottom: 12px; }
.article-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text3);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.article-detail-cover {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}
.article-detail-content { font-size: 15px; line-height: 1.9; color: var(--text); word-break: break-word; }
.article-detail-content h2 { font-size: 20px; margin: 22px 0 10px; }
.article-detail-content h3 { font-size: 17px; margin: 18px 0 8px; }
.article-detail-content p { margin: 10px 0; }
.article-detail-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.article-detail-content blockquote {
    border-left: 3px solid var(--primary);
    background: var(--bg);
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    color: var(--text2);
    margin: 12px 0;
}
.article-detail-content ul, .article-detail-content ol { padding-left: 24px; margin: 10px 0; }
.article-detail-content a { color: var(--primary); text-decoration: underline; }
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
}
.article-nav-item {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text);
    transition: all .2s;
    display: block;
}
.article-nav-item:hover { border-color: var(--primary); color: var(--primary); }
.article-nav-item span { display: block; font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.article-nav-item.right { text-align: right; }

@media (max-width: 900px) {
    .article-wrap, .article-detail-wrap { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .article-grid { grid-template-columns: 1fr; }
    .article-banner { flex-direction: column; }
    .article-banner-thumb { width: 100%; min-height: 150px; }
    .article-detail-card { padding: 20px; }
}

/* ---------- 防采集：开发者工具警示遮罩 ---------- */
#devtools-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(26, 26, 46, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dtMaskIn .25s ease;
}
@keyframes dtMaskIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.dt-mask-box {
    text-align: center;
    color: #fff;
    padding: 40px;
    max-width: 420px;
}
.dt-mask-icon { font-size: 56px; margin-bottom: 18px; }
.dt-mask-title { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.dt-mask-sub { font-size: 14px; line-height: 1.8; color: rgba(255,255,255,.75); }

/* ============================================================
   分类批量下载
   ============================================================ */
.cat-batch-btn { margin-left: auto; flex-shrink: 0; }
.batch-page { max-width: 860px; }
.batch-head { margin-bottom: 16px; }
.batch-back { font-size: 13px; color: var(--text3); display: inline-block; margin-bottom: 6px; }
.batch-back:hover { color: var(--primary); }
.batch-login-tip {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}
.batch-tip-icon { font-size: 40px; margin-bottom: 10px; }
.batch-login-tip p { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.batch-actions { margin-bottom: 14px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.batch-progress {
    margin-top: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.batch-progress-bar {
    flex: 1;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}
.batch-progress-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary);
    border-radius: 4px;
    transition: width .3s;
}
.batch-progress span { font-size: 12px; color: var(--text2); white-space: nowrap; }

/* 平台引导 */
.batch-guide {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.batch-guide summary {
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    user-select: none;
}
.batch-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
}
.guide-item {
    background: var(--card);
    border-radius: 10px;
    padding: 14px;
}
.guide-icon { font-size: 24px; margin-bottom: 6px; }
.guide-item h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.guide-item p { font-size: 12px; color: var(--text2); line-height: 1.7; }
.guide-item b { color: var(--primary); }

/* 素材清单 */
.batch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.batch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    transition: border .2s;
}
.batch-item:hover { border-color: var(--primary); }
.batch-item-thumb { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--bg); }
.batch-thumb-img {
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
}
.batch-thumb-file {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; color: var(--text3);
}
.batch-item-info { flex: 1; min-width: 0; }
.batch-item-title {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.batch-item-meta { font-size: 11px; color: var(--text3); margin-top: 3px; }
.batch-item-state { width: 52px; font-size: 11px; color: var(--text3); text-align: center; flex-shrink: 0; }
.batch-item-state.downloading { color: var(--primary); }
.batch-item-state.done { color: #059669; }
.batch-item-dl { flex-shrink: 0; }

@media (max-width: 700px) {
    .batch-guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .batch-item-state { width: 44px; }
    .batch-item-dl { padding: 8px 12px; font-size: 12px; }
}

/* 批量下载页布局与字号优化 */
.batch-count {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--text3);
    margin-top: 6px;
}
.batch-start-btn { font-size: 17px; padding: 16px 20px; }
.batch-guide summary { font-size: 15px; }
.guide-item h4 { font-size: 14px; }
.guide-item p { font-size: 13.5px; line-height: 1.8; }
.batch-progress span { font-size: 13px; }
.batch-login-tip p { font-size: 15px; }
.batch-item-title { font-size: 14px; }
.batch-item-meta { font-size: 12px; }
.batch-item-dl { font-size: 13px; padding: 9px 16px; }
.batch-back { font-size: 14px; }

/* 批量下载按钮：手机端换到分类下面单独一行 */
@media (max-width: 700px) {
    .category-bar { flex-wrap: wrap; }
    .cat-batch-btn {
        flex-basis: 100%;
        order: 99;
        margin-left: 0;
        margin-top: 8px;
        justify-content: center;
    }
}

/* 批量下载按钮：橙红底白字 */
.cat-batch-btn {
    margin-left: auto;
    flex-shrink: 0;
    background: #E8503A;
    border-color: #E8503A;
    color: #fff;
    font-weight: 500;
}
.cat-batch-btn:hover {
    background: #D6432E;
    border-color: #D6432E;
    color: #fff;
}

/* 微信内引导横幅 */
.wechat-banner {
    background: #E8503A;
    color: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.7;
}
.wechat-banner .wb-icon { font-size: 22px; flex-shrink: 0; }
.wechat-banner b { font-weight: 600; }
.wechat-banner .wb-step {
    display: block;
    margin-top: 4px;
    background: rgba(255,255,255,.18);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
}
.wechat-tip-box {
    background: #FDF3F1;
    border: 1px dashed #E8503A;
    color: #A63B2A;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}
