/* 网格布局容器 */
.panel-body {
    padding: 15px;
}

/* 单个书籍项目 */
.item {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
    transition: transform 0.3s ease;
    height: 350px;
    position: relative;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 书籍封面图片 */
.image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    margin-right: 0;
}

.image img {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 书籍信息 */
dl {
    flex: 1;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

dt {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 8px;
}

dt a {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    margin-bottom: 5px;
    max-width: 100%;
    text-align: center;
}

dt a:hover {
    color: #ff6b6b;
}

dt span {
    font-size: 14px;
    color: #666;
    text-align: center;
}

dd {
    font-size: 13px;
    line-height: 1.5;
    color: #777;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-align: justify;
    margin-top: 5px;
}

.clear {
    clear: both;
}

/* 响应式布局 */
@media (min-width: 768px) {
    .panel-body {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .item {
        margin-bottom: 0;
    }
}

@media (min-width: 1200px) {
    .panel-body {
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        display: grid;
    }

    .item {
        width: 100%;
        margin-right: 0;
    }
}

.panel-body:before {
    content: none;
    /* 或者 content: ""; */
    display: none;
}

/* 或者如果需要保留伪元素但不希望它占用空间 */
.panel-body:before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
}

/* 列表项基本样式 */
.tjlb li {
    position: relative;
    padding: 12px 15px;
    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 {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 列表项基本样式 */
.zjgx li {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
}

/* 分类标签样式 */
.zjgx .s1 {
    display: inline-block;
    padding: 2px 5px;
    margin-right: 8px;
    color: #fff;
    background-color: #8a8a8a;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}

/* 不同分类的颜色 */
.zjgx li:nth-child(5n+1) .s1 {
    background-color: #7ecef4;
}

/* 浅蓝色 */
.zjgx li:nth-child(5n+2) .s1 {
    background-color: #f69c9f;
}

/* 粉红色 */
.zjgx li:nth-child(5n+3) .s1 {
    background-color: #95ce6a;
}

/* 绿色 */
.zjgx li:nth-child(5n+4) .s1 {
    background-color: #f8cc7a;
}

/* 黄色 */
.zjgx li:nth-child(5n+5) .s1 {
    background-color: #84ccc9;
}

/* 青色 */

/* 书名链接样式 */
.zjgx .s2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    flex-shrink: 0;
}

.zjgx .s2 a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.zjgx .s2 a:hover {
    color: #06c;
}

/* 章节链接样式 */
.zjgx .s3 {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 5px;
}

.zjgx .s3 a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.zjgx .s3 a:hover {
    color: #06c;
}

/* 日期样式 */
.zjgx .s5 {
    color: #999;
    font-size: 12px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
    width: 140px;
}

/* 移动端样式 */
@media screen and (max-width: 768px) {
    .zjgx li {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .zjgx .s1 {
        margin-bottom: 5px;
    }

    .zjgx .s2 {
        margin-bottom: 5px;
        max-width: 100%;
        width: 100%;
    }

    .zjgx .s3 {
        margin-bottom: 5px;
        padding-left: 0;
        max-width: 100%;
        width: 100%;
    }

    .zjgx .s5 {
        width: 100%;
        text-align: left;
        margin-left: 0;
    }
}


/* 最新入库列表容器 */
.zxrk {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 列表项基本样式 */
.zxrk li {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
}

/* 分类标签样式 */
.zxrk .s1 {
    display: inline-block;
    padding: 2px 5px;
    margin-right: 8px;
    color: #fff;
    background-color: #8a8a8a;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}

/* 不同分类的颜色 */
.zxrk li:nth-child(5n+1) .s1 {
    background-color: #7ecef4;
}

/* 浅蓝色 */
.zxrk li:nth-child(5n+2) .s1 {
    background-color: #f69c9f;
}

/* 粉红色 */
.zxrk li:nth-child(5n+3) .s1 {
    background-color: #95ce6a;
}

/* 绿色 */
.zxrk li:nth-child(5n+4) .s1 {
    background-color: #f8cc7a;
}

/* 黄色 */
.zxrk li:nth-child(5n+5) .s1 {
    background-color: #84ccc9;
}

/* 青色 */

/* 书名链接样式 */
.zxrk .s2 {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zxrk .s2 a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.zxrk .s2 a:hover {
    color: #06c;
}

/* 作者名样式 */
.zxrk .s5 {
    color: #999;
    font-size: 12px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    padding-left: 10px;
}

/* 移动端样式 - 保持横向 */
@media screen and (max-width: 768px) {
    .zxrk li {
        padding: 8px;
    }

    .zxrk .s1 {
        min-width: 50px;
        font-size: 11px;
    }

    .zxrk .s2 {
        font-size: 13px;
    }

    .zxrk .s5 {
        font-size: 11px;
    }
}