#maze-board table {
  border-collapse: collapse;
}

#maze-board td {
  width: 35px;
  height: 35px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #aaa;
}

#legend table {
  border-collapse: collapse;
}

#legend td {
  width: 50px;
  height: 50px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #aaa;
}

.maze-wall {
  background-color: #333;
}

.maze-path {
  background-color: #fff;
}

.maze-start {
  background-color: limegreen;
  font-weight: bold;
  color: white;
}

.maze-goal {
  background-color: red;
  font-weight: bold;
  color: white;
}

.maze-visited {
  background-color: yellow;
}

.wall {
  background-color: black;
}

.empty {
  background-color: white;
}
.start {
  background-color: green;
}

td.solution {
  background-color: lightgreen;
}
td.optimal {
  background-color: yellow;
}

td.optimal {
  position: relative;
  background-color: #ffa50033;
  overflow: hidden;
}

td.optimal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(242, 255, 0, 0.5),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -150%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 150%;
  }
}

.visited {
  background-color: lightblue;
}

.start {
  background-color: gold;
}

.goal {
  background-color: green;
}
.white-text {
  color: white;
}
