page {
  background: #ffe566;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
}

.rank-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #ffe566 0%, #ffe566 420rpx, #fff8dc 520rpx, #ffffff 620rpx);
}

/* ========== 顶区 ========== */
.header-zone {
  position: relative;
  z-index: 10;
  padding-bottom: 8rpx;
}

.role-tabs {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  margin: 0 0 0;
  padding: 0 8rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}

.role-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24rpx 0 18rpx;
  position: relative;
}

.role-tab-text {
  font-size: 28rpx;
  color: #666666;
  line-height: 1.2;
}

.role-tab.active .role-tab-text {
  color: #1a1a1a;
  font-weight: 700;
  font-size: 30rpx;
}

.role-tab-line {
  position: absolute;
  bottom: 8rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 48rpx;
  height: 6rpx;
  border-radius: 6rpx;
  background: #3d2914;
}

.date-scroll {
  width: 100%;
  white-space: nowrap;
  padding: 20rpx 0 8rpx;
}

.date-line {
  display: inline-flex;
  padding: 0 20rpx;
  gap: 8rpx;
}

.date-tab {
  display: inline-block;
  padding: 10rpx 22rpx;
  font-size: 26rpx;
  color: rgba(0, 0, 0, 0.45);
  border-radius: 8rpx;
}

.date-tab.active {
  color: #1a1a1a;
  font-weight: 700;
  position: relative;
}

.date-tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 36rpx;
  height: 4rpx;
  border-radius: 4rpx;
  background: #3d2914;
}

.scope-row {
  display: flex;
  align-items: center;
  gap: 12rpx;
  padding: 8rpx 24rpx 12rpx;
}

.scope-tab {
  padding: 8rpx 20rpx;
  border-radius: 999rpx;
  font-size: 22rpx;
  color: rgba(0, 0, 0, 0.55);
  background: rgba(255, 255, 255, 0.55);
  border: 1rpx solid rgba(0, 0, 0, 0.06);
}

