/* 书籍封面占位符样式 - 优化版本 */
.book-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    box-sizing: border-box;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.12),
        0 1px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
}

.book-placeholder:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 颜色主题 - 更丰富的书籍风格渐变 */
.book-placeholder.theme-orange {
    background: linear-gradient(135deg, #FF8A50 0%, #FF6B35 60%, #E55A2B 100%);
}

.book-placeholder.theme-purple {
    background: linear-gradient(135deg, #B794F6 0%, #9F7AEA 60%, #805AD5 100%);
}

.book-placeholder.theme-green {
    background: linear-gradient(135deg, #68D391 0%, #48BB78 60%, #38A169 100%);
}

.book-placeholder.theme-blue {
    background: linear-gradient(135deg, #63B3ED 0%, #4299E1 60%, #3182CE 100%);
}

.book-placeholder.theme-teal {
    background: linear-gradient(135deg, #4FD1C7 0%, #38B2AC 60%, #2C7A7B 100%);
}

.book-placeholder.theme-indigo {
    background: linear-gradient(135deg, #7C3AED 0%, #6B46C1 60%, #553C9A 100%);
}

.book-placeholder.theme-pink {
    background: linear-gradient(135deg, #F687B3 0%, #ED64A6 60%, #D53F8C 100%);
}

.book-placeholder.theme-yellow {
    background: linear-gradient(135deg, #F6E05E 0%, #ECC94B 60%, #D69E2E 100%);
    color: #2D3748;
}

.book-placeholder.theme-red {
    background: linear-gradient(135deg, #FC8181 0%, #F56565 60%, #E53E3E 100%);
}

.book-placeholder.theme-cyan {
    background: linear-gradient(135deg, #76E4F7 0%, #0BC5EA 60%, #0086B3 100%);
    color: #2D3748;
}

/* 新增主题 */
.book-placeholder.theme-emerald {
    background: linear-gradient(135deg, #10B981 0%, #047857 60%, #065F46 100%);
}

.book-placeholder.theme-violet {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 60%, #6D28D9 100%);
}

.book-placeholder.theme-rose {
    background: linear-gradient(135deg, #FB7185 0%, #F43F5E 60%, #E11D48 100%);
}

.book-placeholder.theme-amber {
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 60%, #D97706 100%);
    color: #2D3748;
}

.book-placeholder.theme-slate {
    background: linear-gradient(135deg, #64748B 0%, #475569 60%, #334155 100%);
}

/* 装饰元素已删除，保持简洁设计 */

/* 顶部装饰条 */
.book-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(1px);
}

/* 书脊效果 */
.book-placeholder::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1px;
}

/* 书籍信息 */
.book-placeholder-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 24px 20px 20px 20px;
    margin-left: 0;
}

/* 首页和列表页占位符字体 */
.book-placeholder-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    word-break: break-word;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.98);
}

.book-placeholder-author {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    word-break: break-word;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.9);
}

/* 书籍详情页面占位符专用样式 */
.book-detail-placeholder .book-placeholder-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px 0;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    letter-spacing: 0.2px;
}

.book-detail-placeholder .book-placeholder-author {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    letter-spacing: 0.1px;
}

.book-detail-placeholder .book-placeholder-content {
    padding: 16px 12px 12px 12px;
    margin-left: 0;
}

/* 类型标签已删除，专注于书名和作者显示 */

/* 响应式调整 */
@media (max-width: 768px) {
    .book-placeholder-content {
        padding: 20px 16px 16px 16px;
        margin-left: 0;
    }
    
    .book-placeholder-title {
        font-size: 16px;
        margin-bottom: 10px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        letter-spacing: 0.2px;
    }
    
    .book-placeholder-author {
        font-size: 13px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        letter-spacing: 0.1px;
    }
    
    /* 详情页面在平板端优化 */
    .book-detail-placeholder .book-placeholder-title {
        font-size: 13px;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .book-detail-placeholder .book-placeholder-author {
        font-size: 11px;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .book-detail-placeholder .book-placeholder-content {
        padding: 14px 10px 10px 10px;
    }
    
    .book-placeholder::after {
        left: 6px;
        top: 10px;
        bottom: 10px;
        width: 1.5px;
    }
}

@media (max-width: 480px) {
    .book-placeholder-content {
        padding: 16px 12px 12px 12px;
        margin-left: 0;
    }
    
    .book-placeholder-title {
        font-size: 15px;
        margin-bottom: 8px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        letter-spacing: 0.1px;
    }
    
    .book-placeholder-author {
        font-size: 12px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        letter-spacing: 0.08px;
    }
    
    /* 详情页面在手机端优化 */
    .book-detail-placeholder .book-placeholder-title {
        font-size: 12px;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        letter-spacing: 0.05px;
    }
    
    .book-detail-placeholder .book-placeholder-author {
        font-size: 10px;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        letter-spacing: 0.03px;
    }
    
    .book-detail-placeholder .book-placeholder-content {
        padding: 12px 8px 8px 8px;
        margin-left: 0;
    }
    
    .book-placeholder::after {
        left: 4px;
        top: 8px;
        bottom: 8px;
        width: 1px;
    }
}

/* 加载动画 */
.book-placeholder-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.book-placeholder-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图片替换动画 */
.book-cover-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 占位符定位 - 不影响原有容器样式 */
.book-placeholder-wrapper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1 !important;
    pointer-events: none;
    display: none; /* 默认隐藏 */
}

.book-placeholder-wrapper.show {
    display: flex !important;
    pointer-events: auto;
}

/* 确保图片在占位符之上 */
.book-cover img,
.book-cover-container img {
    position: relative !important;
    z-index: 2 !important;
    transition: opacity 0.3s ease;
    display: block;
}

/* 图片加载失败时的状态 */
.book-cover img.placeholder-active,
.book-cover-container img.placeholder-active {
    opacity: 0 !important;
    pointer-events: none !important;
}
