html,
body {
  font-size: 15px;
  font-family: 'Montserrat', Helvetica Neue, sans-serif !important;
  margin: 0;
  background-color: #94A3B8;
  height: 100%;
}

h1 {
  font: 3rem/4rem 'Bebas Neue', Helvetica Neue, sans-serif;
}

h2 {
  font: 2rem/3rem 'Bebas Neue', Helvetica Neue, sans-serif;
}

h3 {
  font: 1.5rem/2.5rem 'Montserrat', Helvetica Neue, sans-serif;
}

h4 {
  font: 600 1rem/1.8rem 'Montserrat', Helvetica Neue, sans-serif;
}

p {
  font: 400 1rem/1.8rem 'Montserrat', Helvetica Neue, sans-serif;
  margin: 0;
}

button {
  font: 500 1rem/1.8rem 'Montserrat', Helvetica Neue, sans-serif;
  margin: 0;
}

h1, h2, h3, h4, p {
  margin: 0 !important;
}

.page-content {
  max-width: 1024px;
  height: 100%;
  background-color: #F1F5F9;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  /*padding: 20px;*/
}

.page-description, .canvas-container, .instructions-container, .buttons-container {
  padding: 20px;
}

.page-header {
  padding: 20px 20px 0 20px;
  display: flex;
  justify-content: center;
}

.page-description button {
  margin-top: 10px;
}

.canvas-container {
  display: flex;
  flex-direction: column;
  row-gap: 10px;
  align-items: center;
}

canvas {
  border: 1px solid #334155;
  background-color: #FAFAFA;
  max-width: 500px;
}

.buttons-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

@media screen and (max-width: 1023px) {
  .page-description {
    display: none;
  }
  .buttons-container {
    margin-bottom: 40px;
  }
}

@media screen and (min-width: 1024px) {
  .canvas-container {
    flex-direction: row;
    column-gap: 20px;
  }
  .page-description {
    display: block;
  }
}

.paths-legend {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  padding: 20px;
}

.paths-legend-description {
  width: 180px;
}

.legend-container h3 {
  font-weight: 600;
}

.centerDot {
  animation: fade 1.5s infinite ease-in-out;
}

.paths-legend-item {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-items: center;
  justify-content: space-between;
}

.legend-container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.legend-item {
  width: 50px;
  height: 20px;
  border-radius: 6px;
}

button {
  padding: 5px 20px;
  border: none;
  border-radius: 8px;
  transition: all 300ms ease-in-out;
  cursor: pointer;
}

#drawShortestPathBtn, .btn-main {
  background-color: #1E3A8A;
  color: #F1F5F9;
}

#drawShortestPathBtn:hover, .btn-main:hover {
  background-color: #172554;
}

#resetPathsBtn {
  background-color: #881337;
  color: #F1F5F9;
}

#resetPathsBtn:hover {
  background-color: #4C0519;
}

.buttons {
  display: flex;
  flex-direction: row;
  column-gap: 20px;
}

ol li {
  line-height: 1.8rem;
}

.arrow-buttons-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 5px;
  width: 150px; /* Adjust this to control the size */
  height: 150px; /* Adjust this to control the size */
  justify-content: center;
  align-items: center;
  margin: 10px auto; /* Centers the container horizontally */
}

.arrow-buttons-container button {
  width: 50px;
  height: 50px;
  font-size: 20px;
  background-color: #262626; /* Button background color */
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

/* Positioning the buttons in the grid */
#arrowUpBtn {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

#arrowLeftBtn {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

#arrowDownBtn {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}

#arrowRightBtn {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

/* Button hover effects */
.arrow-buttons-container button:hover {
  background-color: #525252;
}

/* Button active effects */
.arrow-buttons-container button:active {
  background-color: #525252;
}

.start-point {
  background-color: black;
}
.path-a {
  background-color: #e0372a;
}
.path-b {
  background-color: #2195d1;
}
.path-c {
  background-color: #3bd121;
}

@keyframes fade {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 1;
  }
}
