body {
    font-family: Arial, sans-serif;
    width: 100%;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.container {
    width: auto;
    margin: 0 auto;
    padding: 20px;
    text-align: center; /* Center align the contents */
}

h1 {
    width: 100%;
    text-align: center;
}

label {
    margin-right: 5px;
}

input {
    width: 50px;
}

button {
    margin-top: 10px;
    cursor: pointer;
}

#board {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(var(--cols, 8), 50px); /* Added default value for --cols */
    gap: 2px;
    border: 1px solid #ccc;
    width: 100%; /* Added to fit the grid to its contents */
    text-align: center;
    justify-content: center;
    align-items: center;
}

.square {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #f0f0f0;
}

/* Add bold styles to the knight emoji */
.square strong {
    font-weight: bold;
}

/* Highlight the board with orange when the knight is present */
.square.highlight {
    background-color: orange;
}

.info {
    border: 1px dotted #000000;
    padding: 20px 20px 5px 20px;
    margin: auto auto;
    width: 80%;
    border-radius: 8px;
    border-width: 5px;
    justify-content: center;
    text-align: center;
}

.github-icon {
    position: absolute;
    top: 10px;
    right: 8%;
    font-size: 36px;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    color: rgb(228, 228, 228);
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;

    background-color: #000000;
}

.github-icon:hover{
    color: white;
}

@media (max-width: 767px) {
    body{
        width: 95%;
    }

    .github-icon {
        right: 3%;
    }
    #board{
        padding: 0;
        margin-bottom: 0px;
        grid-template-columns: repeat(var(--cols, 8), 30px); /* Added default value for --cols */
        border: 1px solid #ccc;
        width: 100%; /* Added to fit the grid to its contents */
    }
    
    .square {
        width: 30px;
        height: 30px;
    }
}