html,
body {
    height: 100%;
    width: 100%;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: "Roboto", "SF Pro SC", "SF Pro Display", "SF Pro Icons", "PingFang SC", BlinkMacSystemFont, -apple-system, "Segoe UI", "Microsoft Yahei", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
    font-weight: 400;
    margin: 0;
    /* background-image: url(/assets/img/bg-1.jpg); */
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #f4f4f4;
}

a {
    -webkit-transition: all 0.35s;
    -moz-transition: all 0.35s;
    transition: all 0.35s;
    color: #474157;
}

a:hover,
a:focus {
    color: #474157;
}

hr {
    max-width: 100px;
    margin: 25px auto 0;
    border-width: 1px;
    border-color: rgba(34, 34, 34, 0.1);
}

hr.light {
    border-color: white;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 200;
    letter-spacing: 1px;
}

p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

img.error {
  display: inline-block;
  transform: scale(1);
  content: '';
  color: transparent;
  /* 隐藏图标与文�?*/
  opacity:0.6;
  filter: alpha(opacity=60);
}


img.error::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: #f5f5f5 url(break.svg) no-repeat center  50% 50%;
}


img.error::after {
  /* content: attr(alt); */
  content: '-- D一本书单网 --';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  line-height: 2;
  background-color: #ccc;
  color: white;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.maskpanel{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #00000069;
    display: none;
}

.navbar-brand{
    font-family: fantasy;
}

/* 挑书统计面板样式 */
#selected-summary-panel .maskpanel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.user-selected-summary-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.user-selected-summary-title {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 1.4em;
    font-weight: bold;
    color: #495057;
}

.user-selected-summary-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
}

/* 挑书统计面板内容样式 */
.summary-stats {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #6c757d;
}

.summary-table {
    margin: 30px 0;
}

.summary-table h4 {
    margin-bottom: 15px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table tr:hover {
    background-color: #e9ecef;
}

.summary-charts {
    margin: 30px 0;
}

.summary-charts h4 {
    margin-bottom: 15px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.chart-placeholder {
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

/* 针对挑书统计面板的关闭按钮 */
#selected-summary-panel .maskpanel-content .close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    outline: none;
}

#selected-summary-panel .maskpanel-content .close-btn:hover {
    color: #333;
}
/* 书单头部信息 */
.booklist-header {
    padding: 20px 0;
    text-align: center;
    /* background: #f4f4f4; */
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

#btn-show-filter{
    display: none;
}
.btn-filterpanel-switch{
    display: none;
}
.collapsed .more-filter-btn{
    display: none !important;
}
.collapsed .filter-panel-multi .filter-section-multi:first-child .btn-filterpanel-switch{
    display: block;
    padding: 4px 10px;
    background: #38f;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
    line-height: 18px;
    float: right;
    margin-top: -30px;
}

#mainbody.fold .booklist-header{
    margin-bottom: 0;
    background-color: #fff;
}
#mainbody.fold .booklist-header h1{
    margin-bottom: 0;
    margin-top: 0;
}
#mainbody.fold .booklist-header .booklist-description{
    display: none;
}
#mainbody.fold .books-container{
    /* height: calc(100vh - 288px); */
}

.top-panel{
    padding-bottom: 10px;
}

#mainbody.fold .top-panel{
    position: fixed;
    top: 50px;
    z-index: 99;
    background-color: #fff;
}
#mainbody.fold #btn-show-filter{
    display: block;
}
#mainbody.fold .mutil-filter-panel.collapsed{
    display: none;
}

#mainbody .container{
    background-color: #fff;
}

.header-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-input {
    padding: 3px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#filter-action, #clear-filter {
    padding: 3px 10px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    margin: 0 5px;
}

#filter-action {
    background: #007bff;
    color: white;
}

#filter-action:hover {
    background: #0056b3;
}

#clear-filter:hover {
    background: #e0e0e0;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    padding: 5px 10px;
    background: #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
}

.tag-item:hover {
    background: #007bff;
    color: white;
}

.tag-item.active {
    background: #007bff;
    color: white;
}

