/* Bookshelf Page - Magical Library */

.bookshelf-page {
    padding: 20px 0;
}

.bookshelf-header {
    text-align: center;
    border-bottom: 3px double var(--ink);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.bookshelf-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.bookshelf-header p {
    font-style: italic;
    color: var(--ink-faded);
}

/* Statistics Bar */
.bookshelf-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 15px 0;
    margin-bottom: 30px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--ink-faded);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Filter Tabs */
.bookshelf-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 20px;
    border: 1px solid var(--ink-faded);
    background: transparent;
    font-family: 'IM Fell English', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--ink);
    color: var(--paper);
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Book Card */
.book-card {
    position: relative;
    transition: transform 0.3s;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-cover {
    position: relative;
    padding-bottom: 140%;
    background: linear-gradient(135deg, var(--paper-dark) 0%, var(--paper) 100%);
    border: 2px solid var(--ink);
    overflow: hidden;
    box-shadow: 
        3px 3px 0 rgba(0,0,0,0.1),
        inset 0 0 20px rgba(139, 69, 19, 0.05);
}

.book-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    background: linear-gradient(90deg, 
        rgba(0,0,0,0.2) 0%,
        rgba(0,0,0,0.1) 50%,
        rgba(255,255,255,0.1) 100%
    );
    border-right: 1px solid rgba(0,0,0,0.1);
}

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

.book-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-author {
    font-size: 0.8rem;
    color: var(--ink-faded);
    margin-bottom: 8px;
}

.book-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
}

.book-rating {
    color: var(--gold);
}

.book-source {
    padding: 2px 6px;
    background: var(--paper-dark);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.book-source.douban {
    background: #007722;
    color: white;
}

.book-source.weread {
    background: #1aad19;
    color: white;
}

/* Reading Progress Bar */
.reading-progress {
    margin-top: 8px;
    height: 3px;
    background: var(--border-color);
    overflow: hidden;
}

.reading-progress-bar {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s;
}

/* Load More Button */
.load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    padding: 12px 30px;
    border: 2px solid var(--ink);
    background: transparent;
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--ink);
    color: var(--paper);
}

/* Empty State */
.bookshelf-empty {
    text-align: center;
    padding: 60px 20px;
}

.bookshelf-empty .icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.bookshelf-empty p {
    color: var(--ink-faded);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .bookshelf-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
}
