html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    font-family: "Press Start 2P", monospace;
    overflow: hidden;
    text-align: center;
    user-select: none;
}

#gameContainer {
    position: relative;
    margin: 0 auto;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    max-width: 100vw; /* evita overflow orizzontale */
}

canvas {
    display: block;
    margin: 0 auto;
    border: 3px solid #333;
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

#startScreen,
#creditsScreen,
#gameSetupScreen,
#instructionsScreen,
#highScoreScreen {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

.title {
    font-size: clamp(1rem, 2vw, 2.5rem);
    margin-bottom: 2vh;
    color: #ff0;
    text-shadow: 0 0 10px #ff0, 0 0 20px #ff0;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    margin-bottom: 5vh;
    color: #0ff;
    text-shadow: 0 0 5px #0ff, 0 0 10px #0ff;
}

.button {
    font-family: "Press Start 2P", monospace;
    background-color: #333;
    color: #fff;
    border: 2px solid #0ff;
    padding: 1vh 2vw;
    margin: 1vh;
    font-size: clamp(0.9rem, 2.2vw, 1.5rem);
    cursor: pointer;
    transition: all 0.3s;
}

.button:hover {
    background-color: #0ff;
    color: #000;
}

.option {
    margin: 2vh;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
}

.option span {
    margin: 0 2vw;
}

.selected {
    color: #ff0;
    text-shadow: 0 0 5px #ff0;
}
#highScoresList {
    width: 100%;
}

.highscore-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 4px;
}

.highscore-entry span {
    flex: 1;
    text-align: center;
    padding: 4px;
    font-weight: bold;
    font-family: 'Press Start 2P', monospace; /* opzionale: font arcade */
}

/* Colori arcade diversi per ciascuna colonna */
.highscore-entry span:nth-child(1) {
    color: #FFD700;   /* Giallo */
}

.highscore-entry span:nth-child(2) {
    color: #00FFFF;   /* Ciano */
}

.highscore-entry span:nth-child(3) {
    color: #FF00FF;   /* Fucsia */
}

.letter-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2vh 0;
}

.letter-box {
    width: 10vw;
    height: 10vw;
    border: 2px solid #0ff;
    margin: 0 1vw;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1rem, 5vw, 3rem);
}

.current {
    border-color: #ff0;
    background-color: rgba(255, 255, 0, 0.2);
}

.instructions-list {
    list-style-type: disc;
    padding-left: 0.5rem;
    margin-top: 0.2rem;
    text-align: left;
}

.instructions-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: clamp(0.6rem, 2.2vw, 1.0rem);
}

#copyright,
#created,
#powered,
#views {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 2vw;
    color: #666;
}

#views {
    bottom: 10vh;
}

#copyright {
    bottom: 6vh;
}

#created {
    bottom: 4vh;
}

#powered {
    bottom: 2vh;
}

#colorPreview {
    display: flex;
    margin-top: 2vh;
    justify-content: center;
}

#gameLogo {
    display: block;
    background-color: #fff;
    margin: 0 auto 2vh auto;
    max-width: 20vw;
    height: auto;
}

.zoom-esplosione {
    animation: esplodiRientra 3s infinite ease-in-out;
    display: inline-block;
    transform-origin: center;
    will-change: transform;
}

.nounderline {
    text-decoration: none;
}

@keyframes esplodiRientra {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    40% {
        transform: scale(1.5);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 📱 Media query per dispositivi con larghezza max 600px */
/* @media (max-width: 600px) {
    .title {
        font-size: 6vw;
    }

    .subtitle {
        font-size: 4vw;
    }

    .button,
    .option {
        font-size: 4vw;
    }

    .letter-box {
        width: 12vw;
        height: 12vw;
        font-size: 6vw;
    }

    .instructions-list li {
        font-size: 0.9rem;
    }
} */