/* ========================================
   排行榜样式
   ======================================== */

/* ---------- 页面头部 ---------- */
.lb-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  background: var(--bg-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-title {
  font-size: 18px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- 标签栏 ---------- */
.lb-tabs {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  padding: 12px 16px 0;
}

.lb-tab-bar {
  display: flex;
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 3px;
}

.lb-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.3s;
  position: relative;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
}

.lb-tab.active {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.lb-tab-indicator {
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  height: calc(100% - 6px);
  background: var(--bg-tertiary);
  border-radius: 10px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* ---------- 内容区 ---------- */
.lb-content {
  padding-top: 12px !important;
  min-height: 60vh;
}

.lb-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

/* ---------- 领奖台 ---------- */
.lb-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 20px 8px 24px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.04) 0%, transparent 100%);
  border-radius: var(--radius-lg);
}

.lb-podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 30%;
  max-width: 120px;
}

.lb-podium-item.rank-1 {
  order: 2;
  margin-bottom: 16px;
}

.lb-podium-item.rank-2 {
  order: 1;
}

.lb-podium-item.rank-3 {
  order: 3;
}

.lb-medal {
  font-size: 28px;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.lb-podium-item.rank-1 .lb-medal {
  font-size: 36px;
  animation: podiumFloat 3s ease-in-out infinite;
}

/* ---------- 头像 ---------- */
.lb-avatar-wrap {
  border-radius: 50%;
  padding: 3px;
  margin-bottom: 8px;
}

.lb-avatar-wrap.rank-1 {
  padding: 3px;
  background: linear-gradient(135deg, #ffd700, #ffaa00, #ffd700);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 0 0 40px rgba(255, 215, 0, 0.15);
  animation: glowGold 2.5s ease-in-out infinite;
}

.lb-avatar-wrap.rank-2 {
  padding: 2px;
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8, #c0c0c0);
  box-shadow: 0 0 14px rgba(192, 192, 192, 0.3);
}

.lb-avatar-wrap.rank-3 {
  padding: 2px;
  background: linear-gradient(135deg, #cd7f32, #e8a850, #cd7f32);
  box-shadow: 0 0 14px rgba(205, 127, 50, 0.3);
}

.lb-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
}

.lb-podium-item.rank-1 .lb-avatar {
  width: 64px;
  height: 64px;
  font-size: 24px;
  background: linear-gradient(135deg, #1a1500, #2a2000);
  color: #ffd700;
}

.lb-podium-item.rank-2 .lb-avatar {
  width: 52px;
  height: 52px;
  font-size: 20px;
  background: linear-gradient(135deg, #1a1a1a, #252525);
  color: #e0e0e0;
}

.lb-podium-item.rank-3 .lb-avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
  background: linear-gradient(135deg, #1a1208, #251a10);
  color: #e8a850;
}

/* ---------- 领奖台文字 ---------- */
.lb-podium-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-podium-profit {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ---------- 奖励标签 ---------- */
.lb-reward-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.lb-reward-tag.lb-reward-rank-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 170, 0, 0.15));
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.lb-reward-tag.lb-reward-rank-2 {
  background: rgba(192, 192, 192, 0.15);
  color: #d0d0d0;
  border: 1px solid rgba(192, 192, 192, 0.25);
}

.lb-reward-tag.lb-reward-rank-3 {
  background: rgba(205, 127, 50, 0.15);
  color: #e8a850;
  border: 1px solid rgba(205, 127, 50, 0.25);
}

.lb-reward-tag.lb-reward-done {
  background: rgba(0, 230, 118, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

/* ---------- 排行列表 ---------- */
.lb-list {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lb-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.lb-list-item:last-child {
  border-bottom: none;
}

.lb-list-item:active {
  background: var(--bg-tertiary);
}

.lb-list-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.lb-rank-num {
  width: 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-align: center;
  flex-shrink: 0;
}

.lb-list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-list-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-list-profit {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ---------- 邀请统计卡片 ---------- */
.lb-invite-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  border: 1px solid rgba(0, 212, 255, 0.1);
}

.lb-invite-stats-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.lb-invite-stats-num {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.lb-invite-stats-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ---------- 邀请列表 ---------- */
.lb-invite-list {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lb-invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lb-invite-item:last-child {
  border-bottom: none;
}

.lb-invite-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lb-invite-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-blue);
  flex-shrink: 0;
  border: 1px solid rgba(0, 212, 255, 0.15);
}

.lb-invite-info {
  min-width: 0;
}

.lb-invite-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.lb-invite-time {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.lb-invite-reward {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-success);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- 底部说明 ---------- */
.lb-footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 20px 0 8px;
}

/* ---------- 邀请按钮 ---------- */
.lb-invite-btn {
  margin-top: 20px;
}

/* ---------- 动画 ---------- */
@keyframes podiumFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes glowGold {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 0 0 40px rgba(255, 215, 0, 0.15); }
  50% { box-shadow: 0 0 28px rgba(255, 215, 0, 0.55), 0 0 56px rgba(255, 215, 0, 0.25); }
}
