body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-row {
    display: flex;
    flex: 1;
    background-color: #f4d1ae;
}

.left {
    flex: 1;
    background-color: #f7b2b7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.divider {
    width: 2%;
    background-color: #e1e5ea;
}

.right {
    flex: 3;
    background-color: #c6def1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.bottom-row {
    height: 40px;
    background-color: #a2d5c6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

button,
input[type="number"],
input[type="file"],
input[type="radio"] {
    border: 2px solid red;
    border-radius: 10px;
    background-color: white;
    color: black;
    padding: 8px;
    font-size: 16px;
    cursor: pointer;
}

input[type="file"] {
    width: 80%;
}

input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid red;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

input[type="radio"]:checked::before {
    content: "";
    width: 10px;
    height: 10px;
    background-color: black;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

button:hover {
    background-color: #f8d7da;
}

#countdown {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

#wordList {
    font-size: 30px;
    font-weight: bold;
}

#wordList div {
    margin: 5px 0;
}

hr {
    width: 50%;
    border: 1px solid #000;
    margin: 10px auto;
}

#finalWords {
    font-size: 24px;
    font-weight: bold;
}

#finalWordsList {
    font-size: 24px;
    font-style: italic;
    font-weight: normal;
}

#finalWordsList p {
    margin: 2px 0;
}

button:last-of-type {
    margin-bottom: 20px; /* Aggiunge spazio sotto il pulsante Restart */
}

/* ===============================
   STILI SPOSTATI DALL'HTML
   =============================== */

/* Contenitore generale per la sezione di impostazioni */
.settings-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* allinea etichette e input a sinistra */
    gap: 10px;
    width: 80%;
    margin: 0 auto;
}

/* Righe di input: label e input affiancati orizzontalmente */
.field-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    max-width: 300px; /* larghezza massima uguale per tutti */
    margin: 0 auto;
}

.field-row label {
    flex: 1;
    text-align: left;
    margin-right: 5px;
    font-weight: bold;
}

.field-row input[type="number"] {
    width: 80px; /* stessa larghezza per i campi numerici */
}

/* Contenitore per i radio button Shuffle, centrato orizzontalmente */
.shuffle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Contenitore del pulsante Start per centrarlo */
.start-button-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Schermata di gioco: sistemiamo il pulsante Restart in alto e centrato */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* tiene il contenuto centrato orizzontalmente */
    justify-content: flex-start; /* in alto */
    width: 100%;
    height: 100%;
    gap: 10px;
    position: relative;
}

/* Pulsante Restart in alto e centrato orizzontalmente */
#restartButton {
    margin-top: 10px; /* piccolo distacco dal bordo in alto */
    align-self: center; /* centra orizzontalmente */
}
