/* Ranking Page Enhanced Styles */

.ranking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ranking-header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(26,26,16,0.9));
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.ranking-header h1 {
    color: #fff;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 10px;
    font-family: 'Soul_Calibur', serif;
}

.ranking-header p {
    color: #ccc;
    font-size: 1.2rem;
    margin: 0;
}

/* Ranking Tabs */
.ranking-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.ranking-tab {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: bold;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.ranking-tab:hover {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.ranking-tab.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    transform: scale(1.05);
}

/* Enhanced Player Cards */
.player-rank-continer {
    margin: 30px 0;
}

.player-rank-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.player-rank-card {
    background: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(26,26,16,0.8));
    border-radius: 15px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.player-rank-card:hover {
    transform: translateY(-5px);
    border-color: #e74c3c;
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.3);
}

.player-rank-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #e74c3c);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-rank-card:hover::before {
    opacity: 1;
}

/* Rank Number Badge */
.rank-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.rank-number.top3 {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4); }
    to { box-shadow: 0 4px 25px rgba(241, 196, 15, 0.8); }
}

/* Player Avatar */
.player-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #e74c3c;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.player-rank-card:hover .player-avatar {
    transform: scale(1.1);
    border-color: #f39c12;
}

/* Player Name */
.player-name {
    color: #fff;
    font-size: 1.4rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.player-name i {
    color: #e74c3c;
    margin-right: 8px;
}

/* Player Stats */
.player-rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.player-rank-list li {
    background: rgba(255,255,255,0.1);
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 8px;
    color: #fff;
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.player-rank-list li:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
    border-left-color: #f39c12;
}

.player-rank-list li i {
    color: #f39c12;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Class Colors */
.class-warrior { border-left-color: #e74c3c; }
.class-archer { border-left-color: #27ae60; }
.class-ninja { border-left-color: #9b59b6; }
.class-monk { border-left-color: #f39c12; }

/* Top Player Highlight */
.top-player {
    position: relative;
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.2), rgba(243, 156, 18, 0.1));
    border: 2px solid #f1c40f;
}

.top-player::after {
    content: '👑';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    background: #f1c40f;
    padding: 5px 10px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.5);
}

/* Loading Animation */
.ranking-loading {
    text-align: center;
    padding: 50px;
    color: #fff;
    font-size: 1.2rem;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #e74c3c;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.ranking-empty {
    text-align: center;
    padding: 50px;
    color: #ccc;
    font-size: 1.2rem;
    background: rgba(0,0,0,0.5);
    border-radius: 15px;
    margin: 20px 0;
}

.ranking-empty i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ranking-container {
        padding: 15px;
    }
    
    .ranking-header h1 {
        font-size: 2rem;
    }
    
    .ranking-header p {
        font-size: 1rem;
    }
    
    .player-rank-box {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ranking-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .ranking-tab {
        width: 200px;
    }
    
    .player-rank-card {
        padding: 20px;
    }
    
    .player-avatar {
        width: 80px;
        height: 80px;
    }
    
    .player-name {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .ranking-header {
        padding: 20px;
    }
    
    .ranking-header h1 {
        font-size: 1.5rem;
    }
    
    .player-rank-card {
        padding: 15px;
    }
    
    .player-avatar {
        width: 70px;
        height: 70px;
    }
    
    .rank-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Additional styles for ranking page components */

.stat-card {
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(26,26,16,0.9));
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.stat-card:hover {
    border-color: #e74c3c;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    color: #e74c3c;
    margin-bottom: 10px;
}

.stat-info h3 {
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0 5px;
}

.stat-info p {
    color: #ccc;
    margin: 0;
    font-size: 1rem;
}

.ranking-controls {
    background: rgba(0,0,0,0.7);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
}

.search-container {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 25px;
    border: 2px solid #e74c3c;
    background: rgba(255,255,255,0.1);
    color: #fff;
    backdrop-filter: blur(5px);
}

.search-box input::placeholder {
    color: #ccc;
}

.search-box input:focus {
    outline: none;
    border-color: #f39c12;
    background: rgba(255,255,255,0.2);
}

.pagination-container {
    margin: 40px 0;
    text-align: center;
}

.pagination .page-link {
    background: rgba(0,0,0,0.8);
    border: 1px solid #e74c3c;
    color: #fff;
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

.pagination-info {
    margin-top: 20px;
    font-size: 1.1rem;
}

/* Loading animation for tabs */
.ranking-tab.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ranking-tab.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