.scope-tab.active {
  color: #1a1a1a;
  font-weight: 600;
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

.refresh-btn {
  margin-left: auto;
  width: 56rpx;
  height: 56rpx;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.refresh-ico {
  width: 28rpx;
  height: 28rpx;
  opacity: 0.65;
}

.reward-banner {
  margin: 0 24rpx 12rpx;
  padding: 18rpx 22rpx;
  border-radius: 16rpx;
  background: rgba(255, 255, 255, 0.85);
  border: 1rpx solid rgba(255, 193, 7, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reward-banner-main {
  display: flex;
  flex-direction: column;
  gap: 4rpx;
}

.reward-tag { font-size: 26rpx; font-weight: 600; color: #d48806; }
.reward-club { font-size: 22rpx; color: #666; }
.reward-status { font-size: 22rpx; color: #999; }
.reward-status.pending { color: #52c41a; font-weight: 600; }
.reward-status.claimed { color: #8c8c8c; }
.reward-link { font-size: 24rpx; color: #d48806; }

/* ========== 状态 ========== */
.state-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120rpx 0;
  color: rgba(0, 0, 0, 0.45);
  font-size: 28rpx;
}

.loader {
  width: 48rpx;
  height: 48rpx;
  border: 3rpx solid rgba(0, 0, 0, 0.08);
  border-top-color: #ffb800;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 20rpx;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-img {
  width: 160rpx;
  height: 160rpx;
  margin-bottom: 20rpx;
  opacity: 0.5;
}

/* ========== 滚动区 ========== */
.body-scroll {
  height: calc(100vh - 280rpx);
}

/* ========== 领奖台 ========== */
.podium-zone {
  padding: 16rpx 16rpx 0;
}

.podium-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6rpx;
}

.podium-col {
  flex: 1;
  max-width: 230rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.col-1 {
  max-width: 260rpx;
  margin-bottom: 10rpx;
}

.crown {
  font-size: 28rpx;
  line-height: 1;
  margin-bottom: 6rpx;
  filter: drop-shadow(0 2rpx 4rpx rgba(0, 0, 0, 0.15));
}

.col-1 .crown {
  font-size: 34rpx;
}

.avatar-ring {
  border-radius: 50%;
  padding: 6rpx;
  margin-bottom: 10rpx;
  background: #ffffff;
}

.ring-gold {
  padding: 8rpx;
  box-shadow: 0 0 0 4rpx #ffd700, 0 8rpx 20rpx rgba(255, 183, 0, 0.35);
}

.ring-silver {
  box-shadow: 0 0 0 4rpx #b8c4d4, 0 6rpx 16rpx rgba(120, 140, 180, 0.25);
}

.ring-bronze {
  box-shadow: 0 0 0 4rpx #cd9a5a, 0 6rpx 16rpx rgba(205, 127, 50, 0.25);
}

.p-avatar {
  width: 96rpx;
  height: 96rpx;
  border-radius: 50%;
  display: block;
  background: #f0f0f0;
}

.p-avatar-lg {
  width: 116rpx;
  height: 116rpx;
}

.p-name {
  font-size: 26rpx;
  font-weight: 600;
  color: #1a1a1a;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  margin-bottom: 8rpx;
}

.p-name-lg {
  font-size: 28rpx;
}

.p-label {
  font-size: 22rpx;
  color: #999999;
  line-height: 1.2;
}

.p-amount {
  font-size: 34rpx;
  font-weight: 800;
  color: #ffb800;
  line-height: 1.3;
  margin-top: 2rpx;
}

.p-amount-lg {
  font-size: 40rpx;
}

.p-sub-label {
  font-size: 22rpx;
  color: #999999;
  margin-top: 6rpx;
}

.p-sub-value {
  font-size: 28rpx;
  font-weight: 700;
  color: #ffb800;
  line-height: 1.2;
}

.p-sub-value-lg {
  font-size: 32rpx;
}

.p-reward {
  margin-top: 4rpx;
  font-size: 20rpx;
  color: #d48806;
  font-weight: 600;
}

.pedestal {
  width: 92%;
  margin-top: 14rpx;
  border-radius: 16rpx 16rpx 0 0;
  background: linear-gradient(180deg, #ffe08a 0%, #ffd04d 100%);
  box-shadow: inset 0 2rpx 0 rgba(255, 255, 255, 0.5);
}

.pedestal-1 {
  height: 88rpx;
  background: linear-gradient(180deg, #ffe08a 0%, #ffc933 100%);
}

.pedestal-2 {
  height: 64rpx;
  background: linear-gradient(180deg, #ffe08a 0%, #ffd04d 100%);
}

.pedestal-3 {
  height: 48rpx;
  background: linear-gradient(180deg, #ffe08a 0%, #ffd04d 100%);
}

/* ========== 列表区（白底） ========== */
.list-panel {
  margin-top: 8rpx;
  background: #ffffff;
  border-radius: 32rpx 32rpx 0 0;
  padding: 24rpx 28rpx 0;
  min-height: 400rpx;
  box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.04);
}

.list-row {
  display: flex;
  align-items: center;
  padding: 24rpx 0;
  border-bottom: 1rpx solid #f3f3f3;
}

.list-row:last-child {
  border-bottom: none;
}

.li-rank {
  width: 44rpx;
  flex-shrink: 0;
  font-size: 32rpx;
  font-weight: 700;
  color: #333333;
  text-align: center;
}

.li-avatar {
  width: 72rpx;
  height: 72rpx;
  border-radius: 50%;
  flex-shrink: 0;
  margin: 0 16rpx 0 8rpx;
  background: #f0f0f0;
}

.li-name {
  flex: 1;
  min-width: 0;
  font-size: 28rpx;
  font-weight: 500;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.li-right {
  flex-shrink: 0;
  text-align: right;
  margin-left: 12rpx;
}

.li-amount {
  display: block;
  font-size: 30rpx;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

.li-orders {
  display: block;
  margin-top: 4rpx;
  font-size: 24rpx;
  color: #999999;
}

.li-reward {
  display: block;
  margin-top: 4rpx;
  font-size: 20rpx;
  color: #d48806;
}

.sort-tip {
  display: block;
  padding: 0 24rpx 8rpx;
  font-size: 22rpx;
  color: rgba(0, 0, 0, 0.45);
}

.p-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6rpx;
  justify-content: center;
  margin: 8rpx 0 10rpx;
  max-width: 100%;
}

.p-metric {
  font-size: 20rpx;
  color: #888;
  background: rgba(255, 255, 255, 0.65);
  padding: 4rpx 10rpx;
  border-radius: 8rpx;
}

.li-label {
  display: block;
  margin-top: 2rpx;
  font-size: 22rpx;
  color: #999;
}

.li-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6rpx;
  justify-content: flex-end;
  margin-top: 6rpx;
  max-width: 280rpx;
}

.li-tag {
  font-size: 20rpx;
  color: #888;
  background: #f5f5f5;
  padding: 2rpx 8rpx;
  border-radius: 6rpx;
}

.bottom-gap {
  height: 160rpx;
}

/* ========== 领取栏 ========== */
.claim-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 20rpx 28rpx calc(20rpx + env(safe-area-inset-bottom));
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1rpx solid #f0f0f0;
  box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.06);
}

.claim-text {
  display: flex;
  flex-direction: column;
}

.claim-title {
  font-size: 26rpx;
  color: #333;
}

.claim-amount {
  font-size: 36rpx;
  font-weight: 700;
  color: #ffb800;
}

.claim-btn {
  margin: 0;
  padding: 0 40rpx;
  height: 72rpx;
  line-height: 72rpx;
  font-size: 28rpx;
  background: linear-gradient(135deg, #ffc107, #ffb300);
  color: #1a1a1a;
  border-radius: 999rpx;
  border: none;
}
