/* 书籍页面专用样式 */

/* 页面头部 */
.page-header {
    background: linear-gradient(120deg, rgba(138, 20, 23, 0.95), rgba(179, 26, 29, 0.88));
    color: white;
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%),
                radial-gradient(circle at 75% 30%, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0) 55%);
    opacity: 0.9;
}

.page-title {
    font-size: 3.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    letter-spacing: 0.12em;
}

.page-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    letter-spacing: 0.06em;
}

.breadcrumb {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    padding: 0.6rem 1.8rem;
    border-radius: 999px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

/* 分类导航 */
.category-nav {
    background: #fff;
    padding: 2.2rem 0;
    border-bottom: 1px solid rgba(179, 26, 29, 0.12);
    position: sticky;
    top: 78px;
    z-index: 100;
    box-shadow: 0 18px 40px rgba(47, 28, 25, 0.08);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 12px 26px;
    border: 1px solid transparent;
    background: rgba(179, 26, 29, 0.08);
    color: var(--primary-dark);
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.category-tab:hover {
    background: rgba(179, 26, 29, 0.12);
    transform: translateY(-2px);
}

.category-tab.active {
    background: linear-gradient(135deg, rgba(138, 20, 23, 0.95), rgba(179, 26, 29, 0.85));
    color: white;
    box-shadow: 0 18px 35px rgba(179, 26, 29, 0.2);
}

/* 书籍展示区域 */
.books-section {
    padding: 4.5rem 0;
    background: var(--secondary-color);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 书籍卡片 */
.book-card {
    background: var(--surface-color);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.35s ease;
    position: relative;
    border: var(--card-border);
}

.book-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 32px 60px rgba(47, 28, 25, 0.2);
}

.book-card.hidden {
    display: none;
}

.book-cover {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, rgba(138, 20, 23, 0.92), rgba(179, 26, 29, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-image {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.book-icon {
    font-size: 2.5rem;
    color: white;
}

.book-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(179, 26, 29, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.book-info {
    padding: 2.2rem;
}

.book-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.book-subtitle {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.book-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--muted-text);
}

.book-year, .book-pages {
    background: rgba(179, 26, 29, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.book-description {
    color: var(--muted-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.book-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(179, 26, 29, 0.08);
    color: var(--primary-dark);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.book-actions {
    display: flex;
    gap: 1rem;
}

.btn-detail, .btn-quote {
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-detail {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
}

.btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(179, 26, 29, 0.28);
}

.btn-quote {
    background: rgba(179, 26, 29, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(179, 26, 29, 0.25);
}

.btn-quote:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    transform: translateY(-2px);
    border-color: transparent;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 26px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 35px 80px rgba(47, 28, 25, 0.25);
    border: 1px solid rgba(179, 26, 29, 0.12);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: rgba(47, 28, 25, 0.4);
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 2.4rem;
}

/* 书籍详情样式 */
.book-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.book-detail-cover {
    text-align: center;
}

.book-detail-image {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(138, 20, 23, 0.92), rgba(179, 26, 29, 0.85));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.book-detail-icon {
    font-size: 4rem;
    color: white;
}

.book-detail-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.book-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.meta-item {
    background: rgba(179, 26, 29, 0.08);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.book-detail-description h3 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.book-detail-description h3:first-child {
    margin-top: 0;
}

.book-detail-description p {
    color: var(--muted-text);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.book-detail-description ul {
    color: var(--muted-text);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.book-detail-description li {
    margin-bottom: 0.5rem;
}

/* 语录样式 */
.quote-detail {
    text-align: center;
}

.quote-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
}

.quotes-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quote-item {
    background: rgba(179, 26, 29, 0.08);
    padding: 2rem;
    border-radius: 18px;
    border-left: 4px solid var(--primary-color);
}

.quote-item blockquote {
    font-size: 1.3rem;
    color: var(--primary-dark);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.quote-item cite {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .category-tabs {
        gap: 0.5rem;
    }
    
    .category-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .book-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .book-detail-image {
        width: 120px;
        height: 120px;
    }
    
    .book-detail-icon {
        font-size: 3rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .book-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .category-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .book-info {
        padding: 1.5rem;
    }
    
    .book-title {
        font-size: 1.2rem;
    }
    
    .book-description {
        font-size: 0.9rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .book-detail-title {
        font-size: 1.5rem;
    }
}

/* 动画效果 */
.book-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.book-card:nth-child(1) { animation-delay: 0.1s; }
.book-card:nth-child(2) { animation-delay: 0.2s; }
.book-card:nth-child(3) { animation-delay: 0.3s; }
.book-card:nth-child(4) { animation-delay: 0.4s; }
.book-card:nth-child(5) { animation-delay: 0.5s; }
.book-card:nth-child(6) { animation-delay: 0.6s; }
.book-card:nth-child(7) { animation-delay: 0.7s; }
.book-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 