/**
 * 认准啦组件样式
 * 从内联样式提取到外部文件以优化文件大小
 */

/* ============================================
   认准啦热榜组件样式
   ============================================ */
.renzhunla-hot-list {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-top: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid #f0f0f0;
}

.widget-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e62828;
  display: flex;
  align-items: center;
  color: #333;
}

.widget-icon {
  margin-right: 8px;
  font-size: 20px;
  animation: flicker 2s ease-in-out infinite;
}

@keyframes flicker {
  0%,100% { opacity: 1; }
  50% { opacity: .6; }
}

.hot-list-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
}

.tab-btn.active {
  background: linear-gradient(135deg,#e62828 0%,#ff4444 100%);
  color: #fff;
  border-color: #e62828;
  box-shadow: 0 2px 6px rgba(230,40,40,.3);
}

.hot-list-loading,
.hot-list-error {
  text-align: center;
  padding: 20px 0;
  color: #666;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #e62828;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hot-list-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hot-list-item {
  display: block;
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: all .2s ease;
  border: 1px solid transparent;
  position: relative;
}

.hot-list-item:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(230,40,40,.1);
  border-color: #e62828;
  transform: translateY(-1px);
}

.item-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg,#e62828 0%,#ff4444 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(230,40,40,.3);
}

.item-rank.top3 {
  background: linear-gradient(135deg,#ffd700 0%,#ffed4e 100%);
  color: #333;
}

.item-content {
  padding-left: 32px;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.item-category {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.item-category.all {
  background: linear-gradient(135deg,#666 0%,#888 100%);
  color: #fff;
}

.item-category.shequ {
  background: linear-gradient(135deg,#51cf66 0%,#8ce99a 100%);
  color: #fff;
}

.item-category.pinpai {
  background: linear-gradient(135deg,#845ef7 0%,#a78bfa 100%);
  color: #fff;
}

.item-category.haojia {
  background: linear-gradient(135deg,#ff6b6b 0%,#ff8787 100%);
  color: #fff;
}

.item-category.haiwai {
  background: linear-gradient(135deg,#4dabf7 0%,#74c0fc 100%);
  color: #fff;
}

.item-category.quality-demand {
  background: linear-gradient(135deg,#fd7e14 0%,#ffa94d 100%);
  color: #fff;
}

.item-category.standard-crowdfunding {
  background: linear-gradient(135deg,#20c997 0%,#51cf9f 100%);
  color: #fff;
}

.item-category.store {
  background: linear-gradient(135deg,#f59f00 0%,#fbbf24 100%);
  color: #fff;
}

.item-badge {
  padding: 2px 6px;
  background: #fff3cd;
  color: #856404;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.item-badge.hot {
  background: #ffe5e5;
  color: #e62828;
}

.item-badge.new {
  background: #e3f2fd;
  color: #1976d2;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #999;
  flex-wrap: wrap;
}

.item-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-price {
  color: #e62828;
  font-weight: 700;
  font-size: 16px;
}

.item-views,
.item-comments,
.item-time {
  color: #999;
}

.item-mall,
.item-pinpai-category,
.item-store-category {
  color: #666;
  font-size: 11px;
  padding: 2px 6px;
  background: #f0f0f0;
  border-radius: 3px;
}

.item-discount {
  background: #e62828;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 11px;
}

.error-link {
  display: inline-block;
  margin-top: 12px;
  color: #e62828;
  text-decoration: none;
  font-weight: 600;
}

.error-link:hover {
  text-decoration: underline;
}

.widget-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.view-more-btn {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: linear-gradient(135deg,#e62828 0%,#ff4444 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: all .3s ease;
}

.view-more-btn:hover {
  background: linear-gradient(135deg,#cc0000 0%,#e62828 100%);
  box-shadow: 0 4px 12px rgba(230,40,40,.3);
  transform: translateY(-1px);
}

/* ============================================
   浮动回主站按钮样式
   ============================================ */
.float-back-home {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease,visibility .3s ease,transform .3s ease;
  transform: translateY(20px);
}

.float-back-home.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.float-back-home-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg,#e62828 0%,#ff4444 100%);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(230,40,40,.3);
  transition: all .3s ease;
  padding: 8px;
  cursor: pointer;
  animation: pulse 2s ease-in-out infinite;
}

.float-back-home-btn:hover {
  background: linear-gradient(135deg,#cc0000 0%,#e62828 100%);
  box-shadow: 0 6px 20px rgba(230,40,40,.5);
  transform: translateY(-2px);
  animation: none;
}

.float-back-home-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(230,40,40,.4);
}

.float-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
}

.float-text {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

@keyframes pulse {
  0%,100% {
    box-shadow: 0 4px 12px rgba(230,40,40,.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(230,40,40,.6),0 0 0 8px rgba(230,40,40,.1);
  }
}

/* ============================================
   暗黑模式适配
   ============================================ */
@media (prefers-color-scheme: dark) {
  .renzhunla-hot-list {
    background: #1a1a1a;
    border-color: #333;
  }
  
  .widget-title {
    color: #ddd;
    border-bottom-color: #ff4444;
  }
  
  .tab-btn {
    background: #2a2a2a;
    border-color: #404040;
    color: #aaa;
  }
  
  .tab-btn:hover {
    background: #333;
    border-color: #555;
  }
  
  .tab-btn.active {
    background: linear-gradient(135deg,#ff4444 0%,#ff6666 100%);
    color: #fff;
    border-color: #ff4444;
  }
  
  .hot-list-item {
    background: #222;
  }
  
  .hot-list-item:hover {
    background: #2a2a2a;
    border-color: #ff4444;
  }
  
  .item-title {
    color: #ddd;
  }
  
  .item-price {
    color: #ff6b6b;
  }
  
  .widget-footer {
    border-top-color: #333;
  }
  
  .float-back-home-btn {
    background: linear-gradient(135deg,#ff4444 0%,#ff6666 100%);
    box-shadow: 0 4px 12px rgba(255,68,68,.4);
  }
  
  .float-back-home-btn:hover {
    background: linear-gradient(135deg,#ff6666 0%,#ff8888 100%);
    box-shadow: 0 6px 20px rgba(255,68,68,.6);
  }
  
  @keyframes pulse {
    0%,100% {
      box-shadow: 0 4px 12px rgba(255,68,68,.4);
    }
    50% {
      box-shadow: 0 4px 20px rgba(255,68,68,.7),0 0 0 8px rgba(255,68,68,.15);
    }
  }
}

/* ============================================
   移动端适配
   ============================================ */
@media (max-width: 768px) {
  .renzhunla-hot-list {
    padding: 15px;
    margin-top: 20px;
  }
  
  .widget-title {
    font-size: 16px;
  }
  
  .hot-list-tabs {
    gap: 6px;
  }
  
  .tab-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
  
  .hot-list-item {
    padding: 10px;
  }
  
  .item-rank {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  
  .item-content {
    padding-left: 28px;
  }
  
  .item-title {
    font-size: 13px;
  }
  
  .item-meta {
    font-size: 11px;
  }
  
  .item-price {
    font-size: 14px;
  }
  
  .float-back-home {
    bottom: 60px;
    right: 15px;
  }
  
  .float-back-home-btn {
    width: 50px;
    height: 50px;
    border-radius: 10px;
  }
  
  .float-icon {
    width: 20px;
    height: 20px;
  }
  
  .float-text {
    font-size: 10px;
  }
}

