/* ========================================
   书架页面现代化重构
   ======================================== */

/* 主容器优化 */
.bookshelf-main {
    background: #fafafa !important;
    min-height: calc(100vh - 56px);
    padding: 30px 20px !important;
}

/* 书架容器 - 现代化设计 */
.bookshelf-container {
    max-width: 1400px !important;
    margin: 0 auto;
    background: transparent !important;
    padding: 0 !important;
}

/* 批量操作栏 - 顶部固定悬浮设计 */
.batch-ops-bar {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 16px 24px !important;
    margin-bottom: 24px !important;
    margin-left: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 70px;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

#selectAllWrapper {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    user-select: none;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#selectAllWrapper:hover {
    background: #f5f5f5;
}

#selectAllCheckbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #F57F17 !important;
}

.batch-remove-btn {
    background: linear-gradient(135deg, #F57F17 0%, #FF9800 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 127, 23, 0.3) !important;
    transition: all 0.3s ease !important;
}

.batch-remove-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 127, 23, 0.4) !important;
    background: linear-gradient(135deg, #E65100 0%, #F57F17 100%) !important;
}

/* 书籍网格 - 优化间距和响应式 */
.bookshelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 0 !important;
}

/* 书籍卡片 - 全新现代设计 */
.book-card {
    width: 100% !important;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(245, 127, 23, 0.15);
    border-color: rgba(245, 127, 23, 0.3);
}

/* 书籍封面容器 - 优化布局 */
.book-cover {
    width: 140px !important;
    height: 186px !important;
    margin: 20px auto 0 auto !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    position: relative;
}

.book-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
    pointer-events: none;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover-img {
    transform: scale(1.05);
}

/* 书籍信息区 - 优化间距和排版 */
.book-info {
    padding: 16px 20px 20px 20px !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.book-title {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #222 !important;
    line-height: 1.4 !important;
    margin: 0 0 4px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 47px;
}

.book-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.book-author {
    font-size: 14px !important;
    color: #666 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.book-author::before {
    content: '✍️';
    font-size: 14px;
}

.book-desc {
    font-size: 13px !important;
    color: #777 !important;
    line-height: 1.6 !important;
    margin: 4px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 41px;
}

.book-addtime {
    font-size: 12px !important;
    color: #aaa !important;
    margin-top: auto !important;
    padding-top: 8px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.book-addtime::before {
    content: '📅';
    font-size: 12px;
}

/* 阅读进度条 - 现代化设计 */
.book-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 0;
    border-top: 1px solid #f5f5f5;
}

.progress-bar {
    flex: 1;
    height: 6px !important;
    background: #f0f0f0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F57F17 0%, #FF9800 100%) !important;
    border-radius: 10px !important;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 移除按钮 - 现代化设计 */
.remove-bookshelf-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #F57F17 !important;
    border: 1px solid rgba(245, 127, 23, 0.3) !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(8px);
}

.remove-bookshelf-btn:hover {
    background: #F57F17 !important;
    color: #fff !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(245, 127, 23, 0.3) !important;
}

/* 批量选择复选框 - 优化样式 */
.batch-checkbox {
    position: absolute !important;
    left: 12px !important;
    top: 12px !important;
    z-index: 10;
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
    accent-color: #F57F17 !important;
    border-radius: 4px;
}

/* 空状态卡片 - 现代设计 */
.empty-add-card {
    background: #fafafa !important;
    border: 2px dashed rgba(245, 127, 23, 0.4) !important;
    border-radius: 16px !important;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

.empty-add-card:hover {
    background: #fff !important;
    border-color: #F57F17 !important;
    box-shadow: 0 4px 20px rgba(245, 127, 23, 0.15) !important;
    transform: translateY(-4px);
}

.empty-add-content {
    text-align: center;
    padding: 40px 20px;
}

.empty-add-content i {
    font-size: 48px;
    color: #F57F17;
    margin-bottom: 16px;
    display: block;
}

.empty-add-content p {
    font-size: 15px;
    color: #666;
    margin-bottom: 16px;
}

.add-more-btn {
    display: inline-block;
    padding: 10px 24px !important;
    background: linear-gradient(135deg, #F57F17 0%, #FF9800 100%) !important;
    color: #fff !important;
    border-radius: 25px !important;
    font-size: 14px !important;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 127, 23, 0.3);
}

.add-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 127, 23, 0.4);
}

/* 空状态提示 - 优化设计 */
.no-content {
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
    padding: 80px 40px !important;
    max-width: 500px !important;
    margin: 80px auto !important;
    text-align: center;
}

.no-content i {
    font-size: 72px !important;
    color: #F57F17 !important;
    margin-bottom: 24px !important;
    display: block;
    opacity: 0.8;
}

.no-content p {
    font-size: 16px !important;
    color: #666 !important;
    margin-bottom: 32px !important;
    line-height: 1.6;
}

.browse-btn {
    display: inline-block;
    padding: 14px 40px !important;
    background: linear-gradient(135deg, #F57F17 0%, #FF9800 100%) !important;
    color: #fff !important;
    border-radius: 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 24px rgba(245, 127, 23, 0.35) !important;
}

.browse-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 35px rgba(245, 127, 23, 0.45) !important;
}

/* 响应式优化 */
@media (max-width: 1400px) {
    .bookshelf-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1200px) {
    .bookshelf-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }
    
    .batch-ops-bar {
        top: 60px;
        padding: 14px 20px !important;
    }
}

@media (max-width: 992px) {
    .bookshelf-main {
        padding: 20px 15px !important;
    }
    
    .bookshelf-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .book-cover {
        width: 120px !important;
        height: 160px !important;
    }
}

@media (max-width: 768px) {
    .bookshelf-main {
        padding: 15px 10px !important;
    }
    
    .batch-ops-bar {
        position: static;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px !important;
        margin-bottom: 16px !important;
    }
    
    #selectAllWrapper {
        justify-content: center;
    }
    
    .batch-remove-btn {
        width: 100%;
        text-align: center;
    }
    
    .bookshelf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .book-card {
        border-radius: 12px;
    }
    
    .book-cover {
        width: 100px !important;
        height: 133px !important;
        margin: 12px auto 0 auto !important;
    }
    
    .book-info {
        padding: 12px 14px 14px 14px !important;
    }
    
    .book-title {
        font-size: 14px !important;
        min-height: auto;
    }
    
    .book-desc {
        font-size: 12px !important;
        min-height: auto;
    }
    
    .no-content {
        padding: 60px 30px !important;
        margin: 40px auto !important;
    }
}

@media (max-width: 480px) {
    .bookshelf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .book-cover {
        width: 90px !important;
        height: 120px !important;
    }
    
    .book-title {
        font-size: 13px !important;
    }
    
    .remove-bookshelf-btn {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }
}

