/* Leaderboard Styles for PayToWin */

/* Container and Layout */
.leaderboard-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
    animation: slideUp 0.8s ease;
}

/* Header Section */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    flex-wrap: wrap;
    gap: 15px;
}

.leaderboard-title {
    font-size: 2.2em;
    font-weight: bold;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: pulse 2s infinite;
}

/* Currency Indicator Styling */
.currency-indicator {
    color: #ffd700;
    font-size: 0.9em;
    padding: 5px 10px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    font-weight: 600;
}

/* Update footer for better spacing with 3 items */
.leaderboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

/* Tab System */
.leaderboard-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.tab-btn.active {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

/* Content Areas */
.leaderboard-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.leaderboard-content.active {
    display: block;
}

/* Individual Leaderboard Styles */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease backwards;
}

.leaderboard-item:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

/* Special ranks styling */
.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border: 2px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.1));
    border: 2px solid #c0c0c0;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.1));
    border: 2px solid #cd7f32;
}

/* Rank Section */
.rank-section {
    display: flex;
    align-items: center;
    min-width: 60px;
}

.rank-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
}

/* Player Info */
.player-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

.player-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.founder-badge {
    font-size: 0.9em;
    animation: rotate 3s linear infinite;
}

.team-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px currentColor;
}

/* Score Display */
.player-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
}

.points {
    font-size: 1.3em;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.points-label {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.player-amount {
    min-width: 100px;
    text-align: right;
}

.amount {
    font-size: 1.1em;
    color: #4ade80;
    font-weight: 600;
}

/* Team Standings */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease backwards;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.team-emoji {
    font-size: 2em;
}

.team-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
}

.team-rank {
    background: rgba(255, 215, 0, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #ffd700;
    font-weight: bold;
}

.team-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 10px currentColor;
}

.team-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

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

.stat-value {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffd700;
}

.stat-label {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

/* Footer */
.leaderboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.update-indicator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    animation: blink 2s infinite;
}

.your-position {
    color: #ffd700;
    font-weight: bold;
}

/* Loading States */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.empty-state-emoji {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.empty-state h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #ffd700;
}

.empty-state p {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.empty-state .cta-button {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.empty-state .cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 30px;
    color: #ef4444;
    font-size: 1.1em;
}

/* Join CTA */
.team-join-cta {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    border: 1px dashed rgba(255, 215, 0, 0.3);
}

.team-join-cta p {
    margin: 0;
    font-size: 1.1em;
    color: #ffd700;
    font-weight: 600;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .currency-indicator {
        width: 100%;
        text-align: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .leaderboard-container {
        margin: 15px;
        padding: 15px;
    }
    
    .leaderboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .leaderboard-title {
        font-size: 1.8em;
    }
    
    .leaderboard-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .tab-btn {
        flex: 1;
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }
    
    .player-info {
        padding: 0;
    }
    
    .player-score {
        margin: 10px 0;
    }
    
    .teams-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .leaderboard-title {
        font-size: 1.5em;
    }
    
    .rank-number {
        font-size: 1.2em;
    }
    
    .player-name {
        font-size: 1em;
    }
    
        .points {
            font-size: 1.1em;
        }
    }