/* ========================================
   排行榜页面
   ======================================== */

.ls-rank {
    width: 1100px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
    min-height: calc(100vh - 120px);
}

/* ========== 左侧菜单 ========== */
.ls-rank-side {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ls-rank-menu {
    background: #fff;
    border-radius: var(--ls-border-radius, 12px);
    overflow: hidden;
    box-shadow: var(--ls-shadow-xs);
}

.ls-rank-menu-title {
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ls-rank-menu-title i {
    font-size: 18px;
    color: #6366f1;
}

.ls-rank-menu-list {
    padding: 8px;
}

.ls-rank-menu-item {
    padding: 10px 12px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.ls-rank-menu-item:last-child {
    margin-bottom: 0;
}

.ls-rank-menu-item i {
    font-size: 18px;
    opacity: 0.7;
}

.ls-rank-menu-item:hover {
    background: #f8fafc;
    color: #334155;
}

.ls-rank-menu-item.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 500;
}

.ls-rank-menu-item.active i {
    opacity: 1;
}

/* 榜单说明 */
.ls-rank-tips {
    background: #fff;
    border-radius: var(--ls-border-radius, 12px);
    padding: 14px 16px;
    box-shadow: var(--ls-shadow-xs);
}

.ls-rank-tips-title {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ls-rank-tips-title i {
    font-size: 14px;
}

.ls-rank-tips-content {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}

/* ========== 右侧内容 ========== */
.ls-rank-body {
    flex: 1;
    min-width: 0;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========== 头部前三名格子布局 ========== */
.ls-rank-top {
    display: flex;
    gap: 12px;
    height: 220px;
}

/* 通用卡片样式 */
.ls-rank-top-card {
    text-decoration: none;
    border-radius: var(--ls-border-radius, 12px);
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    overflow: hidden;
}

.ls-rank-top-card:hover {
    transform: translateY(-4px);
}

/* 卡片头部 */
.ls-rank-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
}

.ls-rank-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.ls-rank-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}

/* 卡片主体 */
.ls-rank-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    gap: 8px;
}

/* 前三名头像装饰边框 */
.ls-rank-card-body .ls-avatar img.avatar {
    border: 3px solid rgba(255,255,255,0.6);
}

.ls-rank-info {
    text-align: center;
    min-width: 0;
    max-width: 100%;
}

.ls-rank-name {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.ls-rank-desc {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* 数据展示 */
.ls-rank-data {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    flex-wrap: wrap;
}

.ls-rank-data span {
    white-space: nowrap;
}

/* 卡片底部 */
.ls-rank-card-footer {
    padding: 10px 14px 14px;
    text-align: center;
}

.ls-rank-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.ls-rank-score .num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.ls-rank-score .unit {
    font-size: 11px;
    opacity: 0.7;
}

.ls-rank-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
}

/* ========== 第一名 - 金色主题 + 尊贵光芒 ========== */
.ls-rank-top-1st {
    flex: none;
    width: calc((100% - 24px) / 2);
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
    box-shadow: var(--ls-shadow-xs), 0 4px 20px rgba(251, 191, 36, 0.25);
    position: relative;
    overflow: hidden;
}

/* 流光效果 */
.ls-rank-top-1st::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.4) 45%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.4) 55%,
        transparent 70%
    );
    animation: shine 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50%, 100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.ls-rank-top-1st .ls-rank-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.ls-rank-top-1st .ls-rank-label {
    color: #92400e;
}

.ls-rank-top-1st .ls-avatar img {
    border-color: #f59e0b;
}

.ls-rank-top-1st .ls-rank-name {
    color: #78350f;
}

.ls-rank-top-1st .ls-rank-data {
    color: #92400e;
}

.ls-rank-top-1st .ls-rank-desc {
    color: #92400e;
}

.ls-rank-top-1st .ls-rank-score .num {
    color: #b45309;
}

.ls-rank-top-1st .ls-rank-score .unit {
    color: #92400e;
}

