/**
 * 书单页面样式
 */

/* ==================== 页面头部 ==================== */
.booklist-hero {
    position: relative;
    margin: 4rem auto 3rem;
    padding: 4rem 0 3.5rem;
    color: #fff;
    overflow: hidden;
}

.booklist-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, rgba(19, 28, 61, 0.95), rgba(7, 10, 23, 0.95));
    box-shadow: 0 25px 80px rgba(8, 12, 32, 0.7);
}

.booklist-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-2xl);
    background: radial-gradient(circle at 15% 20%, rgba(242, 201, 76, 0.35), transparent 45%),
                radial-gradient(circle at 80% -10%, rgba(86, 204, 242, 0.4), transparent 55%);
    pointer-events: none;
}

.booklist-hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 960px;
}

.booklist-hero__kicker {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.booklist-hero__title {
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
}

.booklist-hero__description {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

/* 阅读统计 */
.reading-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 20px 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.75);
}

/* ==================== 筛选栏 ==================== */
.booklist-filter .filters-bar {
    margin: 30px 0;
    padding: 32px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.filter-groups {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.filter-group,
.sort-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: #475569;
    font-size: var(--text-sm);
    min-width: 48px;
    line-height: 2;
}

.filter-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) 1.1rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(47, 128, 237, 0.3);
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all var(--transition-base) ease;
    font-size: var(--text-sm);
    color: #475569;
    font-weight: 600;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(47, 128, 237, 0.25);
}

.filter-btn.active {
    background: linear-gradient(120deg, #2F80ED, #56CCF2);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(47, 128, 237, 0.2);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-left: auto;
}

/* 搜索框 */
.booklist-filter .search-box {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    min-width: 260px;
}

.booklist-filter .search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-sm);
    color: #0f172a;
}

.booklist-filter .search-input:focus {
}

.booklist-filter .search-icon {
    color: #94a3b8;
}

/* 排序选择器 */
.sort-select {
    padding: var(--space-sm) 2.5rem 0.5rem 1rem;
    border: 1px solid rgba(47, 128, 237, 0.25);
    border-radius: var(--radius-full);
    background: white;
    cursor: pointer;
    font-size: var(--text-sm);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sort-select:focus {
    border-color: #2F80ED;
}

/* ==================== 书籍分区 ==================== */
.book-section {
    margin-bottom: 50px;
}

.section-header {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #667eea;
}

.section-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.section-desc {
    font-size: var(--text-sm);
    color: #666;
}

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

/* ==================== 书籍卡片 ==================== */
.book-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all var(--transition-base) ease;
    display: flex;
    flex-direction: column;
}

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

/* 书籍封面 */
.book-cover-link {
    position: relative;
    display: block;
    padding-top: 140%; /* 封面比例 */
    background: #f5f5f5;
    overflow: hidden;
}

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

.book-card:hover .book-cover {
    transform: scale(1.05);
}

/* 状态徽章 */
.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.status-badge.reading {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

.status-badge.finished {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

.status-badge.wishlist {
    background: rgba(255, 152, 0, 0.9);
    color: white;
}

/* 书籍信息 */
.book-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-title-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.book-title-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.book-author {
    font-size: var(--text-sm);
    color: #666;
    margin-bottom: 12px;
}

/* 评分 */
.book-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    font-size: var(--text-base);
}

.rating-number {
    font-size: var(--text-sm);
    font-weight: 600;
    color: #FF9800;
}

/* 进度条 */
.progress-bar {
    position: relative;
    height: 8px;
    background: #e0e0e0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-xs);
    font-weight: 600;
    color: #333;
}

/* 简介 */
.book-summary {
    font-size: var(--text-sm);
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分类标签 */
.book-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.category-tag {
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-md);
}

/* 标签 */
.book-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    font-size: var(--text-xs);
    color: #999;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: var(--radius-md);
}

/* 操作按钮 */
.book-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.badge-review {
    font-size: var(--text-xs);
    padding: 4px 8px;
    background: #4CAF50;
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.btn-review,
.btn-douban {
    font-size: var(--text-sm);
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.btn-review:hover,
.btn-douban:hover {
    color: #764ba2;
}

/* 日期 */
.book-date {
    font-size: var(--text-xs);
    color: #999;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    color: #ddd;
    margin-bottom: 20px;
}

.empty-text {
    font-size: var(--text-lg);
    color: #999;
}

/* ==================== 页面底部 ==================== */
.page-footer {
    margin-top: 60px;
    padding: 40px 20px;
    background: #f9f9f9;
}

.footer-note {
    text-align: center;
    color: #666;
    line-height: 1.8;
}

.footer-note p {
    margin: 8px 0;
}

.footer-note strong {
    color: #4CAF50;
    font-weight: 600;
}

/* ==================== 加载状态 ==================== */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: var(--text-lg);
    color: #999;
}

.error {
    text-align: center;
    padding: 60px 20px;
    font-size: var(--text-lg);
    color: #f44336;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .booklist-hero__title {
        font-size: var(--text-3xl);
    }

    .reading-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: var(--text-2xl);
    }

    .booklist-filter .filters-bar {
        padding: 20px;
    }

    .filter-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group,
    .sort-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-label {
        min-width: auto;
    }

    .booklist-filter .search-box {
        width: 100%;
        max-width: none;
    }

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

    .section-title {
        font-size: var(--text-2xl);
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: 1fr;
    }

    .book-card {
        max-width: 100%;
    }
}

/* ==================== Modern Glass Overrides ==================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
}

.book-card,
.book-card-simple {
    border-radius: var(--radius-xl);
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.12);
    transition: transform 0.3s var(--transition-bounce, cubic-bezier(0.68, -0.55, 0.265, 1.55)), box-shadow 0.3s ease;
}

.book-card:hover,
.book-card-simple:hover {
    transform: translateY(-6px);
    box-shadow: 0 35px 70px rgba(15, 23, 42, 0.2);
}

.book-card .book-cover,
.book-card-simple .book-cover {
    border-radius: var(--radius-md);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.2);
}

.book-info,
.book-card .book-info {
    color: var(--text-secondary, #4a5568);
}

.book-rating .star {
    color: #F2C94C;
}

.page-footer {
    background: rgba(15, 23, 42, 0.03);
    border-radius: var(--radius-xl);
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

@media (max-width: 768px) {
    .booklist-filter .filters-bar {
        padding: 20px;
    }
}
