/* Leaderboards Specific Styles */
.leaderboards-main {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #0f1419 100%);
    padding-top: 20px;
    padding-bottom: 40px;
}

.leaderboards-main .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section */
.leaderboards-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 0;
}

.leaderboards-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 4rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.leaderboards-title i {
    color: #ffd700;
    margin-right: 20px;
}

.leaderboards-subtitle {
    font-size: 1.3rem;
    color: #b8c5d1;
    font-weight: 300;
    margin-bottom: 20px;
}

.last-updated {
    font-size: 0.9rem;
    color: #8a96a3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Tournament Tabs */
.tournament-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: #b8c5d1;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    justify-content: center;
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    border-color: #ffd700;
    color: #fff;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.tab-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

/* Loading and Error States */
.loading-state, .error-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 20px;
}

.error-icon {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

.loading-state p, .error-state p {
    font-size: 1.2rem;
    color: #b8c5d1;
    margin-bottom: 20px;
}

/* Tournament Content */
.tournament-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.tournament-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.2rem;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: #ffd700;
}

.tournament-info-summary {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.9rem;
    color: #8a96a3;
    font-weight: 400;
}

.info-value {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

/* Leaderboard Container */
.leaderboard-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.leaderboard-table td {
    padding: 15px 20px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.leaderboard-table tr:hover {
    background: rgba(255, 215, 0, 0.05);
}

.position-cell {
    font-weight: bold;
    color: #ffd700 !important;
    font-size: 1.1rem !important;
    width: 60px;
}

.player-name-cell {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-cell {
    font-weight: 600;
    color: #2ecc71 !important;
    font-size: 1.05rem !important;
}

.prize-cell {
    font-weight: 600;
    color: #f39c12 !important;
}

/* Position Badges */
.position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
}

.position-badge.first {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.position-badge.second {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #333;
}

.position-badge.third {
    background: linear-gradient(135deg, #cd7f32, #d4af37);
    color: #fff;
}

.position-badge.other {
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
}

/* Empty State */
.empty-leaderboard {
    text-align: center;
    padding: 60px 20px;
    color: #8a96a3;
}

.empty-leaderboard i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-leaderboard h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #b8c5d1;
}

.empty-leaderboard p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Recent Tournaments */
.recent-tournaments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.recent-tournament-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 25px;
    transition: all 0.3s ease;
}

.recent-tournament-card:hover {
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-3px);
}

.recent-tournament-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-tournament-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.recent-tournament-date {
    font-size: 0.9rem;
    color: #8a96a3;
}

.recent-leaderboard {
    max-height: 300px;
    overflow-y: auto;
}

.recent-leaderboard::-webkit-scrollbar {
    width: 6px;
}

.recent-leaderboard::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.recent-leaderboard::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.recent-leaderboard::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .recent-tournaments {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .leaderboards-main {
        padding-top: 120px;
    }
    
    .leaderboards-title {
        font-size: 3rem;
    }
    
    .tournament-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        min-width: 250px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tournament-info-summary {
        gap: 20px;
    }
    
    .leaderboard-table {
        font-size: 0.85rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 15px;
    }
    
    .recent-tournaments {
        grid-template-columns: 1fr;
    }
    
    .recent-tournament-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .leaderboards-title {
        font-size: 2.5rem;
    }
    
    .leaderboards-subtitle {
        font-size: 1.1rem;
    }
    
    .tournament-section {
        padding: 20px;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px 12px;
    }
    
    .position-badge {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* Animation classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Loading animation for spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Weekly Champions Specific Styles */
.champions-table {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 107, 53, 0.03));
    border: 2px solid rgba(255, 215, 0, 0.2);
}

.champions-table th {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 107, 53, 0.1));
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.champion-row {
    background: rgba(255, 215, 0, 0.02);
    transition: all 0.3s ease;
}

.champion-row:hover {
    background: rgba(255, 215, 0, 0.08);
    transform: scale(1.01);
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
}

.champion-score {
    font-weight: 700 !important;
    color: #ffd700 !important;
    text-shadow: 0 1px 3px rgba(255, 215, 0, 0.3);
    font-size: 1.1rem !important;
}

.wins-cell {
    color: #2ecc71 !important;
    font-weight: 600;
}

.win-rate-cell {
    color: #e67e22 !important;
    font-weight: 600;
}

.currency-cell {
    color: #3498db !important;
    font-weight: 600;
}

.center-text {
    text-align: center;
}

.champion-row .player-name-cell {
    font-weight: 600;
    color: #fff !important;
}

.champion-row .player-name-cell i {
    margin-right: 8px;
    opacity: 0.7;
}

.champion-row .player-name-cell i.fa-robot {
    color: #9b59b6;
}

.champion-row .player-name-cell i.fa-user {
    color: #2ecc71;
}

/* Special styling for top 3 champions */
.champion-row:nth-child(1) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    border-left: 4px solid #ffd700;
}

.champion-row:nth-child(2) {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(192, 192, 192, 0.05));
    border-left: 4px solid #c0c0c0;
}

.champion-row:nth-child(3) {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(205, 127, 50, 0.05));
    border-left: 4px solid #cd7f32;
}

/* Crown icon styling for Weekly Champions tab */
.tab-btn[data-type="weekly_champions"] i {
    color: #ffd700;
    text-shadow: 0 1px 3px rgba(255, 215, 0, 0.5);
}

.tab-btn[data-type="weekly_champions"].active {
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    border-color: #ffd700;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

/* Monthly Champions Specific Styles */
.monthly-champions-table {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(155, 89, 182, 0.03));
    border: 2px solid rgba(52, 152, 219, 0.2);
}

.monthly-champions-table th {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(155, 89, 182, 0.1));
    color: #3498db;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.monthly-champion-row {
    background: rgba(52, 152, 219, 0.02);
    transition: all 0.3s ease;
}

.monthly-champion-row:hover {
    background: rgba(52, 152, 219, 0.08);
    transform: scale(1.01);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.2);
}

.monthly-score {
    font-weight: 700 !important;
    color: #3498db !important;
    text-shadow: 0 1px 3px rgba(52, 152, 219, 0.3);
    font-size: 1.1rem !important;
}

.monthly-champion-row .player-name-cell {
    font-weight: 600;
    color: #fff !important;
}

.monthly-champion-row .player-name-cell i {
    margin-right: 8px;
    opacity: 0.7;
}

.monthly-champion-row .player-name-cell i.fa-robot {
    color: #9b59b6;
}

.monthly-champion-row .player-name-cell i.fa-user {
    color: #3498db;
}

/* Special styling for top 3 monthly champions */
.monthly-champion-row:nth-child(1) {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.05));
    border-left: 4px solid #3498db;
}

.monthly-champion-row:nth-child(2) {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(155, 89, 182, 0.05));
    border-left: 4px solid #9b59b6;
}

.monthly-champion-row:nth-child(3) {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.05));
    border-left: 4px solid #2ecc71;
}

/* Medal icon styling for Monthly Champions tab */
.tab-btn[data-type="monthly_champions"] i {
    color: #3498db;
    text-shadow: 0 1px 3px rgba(52, 152, 219, 0.5);
}

.tab-btn[data-type="monthly_champions"].active {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-color: #3498db;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

/* Pulse animation for active status */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}
