/* 强制重置所有样式，确保优先级 */
.hot-topics-wrapper {
  all: initial !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.5 !important;
  color: #111827 !important;
  background-color: #f4f5f6 !important;
  display: block !important;
  width: 100% !important;
  min-height: 100vh !important;
  box-sizing: border-box !important;
}

.hot-topics-wrapper *,
.hot-topics-wrapper *::before,
.hot-topics-wrapper *::after {
  box-sizing: border-box !important;
}

.hot-topics-wrapper .ht-container {
  max-width: 64rem !important;
  margin: 0 auto !important;
  padding: 0 1rem !important;
}

.hot-topics-wrapper .ht-header {
  position: sticky !important;
  top: 0 !important;
  background-color: #f4f5f6 !important;
  border-bottom: 1px solid #e5e7eb !important;
  z-index: 999 !important;
  padding: 1rem 0 0.5rem 0 !important; /* 减少底部padding */
}

.hot-topics-wrapper .ht-header-content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 1rem !important;
}

.hot-topics-wrapper .ht-title {
  font-size: 1.5rem !important;
  font-weight: bold !important;
  color: #111827 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 刷新按钮样式 - 使用主题色 #7EAD9A */
.hot-topics-wrapper .ht-refresh-btn {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.6rem 1.2rem !important;
  background: linear-gradient(135deg, #7ead9a 0%, #6b9b87 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0.75rem !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: 0 2px 8px rgba(126, 173, 154, 0.3) !important;
}

.hot-topics-wrapper .ht-refresh-btn:hover {
  background: linear-gradient(135deg, #6b9b87 0%, #5a8a76 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(126, 173, 154, 0.4) !important;
}

.hot-topics-wrapper .ht-refresh-btn:active {
  transform: translateY(0) !important;
}

.hot-topics-wrapper .ht-refresh-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.hot-topics-wrapper .ht-refresh-icon {
  width: 1rem !important;
  height: 1rem !important;
  flex-shrink: 0 !important;
}

.hot-topics-wrapper .ht-refresh-icon.spinning {
  animation: ht-spin 1s linear infinite !important;
}

@keyframes ht-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 平台标签滑动容器 - 优化美观度，调整按钮位置 */
.hot-topics-wrapper .ht-platform-tabs-container {
  position: relative !important;
  margin-bottom: 0.5rem !important; /* 减少底部间距 */
  width: 100% !important;
  background: rgba(255, 255, 255, 0.8) !important;
  border-radius: 1rem !important;
  padding: 0.5rem 3.5rem !important; /* 增加左右padding为按钮留出空间 */
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(229, 231, 235, 0.5) !important;
}

/* 平台标签 - 单行滑动，更美观的设计 */
.hot-topics-wrapper .ht-platform-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 0.5rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth !important;
  padding: 0.25rem 0 !important; /* 移除左右padding */
  margin: 0 !important;
  white-space: nowrap !important;

  /* 隐藏滚动条 - 所有浏览器 */
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE and Edge */
}

.hot-topics-wrapper .ht-platform-tabs::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari, Opera */
  width: 0 !important;
  height: 0 !important;
}

.hot-topics-wrapper .ht-platform-tab {
  flex-shrink: 0 !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 0.75rem !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  background: rgba(255, 255, 255, 0.7) !important;
  color: #6b7280 !important;
  outline: none !important;
  min-width: auto !important;
  position: relative !important;
  overflow: hidden !important;
}

.hot-topics-wrapper .ht-platform-tab::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
  transition: left 0.5s ease !important;
}

.hot-topics-wrapper .ht-platform-tab:hover::before {
  left: 100% !important;
}