#clear-filter:hover {
    background: #e0e0e0;
}

.view-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.view-toolbar .view-btn, 
.view-toolbar .show-filter-panel {
    width: 40px;
    height: 40px;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 16px;
}

.view-toolbar .view-btn::after, 
.view-toolbar .show-filter-panel::after {
    content: attr(title);
    position: absolute;
    right: 100%;
    margin-right: 10px;
    background: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.view-toolbar .view-btn:hover::after, 
.view-toolbar .show-filter-panel:hover::after {
    opacity: 1;
}

.booklist-header .booklist-title{
    font-size: clamp(16px, 4vw, 28px);
    font-weight: bold;
    color: #171347;
    margin-bottom: 15px;
    text-align: left;
    padding-left: 20px;
    padding-right: 20px;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    float: left;
    /* text-overflow: ellipsis; */
}

.booklist-description {
    color: #6c757d;
    text-align: left;
    padding: 3px 20px;
}



.btn-list-summary.active,.btn-list-summary:hover{
    /* background-color: gold !important; */
    border-bottom: 2px solid blue;
}

/* 视图切换按钮 */
.toolbar {
    margin-top: 20px;
    text-align: right;
    padding-right: 20px;
}

.view-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 20px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.view-btn.active {
    background: #007bff;
    color: white;
}

.view-btn.random-btn {
    /* background: #ebf744; */
    color: red;
}

/* 书籍容器 */
.books-container-wrapper {
    display: flex;
    margin-top: 5px;
    /* height: calc(100vh - 140px); */
}

@media screen and (max-width: 768px), screen and (orientation: portrait) {
    .books-container-wrapper {
        /* height: calc(100vh - 100px); */
    }
    #btn-show-filter{
        display: none;
    }
    .books-container-main {
        transition: transform 0.3s ease;
        width: 100%;
    }
    .sub-container {
        /* width: calc(100vw - 28px); */
        left: 0;
        width: 100%;
    }
}

.filter-panel {
    width: 25%;
    background: #fff;
    border-right: 1px solid #dee2e6;
    padding: 15px;
    overflow-y: auto;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 290px);
    box-shadow: 2px 2px 5px #b0b0b0;
    z-index: 9;
}

@media screen and (max-width: 768px), screen and (orientation: portrait) {
    .filter-panel {
        position: fixed;
        top: 60px;
        left: 0;
        width: 250px;
        height: calc(100vh - 65px);
        z-index: 1000;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
    }
    
    /* 在窄屏状态下，默认隐藏过滤面�?*/
    .filter-panel:not(.collapsed) {
        transform: translateX(0);
    }
    
    .filter-panel.collapsed {
        width: 0;
        padding: 0;
        border-right: none;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
    }
    
    /* .filter-panel:not(.collapsed) ~ .books-container-main {
        transform: translateX(150px);
    } */
}

.filter-panel-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.filter-panel.collapsed {
    width: 0;
    padding: 0;
    border-right: none;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    height: 60px;
}
.booklist-stat-info{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: fixed;
    bottom: 0;
    z-index: 999;
    width: 100%;
    left: 0;
    background-color: currentColor;
    padding-top: 8px;
}
.btn-list-summary{
    padding: 5px 10px;
    border-bottom: 1px solid #ccc;
    border-radius: 8px; 
    background-color: #fff;
    padding: 5px 30px;
}
.btn-list-summary:hover{
    background: gold;
}

.toggle-filter-panel {
    background: #007bff;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    padding: 15px 0 10px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.filter-actions button {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

#filter-action {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

#clear-filter {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.filter-actions button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.filter-actions button:active {
    transform: translateY(0);
}

.filter-section {
    display: flex;
    margin-bottom: 8px;
    padding: 0 15px;
}

.filter-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #495057;
}

