/* sort-filter.css - Auto-split from styles.css */

/* ========== 搜索结果排序筛选器样式 ========== */
.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 4px;
}

.sort-filter {
  position: relative;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #222;
  transition: all 0.2s ease;
}

.sort-btn:hover {
  border-color: #222;
}

.sort-btn.active {
  border-color: #222;
}

.sort-arrow {
  transition: transform 0.2s ease;
}

.sort-btn.active .sort-arrow {
  transform: rotate(180deg);
}

.sort-current {
  font-weight: 500;
}

.sort-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 100;
  display: none;
}

.sort-dropdown.show {
  display: block;
}

.sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #222;
  transition: background 0.15s ease;
}

.sort-item:hover {
  background: #f5f5f5;
}

.sort-item.active {
  font-weight: 600;
}

.sort-check {
  width: 18px;
  height: 18px;
  opacity: 0;
  fill: none;
}

.sort-item.active .sort-check {
  opacity: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .search-results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .sort-filter {
    align-self: flex-end;
  }
  
  .sort-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .sort-dropdown {
    min-width: 130px;
  }
  
  .sort-item {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ========== 热门搜索词样式 ========== */
.hot-keywords-section {
  margin: 60px 40px 30px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hot-keywords-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.hot-keywords-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.hot-keywords-time {
  font-size: 12px;
  color: #999;
}

.hot-keywords-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hot-keywords-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 30px;
}

.loading-spinner-small {
  width: 24px;
  height: 24px;
  border: 2px solid #f0f0f0;
  border-top-color: #222;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hot-keyword-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #fafafa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.hot-keyword-item:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.hot-keyword-item:active {
  transform: translateY(0);
}

.hot-keyword-rank {
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  margin-right: 10px;
  border-radius: 4px;
}

.hot-keyword-rank.top3 {
  background: #222;
  color: #fff;
}

.hot-keyword-rank:not(.top3) {
  color: #888;
}

.hot-keyword-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hot-keyword-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hot-keyword-title {
  font-size: 14px;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-keyword-subtitle {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-keyword-change {
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.hot-keyword-change.up {
  color: #f15746;
}

.hot-keyword-change.down {
  color: #41a0ff;
}

.hot-keyword-change.new {
  color: #f15746;
  font-weight: 600;
}

.hot-keyword-change.same {
  color: #999;
}

.hot-keywords-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

/* 响应式布局 */
@media (max-width: 1024px) {
  .hot-keywords-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hot-keywords-section {
    margin: 40px 16px 20px;
    padding: 16px;
  }
  
  .hot-keywords-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hot-keyword-item {
    padding: 8px 10px;
  }
  
  .hot-keyword-title {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .hot-keywords-list {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  
  .hot-keyword-rank {
    min-width: 20px;
    height: 20px;
    font-size: 12px;
    margin-right: 8px;
  }
  
  .hot-keyword-title {
    font-size: 12px;
  }
  
  .hot-keyword-change {
    font-size: 10px;
  }
}

  
 
 
 
