/* ========================================
   小蜜阅读 - 现代化书城样式
   全新设计 - 2025版
   ======================================== */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

/* ==================== 现代化导航栏 ==================== */
.modern-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ==================== 书城容器 ==================== */
.bookstore-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
    min-height: calc(100vh - 200px);
}

/* ==================== 筛选侧边栏 ==================== */
.filter-sidebar {
    width: 260px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    height: fit-content;
    position: sticky;
    top: 100px;
    transition: all 0.3s ease;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.sidebar-header h3 i {
    color: #667eea;
    font-size: 1rem;
}

.clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-title {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-title i {
    color: #a0aec0;
    font-size: 0.85rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    padding: 6px 14px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1.4;
}

.filter-tag:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

.filter-tag.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.close-sidebar-mobile {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #f7fafc;
    border: none;
    border-radius: 50%;
    color: #718096;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-sidebar-mobile:hover {
    background: #e2e8f0;
    color: #2d3748;
}

/* ==================== 主内容区 ==================== */
.bookstore-main {
    flex: 1;
    min-width: 0;
}

.filter-toggle-btn-mobile {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    width: 100%;
    justify-content: center;
}

.filter-toggle-btn-mobile:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* ==================== 书籍网格 ==================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    min-height: 400px;
}

.book-card-store {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
}

.book-card-store:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.2);
}

.book-cover-store {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.book-cover-store img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.book-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.book-status-badge.completed {
    background: rgba(72, 187, 120, 0.9);
}

.book-status-badge.ongoing {
    background: rgba(66, 153, 225, 0.9);
}

.book-info-store {
    padding: 18px;
}

.book-title-store {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-author-store {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.book-author-store i {
    font-size: 0.75rem;
}

.book-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #edf2f7;
    color: #667eea;
    font-size: 0.75rem;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 500;
}

.book-stats-store {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #718096;
}

.book-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.book-stat-item i {
    color: #a0aec0;
    font-size: 0.8rem;
}

/* ==================== 加载状态 ==================== */
.books-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #718096;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    border: 5px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.books-loading p {
    font-size: 1.1rem;
    color: #a0aec0;
}

/* 空状态 */
.books-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.books-empty i {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.books-empty h3 {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 10px;
}

.books-empty p {
    color: #a0aec0;
    font-size: 1rem;
}

/* ==================== 分页器 ==================== */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    padding: 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #4a5568;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-number:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.page-number.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

@media (max-width: 992px) {
    .bookstore-container {
        flex-direction: column;
        padding: 15px;
    }

    .filter-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 320px;
        height: 100vh;
        z-index: 10000;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    .filter-sidebar.active {
        left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .close-sidebar-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-toggle-btn-mobile {
        display: inline-flex;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .book-info-store {
        padding: 12px;
    }

    .book-title-store {
        font-size: 0.95rem;
    }

    .pagination-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pagination-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .page-numbers {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .bookstore-container {
        padding: 10px;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .book-card-store {
        border-radius: 12px;
    }

    .book-info-store {
        padding: 10px;
    }

    .book-title-store {
        font-size: 0.9rem;
    }

    .book-stats-store {
        font-size: 0.75rem;
    }
}

/* ==================== 侧边栏遮罩层(移动端) ==================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

/* ==================== Footer 样式 ==================== */
.modern-footer {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    color: #e2e8f0;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.modern-footer .footer-section h4 {
    color: white;
}

.modern-footer .footer-section a {
    color: #cbd5e0;
}

.modern-footer .footer-section a:hover {
    color: #667eea;
}

