/* 榜单页面专用样式 */

/* 榜单头部 */
.rank-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rank-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.rank-content {
    position: relative;
    z-index: 1;
}

.rank-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.rank-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* 筛选区域 */
.filter-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.75rem 2rem 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%236c757d" viewBox="0 0 20 20"><path d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5rem;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 筛选按钮 */
.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-filter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-reset {
    background: #6c757d;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 统计信息 */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 榜单内容 */
.rank-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 排名表格 */
.rank-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.rank-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 50;
}

.rank-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.rank-table tbody tr {
    transition: background-color 0.3s ease;
}

.rank-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 排名位置 */
.rank-position {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.5);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a55c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.5);
}

.rank-other {
    background: #f8f9fa;
    color: #6c757d;
}

/* 球员信息 */
.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 3rem;
    height: 3rem;
    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: 1.25rem;
    flex-shrink: 0;
}

.player-details {
    flex: 1;
}

.player-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.player-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

/* 评分显示 */
.score-display {
    text-align: center;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.score-bar {
    width: 80px;
    height: 0.5rem;
    background: #e9ecef;
    border-radius: 0.25rem;
    overflow: hidden;
    margin: 0 auto;
}

.score-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

/* 位置标签 */
.position-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    min-width: 3rem;
}

/* 地区信息 */
.region-info {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
}

/* 排名变化 */
.rank-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.rank-up {
    color: #28a745;
}

.rank-down {
    color: #dc3545;
}

.rank-same {
    color: #6c757d;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-detail {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-detail:hover {
    background: #5a6db8;
    transform: translateY(-1px);
}

.btn-contact {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    background: white;
    color: #6c757d;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 卡片视图 */
.rank-cards {
    display: none;
    gap: 1.5rem;
}

.rank-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rank-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rank-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.rank-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rank-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* 视图切换 */
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #6c757d;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.view-btn:hover:not(.active) {
    border-color: #667eea;
    color: #667eea;
}

/* 加载状态 */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.5rem;
}

.skeleton-row {
    height: 60px;
    margin-bottom: 1rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-desc {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .filter-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .rank-table {
        font-size: 0.9rem;
    }

    .rank-table th,
    .rank-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .rank-title {
        font-size: 2rem;
    }

    .filter-section {
        padding: 1.5rem;
        position: static;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .rank-content {
        padding: 1.5rem;
    }

    .rank-table {
        font-size: 0.8rem;
    }

    .rank-table th,
    .rank-table td {
        padding: 0.5rem 0.25rem;
    }

    .player-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .player-avatar {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .score-value {
        font-size: 1.25rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }

    .rank-cards {
        display: grid;
        grid-template-columns: 1fr;
    }

    .rank-table-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .rank-header {
        padding: 2rem 0;
    }

    .rank-title {
        font-size: 1.75rem;
    }

    .filter-section {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .rank-content {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
}