body {
    margin: 0;
    background: #202020;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    font-family: "Press Start 2P";
}

canvas {
    border: 1px solid #555;
    background: white;
    width: min(95vw, 95vh);
    height: min(95vw, 95vh);
    image-rendering: pixelated;
}

.press-start-2p-regular {
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
}

.modal {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0,0,0,.5);
    font-family: "Press Start 2P";
}

.hidden {
    display: none;
}

.modal-content {
    width: 350px;

    background: white;

    padding: 24px;

    border-radius: 8px;

    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-content h2,
.modal-content p {
    margin: 0;
}

.modal-content input {
    font-size: 18px;
    padding: 8px;
    font-family: "Press Start 2P";
}

.buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.game-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
}

.leaderboard {
    width: 380px;
    height: 450px;

    background: white;
    border: 1px solid #555;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    padding: 16px;
}

.leaderboard h2 {
    margin: 0 0 16px;
    text-align: center;
    font-size: 16px;
}

.leaderboard-controls input {
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    padding: 4px;
}

#leaderboardTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 10px;
}

#leaderboardTable th,
#leaderboardTable td {
    border: 1px solid #555;
    padding: 6px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
}

.leaderboard-pagination {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
}

.leaderboard-pagination button {
    width: 48px;
}

.game-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

canvas {
    flex: 0 0 auto;
}

.leaderboard {
    flex: 0 0 380px;
}
