/* Book List Styles - Card Grid */
#book-list {
    max-width: 1200px;
    margin: 0 auto;
}

#book-list h2 {
    color: #333;
    font-weight: 600;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.book-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.book-cover {
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: #f5f5f5;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-title {
    padding: 12px;
    text-align: center;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .book-title {
        font-size: 13px;
        padding: 10px;
    }
}

/* Book Single Detail */
#book-single {
    max-width: 900px;
    margin: 0 auto;
}

.book-detail {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.book-cover-large {
    width: 300px;
    flex-shrink: 0;
}

.book-cover-large img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.book-info {
    flex: 1;
}

.book-info h1 {
    margin-bottom: 20px;
    color: #333;
}

.book-author {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
}

.book-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.book-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 24px;
}

.btn-download {
    padding: 12px 32px;
    font-size: 16px;
}

.book-content {
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.book-content h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #333;
}

@media (max-width: 768px) {
    .book-detail {
        flex-direction: column;
        align-items: center;
    }
    
    .book-cover-large {
        width: 200px;
    }
}

/* Book Catalog - Link Cards */
#book-detail {
    padding: 20px;
}

.catalog-section {
    margin-bottom: 30px;
}

.book-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.book-link-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 280px;
}

.book-link-card .book-link-info {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-top: none;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-link-cover {
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.book-link-cover .book-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    font-size: 11px;
    color: #fff;
    border-radius: 3px;
    z-index: 1;
}

.book-tag.免费 { background: #28a745; }
.book-tag.VIP免费 { background: #ffc107; color: #333; }
.book-tag.收费 { background: #dc3545; }

.book-link-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.book-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.book-link-cover {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f5f5;
}

.book-link-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-link-title {
    padding: 10px;
    text-align: center;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    background: #fff;
    transition: color 0.3s ease;
}

.book-link-card:hover .book-link-title {
    color: #007bff;
}

.book-link-desc {
    padding: 0 10px 10px;
    text-align: center;
    color: #666;
    font-size: 13px;
    background: #fff;
}

.book-link-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 10px 15px;
    background: #fff;
}

.link-btn {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    color: #007bff;
    text-decoration: none;
    border: 1px solid #007bff;
    border-radius: 3px;
}

.link-btn:hover {
    background: #007bff;
    color: #fff;
}
