/* 书架页面样式 */
body {
    padding-top: 56px; /* 精确匹配导航栏高度，消除缝隙 */
}

/* 书架横幅 - 紧贴导航栏，与其他页面保持完全一致 */
.bookshelf-banner {
    margin-top: 0 !important;
    height: 43.98px !important;
    background: linear-gradient(135deg, #1976d2, #42a5f5) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    border-radius: 0 0 10px 10px !important;
    text-align: center !important;
    color: white !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 0 !important;
    max-width: none !important;
    flex: none !important;
    position: relative !important;
    overflow: hidden !important;
    /* 禁用继承的动画效果 - 横幅容器本身不应该有动画 */
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.bookshelf-banner::before {
    display: none !important;
}

.bookshelf-banner-content {
    width: 100%;
    max-width: 1555px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto;
}

.bookshelf-banner-content h1 {
    font-size: 16px !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 1px !important;
    color: #fff !important;
    position: relative !important;
    z-index: 2 !important;
    text-align: center !important;
}

.bookshelf-banner-content p {
    font-size: 12px !important;
    margin: 2px auto 0 !important;
    line-height: 1.2 !important;
    max-width: 600px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    position: relative !important;
    z-index: 2 !important;
    text-align: center !important;
}

.bookshelf-main {
    background: #f7f7f7;
    min-height: calc(100vh - 200px);
    padding: 32px 0;
    padding-top: 10px;  
}

/* 无内容提示样式 */
.no-content {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 480px;
    margin: 60px auto 0 auto;
}

.no-content i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.no-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.browse-btn {
    display: inline-block;
    padding: 8px 24px;
    background: #1976d2;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.browse-btn:hover {
    background: #42a5f5;
}

/* 书籍卡片容器样式 */
.bookshelf-container {
    width: 100%;
    max-width: 1555px;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 0;
    padding-top: 0;
}

.bookshelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 298.5px);
    gap: 20px;
    justify-content: center;
    padding: 20px 0;
    align-items: stretch;
}

/* 书籍卡片样式（唯一保留） */
.book-card {
    width: 298.5px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 24px rgba(25,118,210,0.28);
}

.book-cover {
    width: 120px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    overflow: hidden;
    margin: 16px auto 0 auto;
    border-radius: 4px;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block;
}

.book-card:hover .book-cover-img {
    transform: none;
}

.book-info {
    padding: 14px 12px 14px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 4px;
}

.book-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.book-desc {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
    line-height: 1.5;
    min-height: 18px;
    max-height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-addtime {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

.book-author {
    font-size: 14px;
    color: #666;
    margin: 4px 0;
}

.book-progress {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-right: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1976d2;
    border-radius: 2px;
    transition: width 0.3s;
}

.remove-bookshelf-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: #e3f2fd;
    color: #1976d2;
    border: none;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s;
}

.remove-bookshelf-btn:hover {
    background: #bbdefb;
    color: #1976d2;
}

.batch-ops-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    margin-left: calc(3 * (298.5px + 20px) + 305px);
    position: static;
}

.batch-remove-btn {
    background: #e3f2fd;
    color: #1976d2;
    border: none;
    border-radius: 16px;
    padding: 6px 18px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: background 0.2s, color 0.2s;
}

.batch-remove-btn:hover {
    background: #bbdefb;
    color: #1976d2;
}

.batch-checkbox {
    position: absolute !important;
    left: 10px;
    top: 10px;
    z-index: 3;
    width: 18px;
    height: 18px;
    accent-color: #1976d2;
}

.empty-add-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    border: 1.5px dashed #1976d2;
    color: #888;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

.empty-add-card:hover {
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.08);
    border-color: #1976d2;
}

.empty-add-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.add-more-btn {
    display: inline-block;
    padding: 7px 22px;
    background: #1976d2;
    color: #fff;
    border-radius: 18px;
    font-size: 15px;
    text-decoration: none;
    margin-top: 6px;
    transition: background 0.2s;
}

.add-more-btn:hover {
    background: #1976d2;
}

/* 隐藏返回顶部按钮 */
.back-to-top {
  display: none !important;
} 

/* 书架页面橙色背景修复 */
.bookshelf-main,
.bookshelf-container,
.bookshelf-content,
.bookshelf-section,
.book-card,
.book-item,
.book-grid,
.book-list,
.filter-section,
.search-section {
    background: #fff !important;
    background-color: #fff !important;
} 

/* ========================================
   书架页面移动端全面优化
   ======================================== */

