/* Estilo para el contenedor del juego */
#contenedor {
    width: 400px;
    margin: 0 auto;
    text-align: center;
}

/* Estilo para la tabla y celdas */
table {
    border-collapse: collapse;
    border: 2px solid #2d2d2d;
    margin: 20px auto;
    table-layout: fixed;
    width: 400px;
}

td {
    width: 100px;
    height: 100px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #2d2d2d;
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

td:hover {
    background-color: #007bff;
    transform: scale(1.1);
}

img {
    max-width: 100%;
    height: auto;
}

/* Estilo para los botones */
button {
    background-color: #ff6f61;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    margin: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

button:hover {
    background-color: #ff0000;
}

/* Estilo para el panel */
#panel {
    text-align: center;
}

/* Estilo para el mensaje emergente */
#popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 999;
}

#popupMessage {
    background: #ff6f61;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    text-align: center;
    font-size: 20px;
    color: #fff;
}

#popupClose {
    background-color: #ff0000;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease-in-out;
}

#popupClose:hover {
    background-color: #cc0000;
}


#inicio{
    display: inline-block;
}

#reiniciar{
    display: none;
}

#guardarPartida{
    display: none;
}

#cargarPartida{
    display: inline-block;
}


@media (max-width: 768px) {
    #contenedor {
        width: 100%;
        text-align: center;
    }

    table {
        width: 100%;
        margin: 10px auto;
    }

    td {
        width: 25%; 
        height: auto; /* Permite que la altura se ajuste automáticamente */
    }

    td img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}