/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: system-ui, sans-serif;
    display: flex;
    justify-content: center;
    padding-top: 40px;
}

/* PANNELLI PRINCIPALI */
#starterPanel,
#gamePanel,
#deathScreen,
#winScreen {
    background: #111;
    border: 2px solid #fff;
    padding: 20px;
    min-width: 480px;
    text-align: center;
}

.hidden {
    display: none;
}

/* BOTTONI */
button {
    background: #ffb347;
    color: #000;
    border: 2px solid #fff;
    padding: 8px 16px;
    margin: 6px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #ffd28a;
}

/* LEADERBOARD */
#leaderboardList {
    list-style: none;
    margin-top: 20px;
    text-align: left;
}

#leaderboardList li {
    padding: 4px 0;
}

/* HUD */
#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    border: 2px solid #fff;
    padding: 6px 10px;
    margin-bottom: 10px;
}

#hudScoreBox,
#hudLivesBox {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* SAGOMA PUNTO NELL'HUD */
.point.hudPoint {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
}

/* SAGOMA CUORE */
.life {
    width: 14px;
    height: 14px;
    background: #ff3333;
    clip-path: polygon(
        50% 0%,
        61% 10%,
        75% 10%,
        90% 25%,
        90% 40%,
        50% 100%,
        10% 40%,
        10% 25%,
        25% 10%,
        39% 10%
    );
}

/* GAME AREA */
#gameArea {
    position: relative;
    width: 448px;   /* 28 * 16 */
    height: 496px;  /* 31 * 16 */
    margin: 10px auto 0 auto;
    background: #000;
    border: 2px solid #fff;
    overflow: hidden;
}

/* OGGETTI DI GIOCO */
.block,
.point,
.pacman,
.ghost {
    position: absolute;
    width: 16px;
    height: 16px;
}

/* MURI */
.block {
    background: #0011aa;
    border: 1px solid #00ffff;
}

/* PUNTI */
.point {
    display: flex;
    justify-content: center;
    align-items: center;
}

.point::before {
    content: "";
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
}

/* PACMAN */
.pacman {
    background: #ffb347;
    border-radius: 50%;
}

/* FANTASMI */
.ghost {
    background: #ff0000;
    border-radius: 4px 4px 0 0;
}