/* ====================================
   西梅故事 - 书架页面全新设计
   现代化、卡片式、网格布局
   ==================================== */

/* ==================== 主内容区域 ==================== */
.main-content {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%) !important;
    padding: 40px 0 80px !important;
    min-height: calc(100vh - 200px) !important;
}

.main-content .container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* ==================== 书架容器 ==================== */
.bookshelf,
#bookshelf {
    min-height: auto !important;
    margin-top: 0 !important;
}

/* ==================== 空书架状态 - 现代化设计 ==================== */
.empty-bookshelf {
    background: #fff !important;
    border-radius: 24px !important;
    padding: 80px 40px !important;
    text-align: center !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #f0f0f0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 500px !important;
}

.empty-bookshelf .empty-icon {
    width: 140px !important;
    height: 140px !important;
    margin: 0 auto 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d9 100%) !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 24px rgba(255, 102, 0, 0.15) !important;
    animation: none !important;
}

.empty-bookshelf .empty-icon i {
    font-size: 60px !important;
    color: #ff6600 !important;
}

.empty-bookshelf p {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 12px !important;
}

.empty-bookshelf .login-tip {
    font-size: 15px !important;
    color: #999 !important;
    margin-bottom: 35px !important;
}

.empty-bookshelf .button-container {
    display: flex !important;
    gap: 15px !important;
    justify-content: center !important;
    align-items: center !important;
}

.empty-bookshelf .login-btn,
.empty-bookshelf .explore-link,
.empty-bookshelf a.login-btn,
.empty-bookshelf a.explore-link {
    padding: 14px 32px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    background: linear-gradient(135deg, #ff6600 0%, #ff8833 100%) !important;
    background-color: #ff6600 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(255, 102, 0, 0.25) !important;
    line-height: 1.5 !important;
    text-align: center !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    min-width: 140px !important;
    height: auto !important;
    min-height: 48px !important;
    white-space: nowrap !important;
}

.empty-bookshelf .login-btn:hover,
.empty-bookshelf .explore-link:hover,
.empty-bookshelf a.login-btn:hover,
.empty-bookshelf a.explore-link:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(255, 102, 0, 0.35) !important;
    background: linear-gradient(135deg, #ff7711 0%, #ff9944 100%) !important;
}

/* ==================== 书架网格布局 ==================== */
.bookshelf.has-books,
#bookshelf.has-books {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 25px !important;
}

/* 书架标题区域 */
.bookshelf-header {
    grid-column: 1 / -1 !important;
    background: #fff !important;
    border-radius: 20px !important;
    padding: 30px 40px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #f0f0f0 !important;
    text-align: center !important;
}

.bookshelf-header h2 {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin: 0 0 8px 0 !important;
    background: linear-gradient(135deg, #ff6600 0%, #ff8833 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.bookshelf-header p {
    font-size: 14px !important;
    color: #999 !important;
    margin: 0 !important;
}

/* ==================== 书籍卡片 - 与书城统一 ==================== */
.book-item,
.bookshelf .book-item {
    background: #fff !important;
    border-radius: 16px !important;
    overflow: visible !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
    padding: 0 !important;
    gap: 0 !important;
    align-items: stretch !important;
}

.book-item:hover,
.bookshelf .book-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 32px rgba(255, 102, 0, 0.15) !important;
    border-color: #ff6600 !important;
}

/* 书籍封面 */
.book-item .book-cover,
.bookshelf .book-item .book-cover {
    position: relative !important;
    width: 100% !important;
    height: 280px !important;
    overflow: hidden !important;
    background: #f5f5f5 !important;
    flex-shrink: 0 !important;
}

.book-item .book-cover img,
.bookshelf .book-item .book-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
}

.book-item:hover .book-cover img {
    transform: scale(1.05) !important;
}

/* 阅读进度条 */
.book-item .reading-progress,
.bookshelf .book-item .reading-progress {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
}

.book-item .reading-progress .progress-bar,
.bookshelf .book-item .reading-progress .progress-bar {
    height: 100% !important;
    background: linear-gradient(to right, #ff6600 0%, #ff8833 100%) !important;
    transition: width 0.3s ease !important;
}

/* 书籍信息 */
.book-item .book-info,
.bookshelf .book-item .book-info {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    flex: 1 !important;
    overflow: visible !important;
}

.book-item .book-title,
.bookshelf .book-item .book-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    display: block !important;
    overflow: visible !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    transition: color 0.3s ease !important;
}

.book-item:hover .book-title {
    color: #ff6600 !important;
}

.book-item .book-author,
.bookshelf .book-item .book-author {
    font-size: 13px !important;
    color: #999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
}

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

.book-item .book-description,
.bookshelf .book-item .book-description {
    font-size: 13px !important;
    color: #666 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.book-item .book-stats,
.bookshelf .book-item .book-stats {
    display: flex !important;
    gap: 16px !important;
    font-size: 12px !important;
    color: #999 !important;
    padding-top: 8px !important;
    border-top: 1px solid #f5f5f5 !important;
    margin-top: auto !important;
}

.book-item .book-stats span {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.book-item .book-stats .updated::before {
    content: '🕒' !important;
}

.book-item .book-stats .chapter::before {
    content: '📖' !important;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .bookshelf.has-books,
    #bookshelf.has-books {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
        gap: 20px !important;
    }
}

@media (max-width: 992px) {
    .empty-bookshelf {
        padding: 60px 30px !important;
        min-height: 400px !important;
    }
    
    .bookshelf.has-books,
    #bookshelf.has-books {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 18px !important;
    }
    
    .book-item .book-cover,
    .bookshelf .book-item .book-cover {
        height: 240px !important;
    }
}

@media (max-width: 768px) {
    .empty-bookshelf {
        padding: 50px 25px !important;
        border-radius: 20px !important;
    }
    
    .empty-bookshelf .empty-icon {
        width: 100px !important;
        height: 100px !important;
        margin-bottom: 20px !important;
    }
    
    .empty-bookshelf .empty-icon i {
        font-size: 45px !important;
    }
    
    .empty-bookshelf p {
        font-size: 16px !important;
    }
    
    .empty-bookshelf .button-container {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 300px !important;
    }
    
    .bookshelf.has-books,
    #bookshelf.has-books {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    
    .book-item .book-cover,
    .bookshelf .book-item .book-cover {
        height: 220px !important;
    }
}

@media (max-width: 576px) {
    .empty-bookshelf {
        padding: 40px 20px !important;
    }
    
    .bookshelf.has-books,
    #bookshelf.has-books {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .book-item .book-cover,
    .bookshelf .book-item .book-cover {
        height: 200px !important;
    }
    
    .book-item .book-info,
    .bookshelf .book-item .book-info {
        padding: 14px !important;
        gap: 8px !important;
    }
    
    .book-item .book-title,
    .bookshelf .book-item .book-title {
        font-size: 15px !important;
    }
}

