/*
 * 高端质感版 · 全站排行榜样式
 * 设计：轻奢渐变 | 无边卡片 | 通透质感 | 统一高端风格
 */
.rank-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background: linear-gradient(180deg, #F8F9FC 0%, #F1F5FB 100%);
    position: relative;
}
@media (max-width:768px) {
    .rank-page {
        width: 100vw;
        padding: 0;
        max-width: 100%;
        background: #F8F9FC;
    }
}

/* 滚动条隐藏 */
.rank-list-container {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    max-height: 520px;
    overflow-y: auto;
}
.rank-list-container::-webkit-scrollbar { display: none; }
.rank-list-container { -ms-overflow-style: none; scrollbar-width: none; }

/* 顶部渐变条 */
.rank-header-bg {
    height: 110px;
    background: linear-gradient(90deg, #4158D4 0%, #647BFF 100%);
    border-radius: 16px 16px 0 0;
    margin-bottom: -50px;
    box-shadow: 0 8px 25px rgba(99, 112, 255, 0.15);
}

/* 侧边栏 */
.rank-sidebar {
    width: 240px;
    float: left;
    position: relative;
    z-index: 2;
}
.rank-logo-box {
    text-align: center;
    margin-bottom: 28px;
}
.rank-logo-icon {
    width: 86px;
    height: 86px;
    background: linear-gradient(135deg, #5671F5 0%, #7890FF 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(86, 113, 245, 0.25);
}
.rank-logo-icon i {
    font-size: 36px;
    color: #fff;
}
.rank-title {
    font-size: 24px;
    font-weight: 600;
    margin: 12px 0 8px;
    color: #1F2136;
}
.rank-tag {
    background: #1F2136;
    color: #FFD14C;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* 卡片 */
.sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    border: none;
}
.sidebar-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1F2136;
}
.sidebar-card p {
    font-size: 13px;
    color: #5D617A;
    line-height: 1.65;
    margin: 0;
}

/* 奖励 */
.reward-list { font-size: 13px; }
.reward-item {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #F5F6FA;
}
.reward-item:last-child { border-bottom: none; }
.reward-place { color: #3E4258; font-weight: 500; }
.reward-val.first { color: #FF4D6B; font-weight: 600; }
.reward-val.second { color: #FF8C4A; font-weight: 600; }
.reward-val.third { color: #FABC3C; font-weight: 600; }

/* 主内容 */
.rank-main {
    margin-left: 260px;
    position: relative;
    z-index: 2;
}

.rank-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: 4px;
}
.rank-tabs::-webkit-scrollbar { height: 0; }
.rank-tab {
    padding: 8px 14px;
    border-radius: 12px;
    background: #fff;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all .2s;
    white-space: nowrap;
}
.rank-tab.active {
    background: #222;
    color: #ffd700;
}



.rank-tab.active {
    background: linear-gradient(90deg, #4158D4 0%, #5671F5 100%);
    color: #fff;
    box-shadow: 0 6px 15px rgba(65, 88, 212, 0.22);
}

/* TOP3 冠军展示 */
.top3-container {
    background: #fff;
    border-radius: 18px;
    padding: 26px 15px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 22px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}
.top3-item {
    text-align: center;
    width: 32%;
}
.avatar-wrap {
    position: relative;
    margin-bottom: 10px;
    display: inline-block;
}
.avatar-wrap img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 冠亚季军边框 */
.top3-item:nth-child(1) .avatar-wrap img {
    border: 3px solid #FFD14C;
}
.top3-item:nth-child(2) .avatar-wrap img {
    border: 3px solid #C9CDD4;
}
.top3-item:nth-child(3) .avatar-wrap img {
    border: 3px solid #E5A866;
}

.top3-name {
    font-size: 15px;
    font-weight: 600;
    color: #1F2136;
    margin-bottom: 3px;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: auto;
    margin-right: auto;
}
.top3-desc {
    font-size: 12px;
    color: #8D93AB;
}

/* 列表 */
.rank-list-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid #F5F6FA;
    font-size: 13px;
    color: #6B729F;
    font-weight: 500;
}
.rank-list-header .right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rank-list-item {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid #F7F8FC;
    transition: background 0.2s ease;
}
.rank-list-item:last-child { border-bottom: none; }
.rank-list-item:hover {
    background: #F8F9FC;
}
.rank-num {
    width: 44px;
    font-size: 14px;
    font-weight: 600;
    color: #8D93AB;
}
.rank-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}
.rank-user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}
.rank-username {
    font-size: 15px;
    font-weight: 500;
    color: #2A2D46;
}
.rank-value {
    font-size: 15px;
    font-weight: 600;
    color: #4158D4;
}

/* 礼物与状态 */
.gift-icon {
    font-size: 15px;
    cursor: pointer;
    position: relative;
    margin-left: 5px;
}
.gift-icon:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #1F2136;
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 999;
    opacity: 0.95;
}
.rewarded-text {
    font-size: 11px;
    margin-left: 5px;
    font-weight: 600;
}
.rewarded-text.sent { color: #00B578; }
.rewarded-text.wait { color: #8D93AB; }

.empty-tip {
    text-align: center;
    padding: 40px 0;
    color: #9CA3C0;
    font-size: 14px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 响应式 */
@media (max-width:768px) {
    .rank-page { padding: 12px; }
    .rank-sidebar { width: 100%; float: none; margin-bottom: 22px; }
    .rank-main { margin-left: 0; }
    .top3-container { gap: 12px; padding: 20px 8px; }
    .avatar-wrap img { width: 46px; height: 46px; }
    .rank-tag-pc { display: none !important; }
    .rank-tag-mobile { display: inline-block !important; }
}
@media (min-width:769px) {
    .rank-tag-pc { display: inline-block !important; }
    .rank-tag-mobile { display: none !important; }
}
@media (max-width:768px) {
    .sidebar-card:nth-child(3) { display: none !important; }
}

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: rgba(255,255,255,0.97);
    border-radius: 16px;
    width: 90%;
    max-width: 340px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: #1F2136;
    font-weight: 600;
}
.modal-close {
    font-size: 22px;
    cursor: pointer;
    color: #6B729F;
}
.reward-group { margin-bottom: 20px; }
.group-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
    color: #1F2136;
}
.reward-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #F5F6FA;
}
.reward { color: #FF4D6B; font-weight: 600; }
.notice {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: #8D93AB;
}
/* 周期排行标签栏 */
.week-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

/* 小号标签 */
.week-tab {
  padding: 3px 8px;
  border-radius: 4px;
  background: #f0f0f0;
  font-size: 12px;
  cursor: pointer;
  color: #333;
}
.week-tab.active {
  background: #4169E1;
  color: #fff;
}

/* 列表项 */
.week-item {
  display: flex;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
}
.week-rank {
  width: 18px;
  text-align: center;
  color: #ff9c00;
  font-weight: bold;
}
.week-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin: 0 5px;
}
.week-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.week-value {
  color: #666;
  font-weight: bold;
}
.week-empty {
  font-size: 12px;
  color: #999;
}