/* ==========================================================================
   轩玩聚集地 — 搜索页样式（v1，2026-10-17）
   文件：themes/wonderful/stylesheet/xw-search.css
   风格：与站点紫色主题（#5b4bd6）一致
   ========================================================================== */

.xw-search-page { padding-bottom: 40px; }

/* ---------------- 搜索框 ---------------- */
.xw-search-form { margin-bottom: 18px; }
.xw-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f6fa;
  border: 1px solid #e3e6ef;
  border-radius: 12px;
  padding: 6px 8px 6px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.xw-search-box:focus-within {
  border-color: #5b4bd6;
  box-shadow: 0 0 0 3px rgba(91, 75, 214, .12);
  background: #fff;
}
.xw-search-ico { width: 18px; height: 18px; color: #9aa0b0; flex: none; }
#xw-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #1c1e26;
  padding: 8px 0;
  min-width: 0;
}
#xw-search-input::placeholder { color: #a8adbb; }
.xw-search-go {
  flex: none;
  padding: 9px 22px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(120deg, #5b4bd6, #7a5cf0);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.xw-search-go:hover { opacity: .9; }

/* ---------------- 搜索历史 ---------------- */
.xw-history { margin-bottom: 14px; }
.xw-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.xw-history-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #6b6f80;
}
.xw-history-clear {
  font-size: 12px;
  color: #e8590c;
  cursor: pointer;
  user-select: none;
}
.xw-history-clear:hover { text-decoration: underline; }
.xw-history-list { display: flex; flex-wrap: wrap; gap: 8px; }
.xw-history-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  background: #f0f1f7;
  border-radius: 16px;
  font-size: 13px;
  color: #4a4d59;
  cursor: pointer;
  transition: background .15s;
}
.xw-history-item:hover { background: #e6e7f2; }
.xw-hi-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  color: #a8adbb;
  transition: background .15s, color .15s;
}
.xw-hi-del:hover { background: #d9dbe6; color: #e5453d; }

/* ---------------- 热搜榜 ---------------- */
.xw-hot { margin-bottom: 16px; }
.xw-hot-head {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #6b6f80;
  margin-bottom: 8px;
}
.xw-hot-head svg { color: #ff7a45; }
.xw-hot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.xw-hot-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid #e8eaf2;
  border-radius: 16px;
  font-size: 13px;
  color: #4a4d59;
  cursor: pointer;
  transition: all .15s;
}
.xw-hot-item:hover { border-color: #5b4bd6; color: #5b4bd6; }
.xw-hot-item em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #a8adbb;
}
.xw-hot-item.top em { color: #e8590c; }

/* ---------------- 筛选栏 ---------------- */
.xw-filters {
  border-top: 1px solid #eef0f6;
  padding-top: 14px;
  margin-bottom: 16px;
}
.xw-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.xw-filter-label {
  flex: none;
  width: 38px;
  padding-top: 6px;
  font-size: 12px;
  color: #9aa0b0;
  text-align: right;
}
.xw-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.xw-chips-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.xw-chips-scroll::-webkit-scrollbar { height: 4px; }
.xw-chips-scroll::-webkit-scrollbar-thumb { background: #d5d8e4; border-radius: 2px; }
.xw-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: #f5f6fa;
  border: 1px solid #e8eaf2;
  border-radius: 18px;
  font-size: 13px;
  color: #4a4d59;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: all .15s;
}
.xw-chip:hover { border-color: #c9c3f0; color: #5b4bd6; }
.xw-chip.on {
  background: linear-gradient(120deg, #5b4bd6, #7a5cf0);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* 作者筛选 */
.xw-author-wrap { display: flex; align-items: center; gap: 8px; flex: 1; }
#xw-author-input {
  flex: 1;
  max-width: 220px;
  padding: 7px 12px;
  border: 1px solid #e3e6ef;
  border-radius: 9px;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
#xw-author-input:focus { border-color: #5b4bd6; }
.xw-author-go {
  padding: 6px 14px;
  border-radius: 9px;
  background: #f0f1f7;
  font-size: 13px;
  color: #4a4d59;
  cursor: pointer;
  transition: all .15s;
}
.xw-author-go:hover { background: #5b4bd6; color: #fff; }
.xw-author-clear { font-size: 12px; color: #e8590c; cursor: pointer; }
.xw-author-clear:hover { text-decoration: underline; }

/* ---------------- 结果头 ---------------- */
.xw-result-head {
  font-size: 13px;
  color: #6b6f80;
  margin-bottom: 10px;
}
.xw-result-head b { color: #5b4bd6; font-size: 15px; }
.xw-result-head em { font-style: normal; color: #1c1e26; font-weight: 600; }

/* ---------------- 结果卡片 ---------------- */
.xw-results { display: flex; flex-direction: column; gap: 1px; }
.xw-card {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f1f7;
  transition: background .15s;
}
.xw-card:hover { background: #fafbff; }
.xw-card:last-child { border-bottom: none; }
.xw-card-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1c1e26;
  text-decoration: none;
  line-height: 1.45;
  margin-bottom: 6px;
}
.xw-card-title:hover { color: #5b4bd6; }
.xw-card-title mark {
  background: #fff3bf;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}
.xw-card-exc {
  font-size: 13px;
  color: #6b6f80;
  line-height: 1.6;
  margin-bottom: 9px;
  word-break: break-word;
}
.xw-card-exc mark {
  background: #fff3bf;
  color: #1c1e26;
  padding: 0 2px;
  border-radius: 2px;
}
.xw-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12px;
  color: #9aa0b0;
}
.xw-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #4a4d59;
}
.xw-user:hover { color: #5b4bd6; }
.xw-av, .xw-av img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}
.xw-av-ph {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(120deg, #5b4bd6, #7a5cf0);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.xw-dot { color: #d5d8e4; }
.xw-tags { display: inline-flex; gap: 6px; margin-left: 2px; }
.xw-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #1c1e26;
  background: #eef0f6;
  text-decoration: none;
}
.xw-tag:hover { color: #5b4bd6; }
.xw-tag-pay { background: #fff0e0; color: #e8590c; }
.xw-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: #eef0f6;
  color: #4a4d59;
}
.xw-badge-image { background: #e6f4ff; color: #1677ff; }
.xw-badge-video { background: #f0e8ff; color: #722ed1; }
.xw-badge-audio { background: #e8fff2; color: #16a34a; }
.xw-badge-file  { background: #fff7e6; color: #d46b08; }
.xw-stats { margin-left: auto; display: inline-flex; gap: 10px; }

/* ---------------- 状态 ---------------- */
.xw-loading {
  padding: 22px 0;
  text-align: center;
  font-size: 13px;
  color: #9aa0b0;
}
.xw-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border: 2px solid #d5d8e4;
  border-top-color: #5b4bd6;
  border-radius: 50%;
  animation: xw-spin .7s linear infinite;
  vertical-align: -2px;
}
@keyframes xw-spin { to { transform: rotate(360deg); } }

.xw-empty {
  padding: 46px 20px;
  text-align: center;
  color: #9aa0b0;
  font-size: 14px;
}
.xw-empty-ico {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #f0f1f7;
  color: #c5c9d6;
  font-size: 26px;
  font-weight: 700;
  line-height: 52px;
}
.xw-empty-t { font-size: 15px; color: #4a4d59; margin-bottom: 6px; }
.xw-empty-s { font-size: 13px; color: #a8adbb; }

.xw-loadmore-wrap { text-align: center; padding: 16px 0 0; }
#xw-loadmore {
  min-width: 160px;
  padding: 10px 0;
  border-radius: 10px;
}

/* ---------------- 旧 Tab 折叠区 ---------------- */
.xw-legacy-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 11px 14px;
  background: #f7f8fc;
  border-radius: 10px;
  font-size: 13px;
  color: #6b6f80;
  cursor: pointer;
  transition: background .15s;
}
.xw-legacy-toggle:hover { background: #f0f1f7; }
.xw-legacy { margin-top: 14px; }

/* ---------------- Toast ---------------- */
.xw-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  z-index: 100000;
  padding: 10px 18px;
  border-radius: 22px;
  background: rgba(20, 20, 28, .9);
  color: #fff;
  font-size: 13px;
  pointer-events: none;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 767px) {
  .xw-filter-row { flex-direction: column; gap: 6px; }
  .xw-filter-label { width: auto; text-align: left; padding-top: 0; }
  .xw-stats { margin-left: 0; width: 100%; margin-top: 4px; }
  .xw-search-go { padding: 9px 16px; }
  .xw-card { padding: 12px; }
}

/* ==========================================================================
 * v3 搜索增强（2026-10-31）
 * ① 输入联想下拉：搜索框正下方浮层，不挤占输入框
 * ========================================================================== */
.xw-search-box{position:relative}
.xw-ac-panel{
  position:absolute;top:100%;left:0;right:0;margin-top:6px;
  background:#fff;border:1.5px solid #332439;border-radius:12px;
  box-shadow:4px 4px 0 rgba(51,36,57,.85);
  z-index:1050;max-height:340px;overflow-y:auto;display:none}
.xw-ac-group{font-size:11px;font-weight:700;color:#8a7f88;padding:7px 12px 2px}
.xw-ac-item{display:flex;align-items:center;gap:8px;padding:8px 12px;cursor:pointer}
.xw-ac-item:hover{background:#FFE3EC}
.xw-ac-ava{width:28px;height:28px;border-radius:50%;object-fit:cover;flex-shrink:0;background:#f2e8ee}
.xw-ac-ico{font-size:16px;flex-shrink:0}
.xw-ac-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#332439}
.xw-ac-s{font-size:11px;color:#b09aa5;flex-shrink:0}
.xw-ac-panel-au{top:100%;left:0;right:0;margin-top:4px}

/* ② 已选条件条：单独移除 */
.xw-active-bar{margin-top:8px;display:flex;flex-wrap:wrap;gap:6px}
.xw-active-chip{
  display:inline-flex;align-items:center;gap:5px;
  background:#FFF0C8;border:1.5px solid #332439;border-radius:999px;
  padding:2px 5px 2px 10px;font-size:12px;font-weight:600;color:#332439}
.xw-active-chip em{
  cursor:pointer;width:18px;height:18px;line-height:16px;text-align:center;
  border-radius:50%;background:#332439;color:#fff;font-style:normal;font-size:12px;user-select:none}
.xw-active-chip em:hover{background:#D22B5E}

/* ③ 列表内原地过滤框 */
#xw-lf-box{
  display:flex;align-items:center;gap:8px;
  background:#fff;border:1.5px solid #332439;border-radius:12px;
  box-shadow:3px 3px 0 rgba(51,36,57,.8);
  padding:8px 12px;margin:10px 0}
#xw-lf-box svg{color:#8a7f88;flex-shrink:0}
#xw-lf-input{flex:1;min-width:0;border:none;outline:none;background:transparent;font-size:13px;color:#332439}
#xw-lf-input::placeholder{color:#b6aab2}
#xw-lf-count{font-size:12px;font-weight:700;color:#D22B5E;white-space:nowrap}
