/* 榜单页面特有样式 */

/* 榜单页面 */
.rank-page {
    background: #f5f7fa;
    min-height: 100vh;
}

/* 榜单头部 */
.rank-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.rank-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.rank-hero-content {
    position: relative;
    z-index: 1;
}

.rank-hero h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.rank-hero p {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 1rem;
}

/* 统计卡片 */
.rank-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: -1.5rem 1rem 1rem;
    position: relative;
    z-index: 2;
}

.stat-item {
    background: white;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c757d;
}

/* 筛选标签栏 */
.rank-filter-tabs {
    background: white;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    scrollbar-width: none;
}

.rank-filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f5f7fa;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.filter-tab:active {
    transform: scale(0.95);
}

/* 榜单列表 */
.rank-list-wrapper {
    padding: 0 1rem 1rem;
}

.rank-list-header {
    display: grid;
    grid-template-columns: 0.8fr 2fr 1fr 1.2fr;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.rank-item {
    display: grid;
    grid-template-columns: 0.8fr 2fr 1fr 1.2fr;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.rank-item:active {
    transform: scale(0.98);
}

/* 排名徽章 */
.rank-badge {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 auto;
}

.rank-badge.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    animation: pulse 2s infinite;
}

.rank-badge.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.5);
}

.rank-badge.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a55c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.5);
}

.rank-badge.normal {
    background: #f5f7fa;
    color: #6c757d;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 球员信息 */
.player-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.player-details {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

/* 位置标签 */
.position-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/* 评分 */
.score-display {
    text-align: center;
}

.score-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.score-bar {
    width: 100%;
    height: 0.375rem;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* 加载更多按钮 */
.load-more-btn {
    display: block;
    width: calc(100% - 2rem);
    margin: 1rem;
    padding: 0.875rem;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .rank-hero h1 {
        font-size: 1.5rem;
    }

    .rank-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin: -1rem 0.75rem 0.75rem;
    }

    .stat-item {
        padding: 0.75rem 0.5rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .rank-list-header {
        grid-template-columns: 0.7fr 1.8fr 0.8fr 1fr;
        gap: 0.5rem;
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
    }

    .rank-item {
        grid-template-columns: 0.7fr 1.8fr 0.8fr 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .rank-badge {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    .player-avatar {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    .player-name {
        font-size: 0.9rem;
    }

    .player-meta {
        font-size: 0.7rem;
    }

    .position-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .score-value {
        font-size: 1rem;
    }
}
