/* ============================================================
   搜索和书架样式
   ============================================================ */

/* 搜索筛选 */
.search-filter { background: #fff; border-bottom: 1px solid #e8e8e8; padding: 15px 0; }
.filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-size: 14px; color: #999; flex-shrink: 0; }
.filter-group { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-item { padding: 4px 14px; font-size: 13px; color: #666; border-radius: 15px; }
.filter-item:hover { background: #f5f5f5; }
.filter-item.active { background: #e65540; color: #fff; }

/* 搜索结果 */
.search-results { padding: 25px 0; min-height: 60vh; }
.search-header { margin-bottom: 20px; }
.search-header h2 { font-size: 18px; color: #333; }

.no-result { text-align: center; padding: 60px 0; }
.no-result p { font-size: 16px; color: #999; }
.no-result-tip { font-size: 14px; margin-top: 10px; }

.result-list { display: flex; flex-direction: column; gap: 15px; }
.result-item { display: flex; gap: 15px; background: #fff; padding: 20px; border-radius: 12px; transition: all 0.3s; }
.result-item:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.result-cover { width: 90px; height: 120px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #f5f5f5, #e0e0e0); display: flex; align-items: center; justify-content: center; position: relative; }
.result-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-cover .placeholder { font-size: 36px; opacity: 0.25; }
.result-info { flex: 1; }
.result-title { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.result-meta { display: flex; gap: 15px; margin-bottom: 8px; font-size: 13px; color: #999; }
.meta-item { white-space: nowrap; }
.result-intro { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-stats { display: flex; gap: 15px; font-size: 13px; color: #999; }

.search-welcome { text-align: center; padding: 40px 0; }
.search-welcome h2 { font-size: 24px; margin-bottom: 20px; }
.hot-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hot-word { padding: 8px 20px; background: #fff; border-radius: 20px; font-size: 14px; color: #666; transition: all 0.2s; }
.hot-word:hover { background: #fff0ed; color: #e65540; }

/* 搜索历史 */
.search-history { margin-bottom: 25px; }
.search-history .history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.search-history .history-label { font-size: 14px; color: #999; }
.search-history .history-clear { font-size: 13px; color: #999; text-decoration: none; }
.search-history .history-clear:hover { color: #e65540; }
.search-history .history-list { display: flex; flex-wrap: wrap; gap: 8px; }
.search-history .history-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; background: #fff; border-radius: 18px;
    font-size: 13px; color: #666; text-decoration: none; transition: all 0.2s;
}
.search-history .history-item:hover { background: #fff0ed; color: #e65540; }
.search-history .history-remove {
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #ccc; transition: all 0.2s;
}
.search-history .history-item:hover .history-remove { color: #e65540; }

/* 书架样式 */
.shelf-section { padding: 30px 0; }
.shelf-header { margin-bottom: 25px; }
.shelf-header h2 { font-size: 22px; }
.shelf-tabs { display: flex; gap: 15px; margin-bottom: 20px; }
.shelf-tab { padding: 8px 20px; font-size: 15px; color: #666; cursor: pointer; border-radius: 20px; }
.shelf-tab.active { background: #e65540; color: #fff; }

.shelf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shelf-card { background: #fff; border-radius: 12px; overflow: hidden; position: relative; transition: all 0.3s; }
.shelf-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.shelf-card .book-cover { padding-top: 133%; }
.shelf-card .book-info { padding: 12px; }
.shelf-card .book-title { font-size: 14px; }
.shelf-card .book-author { font-size: 12px; }
.shelf-card .book-intro { -webkit-line-clamp: 1; }
.shelf-progress { font-size: 12px; color: #999; margin-top: 5px; }
.shelf-remove { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; background: rgba(0,0,0,0.5); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.shelf-card:hover .shelf-remove { opacity: 1; }

/* 阅读历史 */
.history-section { margin-top: 30px; }
.history-list { display: flex; gap: 15px; overflow-x: auto; padding: 10px 0; }
.history-item { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 15px; border-radius: 10px; flex-shrink: 0; min-width: 200px; }
.history-item:hover { background: #fff0ed; }
.history-cover { width: 40px; height: 55px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #f0f0f0; }
.history-cover img { width: 100%; height: 100%; object-fit: cover; }
.history-info { flex: 1; min-width: 0; }
.history-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-chapter { font-size: 12px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 响应式 */
@media (max-width: 768px) {
    .result-item { flex-direction: column; }
    .result-cover { width: 100%; height: 150px; }
    .shelf-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .filter-row { flex-wrap: wrap; }
}
