body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
}

canvas {
    border: 2px solid #333;
    background-color: #e0ffe0; /* Fondo verde suave para el campo externo */
}

.controls {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

/* Estilos para el popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: #333; /* Asegurado en negro */
}

.popup-content h2 {
    margin-top: 0;
    color: #333;
}

.popup-content button {
    margin-top: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
}

/* Estilos para el contador de preparación */
#countdownDisplay {
    font-size: 3em;
    color: #591919; /* ¡Nuevo color aplicado aquí! */
}


/* ... (código CSS anterior) ... */

.controls label, .controls select {
    font-size: 16px;
    margin-left: 10px;
}

select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* ... (resto del código CSS) ... */


/* ... (código CSS anterior) ... */

.instructions {
    margin-top: 30px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
    width: 780px; /* Ancho similar al canvas */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.instructions h3 {
    margin-top: 0;
    color: #333;
}

.instructions p {
    margin: 5px 0;
    color: #555;
}

/* Estilo para simular teclas de teclado */
kbd {
    display: inline-block;
    padding: 3px 5px;
    font-family: monospace;
    font-size: 0.9em;
    line-height: 1;
    color: #444;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 0 0 2px #fff inset;
    white-space: nowrap;
}

/* ... (resto del código CSS) ... */