/* 技术/商家 数据统计排行榜 */
.rank-hub {
  max-width: 1200px;
  margin: 0 auto 40px;
}

.rank-hub__hero {
  text-align: center;
  padding: 28px 16px 20px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff5f7 0%, #f5faff 55%, #f0fff4 100%);
  border-radius: 12px;
  border: 1px solid #f0e6ea;
}

.rank-hub__hero h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  color: #333;
}

.rank-hub__hero p {
  margin: 0;
  color: #888;
  font-size: 14px;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 991px) {
  .rank-grid {
    grid-template-columns: 1fr;
  }
}

.rank-board {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.rank-board__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #f5f5f5;
  flex-wrap: wrap;
}

.rank-board__tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.rank-board__tag--tech {
  background: #fff0f2;
  color: #e84a5f;
}

.rank-board__tag--seller {
  background: #eef4ff;
  color: #3a7afe;
}

.rank-board__tag--bond {
  background: #fff8e6;
  color: #c9920a;
}

.rank-section-title {
  margin: 20px 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #555;
}

.rank-section-title:first-of-type {
  margin-top: 0;
}

.rank-board__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.rank-board__icon--amount { background: linear-gradient(135deg, #e84a5f, #ff8a65); }
.rank-board__icon--count  { background: linear-gradient(135deg, #3a7afe, #5cadff); }
.rank-board__icon--bond   { background: linear-gradient(135deg, #f5a623, #ffd54f); }
.rank-board__icon--good   { background: linear-gradient(135deg, #28a745, #5dd879); }
.rank-board__icon--bad    { background: linear-gradient(135deg, #6c757d, #adb5bd); }

.rank-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  transition: background 0.15s;
}

.rank-item:hover {
  background: #fafafa;
}

.rank-item + .rank-item {
  border-top: 1px solid #f8f8f8;
}

.rank-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f0f0f0;
  color: #888;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #ffd700, #ffb300); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); color: #fff; }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }

.rank-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: #333;
}

.rank-user:hover {
  color: #e84a5f;
}

.rank-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  background: #f5f5f5;
}

.rank-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ccc;
  background: #f8f8f8;
}

.rank-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-metric {
  font-size: 14px;
  font-weight: 700;
  color: #e84a5f;
  white-space: nowrap;
  flex-shrink: 0;
}

.rank-metric--blue { color: #3a7afe; }
.rank-metric--gold { color: #f5a623; }
.rank-metric--green { color: #28a745; }
.rank-metric--gray { color: #6c757d; }

.rank-empty {
  padding: 24px 16px;
  text-align: center;
  color: #bbb;
  font-size: 14px;
}

/* 个人详情页（嵌入会员中心布局） */
.mc-profile-page .rank-stat-grid {
  margin-bottom: 8px;
}

.rank-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 767px) {
  .rank-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.rank-stat-card {
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid transparent;
}

.rank-stat-card__label {
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
}

.rank-stat-card__icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.rank-stat-card__value {
  font-size: 22px;
  font-weight: 700;
}

.rank-stat-card--pink  { background: #fff5f7; border-color: #f5d6db; color: #e84a5f; }
.rank-stat-card--blue  { background: #f5faff; border-color: #d0e8ff; color: #3a7afe; }
.rank-stat-card--green { background: #f0fff4; border-color: #d4edda; color: #28a745; }
.rank-stat-card--red   { background: #fff5f5; border-color: #f5c6cb; color: #dc3545; }
.rank-stat-card--gold  { background: #fffbf0; border-color: #ffe8a3; color: #f5a623; }

.rank-review {
  border-bottom: 1px solid #f0f0f0;
  padding: 14px 0;
}

.rank-review:last-child {
  border-bottom: none;
}

.rank-review__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.rank-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: #888;
  text-decoration: none;
  font-size: 14px;
}

.rank-back:hover {
  color: #e84a5f;
}

/* ========== 右侧悬浮排行 ========== */
.rank-float {
  position: fixed;
  top: 70px;
  right: 0;
  bottom: 24px;
  z-index: 1040;
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  pointer-events: none;
  font-size: 13px;
}

.rank-float__tab,
.rank-float__panel {
  pointer-events: auto;
}

.rank-float__tab {
  width: 44px;
  min-height: 120px;
  border: none;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #e84a5f, #ff6b81);
  color: #fff;
  box-shadow: -4px 2px 16px rgba(232, 74, 95, 0.35);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  flex-shrink: 0;
  align-self: center;
}

.rank-float__tab i {
  font-size: 18px;
}

.rank-float__tab-text {
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
}

.rank-float__panel {
  width: 0;
  overflow: hidden;
  opacity: 0;
  background: #fff;
  border-radius: 12px 0 0 12px;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #eee;
  border-right: none;
  display: flex;
  flex-direction: column;
  transition: width 0.28s ease, opacity 0.22s ease;
}

.rank-float.is-open .rank-float__panel {
  width: min(320px, calc(100vw - 56px));
  opacity: 1;
}

.rank-float__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: linear-gradient(135deg, #fff5f7, #f5faff);
}

.rank-float__title {
  font-weight: 700;
  font-size: 15px;
  color: #333;
}

.rank-float__close {
  border: none;
  background: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #999;
  cursor: pointer;
  line-height: 28px;
  padding: 0;
}

.rank-float__close:hover {
  color: #e84a5f;
}

.rank-float__body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
}

.rank-float__section {
  min-width: 0;
}

.rank-float__section + .rank-float__section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

@media (max-width: 720px) {
  .rank-float.is-open .rank-float__panel {
    width: min(226px, calc(100vw - 56px));
  }

  .rank-float__body {
    grid-template-columns: 1fr;
  }
}

.rank-float__foot {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 11px;
  text-align: center;
  border-top: 1px solid #f5f5f5;
  background: #fafafa;
}

.rank-float .rank-board--compact {
  margin-bottom: 8px;
  box-shadow: none;
}

.rank-float .rank-board--compact:last-child {
  margin-bottom: 0;
}

.rank-float .rank-board__head {
  padding: 6px 8px;
  font-size: 12px;
}

.rank-float .rank-board__icon {
  width: 22px;
  height: 22px;
  font-size: 11px;
  border-radius: 6px;
}

.rank-float .rank-item {
  padding: 4px 6px;
  gap: 5px;
}

.rank-float .rank-num {
  width: 18px;
  height: 18px;
  font-size: 10px;
  border-radius: 5px;
}

.rank-float .rank-avatar {
  width: 22px;
  height: 22px;
}

.rank-float .rank-avatar--placeholder {
  font-size: 14px;
}

.rank-float .rank-name {
  font-size: 12px;
  max-width: 90px;
}

.rank-float .rank-metric {
  font-size: 12px;
}

.rank-float .rank-empty {
  padding: 10px;
  font-size: 12px;
}

body.has-rank-float.is-open .content {
  padding-right: 0;
}

@media (max-width: 767px) {
  .rank-float {
    top: auto;
    bottom: 0;
    left: 0;
    flex-direction: column-reverse;
    align-items: flex-end;
  }

  .rank-float__tab {
    width: auto;
    min-height: 0;
    flex-direction: row;
    border-radius: 10px 10px 0 0;
    padding: 8px 16px;
    align-self: flex-end;
    margin-right: 12px;
  }

  .rank-float__tab-text {
    writing-mode: horizontal-tb;
  }

  .rank-float__panel {
    border-radius: 12px 12px 0 0;
    border: 1px solid #eee;
    border-bottom: none;
    max-height: 70vh;
  }

  .rank-float.is-open .rank-float__panel {
    width: 100vw;
  }
}