.ls-rank-top-1st .ls-rank-stats {
    color: #a16207;
}

/* 第一名皇冠图标 */
.ls-rank-top-1st .ls-rank-badge i {
    font-size: 16px;
}

/* ========== 第二名 - 银色主题 ========== */
.ls-rank-top-2nd {
    flex: none;
    width: calc((100% - 24px) / 4);
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    box-shadow: var(--ls-shadow-xs);
}

.ls-rank-top-2nd .ls-rank-badge {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: #fff;
}

.ls-rank-top-2nd .ls-rank-label {
    color: #475569;
}

.ls-rank-top-2nd .ls-avatar img {
    border-color: #94a3b8;
}

.ls-rank-top-2nd .ls-rank-name {
    color: #334155;
}

.ls-rank-top-2nd .ls-rank-score .num {
    color: #475569;
}

.ls-rank-top-2nd .ls-rank-score .unit {
    color: #64748b;
}

.ls-rank-top-2nd .ls-rank-data {
    color: #64748b;
}

/* ========== 第三名 - 铜色主题 ========== */
.ls-rank-top-3rd {
    flex: none;
    width: calc((100% - 24px) / 4);
    background: linear-gradient(145deg, #ffedd5 0%, #fed7aa 50%, #fdba74 100%);
    box-shadow: var(--ls-shadow-xs);
}

.ls-rank-top-3rd .ls-rank-badge {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    color: #fff;
}

.ls-rank-top-3rd .ls-rank-label {
    color: #9a3412;
}

.ls-rank-top-3rd .ls-avatar img {
    border-color: #fb923c;
}

.ls-rank-top-3rd .ls-rank-name {
    color: #7c2d12;
}

.ls-rank-top-3rd .ls-rank-score .num {
    color: #c2410c;
}

.ls-rank-top-3rd .ls-rank-score .unit {
    color: #9a3412;
}

.ls-rank-top-3rd .ls-rank-data {
    color: #9a3412;
}

/* ========== 排行列表 ========== */

/* 内联认证标识（用户名旁边） */
.ls-rank-username .ls-avatar-verify,
.ls-rank-name .ls-avatar-verify,
.ls-rank-list-name .ls-avatar-verify {
    position: static;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
}

.ls-rank-username .ls-avatar-verify img,
.ls-rank-name .ls-avatar-verify img,
.ls-rank-list-name .ls-avatar-verify img {
    width: 16px;
    height: 16px;
    display: block;
    border: none;
    border-radius: 0;
}

.ls-rank-list {
    background: #fff;
    border-radius: var(--ls-border-radius, 12px);
    overflow: hidden;
    box-shadow: var(--ls-shadow-xs);
}

.ls-rank-list-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #f8fafc;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.ls-rank-list-header .col-rank {
    width: 60px;
    text-align: center;
}

.ls-rank-list-header .col-user {
    flex: 1;
}

.ls-rank-list-header .col-data {
    width: 140px;
    text-align: center;
}

.ls-rank-list-header .col-score {
    width: 100px;
    text-align: right;
}

.ls-rank-list-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.ls-rank-list-item:last-child {
    border-bottom: none;
}

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

.ls-rank-list-rank {
    width: 60px;
    font-size: 15px;
    font-weight: 600;
    color: #cbd5e1;
    text-align: center;
}

.ls-rank-list-rank.hot {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ls-rank-list-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ls-rank-list-info {
    flex: 1;
    min-width: 0;
}

.ls-rank-list-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ls-rank-list-desc {
    font-size: 12px;
    color: #94a3b8;
}

.ls-rank-list-data {
    width: 140px;
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
}

.ls-rank-list-score {
    width: 100px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ls-rank-list-score .num {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

/* ========== 空状态 ========== */
.ls-rank-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--ls-border-radius, 12px);
    color: #94a3b8;
    box-shadow: var(--ls-shadow-xs);
}

.ls-rank-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.ls-rank-empty span {
    font-size: 14px;
}
