/* hot-keywords.css - 热门搜索词样式（从 styles.css 拆分） */

.hot-keywords-section {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px 0;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
}

.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;
  touch-action: pan-y;
}

.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;
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  -webkit-user-drag: none;
}

.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;
}

/* 热门搜索加载失败时显示，点击重试（微信等环境） */
.hot-keywords-retry {
  grid-column: 1 / -1;
  text-align: center;
  padding: 16px;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  background: #f5f5f5;
  border-radius: 8px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}
.hot-keywords-retry:hover {
  background: #eee;
  color: #222;
}

@media (max-width: 1024px) {
  .hot-keywords-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hot-keywords-section {
    margin: 10px 0 10px;
    padding: 10px 0;
  }

  .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;
  }
}
