/* ══════════════════════════════════════════
   RANKING PAGE
══════════════════════════════════════════ */

.ranking-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  max-width: 1250px;
  padding-inline: 16px;
}

/* ── Title ── */
.ranking-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ranking-title-icon {
  font-size: 48px;
  color: var(--on-surface);
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
  flex-shrink: 0;
}

.ranking-title {
  font-size: 57px;
  line-height: 64px;
  font-weight: 500;
  color: var(--on-surface);
  letter-spacing: 0.25px;
}

.ranking-subtitle {
  font-size: 18px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--text-dim);
}

/* ── List ── */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 24px 40px;
}

/* ── Position ── */
.rank-position {
  width: auto;
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.25px;
  flex-shrink: 0;
}

.rank-position.pos-1     { color: #ffc300; }
.rank-position.pos-2     { color: #a593d4; }
.rank-position.pos-3     { color: #ff7700; }
.rank-position.pos-other { color: var(--text-dim); }

/* ── User block ── */
.rank-user {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.rank-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Info: name + points stacked ── */
.rank-info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.rank-name-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.rank-name {
  font-size: 22px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-name-cn {
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  color: var(--secondary-c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Points row: star + number ── */
.rank-points-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.rank-star {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.rank-star.podium  { font-size: 24px; color: var(--primary); }
.rank-star.regular { font-size: 20px; color: var(--on-surface-var); }

.rank-points {
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 1.2;
}

.rank-points.podium  { font-size: 22px; color: var(--primary); }
.rank-points.regular { font-size: 18px; color: var(--on-surface-var); }

/* ══════════════════════════════════════════
   MOBILE — ≤ 1100px
══════════════════════════════════════════ */
@media (max-width: 1100px) {

  .ranking-title { font-size: 32px; line-height: 52px; }
  .ranking-title-icon { font-size: 40px; }

  .ranking-row { padding: 16px 20px; gap: 16px; }

  .rank-position { font-size: 28px; width: auto; }

  .rank-avatar { width: 40px; height: 40px; }

  .rank-name { font-size: 18px; }

  .rank-star.podium,
  .rank-star.regular  { font-size: 18px; }

  .rank-points.podium,
  .rank-points.regular { font-size: 16px; }
}

@media (max-width: 480px) {

  .ranking-list { gap: 16px; }

  .ranking-row { padding: 14px 16px; gap: 12px; }

  .rank-position { font-size: 18px; width: auto; }

  .rank-name { font-size: 16px; }

  .rank-info {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2px;
  }
}
