/* Stats Dashboard Styles */
.live-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.3);
}

.stat-number {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.stat-label {
    font-size: 1.1rem;
    color: #e2e8f0;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 0.9rem;
    color: #34d399;
    font-weight: 600;
}

.chart-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.chart-btn {
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
}

.chart-btn:hover,
.chart-btn.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    transform: translateY(-2px);
}

.chart-container {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    height: 450px;
    position: relative;
}

#mainChart {
    width: 100% !important;
    height: 100% !important;
}

.leaderboard-section {
    margin: 40px 0;
}

.leaderboard-section h3 {
    font-family: 'Cinzel', serif;
    color: #10b981;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
}

.leaderboard-table {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
    overflow: hidden;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 150px 150px;
    gap: 15px;
    background: rgba(16, 185, 129, 0.2);
    padding: 15px 20px;
    font-weight: 600;
    color: #10b981;
    font-size: 1.1rem;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 150px 150px;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
    align-items: center;
}

.leaderboard-row:hover {
    background: rgba(16, 185, 129, 0.1);
}

.leaderboard-row.gold {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
}

.leaderboard-row.silver {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), transparent);
}

.leaderboard-row.bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent);
}

.player-lookup {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
}

.player-lookup h3 {
    font-family: 'Cinzel', serif;
    color: #10b981;
    text-align: center;
    margin-bottom: 20px;
}

.lookup-form {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

#playerSearch {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #e2e8f0;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    width: 250px;
    max-width: 100%;
}

#playerSearch:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.lookup-btn {
    background: linear-gradient(45deg, #10b981, #3b82f6);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lookup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.player-result {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.player-result.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

@media (max-width: 768px) {
    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 60px 1fr 80px 100px 100px;
        font-size: 0.9rem;
        gap: 10px;
    }

    .chart-container {
        height: 300px;
        padding: 15px;
    }

    .lookup-form {
        flex-direction: column;
        align-items: center;
    }

    #playerSearch {
        width: 100%;
    }
}