body {
    margin: 0;
    overflow: hidden;
    background: #222;
    font-family: Verdana, sans-serif;
}

canvas {
    display: block;
    margin: 0 auto;
    background: linear-gradient(#87CEEB, #f0e68c);
}
canvas {
    cursor: none;
}

.overlay {
    display: none;
}

.overlay.visible {
    display: block !important;
}

.leaderboard-overlay {
    width: 420px;
    max-height: 520px;
    overflow-y: auto;
    padding: 20px 26px;
    background: rgba(5, 7, 18, 0.92);
    border-radius: 14px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    border: 2px solid rgba(74, 242, 197, 0.55);
    box-shadow:
        0 0 25px rgba(74, 242, 197, 0.45),
        0 0 45px rgba(255, 79, 216, 0.35),
        inset 0 0 18px rgba(74, 242, 197, 0.25);

    animation: leaderboardFade 0.35s ease-out forwards,
               leaderboardGlow 3s ease-in-out infinite alternate;
}

.leaderboard-overlay h2 {
    margin: 0 0 12px;
    font-size: 30px;
    color: #ff4fd8;
    text-shadow: 0 0 14px rgba(255, 79, 216, 0.8);
}

#leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 22px;
}

#leaderboard-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#leaderboard-table td {
    padding: 6px 10px;

    /* MUCH brighter ink */
    color: #e8fff9;

    /* Strong neon glow */
    text-shadow:
        0 0 6px rgba(255, 255, 255, 1),
        0 0 14px rgba(74, 242, 197, 0.9),
        0 0 22px rgba(255, 79, 216, 0.8);
}

@keyframes leaderboardFade {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes leaderboardGlow {
    0% {
        box-shadow:
            0 0 20px rgba(74, 242, 197, 0.35),
            0 0 35px rgba(255, 79, 216, 0.25),
            inset 0 0 12px rgba(74, 242, 197, 0.2);
    }
    100% {
        box-shadow:
            0 0 30px rgba(74, 242, 197, 0.55),
            0 0 55px rgba(255, 79, 216, 0.45),
            inset 0 0 18px rgba(74, 242, 197, 0.35);
    }
}
