.tjlb {
    padding: 0;
}

/* 列表项基本样式 */
.tjlb li {
    position: relative;
    padding: 10px 3px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
    transition: background-color 0.2s;
}

/* 序号样式 - 带颜色背景的数字 */
.tjlb li .s1 {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    background-color: #ffc107;
    /* 黄色背景，与图片中的1,2,3等数字背景匹配 */
    color: #fff;
    font-weight: bold;
    border-radius: 3px;
    margin-right: 10px;
    font-size: 14px;
    padding-left: 5px;
    padding-right: 5px;
}

/* 书名链接样式 */
.tjlb li .s2 a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
    margin-right: 3px;
}

.tjlb li .s2 a:hover {
    color: #007bff;
}

/* 添加斜杠和作者名 */
.tjlb li .s2:after {
    content: "/";
    color: #ccc;
    margin: 0 5px;
}

/* 作者名样式 */
.tjlb li .s5 {
    color: #999;
    font-size: 13px;
}

/* 右侧数字样式 */
.tjlb li:after {
    content: attr(data-count);
    position: absolute;
    right: 15px;
    color: #666;
    font-size: 13px;
}

/* 列表项悬停效果 */
.tjlb li:hover {
    background-color: #f8f8f8;
}

/* 移除可能导致布局问题的clear div */
.panel-body .clear {
    display: none;
}

/* 确保最后一个item后的clear不会影响布局 */
.panel-body:after {
    display: none;
    content: none;
}

/* 标签样式 */
.tags {
    position: absolute;
    bottom: 10px;
    left: 15px;
    right: 15px;
    font-size: 12px;
    color: #999;
}

/* 列表整体样式 */
.zjgx ul {
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
    border: 1px solid #e5e5e5;
    background-color: #fff;
}

/* 列表项样式 */
.zjgx ul li {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.zjgx ul li:hover {
    background-color: #f9f9f9;
}

/* 让每个span自适应分配空间并对齐 */
.zjgx ul li .s1 {
    flex: 0 0 110px;
    color: #168c84;
    font-weight: bold;
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zjgx ul li .s2 {
    flex: 0 1 180px;
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zjgx ul li .s3 {
    flex: 1 1 auto;
    /* 章节最大拉伸，填满剩余空间 */
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zjgx ul li .s4 {
    flex: 0 0 90px;
    color: #2ea76c;
    margin-right: 8px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zjgx ul li .s5 {
    flex: 0 0 130px;
    color: #999;
    font-size: 13px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 链接样式 */
.zjgx ul a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.zjgx ul .s2 a {
    color: #168c84;
    font-weight: bold;
}

.zjgx ul .s3 a {
    color: #435692;
}

.zjgx ul a:hover {
    color: #eb6100;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .zjgx ul li {
        flex-wrap: wrap;
        padding: 8px 10px;
    }

    .zjgx ul li .s1,
    .zjgx ul li .s2,
    .zjgx ul li .s3,
    .zjgx ul li .s4,
    .zjgx ul li .s5 {
        margin-bottom: 4px;
    }

    .zjgx ul li .s3 {
        flex-basis: 100%;
        margin-right: 0;
    }
}


/* 重置之前可能冲突的样式 */
.page_b a,
.pagelink a {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    text-decoration: none;
}

/* 分页容器样式 */
.page_b {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

/* 确保表格居中并不干扰按钮样式 */
.page_b table {
    margin: 0 auto;
    border-collapse: collapse;
    border-spacing: 0;
}

/* 页码链接容器 */
.pagelink {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* 所有页码按钮的基本样式 */
.pagelink a {
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    text-align: center;
    font-size: 14px;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

/* 当前页码的样式 */
.pagelink a.cur {
    background-color: #168C84;
    color: #fff;
    border-color: #168C84;
    font-weight: bold;
}

/* 首页、上一页、下一页、尾页按钮样式 */
.pagelink a.pn,
.pagelink a[title="首页"],
.pagelink a[title="上一页"],
.pagelink a[title="下一页"],
.pagelink a[title="后10页"],
.pagelink a[title="尾页"] {
    background-color: #f8f8f8;
}

/* 页码按钮悬停效果 */
.pagelink a:hover {
    background-color: #168C84;
    color: #fff;
    border-color: #168C84;
}

/* 确保页码数字按钮宽高一致，呈现为正方形 */
.pagelink a[href*=".html"] {
    padding: 0;
    min-width: 36px;
}