body {
    margin: 0;
    background: #000;
    overflow: hidden;
    font-family: "Segoe UI", sans-serif;
}

/* Hide default cursor */
body, #gameCanvas {
    cursor: none;
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: #000;
}

#gameWrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
}

#hudSide {
    width: 220px;
    background: #111;
    padding: 20px;
    border-left: 3px solid #333;
    font-family: Verdana, sans-serif;
    color: white;
    user-select: none;
}

#hudSide div {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
}

#hudSide a {
    display: block;
    margin-top: 40px;
    font-size: 20px;
    color: #4da3ff;
    text-decoration: none;
    text-align: center;
}

#hudSide a:hover {
    text-decoration: underline;
}

#hudPlayer {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #ffffff;
}

/* ============================= */
/* LEADERBOARD OVERLAY (NEON)    */
/* ============================= */

.overlay {
    display: none;
}

.overlay.visible {
    display: block !important;
}

/* Neon leaderboard container */
.leaderboard-overlay {
    width: 420px;
    max-height: 520px;
    overflow-y: auto;
    padding: 20px 26px;
    background: rgba(5, 7, 18, 0.92);
    border-radius: 14px;

    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;

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.leaderboard-overlay h2 {
    margin: 0 0 12px;
    font-size: 30px;
    color: #4af2c5;
    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;

    /* brighter ink */
    color: #e8fff9;

    /* stronger neon glow */
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.9),
        0 0 14px rgba(74, 242, 197, 0.7),
        0 0 22px rgba(255, 79, 216, 0.5);
}

@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);
    }
}
