html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background: #222;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

*, *::before, *::after {
    box-sizing: border-box;
    outline: 0 none;
}

#grid {
    display: inline-block;
}

#grid .row {
    display: flex;
}

#grid .cell {
    display: inline-block;
    background: #fff;
    width: 40px;
    height: 40px;
    transition: background 0.4s ease;
    overflow: hidden;
}

#grid .cell.wall {
    background: #222;
}

#grid .cell.start {
    background: darkcyan;
}

#grid .cell.finish {
    background: firebrick;
}

#grid .cell.free {
    background: #fff;
}

#grid .cell.path {
    background: rgb(214, 167, 136);
}

#controls button {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 2px solid green;
    color: green;
}

#controls button:disabled {
    opacity: 0.4;
    border: 2px solid red;
    color: red;
}

#controls #reload {
    border: 2px solid #bbb;
    color: #bbb;
}
