body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    /* Evita el zoom/scroll no deseado en dispositivos móviles */
    touch-action: pan-y; 
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em; /* Ajuste para móviles */
}

/* Estilos de botones (asumo que están en el HTML) */
#etsyButton, #newMazeButton {
    padding: 10px 20px;
    margin: 5px; 
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
}

#etsyButton {
    background-color: #ff6f61;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#newMazeButton {
    background-color: #4CAF50;
    color: white;
}

#game-container {
    /* HACE EL CONTENEDOR RESPONSIVE */
    max-width: 95vw; /* Limita el ancho al 95% del ancho de la pantalla */
    max-height: 95vh; /* Limita la altura al 95% del alto de la pantalla */
    margin-top: 10px;
    
    /* Configuración del borde grueso */
    border: 20px solid black; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    /* Permite que el canvas se estire dentro */
    display: flex; 
    justify-content: center;
    align-items: center;
}

canvas {
    /* FUERZA AL CANVAS A ESCALAR DENTRO DEL CONTENEDOR */
    width: 100%;
    height: 100%;
    display: block; 
}

#message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 1.5em; 
    display: none; 
    text-align: center;
}