.filter-section .hascover-container{
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.hascover-container>label{
    flex: 1;
}

.filter-row {
    margin-bottom: 10px;
}

.filter-row:last-child {
    margin-bottom: 0;
    text-align: left;
}

.price-filter {
    display: flex;
    align-items: center;
    /* gap: 10px; */
}

.price-input {
    width: 100px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    flex: 1;
}

.filter-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.books-container-main {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.current-filters {
    padding: 10px 15px;
    /* background: #f4f4f4; */
    border-bottom: 1px solid #ddd;
    height: auto;
    /* min-height: 88px; */
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.filters-header > span {
    font-weight: bold;
    color: #333;
}

.filters-stats {
    display: flex;
    gap: 15px;
    float: right;
}

.filters-stats span {
    font-size: 14px;
    color: #666;
}

.filters-stats span:first-child {
    font-weight: bold;
    /* color: #007bff; */
}

.clear-all-filters {
    /* background: #dc3545; */
    /* color: white; */
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.clear-all-filters:hover {
    /* background: #c82333; */
}

/* 宽屏状态下 filter-col 显示在一�?*/
.filter-col {
    display: flex;
    align-items: center;
}

/* 窄屏状态下每项各占一�?*/
@media screen and (max-width: 768px), screen and (orientation: portrait) {
    .filters-header {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-col {
        display: block;
        width: 100%;
        text-align: left;
        margin-bottom: 10px;
        padding: 5px 0;
    }
    .filters-stats{
        text-align: center;
        margin-bottom: 0;
    }
    
    .filters-stats {
        justify-content: flex-start;
    }
    .book-list-grid{
        grid-template-columns: none !important;
    }

    .welcome-container{
        padding: 20px 10px;
    }
    .welcome-header h1{
        font-size: 1.5em !important;
    }
    
    .booklist-stat-info.filter-col {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        /* position: static; */
        transform: none;
        flex-direction: row;
        /* justify-content: flex-start; */
        font-size: 10px;
        background-color: #f4f4f4cf;
        margin-bottom:0 !important;
        padding-left: 2em;
    }
    
    .booklist-stat-info.filter-col > a {
        /* flex: 1 1 auto; */
        /* min-width: 30%; */
        /* width: auto; */
        padding:0 !important;
        border: none !important;
        background-color: transparent !important;
        text-align: center !important;
    }
    .booklist-stat-info.filter-col > a.active {
        background-color: orange !important;
        color: white !important;
    }
    .booklist-stat-info.filter-col > a.btn-booklist-all,.booklist-stat-info.filter-col > a.btn-booklist-selected{
        display: none !important;
    }

    .books-list.list-view .book-item .book-select{
        background-color: #eeeeeea1 !important;
        padding: 10px !important;
        margin-top: 5px !important;
    }

    .book-detail .cover-img{
        max-width: none !important;
    }
    
    /* 在更小的屏幕上，让链接占据更大比�?*/
    @media screen and (max-width: 480px) {
        .booklist-stat-info.filter-col > a {
            min-width: 45%;
        }
    }
    
    .clear-all-filters {
        margin-left: 0;
        margin-top: 10px;
    }
    
    /* 在极小屏幕上，让每个链接单独占一�?*/
    @media screen and (max-width: 360px) {
        .booklist-stat-info.filter-col > a {
            min-width: 100%;
        }
    }
}

.filters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.filter-tag .remove-filter {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* 多列筛选面板 - 仿京东风格 */
.filter-panel-multi {
    background: #fff;
    border-top: 1px solid #eee;
    /* border-bottom: 1px solid #eee; */
    padding: 12px 0;
    padding-bottom: 0;
    /* margin-bottom: 15px; */
    /* box-shadow: 0 1px 3px rgba(0,0,0,0.05); */
}

.filter-section-multi {
    display: flex;
    margin-bottom: 8px;
    padding: 0 15px;
}

.mutil-filter-panel{
    max-height: 350px;
    overflow-y: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 控制筛选面板的显示与隐藏 */
.mutil-filter-panel.collapsed .filter-section-multi:not(:first-child),.mutil-filter-panel.collapsed .filter-section {
    display: none;
}

/* 默认情况下，所有筛选组的标签列表都是折叠的（除了第一个）*/
.filter-section-multi:not(:first-child) .filter-values,
.filter-section-multi.collapsed .filter-values {
    max-height: 30px; /* 只显示一行的高度 */
    overflow: hidden;
    /* position: relative; */
}

.filter-section-multi:not(:first-child) .filter-values::after,
.filter-section-multi.collapsed .filter-values::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, transparent, #fff 70%);
    pointer-events: none;
}

/* 展开状态下显示全部标签 */
.filter-section-multi:not(:first-child):not(.collapsed) .filter-values {
    max-height: none;
    overflow: visible;
}

.filter-section-multi:not(:first-child):not(.collapsed) .filter-values::after {
    display: none;
}

.mutil-filter-panel .more-filter-btn {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    text-align: center;
    cursor: pointer;
    color: #007bff;
    font-weight: bold;
}

.mutil-filter-panel .more-filter-btn:hover {
    background-color: #f8f9fa;
}

.mutil-filter-panel .more-filter-btn i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.mutil-filter-panel.collapsed .more-filter-btn i {
    transform: rotate(-90deg);
}

.mutil-filter-panel:not(.collapsed) .more-filter-btn i {
    transform: rotate(90deg);
}

.filter-section-multi.collapsed .filter-values {
    max-height: 30px; /* 只显示一行的高度 */
    overflow: hidden;
    /* position: relative; */
}

.filter-section-multi.collapsed .filter-values::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, transparent, #fff 70%);
    pointer-events: none;
}

.mutil-filter-panel.collapsed .filter-more-link {
    /* margin-right: 78px; */
}

.filter-section-multi .filter-more-link {
    float: right;
    /* margin-right: 10px; */
    margin-top: -25px;
    color: #007bff;
    cursor: pointer;
    white-space: nowrap;
    background-color: #fff;
}

.filter-section-multi:last-child {
    margin-bottom: 0;
}

.filter-name {
    min-width: 60px;
    font-weight: bold;
    color: #666;
    padding-right: 10px;
    flex-shrink: 0;
    line-height: 28px;
}

.filter-options {
    flex-grow: 1;
}

.filter-values {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.filter-value-item {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}

.filter-value-item a {
    display: inline-block;
    padding: 4px 10px;
    background: #f7f7f7;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
    line-height: 18px;
}

.filter-value-item a:hover {
    background: #e7f4ff;
    border-color: #38f;
    color: #38f;
}

.filter-value-item.active a,
.filter-value-item.active a:hover {
    background: #38f;
    border-color: #38f;
    color: #fff;
}

/* 不限选项样式 */
.filter-value-item[data-is-none="true"] a {
    background: #f7f7f7;
    border-color: #eee;
    color: #666;
}

.filter-value-item[data-is-none="true"] a:hover {
    background: #e7f4ff;
    border-color: #38f;
    color: #38f;
}

/* 为onlyone-filter组的不限选项添加默认选中样式 */
.onlyone-filter .filter-value-item[data-is-none="true"].selected a,
.onlyone-filter .filter-value-item[data-is-none="true"].active a {
    background: #38f;
    border-color: #38f;
    color: #fff;
}

/* 多选状态样式 */
.filter-value-item:not([data-is-none="true"]).selected a {
    background: #fff0f0;
    border-color: #e4393c;
    color: #e4393c;
    position: relative;
    padding-left: 20px;
}

.filter-value-item:not([data-is-none="true"]).selected a::before {
    content: "\2713";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #e4393c;
    font-weight: bold;
}

.filter-value-item:not([data-is-none="true"]).selected a:hover {
    background: #ffe0e0;
    color: #c4292c;
}

/* 互斥字段样式 */
.filter-value-item[data-field="category_name"]:not([data-is-none="true"]).selected a,
.filter-value-item[data-field="category1"]:not([data-is-none="true"]).selected a,
.filter-value-item[data-field="category2"]:not([data-is-none="true"]).selected a {
    background: #fff0f0;
    border-color: #e4393c;
    color: #e4393c;
    position: relative;
    padding-left: 20px;
}

.filter-value-item[data-field="category_name"]:not([data-is-none="true"]).selected a::before,
.filter-value-item[data-field="category1"]:not([data-is-none="true"]).selected a::before,
.filter-value-item[data-field="category2"]:not([data-is-none="true"]).selected a::before {
    content: "\2713";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #e4393c;
    font-weight: bold;
}

.filter-value-item[data-field="category_name"]:not([data-is-none="true"]).selected a:hover,
.filter-value-item[data-field="category1"]:not([data-is-none="true"]).selected a:hover,
.filter-value-item[data-field="category2"]:not([data-is-none="true"]).selected a:hover {
    background: #ffe0e0;
    color: #c4292c;
}

.filter-value-item.custom-price-range {
    display: flex;
    align-items: center;
    /* padding: 4px 10px; */
    background: #f7f7f7;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #666;
    font-size: 12px;
}

.filter-value-item.custom-price-range span {
    margin: 0 5px;
}

.price-input {
    width: 60px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
}

#price-confirm-multi {
    padding: 4px 8px;
    background: #38f;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 5px;
}

#price-confirm-multi:hover {
    background: #27e;
}

.filter-more-link {
    /* position: absolute;
    margin-top: 0;
    right: 10px; */
    /* position: relative; */
}

.filter-more-link i {
    margin-left: 4px;
}

.more-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    min-width: 200px;
    max-height: 200px;
    overflow-y: auto;
}

.brand-filter .filter-name {
    color: #e4393c;
}



.books-container {
    min-height: 500px;
    overflow-y: auto;
    max-height: 100%;
    height: 100%;
    padding: 10px;
    padding-left: 0;
    /* height: calc(100vh - 348px); */
}

.books-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px;
    padding-left: 0;
}

/* 列表视图 */
.books-list.list-view {
    display: block;
}

.btn-unselect{
    display: none;
}
.btn-unselect:hover{
    background-color: red;
    color: #fff !important;
}
.books-list.list-my-selected .btn-unselect,.books-list.list-selected .btn-unselect{
    display: block;
    color: red;
    font-size: 1.5em;
    border: 1px solid #d0d0d0;
    padding: 1px 9px;
    border-radius: 20px;
}

.books-list.list-my-selected .select-checkbox
,.books-list.list-selected .select-checkbox
,.books-list.list-my-selected .btn-remove-from-list
,.books-list.list-selected .btn-remove-from-list{
    display: none;
}


.books-list.list-view .book-item {
    display: flex;
    align-items: center;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 5px;
    /* margin-bottom: 10px; */
    background: #fff;
}

.books-list.list-view .book-item .book-select{
    position: absolute;
    top: 2px;
    right: 0px;
    background-color: #eeeeee;
    padding: 20px;
}

.books-list.list-view .book-cover {
    width: 40px;
    height: 60px;
    margin-right: 7px;
}

.books-list.list-view .book-info {
    flex: 1;
    padding: 3px 15px;
    background-color: transparent;
}
.books-list.list-view .book-info>div.book-meta {
    float: left;
}

.books-list.list-view .book-title {
    font-size: 18px;
    margin-bottom: 5px;
    height: auto;
}

.books-list.list-view .book-meta {
    font-size: 14px;
    margin-right: 3px;
    padding-right: 3px;
    color: #666 !important;
}
.books-list.list-view .book-item:hover .book-info
,.books-list.list-view .book-item:hover .book-meta{
    color: #000dbe !important;
}

/* 卡片视图 */
.book-item {
    /* background: #fff; */
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.book-item:hover {
    transform: translateY(-5px);
    background: linear-gradient(to bottom, #4893e4, rgb(187, 187, 187));
    color: #fff;
}

.batch-result-content .book-item:hover {
    color: #007bff !important;
}

.book-item:hover .book-info{
    background: transparent;
}

.book-item:hover .book-meta{
    color: #fff;
}


.batch-result-content .book-item:hover {
    color: #007bff !important;
}

.batch-result-content .book-item:hover  .book-meta{
    color: #000 !important;
}
.batch-result-content .book-item:hover .book-info{
    background: rgb(237, 240, 240) !important;
}

.book-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.book-cover img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.book-info {
    padding: 15px;
    background: #f3f3f3;
}

.book-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
    height: 43px;
    overflow: hidden;
}
.remove-bookname{
    color: red;
    font-weight: bold;
    font-size: 1.3em;
    margin-left: 6px;
    margin-right: 6px;
}
.book-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.book-meta .book-price{
    float: right;
    margin-left: 5px;
}

.book-select {
    position: absolute;
    top: 10px;
    right: 10px;
}
.btn-remove-from-list{
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1.2em;
    color: red;
    background-color: #fdf59a;
    padding: 8px 25px 15px 15px;
    border-radius: 0 0 50px 0;
}
.btn-remove-from-list:hover{
    color: red;
}

.select-checkbox {
    width: 18px;
    height: 18px;
}

.loading, .no-more {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 图书详情弹窗 */
.book-detail {
    min-height: 350px;
    position: relative;
    padding: 20px 20px 80px 20px; /* 为底部按钮留出空�?*/
}

.book-detail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.book-detail .cover-img {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    max-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-detail .cover-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.book-detail .book-info {
    flex: 2;
    min-width: 250px;
}

.book-detail .book-info h3 {
    margin-top: 0;
    font-size: 20px;
}

.book-detail .book-info p {
    margin: 5px 0; /* 减小间距 */
    font-size: 14px;
}

.book-detail-description {
    clear: both;
    margin-top: 15px;
    border-top: 1px solid #d0d0d0;
    padding-top: 10px;
}

.book-detail-description h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
}

/* 优化description-txt显示方式 */
.book-detail-description .description-txt {
    line-height: 1.6;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* position: relative; */
}

.book-detail-description .description-txt::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1.6em;
    background: linear-gradient(to right, transparent, white 75%);
}

.book-detail-description .description-txt.expanded {
    -webkit-line-clamp: unset;
    cursor: default;
}

.book-detail-description .description-txt.expanded::after {
    display: none;
}

.book-detail-description .description-overlay {
    display: none;
    margin-top: 10px;
}

.book-detail-description .description-short {
    line-height: 1.6;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.book-detail-description .description-short::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1.6em;
    background: linear-gradient(to right, transparent, white 75%);
}

.book-detail-description .show-more-btn {
    color: #007bff;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: inline-block;
}

.book-detail-description .show-more-btn:hover {
    background-color: #f0f0f0;
}

.book-detail-description div {
    line-height: 1.6;
    font-size: 14px;
}

.book-detail-buttons {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: left;
}

.book-detail-buttons .btn {
    margin-right: 10px;
    margin-bottom: 10px;
    min-width: 80px;
}
@media (min-width: 768px) {
    .sub-container {
        width: 750px;
    }
}
@media (min-width: 992px) {
    .sub-container {
        width: 970px;
    }
}

@media (min-width: 1200px) {
    .sub-container {
        width: 1140px;
    }
}


@media (max-width: 768px) {
    .layui-layer{
        max-width: 100%;
        left: 0 !important;
    }
    .booklist-header{
        padding: 8px 0;
    }
    .booklist-header .booklist-title{
        font-size:clamp(13px, 4vw, 18px);
        text-align: center;
        margin-bottom: 0;
    }
    #btn-select-all{
        float: none !important;
    }
    .view-toolbar{
        right: auto;
        left: -5px;
        background-color: #d2d6de82;
        border-radius: 20px 50px 50px 20px;
        padding: 30px 3px;
        margin-top: 150px;
    }
    .view-toolbar .view-btn{
        border-radius: 30px;
    }
    .mutil-filter-panel.collapsed .filter-more-link{
        margin-right: 2px !important;
        padding: 3px 8px;
        background-color: #38f;
        color: #fff;
        /* margin-top: -30px; */
        border-radius: 5px;
    }
    .btn-filterpanel-switch{
        display: none !important;
    }
    .book-detail {
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
        padding-bottom: 120px;
    }
    
    .book-detail .book-cover {
        width: 100%;
        height: 300px;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .books-list {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        padding: 0;
    }

    .books-container{
        height: auto !important;
    }
    .current-filters{
        min-height: auto;
        padding: 2px 15px;
        padding-bottom: 10px;
    }
    .filters-header{
        margin-bottom: 2px;
    }
    .current-filters .filter-col {
        display: none;
    }
    .filters-stats{
        display: block !important;
    }
    .current-filters.collapsed .filters-header{
        display: none !important;
    }
    .filter-input{
        margin-bottom: 5px;
    }
}

#mainbody {
    position: relative;
    width: 100%;
    min-height: auto;
    /* overflow-y: hidden; */
    /* background: #f1f6fd; */
    color: #474157;
    height: calc(100vh - 95px);
    padding-bottom: 0;
}

.footer {
    background-color: #222222;
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    display: none;
}

.footer p {
    font-size: 14px;
    margin: 0;
}

.batch-select-panel,.select-all-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 580px;
    max-width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    padding: 20px;
}

.batch-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.batch-select-header h3 {
    margin: 0;
    color: #333;
}

.close-batch-panel {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-batch-panel:hover {
    color: #333;
}

.batch-select-content .form-group {
    margin-bottom: 15px;
}

.batch-select-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.batch-select-content input,
.batch-select-content select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.category-setting-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.category-setting-item select,
.category-setting-item input {
    flex: 1;
    min-width: 0;
}

.remove-category-setting {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

.remove-category-setting:hover {
    opacity: 0.8;
}

.batch-select-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.batch-result-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.batch-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.batch-result-panel .btn-remove-from-list{
    right: 10px !important;
    left: auto !important;
}

.result-info-block{
    margin-right: 15px;
}
.batch-result-stats {
    font-size: 14px;
    color: #666;
}
.result-value{
    font-weight: bold;
    font-size: 1.4em;
    color: maroon;
}

.batch-result-stats span {
    /* margin-right: 15px; */
}

.batch-result-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.load-more-container {
    text-align: center;
    padding: 20px;
}

.load-more-container .btn {
    padding: 8px 20px;
    min-width: 120px;
}

.batch-result-actions {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    position: sticky;
    bottom: 0;
    background: white;
}

.batch-result-actions .btn {
    margin: 0 10px;
    padding: 8px 20px;
}

.batch-books-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.batch-books-list .book-item {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.batch-books-list .book-item:hover {
    transform: translateY(-5px);
}

.batch-books-list .book-cover {
    width: 100%;
    height: 150px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.batch-books-list .book-cover img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.batch-books-list .book-info {
    padding: 10px;
    background: #f3f3f3;
}

.batch-books-list .book-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    height: 36px;
    overflow: hidden;
}

.batch-books-list .book-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.batch-books-list .book-select {
    position: absolute;
    top: 10px;
    right: 10px;
}

.batch-books-list .select-checkbox {
    width: 16px;
    height: 16px;
}

.delete-book-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.operation-instructions {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.operation-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.operation-instructions li {
    margin-bottom: 5px;
    font-size: 13px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

@media (min-width: 1600px) {
    .container {
        width: 1440px;
    }
    .sub-container{
        width: 1410px;
    }
}

/* 书单网首页宣传页面样�?*/
.welcome-container {
    max-width: 1200px;
    margin: 5px auto;
    padding: 20px;
    text-align: center;
}

.welcome-header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 40px;
}

.features-section {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.feature-card {
    flex: 1;
    min-width: 250px;
    margin: 10px;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5em;
    color: #007bff;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.feature-card p {
    color: #666;
    font-size: 0.9em;
}

.stats-section {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.stat-item {
    margin: 0 30px;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
}

.stat-label {
    color: #666;
}

.cta-section {
    margin-top: 40px;
    padding: 20px;
    /* background-color: #f8f9fa; */
    border-radius: 8px;
}

.cta-section p {
    margin: 10px 0;
    color: #666;
}

.cta-section .btn {
    padding: 12px 30px;
    font-size: 1.1em;
}