/* 激活状态的标签 - 使用主题色，更美观 */
.hot-topics-wrapper .ht-platform-tab.active {
  background: linear-gradient(135deg, #7ead9a 0%, #6b9b87 100%) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(126, 173, 154, 0.4) !important;
}

.hot-topics-wrapper .ht-platform-tab:not(.active):hover {
  background: rgba(126, 173, 154, 0.1) !important;
  color: #7ead9a !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(126, 173, 154, 0.2) !important;
}

/* 滑动按钮 - 置于最外侧，不遮挡导航 */
.hot-topics-wrapper .ht-scroll-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 2.5rem !important;
  height: 2.5rem !important;
  background: linear-gradient(135deg, #7ead9a 0%, #6b9b87 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  z-index: 10 !important;
  box-shadow: 0 4px 12px rgba(126, 173, 154, 0.3) !important;
  outline: none !important;
  backdrop-filter: blur(10px) !important;
}

.hot-topics-wrapper .ht-scroll-btn:hover {
  background: linear-gradient(135deg, #6b9b87 0%, #5a8a76 100%) !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 6px 16px rgba(126, 173, 154, 0.4) !important;
}

.hot-topics-wrapper .ht-scroll-btn:active {
  transform: translateY(-50%) scale(0.95) !important;
}

.hot-topics-wrapper .ht-scroll-btn.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: translateY(-50%) scale(0.8) !important;
}

/* 按钮置于最外侧 */
.hot-topics-wrapper .ht-scroll-btn-left {
  left: -0.75rem !important; /* 移到容器外侧 */
}

.hot-topics-wrapper .ht-scroll-btn-right {
  right: -0.75rem !important; /* 移到容器外侧 */
}

.hot-topics-wrapper .ht-scroll-btn svg {
  width: 1.2rem !important;
  height: 1.2rem !important;
  flex-shrink: 0 !important;
}

/* 更新时间 - 减少间距 */
.hot-topics-wrapper .ht-update-time {
  font-size: 0.75rem !important;
  color: #6b7280 !important;
  margin-top: 0.5rem !important; /* 减少顶部间距 */
  text-align: center !important;
  background: rgba(255, 255, 255, 0.6) !important;
  padding: 0.4rem 1rem !important;
  border-radius: 0.5rem !important;
  backdrop-filter: blur(5px) !important;
}

/* 内容区域 - 减少顶部间距 */
.hot-topics-wrapper .ht-content {
  padding: 0.5rem 0 1.5rem 0 !important; /* 减少顶部padding */
}

.hot-topics-wrapper .ht-loading {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3rem 0 !important;
  color: #6b7280 !important;
  font-size: 1rem !important;
}

.hot-topics-wrapper .ht-error {
  margin-bottom: 1rem !important;
  padding: 1rem !important;
  background-color: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  border-radius: 0.5rem !important;
  color: #991b1b !important;
  font-size: 0.875rem !important;
}

.hot-topics-wrapper .ht-error .ht-refresh-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  margin-top: 0.5rem !important;
}

.hot-topics-wrapper .ht-error .ht-refresh-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

/* 平台信息 - 完全去除，或者大幅减少间距 */
.hot-topics-wrapper .ht-platform-info {
  display: none !important; /* 完全隐藏平台信息区域 */
}

.hot-topics-wrapper .ht-platform-name {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #111827 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hot-topics-wrapper .ht-platform-meta {
  font-size: 0.8rem !important;
  color: #6b7280 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hot-topics-wrapper .ht-hot-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
}

/* 热榜条目 - 去掉白色背景，减小字体，适配主题 */
.hot-topics-wrapper .ht-hot-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 1rem !important;
  padding: 1rem 1.2rem !important;
  border-radius: 1rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(229, 231, 235, 0.2) !important;
  backdrop-filter: blur(5px) !important;
}

.hot-topics-wrapper .ht-hot-item:hover {
  background: rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(126, 173, 154, 0.3) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(126, 173, 154, 0.15) !important;
}

.hot-topics-wrapper .ht-hot-item:hover .ht-item-title {
  color: #7ead9a !important;
}

.hot-topics-wrapper .ht-hot-item:hover .ht-external-icon {
  opacity: 1 !important;
  color: #7ead9a !important;
}

.hot-topics-wrapper .ht-item-rank {
  flex-shrink: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.8rem !important;
  font-weight: bold !important;
  border-radius: 0.5rem !important;
}

