/**
 * PDF资源库前端样式
 */
/* ========== 资源详情页 ========== */
#zpb-resource-page { }
#zpb-resource-page * { box-sizing: border-box; }

.zpb-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,.08);
    margin-bottom: 20px;
    overflow: hidden;
}
.zpb-card-inner { padding: 30px; }

/* 头部信息区 */
.zpb-header-section {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.zpb-cover-box { flex-shrink: 0; width: 150px; }
.zpb-cover-img {
    width: 150px;
    height: 195px;
    background: linear-gradient(145deg, #8B4513, #5D3A1A);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.zpb-cover-img::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    pointer-events: none;
}
.zpb-cover-img img { width: 100%; opacity: .85; }
.zpb-cover-img .pdf-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b, #e55a5a);
    color: #fff;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}

.zpb-info-box { flex: 1; min-width: 0; }
.zpb-res-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.45;
}
.zpb-res-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0 0 16px;
    line-height: 1.5;
}
.zpb-res-subtitle .zpb-subtitle-label {
    color: #999;
}
.zpb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.zpb-tag { 
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all .2s;
}
.zpb-tag i { margin-right: 6px; }
.zpb-tag-loc { background: #f0f0f0; color: #666; }
.zpb-tag-loc:hover { background: #ff6b6b; color: #fff; }
.zpb-tag-free { background: #e8f5e9; color: #2e7d32; }
.zpb-tag-vip { background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #e65100; }
.zpb-tag-pay { background: #fff2f2; color: #e53935; }
.zpb-tag-oa { background: linear-gradient(135deg, #07c160, #06ad56); color: #fff; }

/* 列表页公众号免费标签 - 覆盖 jb-green 的背景为微信绿 */
.zpb-oa-free-tag.but.jb-green {
    background: linear-gradient(135deg, #07c160, #06ad56) !important;
    margin-left: 6px;
}
.zpb-oa-free-tag i { margin-right: 4px; }

.zpb-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    color: #666;
    font-size: 14px;
}
.zpb-meta-item { display: flex; align-items: center; }
.zpb-meta-item i { margin-right: 7px; color: #999; width: 15px; }
.zpb-meta-item b { color: #333; margin-left: 4px; font-weight: 600; }

/* 下载区块 */
.zpb-dl-section {
    background: linear-gradient(135deg, #f9fafb, #f4f5f7);
    margin: 30px;
    border-radius: 12px;
    overflow: hidden;
}
.zpb-dl-head {
    padding: 15px 22px;
    border-bottom: 1px solid rgba(0,0,0,.04);
    background: rgba(255,255,255,.5);
}
.zpb-status-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.zpb-status-tag i { margin-right: 7px; }
.zpb-status-ok { background: #d4edda; color: #155724; }
.zpb-status-warn { background: #fff3cd; color: #856404; }
.zpb-status-lock { background: #f8d7da; color: #721c24; }

.zpb-dl-content { padding: 22px; }
.zpb-dl-content.is-center { text-align: center; padding: 40px 22px; }
.zpb-dl-line {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #e0e0e0;
}
.zpb-dl-line:last-child { border-bottom: none; }
.zpb-dl-line.is-locked {
    background: rgba(0,0,0,.03);
    margin: 0 -22px;
    padding: 15px 22px;
    border-radius: 8px;
}
.zpb-dl-label { min-width: 85px; color: #666; font-size: 14px; flex-shrink: 0; }
.zpb-dl-val {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.zpb-dl-url { color: #ff6b6b; word-break: break-all; font-size: 14px; }
.zpb-dl-url:hover { text-decoration: underline; }
.zpb-dl-code {
    background: linear-gradient(135deg, #ff6b6b, #ff8a80);
    color: #fff;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 4px;
    font-family: Consolas, Monaco, monospace;
    box-shadow: 0 4px 12px rgba(255,107,107,.3);
}
.zpb-dl-hide {
    color: #999;
    background: #eee;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
}
.zpb-dl-hide i { margin-right: 6px; }

.zpb-copy {
    background: #fff;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
}
.zpb-copy:hover { background: #ff6b6b; color: #fff; }
.zpb-copy i { margin-right: 5px; }

.zpb-price-box { text-align: center; padding: 25px 0 15px; }
.zpb-price-num { font-size: 46px; font-weight: 700; color: #ff6b6b; line-height: 1; }
.zpb-price-num .sym { font-size: 22px; vertical-align: top; }
.zpb-vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: #fff;
    padding: 5px 14px;
    border-radius: 18px;
    font-size: 12px;
    margin-top: 12px;
}

.zpb-dl-foot {
    padding: 18px 22px;
    background: rgba(0,0,0,.02);
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.zpb-copyright-tip {
    width: 100%;
    text-align: center;
    padding: 10px 22px 16px;
    font-size: 12px;
    color: #999;
    background: rgba(0,0,0,.02);
}
.zpb-copyright-tip i { margin-right: 5px; color: #ff9800; }

.zpb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .25s;
}
.zpb-btn i { margin-right: 9px; }
.zpb-btn-blue {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(33,150,243,.3);
}
.zpb-btn-blue:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33,150,243,.4);
}
.zpb-btn-orange {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255,152,0,.3);
}
.zpb-btn-orange:hover {
    background: linear-gradient(135deg, #ff5722, #e64a19);
    color: #fff;
    transform: translateY(-2px);
}
.zpb-btn-gray {
    background: #fff;
    border: 2px solid #ddd;
    color: #333;
}
.zpb-btn-gray:hover { border-color: #ff6b6b; color: #ff6b6b; }

/* 公众号免费获取按钮 - 绿色醒目 */
.zpb-btn-green {
    background: linear-gradient(135deg, #07c160, #06ad56);
    color: #fff;
    box-shadow: 0 4px 15px rgba(7,193,96,.3);
}
.zpb-btn-green:hover {
    background: linear-gradient(135deg, #06ad56, #059648);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7,193,96,.4);
}

/* 公众号按钮高亮动画 */
.zpb-oa-highlight {
    animation: zpb-pulse 2s infinite;
}
@keyframes zpb-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(7,193,96,.3); }
    50% { box-shadow: 0 4px 25px rgba(7,193,96,.6); }
}

/* 公众号按钮包装器 - 横向布局 */
.zpb-oa-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}
.zpb-oa-wrapper .zpb-btn {
    flex-shrink: 0;
}

/* 公众号提示文字 - 在按钮右侧 */
.zpb-oa-tip {
    color: #07c160;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}
/* PC端显示左指手指 */
.zpb-oa-tip .finger-up { display: none; }
.zpb-oa-tip .finger-left { display: inline; }

/* 内容区块 */
.zpb-section { padding: 25px 30px; }
.zpb-section-head {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}
.zpb-section-head i { margin-right: 10px; color: #ff6b6b; }
.zpb-desc-text { color: #555; line-height: 2; font-size: 14px; }
.zpb-notice-box {
    background: #fffbf0;
    border-left: 4px solid #ff9800;
    padding: 16px 18px;
    border-radius: 0 10px 10px 0;
    color: #666;
    font-size: 13px;
    line-height: 2;
}
.zpb-notice-box p { margin: 0 0 6px; }
.zpb-notice-box p:last-child { margin: 0; }

/* 相关资源 */
.zpb-rel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.zpb-rel-item {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    background: #f5f5f5;
    border-radius: 10px;
    color: #333;
    text-decoration: none;
    transition: all .25s;
}
.zpb-rel-item:hover {
    background: #ff6b6b;
    color: #fff;
    transform: translateX(5px);
}
.zpb-rel-item i { margin-right: 14px; color: #e74c3c; font-size: 20px; flex-shrink: 0; }
.zpb-rel-item:hover i { color: #fff; }
.zpb-rel-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

/* 面包屑 */
.zpb-breadcrumb {
    background: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    font-size: 14px;
    color: #888;
}
.zpb-breadcrumb a { color: #666; text-decoration: none; }
.zpb-breadcrumb a:hover { color: #ff6b6b; }
.zpb-breadcrumb .sep { margin: 0 10px; color: #ccc; }
.zpb-breadcrumb .cur { color: #333; }

/* ========== 资源库列表页 ========== */
.zpb-header { text-align: center; padding: 35px 20px; }
.zpb-header .box-title { font-size: 26px; margin-bottom: 12px; font-weight: 600; }
.zpb-header .box-title i { color: var(--focus-color, #ff6b6b); margin-right: 12px; }

.zpb-categories { padding: 20px; }
.zpb-category-wrap { margin-top: 10px; padding: 12px; background: #f8f9fa9c; border-radius: 8px; }
.zpb-category-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.zpb-category-item {
    display: inline-flex;
    align-items: center;
    padding: 11px 20px;
    background: #f5f5f5;
    border-radius: 18px;
    color: #666;
    font-size: 15px;
    transition: all .25s;
    text-decoration: none;
}
.zpb-category-item:hover, .zpb-category-item.active { background: var(--focus-color, #ff6b6b); color: #fff; }
.zpb-category-item .name { margin-right: 6px; }
.zpb-category-item .count { font-size: 12px; opacity: 0.8; }

/* 夜间模式适配（子比主题 body.dark-theme） */
.dark-theme .zpb-breadcrumb { background: #2f3136; color: #bbb; box-shadow: none; border: 1px solid rgba(255,255,255,.08); }
.dark-theme .zpb-breadcrumb a { color: #ccc; }
.dark-theme .zpb-breadcrumb .sep { color: #777; }
.dark-theme .zpb-breadcrumb .cur { color: #eee; }

.dark-theme .zpb-category-wrap { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.dark-theme .zpb-category-item { background: rgba(255,255,255,.08); color: #ddd; }
.dark-theme .zpb-category-item:hover, .dark-theme .zpb-category-item.active { background: var(--theme-color, #ff6b95); color: #fff; }

.dark-theme .zpb-search-box .form-control { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #ddd; }
.dark-theme .zpb-search-box .form-control::placeholder { color: #aaa; }

.dark-theme .table-responsive { background: #2b2f33; border-color: rgba(255,255,255,.1); }
.dark-theme .zpb-table th { background: rgba(255,255,255,.06); color: #ccc; border-bottom-color: rgba(255,255,255,.08); }
.dark-theme .zpb-table td { border-bottom-color: rgba(255,255,255,.08); }
.dark-theme .zpb-table tbody tr:hover { background: rgba(255,255,255,.04); box-shadow: inset 3px 0 0 var(--theme-color, #ff6b95); }
.dark-theme .zpb-table td a { color: #ddd; }
.dark-theme .zpb-table td a:hover { color: var(--theme-color, #ff6b95); }

.zpb-search-box { padding: 20px; }
.zpb-search-box .search-form { display: flex; gap: 12px; }
.zpb-search-box .form-control {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
}
.zpb-search-box .form-control:focus { border-color: var(--focus-color, #ff6b6b); outline: none; }

.zpb-resource-list { padding: 0 20px 20px; }
.table-responsive { overflow-x: auto; }
.table-responsive { border: 1px solid #eee; border-radius: 12px; background: #fff; }
.zpb-table { width: 100%; border-collapse: collapse; }
.zpb-table th, .zpb-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #eee; }
.zpb-table th { background: #f8f9fa; font-weight: 600; color: #666; font-size: 13px; }
.zpb-table tbody tr { transition: background .2s ease, box-shadow .2s ease; }
.zpb-table tbody tr:hover { background: #fffdf8; box-shadow: inset 3px 0 0 var(--focus-color, #ff6b6b); }
.zpb-table td a { color: #333; text-decoration: none; }
.zpb-table td a:hover { color: var(--focus-color, #ff6b6b); }
.zpb-table td.col-name a { font-weight: 600; }
.zpb-table td.col-name a i { color: var(--focus-color, #ff6b6b); margin-right: 8px; }
.zpb-table td.col-action .but { border-radius: 8px; }
.zpb-table td.col-action .but.jb-blue {
    background: #f3f6ff;
    color: #3b7ddd;
    border: 1px solid #e1e9ff;
    box-shadow: none;
    border-radius: 8px;
}
.zpb-table td.col-action .but.jb-blue:hover {
    background: #e8f0ff;
    color: #2f6fdc;
}
.zpb-table .badge { display: inline-block; padding: 4px 10px; border-radius: 15px; font-size: 12px; }
.zpb-table .badge-free { background: #e8f5e9; color: #2e7d32; }
.zpb-table .badge-vip { background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #e65100; }
.zpb-table .price { color: var(--focus-color, #ff6b6b); font-weight: 600; }

.zpb-pagination { margin-top: 25px; text-align: center; }
.zpb-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
}
.zpb-pagination .page-numbers:hover, .zpb-pagination .page-numbers.current {
    background: var(--focus-color, #ff6b6b);
    color: #fff;
}

/* 夜间模式：分页 */
.dark-theme .zpb-pagination .page-numbers {
    background: rgba(255,255,255,.08);
    color: #ddd;
    border: 1px solid rgba(255,255,255,.12);
}
.dark-theme .zpb-pagination .page-numbers:hover,
.dark-theme .zpb-pagination .page-numbers.current {
    background: var(--theme-color, #ff5b95);
    color: #fff;
    border-color: transparent;
}
.dark-theme .zpb-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    color: #aaa;
}

.highlight { color: var(--focus-color, #ff6b6b); font-weight: 600; }

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .zpb-breadcrumb { padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
    .zpb-card-inner { padding: 20px; }
    .zpb-header-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .zpb-cover-box { width: auto; }
    .zpb-cover-img { width: 130px; height: 170px; }
    .zpb-res-title { font-size: 20px; }
    .zpb-tag-list { justify-content: center; flex-wrap: wrap; gap: 6px; }
    .zpb-tag { padding: 4px 8px; font-size: 11px; }
    .zpb-meta-row { justify-content: center; flex-wrap: nowrap; gap: 12px; font-size: 12px; }
    .zpb-meta-item { white-space: nowrap; }
    .zpb-meta-item i { margin-right: 4px; }
    .zpb-dl-section { margin: 20px; }
    .zpb-dl-content { padding: 18px; }
    .zpb-dl-line { flex-direction: column; align-items: flex-start; gap: 12px; }
    .zpb-dl-line.is-locked { margin: 0 -18px; padding: 15px 18px; }
    .zpb-price-num { font-size: 38px; }
    .zpb-dl-foot { flex-direction: column; }
    .zpb-btn { width: 100%; padding: 14px 20px; }
    .zpb-section { padding: 20px; }
    .zpb-rel-grid { grid-template-columns: 1fr; }
    .zpb-category-item { padding: 8px 14px; font-size: 13px; }
    .zpb-table th, .zpb-table td { padding: 12px 10px; font-size: 14px; }
    .zpb-table { table-layout: fixed; }
    .zpb-table th.col-size,
    .zpb-table th.col-pages,
    .zpb-table th.col-category,
    .zpb-table th.col-price,
    .zpb-table td.col-size,
    .zpb-table td.col-pages,
    .zpb-table td.col-category,
    .zpb-table td.col-price { display: none; }
    .zpb-table td.col-name a {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .zpb-table td.col-action { text-align: right; }
    .zpb-table .but { padding: 6px 12px; border-radius: 8px; }
    
    /* 公众号提示文字移动端 - 换行显示在按钮下方 */
    .zpb-oa-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .zpb-oa-wrapper .zpb-btn {
        width: 100%;
    }
    .zpb-oa-tip {
        text-align: center;
        font-size: 12px;
    }
    /* 移动端显示上指手指 */
    .zpb-oa-tip .finger-up { display: inline; }
    .zpb-oa-tip .finger-left { display: none; }
}

/* ========== 主题搜索列表适配（PDF资源） ========== */
.posts-item.ajax-item{margin-bottom:12px;}
.posts-item .post-graphic { width: 100px; flex-shrink: 0; }
.posts-item .post-graphic img.fit-cover { width: 100px; height: 130px; object-fit: cover; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.posts-item .post-graphic .linebook-cover.size-list { width: 100px; height: 130px; }
.posts-item .item-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 768px) {
  .posts-item .post-graphic { width: 80px; }
  .posts-item .post-graphic img.fit-cover { width: 80px; height: 104px; }
  .posts-item .post-graphic .linebook-cover.size-list { width: 80px; height: 104px; }
}

/* 隐藏已加载页的旧分页条，仅保留最后一个 */
.ajaxpager .ajax-pag { margin: 8px 0; }

@media (max-width: 480px) {
    .zpb-cover-img { width: 110px; height: 145px; }
    .zpb-res-title { font-size: 18px; }
    .zpb-dl-code { padding: 7px 14px; font-size: 15px; letter-spacing: 3px; }
}
.linebook-cover {
    position: relative;
    width: 150px;
    height: 195px;
    background: #0f2a57;
    background-image: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.06));
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.linebook-cover.size-detail { width: 150px; height: 195px; }
.linebook-cover.size-list { width: 100px; height: 130px; }
.linebook-cover .title-strip {
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 30px;
    background: #fff;
    border: 2px solid #222;
    box-shadow: inset 0 0 0 2px #111;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.linebook-cover .title-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-weight: 700;
    font-size: 20px;
    color: #111;
    letter-spacing: 3px;
    font-family: "Kaiti SC","KaiTi","STKaiti","SimKai","FZKai-Z03","Noto Serif SC",serif;
    text-shadow: 0 1px 0 rgba(0,0,0,.2);
    overflow: hidden;
    max-height: 100%;
}
.linebook-cover .seal {
    position: absolute;
    left: 6px;
    bottom: 10px;
    width: 18px;
    height: 18px;
    background: #e9433b;
    border: 2px solid #d22c24;
    box-shadow: 0 1px 2px rgba(0,0,0,.15) inset;
}
.linebook-cover .thread {
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    width: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(0,0,0,.10)),
                repeating-linear-gradient(to bottom, transparent 0 20px, rgba(255,255,255,.8) 20px 22px, transparent 22px 44px);
    border-radius: 3px;
}
.linebook-cover.size-detail .title-text{font-size:26px;}
.linebook-cover.size-detail .seal{width:22px;height:22px;}
.zpb-home-card .zpb-latest-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.zpb-latest-item { display: flex; gap: 12px; align-items: center; padding: 12px; background: #fff; border: 1px solid #eee; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: transform .2s ease, box-shadow .2s ease; }
.zpb-latest-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.zpb-latest-item .thumb img { width: 90px; height: 118px; object-fit: cover; border-radius: 8px; }
.zpb-latest-item .thumb { width: 90px; flex: 0 0 90px; }
.zpb-latest-item .thumb .linebook-cover.size-home { width: 90px; height: 118px; }
.zpb-latest-item .text { display: flex; flex-direction: column; gap: 6px; }
.zpb-latest-item .item-title { font-size: 14px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zpb-latest-item .item-meta { color: #888; font-size: 12px; }
@media (max-width: 1024px){ .zpb-home-card .zpb-latest-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px){ .zpb-home-card .zpb-latest-grid { grid-template-columns: 1fr; } .zpb-latest-item { padding: 10px; } }
.zpb-category-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.zpb-category-item { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; background:#f3f4f6; color:#555; border-radius:6px; text-decoration:none; font-size:13px; line-height:1; }
.zpb-category-item .name { font-weight:600; }
.zpb-category-item .count { color:#888; font-size:12px; }
.zpb-category-item:hover { background:#e9ecef; }
.zpb-category-item.active, .zpb-category-item.jb-pink { background:#ff5b95; color:#fff; }
.zpb-category-item.active .count, .zpb-category-item.jb-pink .count { color:#fff; }
.dark-theme .zpb-section-head{color:#eee;border-bottom-color:rgba(255,255,255,.12);}
.dark-theme .zpb-section-head i{color:var(--theme-color,#ff5b95);}
.dark-theme .zpb-meta-row{color:#ccc;}
.dark-theme .zpb-notice-box{background:rgba(255,255,255,.06);border-left-color:var(--theme-color,#ff5b95);color:#cfcfcf;}
.dark-theme .zpb-meta-item b{color:#eee;}
.dark-theme .zpb-rel-item{background:rgba(255,255,255,.06);color:#ddd;}
.dark-theme .zpb-rel-item i{color:var(--theme-color,#ff5b95);}
.dark-theme .zpb-rel-item:hover{background:var(--theme-color,#ff5b95);color:#fff;}
.dark-theme .zpb-rel-item:hover i{color:#fff;}

/* ========== 夜间模式：资源详情页适配 ========== */
.dark-theme .zpb-card { background:#2b2f33; border:1px solid rgba(255,255,255,.08); box-shadow:none; }
.dark-theme .zpb-res-title { color:#eee; }
.dark-theme .zpb-res-subtitle { color:#999; }
.dark-theme .zpb-res-subtitle .zpb-subtitle-label { color:#777; }
.dark-theme .zpb-tag-loc { background:rgba(255,255,255,.08); color:#ccc; }
.dark-theme .zpb-tag-free { background:rgba(46,125,50,.18); color:#cfe9d4; }
.dark-theme .zpb-tag-vip { background:linear-gradient(135deg, rgba(255,243,224,.12), rgba(255,224,178,.12)); color:#ffd59a; }
.dark-theme .zpb-tag-pay { background:rgba(255,82,82,.12); color:#ff9c9c; }
.dark-theme .zpb-tag-oa { background: linear-gradient(135deg, #07c160, #06ad56); color: #fff; }
.dark-theme .zpb-oa-free-tag.but.jb-green { background: linear-gradient(135deg, #07c160, #06ad56) !important; color: #fff; }
.dark-theme .zpb-meta-row { color:#bbb; }
.dark-theme .zpb-meta-item i { color:#aaa; }
.dark-theme .zpb-dl-section { background:linear-gradient(135deg,#2b2f33,#24282c); }
.dark-theme .zpb-dl-head { border-bottom:1px solid rgba(255,255,255,.08); }
.dark-theme .zpb-status-ok { background:rgba(76,175,80,.18); color:#cfe9d4; }
.dark-theme .zpb-status-warn { background:rgba(255,193,7,.18); color:#ffe7a1; }
.dark-theme .zpb-status-lock { background:rgba(244,67,54,.18); color:#ffb4ae; }
.dark-theme .zpb-dl-content { color:#ddd; }
.dark-theme .zpb-dl-line { border-bottom:1px dashed rgba(255,255,255,.12); }
.dark-theme .zpb-dl-label { color:#bbb; }
.dark-theme .zpb-dl-url { color:var(--theme-color,#ff5b95); }
.dark-theme .zpb-dl-hide { background:rgba(255,255,255,.08); color:#aaa; }
.dark-theme .zpb-copy { background:transparent; border-color:var(--theme-color,#ff5b95); color:var(--theme-color,#ff5b95); }
.dark-theme .zpb-copy:hover { background:var(--theme-color,#ff5b95); color:#fff; }
.dark-theme .zpb-price-num { color:var(--theme-color,#ff5b95); }
.dark-theme .zpb-copyright-tip { color:#888; }

/* ========== 侧边栏小工具样式 ========== */
.zpb-sidebar-list { display: flex; flex-direction: column; gap: 0; }
.zpb-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background .2s;
}
.zpb-sidebar-item:last-child { border-bottom: none; }
.zpb-sidebar-item:hover { background: #f8f9fa; }
.zpb-sidebar-item .item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}
.zpb-sidebar-item .item-count {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}
.zpb-sidebar-item .item-cat {
    color: #999;
    font-size: 11px;
    flex-shrink: 0;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}
.zpb-sidebar-item i { color: #ff6b6b; font-size: 14px; flex-shrink: 0; }

/* 排行榜样式 */
.zpb-ranking-list .rank-num {
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    background: #f0f0f0;
    border-radius: 4px;
    flex-shrink: 0;
}
.zpb-ranking-list .rank-num.top1 { background: linear-gradient(135deg, #ffd700, #ffb300); color: #fff; }
.zpb-ranking-list .rank-num.top2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #fff; }
.zpb-ranking-list .rank-num.top3 { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }

/* 下载动态样式 */
.zpb-download-feed-wrap {
    max-height: 360px;
    overflow: hidden;
    position: relative;
}
.zpb-download-feed { gap: 0; }
.zpb-feed-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    color: #666;
}
.zpb-feed-item:last-child { border-bottom: none; }
.zpb-feed-item .feed-avatar { flex-shrink: 0; width: 32px; height: 32px; }
.zpb-feed-item .feed-avatar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.zpb-feed-item .feed-content { flex: 1; line-height: 1.6; min-width: 0; }
.zpb-feed-item .feed-user { color: #888; }
.zpb-feed-item .feed-action { color: #999; }
.zpb-feed-item .feed-resource { color: #ff6b6b; font-weight: 500; text-decoration: none; }
.zpb-feed-item .feed-resource:hover { text-decoration: underline; }
.zpb-feed-item .feed-time { color: #bbb; font-size: 11px; flex-shrink: 0; white-space: nowrap; }

/* 滚动动画 */
.zpb-scroll-up {
    animation: zpbScrollUp 20s linear infinite;
}
.zpb-download-feed-wrap:hover .zpb-scroll-up {
    animation-play-state: paused;
}
@keyframes zpbScrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* 分类统计样式 */
.zpb-category-stats .zpb-sidebar-item i { color: #ffc107; }

/* 夜间模式 */
.dark-theme .zpb-sidebar-item { color: #ccc; border-bottom-color: rgba(255,255,255,.08); }
.dark-theme .zpb-sidebar-item:hover { background: rgba(255,255,255,.05); }
.dark-theme .zpb-sidebar-item .item-count { color: #888; }
.dark-theme .zpb-sidebar-item .item-cat { background: rgba(255,255,255,.1); color: #aaa; }
.dark-theme .zpb-ranking-list .rank-num { background: rgba(255,255,255,.1); color: #aaa; }
.dark-theme .zpb-feed-item { border-bottom-color: rgba(255,255,255,.08); }
.dark-theme .zpb-feed-item .feed-user { color: #999; }
.dark-theme .zpb-feed-item .feed-resource { color: var(--theme-color, #ff5b95); }

/* ========== H2副标题移动端优化 ========== */
@media (max-width: 768px) {
    .zpb-res-subtitle {
        font-size: 12px;
        margin: 0 0 12px;
        padding: 6px 10px;
        background: #f8f9fa;
        border-radius: 6px;
        display: inline-block;
    }
    .zpb-res-subtitle .zpb-subtitle-label {
        display: none;
    }
}
@media (max-width: 480px) {
    .zpb-res-subtitle {
        font-size: 11px;
        padding: 5px 8px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
.dark-theme .zpb-res-subtitle { background: rgba(255,255,255,.08); }


/* ========== 书库首页小工具样式 ========== */
.zpb-home-full {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 头部区域 */
.zpb-home-header {
    padding: 40px 30px 30px;
    text-align: center;
    color: #fff;
}
.zpb-home-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.zpb-home-title-area { text-align: left; }
.zpb-home-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}
.zpb-home-title i { margin-right: 10px; }
.zpb-home-subtitle {
    font-size: 14px;
    opacity: 0.85;
    margin: 0;
}
.zpb-home-stats {
    display: flex;
    gap: 30px;
}
.zpb-stat-item {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}
.zpb-stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
}
.zpb-stat-label {
    font-size: 12px;
    opacity: 0.85;
}

/* 搜索框 */
.zpb-home-search { max-width: 600px; margin: 0 auto; }
.zpb-search-input-wrap {
    display: flex;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.zpb-search-input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 15px;
    outline: none;
}
.zpb-search-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border: none;
    color: #fff;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.zpb-search-btn:hover { background: linear-gradient(135deg, #ee5a5a, #dd4a4a); }

/* 分类导航 */
.zpb-home-section {
    background: #fff;
    margin: 0 20px 20px;
    border-radius: 12px;
    padding: 20px;
}
.zpb-home-categories { margin-top: -10px; }
.zpb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.zpb-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}
.zpb-section-title i {
    margin-right: 8px;
    color: var(--focus-color, #667eea);
}
.zpb-section-more {
    color: #888;
    font-size: 13px;
    text-decoration: none;
}
.zpb-section-more:hover { color: var(--focus-color, #667eea); }

.zpb-cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.zpb-cat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s;
}
.zpb-cat-card:hover {
    background: var(--focus-color, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}
.zpb-cat-card:hover .zpb-cat-icon,
.zpb-cat-card:hover .zpb-cat-name,
.zpb-cat-card:hover .zpb-cat-count { color: #fff; }
.zpb-cat-icon {
    font-size: 20px;
    color: var(--focus-color, #667eea);
}
.zpb-cat-info { flex: 1; min-width: 0; }
.zpb-cat-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zpb-cat-count {
    font-size: 12px;
    color: #999;
}

/* 主内容区 */
.zpb-home-main {
    display: flex;
    gap: 20px;
    padding: 0 20px;
}
.zpb-home-left { flex: 1; min-width: 0; }
.zpb-home-right { width: 320px; flex-shrink: 0; }
.zpb-home-left .zpb-home-section { margin: 0 0 20px; }
.zpb-home-right .zpb-home-section { margin: 0 0 20px; }

/* 书籍网格 */
.zpb-book-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.zpb-book-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s;
}
.zpb-book-card:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.zpb-book-thumb {
    position: relative;
    width: 70px;
    height: 91px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}
.zpb-book-thumb .linebook-cover {
    width: 70px;
    height: 91px;
}
.zpb-book-thumb .linebook-cover .title-strip { left: 5px; top: 5px; bottom: 5px; width: 20px; }
.zpb-book-thumb .linebook-cover .title-text { font-size: 14px; letter-spacing: 1px; }
.zpb-book-thumb .linebook-cover .seal { width: 12px; height: 12px; left: 4px; bottom: 6px; }
.zpb-book-thumb .linebook-cover .thread { right: 8px; width: 6px; }
.zpb-book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.zpb-book-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    color: #fff;
}
.zpb-book-badge.free { background: #52c41a; }
.zpb-book-badge.vip { background: linear-gradient(135deg, #ff9800, #ff5722); }
.zpb-book-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.zpb-book-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.zpb-book-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
}
.zpb-book-meta i { margin-right: 3px; }

/* 排行榜 */
.zpb-rank-list { display: flex; flex-direction: column; gap: 0; }
.zpb-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    transition: all 0.2s;
}
.zpb-rank-item:last-child { border-bottom: none; }
.zpb-rank-item:hover { background: #f8f9fa; margin: 0 -12px; padding: 10px 12px; border-radius: 6px; }
.zpb-rank-num {
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    background: #f0f0f0;
    border-radius: 4px;
    flex-shrink: 0;
}
.zpb-rank-num.top1 { background: linear-gradient(135deg, #ffd700, #ffb300); color: #fff; }
.zpb-rank-num.top2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #fff; }
.zpb-rank-num.top3 { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }
.zpb-rank-name {
    flex: 1;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zpb-rank-count {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}
.zpb-rank-count i { margin-right: 3px; }

/* 底部入口 */
.zpb-home-footer {
    padding: 20px;
    text-align: center;
    background: rgba(255,255,255,0.1);
}
.zpb-enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 40px;
    background: #fff;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.zpb-enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    color: #764ba2;
}

/* ========== 书库首页移动端适配 ========== */
@media (max-width: 1200px) {
    .zpb-cat-grid { grid-template-columns: repeat(4, 1fr); }
    .zpb-book-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .zpb-home-main { flex-direction: column; }
    .zpb-home-right { width: 100%; }
    .zpb-cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .zpb-home-header { padding: 25px 15px 20px; }
    .zpb-home-header-inner { flex-direction: column; gap: 20px; text-align: center; }
    .zpb-home-title-area { text-align: center; }
    .zpb-home-title { font-size: 22px; }
    .zpb-home-stats { gap: 15px; }
    .zpb-stat-item { padding: 10px 15px; }
    .zpb-stat-num { font-size: 18px; }
    .zpb-home-section { margin: 0 10px 15px; padding: 15px; }
    .zpb-home-categories { margin-top: -5px; }
    .zpb-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .zpb-cat-card { padding: 10px 12px; }
    .zpb-home-main { padding: 0 10px; }
    .zpb-book-grid { grid-template-columns: 1fr; }
    .zpb-book-card { padding: 10px; }
    .zpb-section-title { font-size: 16px; }
    .zpb-home-footer { padding: 15px 10px; }
    .zpb-enter-btn { padding: 10px 30px; font-size: 14px; }
}

/* ========== 书库首页夜间模式 ========== */
.dark-theme .zpb-home-full { background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%); }
.dark-theme .zpb-home-section { background: #2b2f33; }
.dark-theme .zpb-section-header { border-bottom-color: rgba(255,255,255,0.1); }
.dark-theme .zpb-section-title { color: #eee; }
.dark-theme .zpb-section-title i { color: var(--theme-color, #667eea); }
.dark-theme .zpb-section-more { color: #aaa; }
.dark-theme .zpb-cat-card { background: rgba(255,255,255,0.06); }
.dark-theme .zpb-cat-card:hover { background: var(--theme-color, #667eea); }
.dark-theme .zpb-cat-name { color: #ddd; }
.dark-theme .zpb-cat-count { color: #888; }
.dark-theme .zpb-book-card { background: rgba(255,255,255,0.06); }
.dark-theme .zpb-book-card:hover { background: rgba(255,255,255,0.1); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.dark-theme .zpb-book-title { color: #ddd; }
.dark-theme .zpb-book-meta { color: #888; }
.dark-theme .zpb-rank-item { border-bottom-color: rgba(255,255,255,0.08); }
.dark-theme .zpb-rank-item:hover { background: rgba(255,255,255,0.05); }
.dark-theme .zpb-rank-num { background: rgba(255,255,255,0.1); color: #aaa; }
.dark-theme .zpb-rank-name { color: #ddd; }
.dark-theme .zpb-rank-count { color: #888; }
.dark-theme .zpb-search-input { background: #2b2f33; color: #ddd; }
.dark-theme .zpb-enter-btn { background: rgba(255,255,255,0.1); color: #fff; }
.dark-theme .zpb-enter-btn:hover { background: rgba(255,255,255,0.15); }


/* ========== 书库首页小工具（子比风格） ========== */
.zpb-library-home { margin-bottom: 20px; }
.zpb-library-home .theme-box {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.zpb-library-home .box-body.notop { padding-top: 15px; padding-bottom: 12px; }
.zpb-library-home .title-theme { margin: 0; font-size: 16px; }
.zpb-library-home .title-theme .pull-right { font-size: 13px; font-weight: normal; }

/* 左右两栏布局 */
.zpb-main-row {
    display: flex;
    gap: 15px;
}
.zpb-main-left {
    flex: 1;
    min-width: 0;
}
.zpb-main-right {
    width: 300px;
    flex-shrink: 0;
}
.zpb-main-right .theme-box {
    position: sticky;
    top: 70px;
}

/* 统计数据卡片 */
.zpb-library-home .zpb-stats-box { 
    background: linear-gradient(135deg, var(--focus-color, #3b7ddd) 0%, #667eea 100%) !important;
    box-shadow: 0 4px 15px rgba(59,125,221,0.3);
}
.zpb-stats-box .box-body { padding: 20px; }
.zpb-stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}
.zpb-stats-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    padding: 15px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    color: #fff;
    text-decoration: none;
    transition: all 0.25s;
}
.zpb-stats-item:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }
.zpb-stats-icon { font-size: 28px; opacity: 0.9; }
.zpb-stats-info { display: flex; flex-direction: column; }
.zpb-stats-num { font-size: 22px; font-weight: 700; line-height: 1.2; }
.zpb-stats-label { font-size: 12px; opacity: 0.85; }
.zpb-stats-enter { cursor: pointer; }
.zpb-stats-enter .zpb-stats-icon { font-size: 32px; }
.zpb-stats-enter .zpb-stats-label { font-size: 14px; font-weight: 500; }

/* 搜索表单 */
.zpb-search-form {
    display: flex;
    gap: 10px;
}
.zpb-search-form .form-control {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}
.zpb-search-form .form-control:focus {
    border-color: var(--focus-color, #3b7ddd);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,125,221,0.1);
}
.zpb-search-form .but {
    padding: 12px 24px;
    white-space: nowrap;
}

/* 分类标签 */
.zpb-cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.zpb-cat-tags .but {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.zpb-cat-tags .but .badge {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* 书籍网格 */
.zpb-books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.zpb-book-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.zpb-book-item:hover {
    border-color: var(--focus-color, #3b7ddd);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.zpb-book-cover-wrap {
    position: relative;
    width: 70px;
    height: 91px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}
.zpb-book-cover-wrap .linebook-cover {
    width: 70px;
    height: 91px;
}
.zpb-book-cover-wrap .linebook-cover .title-strip { left: 5px; top: 5px; bottom: 5px; width: 20px; }
.zpb-book-cover-wrap .linebook-cover .title-text { font-size: 14px; letter-spacing: 1px; }
.zpb-book-cover-wrap .linebook-cover .seal { width: 12px; height: 12px; left: 4px; bottom: 6px; }
.zpb-book-cover-wrap .linebook-cover .thread { right: 8px; width: 6px; }
.zpb-book-cover-wrap .zpb-book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.zpb-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    color: #fff;
}
.zpb-badge.free { background: #52c41a; }
.zpb-badge.vip { background: linear-gradient(135deg, #ff9800, #ff5722); }
.zpb-badge.oa { background: linear-gradient(135deg, #07c160, #06ad56); }
.zpb-book-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.zpb-book-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.zpb-book-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
}
.zpb-book-meta i { margin-right: 3px; }

/* 排行榜（侧边栏用） */
.zpb-rank-list { display: flex; flex-direction: column; gap: 6px; }
.zpb-rank-list .zpb-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}
.zpb-rank-list .zpb-rank-item:hover { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* 排行榜（首页网格用） */
.zpb-rank-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.zpb-rank-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}
.zpb-rank-item:hover { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.zpb-rank-num {
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    background: #e9ecef;
    border-radius: 4px;
    flex-shrink: 0;
}
.zpb-rank-num.top1 { background: linear-gradient(135deg, #ffd700, #ffb300); color: #fff; }
.zpb-rank-num.top2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #fff; }
.zpb-rank-num.top3 { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }
.zpb-rank-name {
    flex: 1;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zpb-rank-dl {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* 移动端适配 */
@media (max-width: 1200px) {
    .zpb-books-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
    .zpb-main-row { flex-direction: column; }
    .zpb-main-right { width: 100%; }
    .zpb-main-right .theme-box { position: static; }
}
@media (max-width: 768px) {
    .zpb-stats-grid { flex-wrap: wrap; }
    .zpb-stats-item { flex: 1 1 45%; min-width: 120px; padding: 12px; }
    .zpb-stats-icon { font-size: 22px; }
    .zpb-stats-num { font-size: 18px; }
    .zpb-stats-label { font-size: 11px; }
    .zpb-search-form { flex-direction: column; }
    .zpb-search-form .but { width: 100%; justify-content: center; }
    .zpb-cat-tags .but { padding: 8px 12px; font-size: 13px; }
    .zpb-books-grid { grid-template-columns: 1fr; }
    .zpb-book-item { padding: 10px; }
}
@media (max-width: 480px) {
}

/* 夜间模式 */
.dark-theme .zpb-library-home .theme-box { background: #2b2f33; box-shadow: none; border: 1px solid rgba(255,255,255,0.08); }
.dark-theme .zpb-library-home .zpb-stats-box { background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important; border: none; box-shadow: none; }
.dark-theme .zpb-stats-item { background: rgba(255,255,255,0.08); }
.dark-theme .zpb-stats-item:hover { background: rgba(255,255,255,0.15); }
.dark-theme .zpb-search-form .form-control { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #ddd; }
.dark-theme .zpb-search-form .form-control::placeholder { color: #888; }
.dark-theme .zpb-cat-tags .but { background: rgba(255,255,255,0.08); color: #ddd; }
.dark-theme .zpb-cat-tags .but:hover { background: var(--theme-color, #3b7ddd); color: #fff; }
.dark-theme .zpb-book-item { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.dark-theme .zpb-book-item:hover { background: rgba(255,255,255,0.08); border-color: var(--theme-color, #3b7ddd); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.dark-theme .zpb-book-name { color: #ddd; }
.dark-theme .zpb-book-meta { color: #888; }
.dark-theme .zpb-rank-list .zpb-rank-item { border-bottom-color: rgba(255,255,255,0.08); }
.dark-theme .zpb-rank-list .zpb-rank-item:hover { background: rgba(255,255,255,0.05); }
.dark-theme .zpb-rank-grid .zpb-rank-item { background: rgba(255,255,255,0.04); }
.dark-theme .zpb-rank-grid .zpb-rank-item:hover { background: rgba(255,255,255,0.08); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.dark-theme .zpb-rank-num { background: rgba(255,255,255,0.1); color: #aaa; }
.dark-theme .zpb-rank-name { color: #ddd; }
.dark-theme .zpb-rank-dl { color: #888; }