/* 移动端优化 (768px以下) */
@media (max-width: 768px) {
    /* 页脚隐藏 */
    .footer,
    footer {
        display: none !important;
    }
    
    /* 主要内容区域适配 */
    .bookshelf-main {
        padding: 15px 10px;
        margin-top: 0;
    }
    
    .bookshelf-container {
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        padding: 20px 15px;
    }
    
    /* 批量操作栏适配 */
    .batch-ops-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .batch-ops-left {
        display: flex;
        align-items: center;
        gap: 15px;
        width: 100%;
    }
    
    .batch-ops-right {
        display: flex;
        gap: 10px;
        width: 100%;
    }
    
    .batch-btn {
        flex: 1;
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 20px;
        min-height: 40px;
        text-align: center;
    }
    
    /* 搜索栏适配 */
    .bookshelf-search {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
        border-radius: 25px;
        border: 1px solid #ddd;
        margin-bottom: 20px;
        min-height: 44px;
    }
    
    /* 书籍网格适配 */
    .bookshelf-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 20px;
    }
    
    .book-item {
        background: #fff;
        border: 1px solid #f0f0f0;
        border-radius: 8px;
        padding: 12px;
        transition: all 0.2s;
        position: relative;
    }
    
    .book-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }
    
    .book-checkbox {
        position: absolute;
        top: 8px;
        left: 8px;
        z-index: 2;
        width: 20px;
        height: 20px;
    }
    
    .book-cover {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .book-cover img {
        width: 100%;
        max-width: 120px;
        height: 160px;
        object-fit: cover;
        border-radius: 6px;
    }
    
    .book-info {
        text-align: center;
    }
    
    .book-title {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 8px;
        line-height: 1.3;
        color: #333;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .book-author {
        font-size: 12px;
        color: #666;
        margin-bottom: 8px;
    }
    
    .book-progress {
        font-size: 11px;
        color: #888;
        margin-bottom: 10px;
    }
    
    .book-actions {
        display: flex;
        gap: 5px;
        justify-content: center;
    }
    
    .btn-continue,
    .btn-remove,
    .btn-download {
        flex: 1;
        padding: 8px 10px;
        font-size: 12px;
        border-radius: 15px;
        min-height: 32px;
        text-align: center;
    }
    
    /* 空状态适配 */
    .empty-state {
        text-align: center;
        padding: 60px 20px;
    }
    
    .empty-icon {
        font-size: 48px;
        color: #ddd;
        margin-bottom: 20px;
    }
    
    .empty-title {
        font-size: 18px;
        color: #666;
        margin-bottom: 10px;
    }
    
    .empty-desc {
        font-size: 14px;
        color: #888;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .btn-browse {
        padding: 12px 25px;
        font-size: 16px;
        border-radius: 25px;
        min-height: 44px;
    }
    
    /* 加载状态适配 */
    .loading-state {
        text-align: center;
        padding: 40px 20px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        margin: 0 auto 20px;
    }
    
    .loading-text {
        font-size: 16px;
        color: #666;
    }
}

/* 小屏幕移动端优化 (480px以下) */
@media (max-width: 480px) {
    .bookshelf-main {
        padding: 10px 5px;
    }
    
    .bookshelf-container {
        padding: 15px 10px;
    }
    
    .batch-ops-bar {
        padding: 12px;
        gap: 12px;
    }
    
    .batch-ops-left {
        gap: 12px;
    }
    
    .batch-ops-right {
        gap: 8px;
    }
    
    .batch-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 36px;
    }
    
    .bookshelf-search {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    /* 单列布局 */
    .bookshelf-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .book-item {
        display: flex;
        padding: 12px;
        align-items: flex-start;
        gap: 12px;
    }
    
    .book-checkbox {
        position: relative;
        top: auto;
        left: auto;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .book-cover {
        width: 80px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .book-cover img {
        width: 80px;
        height: 100px;
        max-width: none;
    }
    
    .book-info {
        flex: 1;
        text-align: left;
    }
    
    .book-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .book-author {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .book-progress {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .book-actions {
        justify-content: flex-start;
        gap: 8px;
    }
    
    .btn-continue,
    .btn-remove,
    .btn-download {
        flex: none;
        padding: 6px 12px;
        font-size: 12px;
        min-height: 30px;
    }
    
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-icon {
        font-size: 40px;
    }
    
    .empty-title {
        font-size: 16px;
    }
    
    .empty-desc {
        font-size: 13px;
    }
    
    .btn-browse {
        padding: 10px 20px;
        font-size: 15px;
    }
}

/* 超小屏幕优化 (360px以下) */
@media (max-width: 360px) {
    .bookshelf-main {
        padding: 8px 3px;
    }
    
    .bookshelf-container {
        padding: 12px 8px;
    }
    
    .batch-ops-bar {
        padding: 10px;
    }
    
    .batch-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-height: 32px;
    }
    
    .book-item {
        padding: 10px;
        gap: 10px;
    }
    
    .book-cover {
        width: 70px;
    }
    
    .book-cover img {
        width: 70px;
        height: 90px;
    }
    
    .book-title {
        font-size: 14px;
    }
    
    .book-author {
        font-size: 12px;
    }
    
    .btn-continue,
    .btn-remove,
    .btn-download {
        padding: 5px 10px;
        font-size: 11px;
        min-height: 28px;
    }
    
    .empty-state {
        padding: 30px 10px;
    }
    
    .empty-icon {
        font-size: 36px;
    }
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .bookshelf-main {
        padding: 10px;
    }
    
    .bookshelf-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .empty-state {
        padding: 30px 20px;
    }
    
    .empty-icon {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .empty-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .empty-desc {
        font-size: 13px;
        margin-bottom: 15px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .book-item:hover {
        transform: none;
    }
    
    .book-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .batch-btn:hover,
    .btn-continue:hover,
    .btn-remove:hover,
    .btn-download:hover,
    .btn-browse:hover {
        transform: none;
    }
    
    .batch-btn:active,
    .btn-continue:active,
    .btn-remove:active,
    .btn-download:active,
    .btn-browse:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
} 