.hot-topics-wrapper .ht-item-rank.top3 {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

.hot-topics-wrapper .ht-item-rank:not(.top3) {
  background: rgba(107, 114, 128, 0.1) !important;
  color: #6b7280 !important;
}

.hot-topics-wrapper .ht-item-content {
  flex: 1 !important;
  min-width: 0 !important;
}

/* 标题字体减小 */
.hot-topics-wrapper .ht-item-title {
  color: #374151 !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
  margin: 0 0 0.5rem 0 !important;
  padding: 0 !important;
  transition: color 0.3s ease !important;
}

.hot-topics-wrapper .ht-item-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.hot-topics-wrapper .ht-item-hot {
  font-size: 0.8rem !important;
  color: #7ead9a !important;
  font-weight: 500 !important;
}

.hot-topics-wrapper .ht-external-icon {
  width: 1rem !important;
  height: 1rem !important;
  color: #9ca3af !important;
  opacity: 0 !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
}

.hot-topics-wrapper .ht-no-data {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3rem 0 !important;
  color: #6b7280 !important;
  background: rgba(255, 255, 255, 0.3) !important;
  border-radius: 1rem !important;
  border: 1px solid rgba(229, 231, 235, 0.3) !important;
  font-size: 1rem !important;
  backdrop-filter: blur(10px) !important;
}

/* 调试样式 */
.ht-debug-info {
  background: rgba(255, 255, 255, 0.8) !important;
  padding: 10px !important;
  margin: 10px 0 !important;
  border-left: 4px solid #7ead9a !important;
  font-family: monospace !important;
  font-size: 12px !important;
  border-radius: 0.5rem !important;
  border: 1px solid rgba(229, 231, 235, 0.3) !important;
  color: #374151 !important;
  backdrop-filter: blur(5px) !important;
}

/* 响应式设计 - 优化不同尺寸 */

/* 大屏幕 (1200px+) */
@media (min-width: 1200px) {
  .hot-topics-wrapper .ht-container {
    max-width: 72rem !important;
  }

  .hot-topics-wrapper .ht-hot-item {
    padding: 1.2rem 1.5rem !important;
  }

  .hot-topics-wrapper .ht-item-title {
    font-size: 1rem !important;
  }
}

/* 中等屏幕 (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .hot-topics-wrapper .ht-container {
    padding: 0 1.5rem !important;
  }

  .hot-topics-wrapper .ht-platform-tabs-container {
    padding: 0.5rem 3rem !important;
  }

  .hot-topics-wrapper .ht-scroll-btn-left {
    left: -0.5rem !important;
  }

  .hot-topics-wrapper .ht-scroll-btn-right {
    right: -0.5rem !important;
  }
}

/* 小屏幕平板 (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .hot-topics-wrapper .ht-container {
    padding: 0 1rem !important;
  }

  .hot-topics-wrapper .ht-title {
    font-size: 1.3rem !important;
  }

  .hot-topics-wrapper .ht-platform-tabs-container {
    padding: 0.4rem 2.5rem !important;
  }

  .hot-topics-wrapper .ht-platform-tab {
    padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
  }

  .hot-topics-wrapper .ht-scroll-btn {
    width: 2rem !important;
    height: 2rem !important;
  }

  .hot-topics-wrapper .ht-scroll-btn svg {
    width: 1rem !important;
    height: 1rem !important;
  }

  .hot-topics-wrapper .ht-hot-item {
    padding: 0.8rem 1rem !important;
    gap: 0.8rem !important;
  }

  .hot-topics-wrapper .ht-item-title {
    font-size: 0.85rem !important;
  }

  .hot-topics-wrapper .ht-item-rank {
    width: 1.8rem !important;
    height: 1.8rem !important;
    font-size: 0.75rem !important;
  }
}

/* 手机端 (最大575px) */
@media (max-width: 575px) {
  .hot-topics-wrapper .ht-container {
    padding: 0 0.75rem !important;
  }

  .hot-topics-wrapper .ht-header {
    padding: 0.75rem 0 0.5rem 0 !important;
  }

  .hot-topics-wrapper .ht-header-content {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: stretch !important;
    margin-bottom: 0.75rem !important;
  }

  .hot-topics-wrapper .ht-title {
    text-align: center !important;
    font-size: 1.2rem !important;
  }

  .hot-topics-wrapper .ht-refresh-btn {
    align-self: center !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
  }

  .hot-topics-wrapper .ht-platform-tabs-container {
    padding: 0.4rem 2rem !important;
    margin-bottom: 0.4rem !important;
  }

  .hot-topics-wrapper .ht-platform-tab {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
    border-radius: 0.5rem !important;
  }

  .hot-topics-wrapper .ht-scroll-btn {
    width: 1.8rem !important;
    height: 1.8rem !important;
  }

  .hot-topics-wrapper .ht-scroll-btn-left {
    left: -0.4rem !important;
  }

  .hot-topics-wrapper .ht-scroll-btn-right {
    right: -0.4rem !important;
  }

  .hot-topics-wrapper .ht-scroll-btn svg {
    width: 0.9rem !important;
    height: 0.9rem !important;
  }

  .hot-topics-wrapper .ht-update-time {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.8rem !important;
    margin-top: 0.4rem !important;
  }

  .hot-topics-wrapper .ht-content {
    padding: 0.4rem 0 1rem 0 !important;
  }

  .hot-topics-wrapper .ht-hot-list {
    gap: 0.5rem !important;
  }

  .hot-topics-wrapper .ht-hot-item {
    padding: 0.7rem 0.8rem !important;
    gap: 0.7rem !important;
    border-radius: 0.8rem !important;
  }

  .hot-topics-wrapper .ht-item-title {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.4rem !important;
  }

  .hot-topics-wrapper .ht-item-rank {
    width: 1.6rem !important;
    height: 1.6rem !important;
    font-size: 0.7rem !important;
  }

  .hot-topics-wrapper .ht-item-hot {
    font-size: 0.7rem !important;
  }

  .hot-topics-wrapper .ht-external-icon {
    width: 0.9rem !important;
    height: 0.9rem !important;
  }

  .hot-topics-wrapper .ht-loading {
    padding: 2rem 0 !important;
    font-size: 0.9rem !important;
  }

  .hot-topics-wrapper .ht-no-data {
    padding: 2rem 0 !important;
    font-size: 0.9rem !important;
  }

  /* 调试信息在手机端缩小 */
  .ht-debug-info {
    font-size: 10px !important;
    padding: 8px !important;
  }
}

/* 超小屏幕 (最大360px) */
@media (max-width: 360px) {
  .hot-topics-wrapper .ht-container {
    padding: 0 0.5rem !important;
  }

  .hot-topics-wrapper .ht-platform-tabs-container {
    padding: 0.3rem 1.5rem !important;
  }

  .hot-topics-wrapper .ht-platform-tab {
    padding: 0.3rem 0.6rem !important;
    font-size: 0.7rem !important;
  }

  .hot-topics-wrapper .ht-hot-item {
    padding: 0.6rem !important;
    gap: 0.6rem !important;
  }

  .hot-topics-wrapper .ht-item-title {
    font-size: 0.75rem !important;
  }

  .hot-topics-wrapper .ht-item-rank {
    width: 1.4rem !important;
    height: 1.4rem !important;
    font-size: 0.65rem !important;
  }
}

/* 确保覆盖主题样式 */
.hot-topics-wrapper button {
  font-family: inherit !important;
}

.hot-topics-wrapper h1,
.hot-topics-wrapper h2,
.hot-topics-wrapper h3 {
  font-family: inherit !important;
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .hot-topics-wrapper .ht-header {
    padding: 0.5rem 0 0.3rem 0 !important;
  }

  .hot-topics-wrapper .ht-header-content {
    margin-bottom: 0.5rem !important;
  }

  .hot-topics-wrapper .ht-platform-tabs-container {
    margin-bottom: 0.3rem !important;
  }

  .hot-topics-wrapper .ht-update-time {
    margin-top: 0.3rem !important;
  }

  .hot-topics-wrapper .ht-content {
    padding: 0.3rem 0 0.8rem 0 !important;
  }

  .hot-topics-wrapper .ht-hot-item {
    padding: 0.6rem 0.8rem !important;
  }
}
