/* ========================================
   搜索页样式
   ======================================== */

/* 搜索头部 */
.search-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240, 250, 248, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
.search-input-wrap {
  flex: 1; display: flex; align-items: center;
  background: var(--bg-white); border-radius: 20px;
  padding: 0 14px; height: 38px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.search-input-wrap svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.search-page-input {
  flex: 1; height: 100%; padding: 0 8px;
  font-size: 14px; color: var(--text-primary);
}
.search-page-input::placeholder { color: var(--text-muted); }
.search-clear-btn {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-muted); color: #fff;
  display: none; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; flex-shrink: 0;
}
.search-clear-btn.show { display: flex; }
.search-cancel {
  font-size: 14px; color: var(--primary);
  white-space: nowrap; cursor: pointer;
}

/* 搜索前 */
.search-before { padding: 16px; }
.search-section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 500; color: var(--text-primary);
  margin-bottom: 12px;
}
.search-history-clear {
  font-size: 12px; color: var(--text-muted); font-weight: 400;
  cursor: pointer;
}
.search-history-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.search-history-tag {
  padding: 6px 14px; border-radius: 16px;
  background: var(--bg-white); font-size: 13px;
  color: var(--text-secondary); cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.search-history-tag:active { background: var(--primary-light); }

/* 热门分类入口 */
.search-hot-cats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.search-hot-cat {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 4px; border-radius: var(--radius-sm);
  background: var(--bg-white); cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.search-hot-cat:active { opacity: 0.7; }
.search-hot-cat-icon { font-size: 22px; margin-bottom: 4px; }
.search-hot-cat-name { font-size: 11px; color: var(--text-secondary); }

/* 搜索结果分类筛选 */
.search-cat-filter {
  display: flex; overflow-x: auto; gap: 0;
  padding: 8px 16px; border-bottom: 1px solid rgba(0,0,0,0.05);
  scrollbar-width: none;
}
.search-cat-filter::-webkit-scrollbar { display: none; }
.search-cat-item {
  flex-shrink: 0; padding: 6px 14px;
  font-size: 13px; color: var(--text-secondary);
  border-radius: 16px; cursor: pointer;
  white-space: nowrap; transition: all 0.2s;
}
.search-cat-item.active {
  background: var(--primary); color: var(--text-white);
}

/* 搜索结果列表（复用首页帖子卡片样式） */
.search-results { padding: 0 16px; }

/* 空结果 */
.search-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px; text-align: center;
}
.search-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.search-empty-text { font-size: 14px; color: var(--text-muted); }
