/* ===== 全部案例页面 ===== */
.portfolio-page-body {
    background: #0c0c1d;
    min-height: 100vh;
    color: white;
}

/* 导航 */
.portfolio-nav {
    background: rgba(12,12,29,0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0;
}
.portfolio-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.back-home-btn {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    transition: all 0.3s;
}
.back-home-btn:hover {
    color: white;
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* 页面标题 */
.portfolio-page-header {
    padding: 120px 0 40px;
    text-align: center;
}
.portfolio-page-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, #a0a0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.portfolio-page-header p {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
}

/* 筛选栏 */
.portfolio-page-filters {
    padding: 0 0 40px;
    text-align: center;
}
.pf-filter-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    padding: 8px 24px;
    margin: 0 6px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}
.pf-filter-btn:hover {
    border-color: rgba(255,255,255,0.4);
    color: white;
}
.pf-filter-btn.active {
    background: white;
    color: #0c0c1d;
    border-color: white;
    font-weight: 600;
}

/* ===== 书页式网格 ===== */
.portfolio-book-container {
    padding: 0 0 80px;
}
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
    perspective: 1200px;
}

/* 单张书页卡片 */
.book-card {
    position: relative;
    transition: opacity 0.4s, transform 0.4s;
}
.book-card-link {
    display: block;
    text-decoration: none;
    color: white;
    position: relative;
}

/* 封面 —— 书页效果 */
.book-card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 4px 12px 12px 4px;
    overflow: hidden;
    box-shadow:
        -4px 0 8px rgba(0,0,0,0.3),
        0 8px 24px rgba(0,0,0,0.4);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.5s ease;
}
.book-card:hover .book-card-cover {
    transform: rotateY(-15deg) scale(1.02);
    box-shadow:
        -8px 4px 16px rgba(0,0,0,0.4),
        0 12px 32px rgba(0,0,0,0.5);
}
.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 书脊 */
.book-card-spine {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0.05) 50%,
        rgba(0,0,0,0.2) 100%);
    border-right: 1px solid rgba(255,255,255,0.08);
}

/* 占位 */
.book-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a3e, #2a2a5e);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}
.book-card-placeholder span {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

/* 卡片信息 */
.book-card-info {
    padding: 16px 4px 8px;
}
.book-card-cat {
    display: inline-block;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.book-card-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-card-info p {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 二维码悬停弹出 */
.book-qr-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    z-index: 10;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    text-align: center;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.book-qr-popup img {
    width: 160px;
    height: 160px;
    border-radius: 8px;
    display: block;
    margin-bottom: 8px;
}
.book-qr-popup span {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}
.book-card:hover .book-qr-popup {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* 页脚 */
.portfolio-page-footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.portfolio-page-footer p {
    font-size: 13px;
    color: rgba(255,255,255,0.3);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .portfolio-page-header h1 { font-size: 28px; }
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .book-card-info h3 { font-size: 14px; }
    .pf-filter-btn { padding: 6px 16px; font-size: 13px; margin: 0 3px 8px; }
}
@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .book-card-cover { aspect-ratio: 2/3; }
}
