body {
  background-color: #000;
  overscroll-behavior: contain;
}



.loading {
  display: block;
  position: absolute;
  z-index: 100;
  width: 100%;
  height: 100%;

  left: 0;
  top: 0;
  background-color: #000000;
  /* animation-name: shrink;
  animation-duration: 4s;
  animation-fill-mode: forwards; */
}

.loadingDone {
  display: block;
  position: absolute;
  z-index: 100;
  width: 100%;
  height: 100%;

  left: 0;
  top: 0;
  background-color: #000000;
  animation-name: shrink;
  animation-duration: 6s;
  animation-fill-mode: forwards;
}



@keyframes rotate {
  to {
    /* border-radius: 50%; */
    transform: rotate(360deg);

  }
}

@keyframes shrink {
  to {
    /* border-radius: 50%; */
    transform: translate(0, -500%);

  }
}





@media (min-width:320px) {
  body {

    font-size: 200%;
  }

  /* smartphones, iPhone, portrait 480x320 phones */
}

@media (min-width:481px) {

  /* portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide. */
  body {

    font-size: 200%;
  }
}

@media (min-width:641px) {

  /* portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones */
  body {

    font-size: 200%;
  }
}

@media (min-width:981px) {
  body {

    font-size: 100%;
  }
}

@media (min-width:1025px) {

  /* big landscape tablets, laptops, and desktops */
  body {

    font-size: 100%;
  }
}

@media (min-width:1281px) {
  body {

    font-size: 100%;
  }

  /* hi-res laptops and desktops */
  /* .navigation {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;

    list-style: none;
    margin: 0;
    background: deepskyblue;


    align-items: center;
    justify-content: center;
    font-size: 100%;
  } */
}


.navigation {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;

  list-style: none;
  margin: 0;
  background: deepskyblue;


  align-items: center;
  justify-content: center;
}

.navigation a {
  text-decoration: none;
  display: block;
  padding: 1em;
  color: white;
}

.navigation span {
  text-decoration: none;
  display: block;
  padding: 1em;
  color: #1565C0;
}

.navigation input {
  text-decoration: none;
  display: block;
  padding: 1em;
  color: #1565C0;
}

.navigation label {
  text-decoration: none;
  display: block;
  padding: 1em;
  color: #1565C0;
}


.navigation a:hover {
  background: #1565C0;
}

/* drop down */
.navigation li ul {
  display: none;
}

.navigation li:hover ul {
  display: block;
  position: absolute;
  z-index: 100;
  /* margin-top: 5px; */
  background: #27ae60;
  border-radius: 0px 6px 6px 6px;
  /* width: 100%; */
  padding: 10px 2px;
  box-shadow: 0px 20px 100px 0px rgba(0, 0, 0, 0.5);
}

.navigation li ul li a:hover {
  background: #19703d;
}

.navigation li:hover a {
  background: #27ae60;
}

@media all and (max-width: 800px) {
  .navigation {
    justify-content: space-around;
  }
}

@media all and (max-width: 600px) {
  .navigation {
    flex-flow: column wrap;
    padding: 0;
  }

  .navigation a {
    text-align: center;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .navigation li:last-of-type a {
    border-bottom: none;
  }
}

.main {
  display: flex;
  --s: 25px;
  /* size  */
  --m: 1px;
  /* margin */
  --f: calc(var(--s) * 1.7320508 + 4 * var(--m) - 0.5px);
  /* z-index: 1; */

  /* align-items: center; */
  justify-content: center;
}

#screen {
  /* display: flex; */
  font-size: 0;
  max-width: calc(26*50px);
  /* font-size: initial; */
  background: black;
  /* wheat; */
  border: 0.2em solid #2e2e2e;
  /* z-index: 1; */
}

#screen::before {
  content: "";
  width: calc(var(--s)/2 + var(--m));
  float: left;
  height: 100%;
  shape-outside: repeating-linear-gradient(#0000 0 calc(var(--f) - 1px), #000 0 var(--f));
  /* background: repeating-linear-gradient(rgb(0, 0, 0) 0 calc(var(--f) - 1px), rgb(255, 0, 0) 0 var(--f)); */

}


#screen .hexagon {
  cursor: grabbing !important;
  background: rgb(122, 121, 121);
  width: var(--s);
  margin: var(--m);
  height: calc(var(--s) * 1.1547);
  /* font-size: 70%; */
  display: inline-block;
  font-size: initial;
  /* we reset the font-size if we want to add some content */
  clip-path: polygon(0% 25%, 0% 75%, 50% 100%, 100% 75%, 100% 25%, 50% 0%);

  text-align: center;
  line-height: 1.7;

  margin-bottom: calc(var(--m) - var(--s) * 0.2886);
  z-index: 1;
}

#screen .hexagon.obsticle {
  background: rgb(40, 40, 40);
}

#screen .hexagon:active {
  cursor: grabbing;
}

#screen .hexagon.visited {
  background: rgb(255, 0, 0);
  /* animation: grow 1s normal linear; */
}

@keyframes grow {
  from {
    /* transform: scale(0.01); */
    background: rgb(0, 0, 0);

  }

  to {
    /* transform: scale(1); */
    background: rgb(255, 0, 0);
  }
}

#screen .hexagon.start {
  background: greenyellow !important;
}

#screen .hexagon.end {
  background: green !important;
}



#screen .hexagon.path {
  background: rgb(255, 255, 255);

}



.stateOne {
  background-color: rgb(0, 121, 161);
  ;
  border-radius: 12px 12px 12px 12px;
}


.stateTwo {

  border-radius: 6px 6px 6px 6px;
  background-color: #520066;
  background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  animation: spin 1s normal linear infinite;

}

.stateThree {
  border-radius: 6px 6px 6px 6px;

  background-color: rgb(167, 167, 167);
}

@keyframes spin {
  0% {
    background-color: #520066;
    background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }

  12.5% {
    background-color: #520066;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }

  25% {
    background-color: #520066;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }

  37.5% {
    background-color: #520066;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }

  50% {
    background-color: #520066;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }

  62.5% {
    background-color: #520066;
    background-image: linear-gradient(225deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }

  75% {
    background-color: #520066;
    background-image: linear-gradient(270deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }

  87.5% {
    background-color: #520066;
    background-image: linear-gradient(315deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }

  100% {
    background-color: #520066;
    background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0px, rgba(255, 255, 255, 0) 100%);
  }
}


/* .navigation li:hover a {

  background: #27ae60;
} */

.lds-roller {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

}

.lds-roller div {
  animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  transform-origin: 40px 40px;
}

.lds-roller div:after {
  content: " ";
  display: block;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  margin: -4px 0 0 -4px;
}

.lds-roller div:nth-child(1) {
  animation-delay: -0.036s;
}

.lds-roller div:nth-child(1):after {
  top: 63px;
  left: 63px;
}

.lds-roller div:nth-child(2) {
  animation-delay: -0.072s;
}

.lds-roller div:nth-child(2):after {
  top: 68px;
  left: 56px;
}

.lds-roller div:nth-child(3) {
  animation-delay: -0.108s;
}

.lds-roller div:nth-child(3):after {
  top: 71px;
  left: 48px;
}

.lds-roller div:nth-child(4) {
  animation-delay: -0.144s;
}

.lds-roller div:nth-child(4):after {
  top: 72px;
  left: 40px;
}

.lds-roller div:nth-child(5) {
  animation-delay: -0.18s;
}

.lds-roller div:nth-child(5):after {
  top: 71px;
  left: 32px;
}

.lds-roller div:nth-child(6) {
  animation-delay: -0.216s;
}

.lds-roller div:nth-child(6):after {
  top: 68px;
  left: 24px;
}

.lds-roller div:nth-child(7) {
  animation-delay: -0.252s;
}

.lds-roller div:nth-child(7):after {
  top: 63px;
  left: 17px;
}

.lds-roller div:nth-child(8) {
  animation-delay: -0.288s;
}

.lds-roller div:nth-child(8):after {
  top: 56px;
  left: 12px;
}

@keyframes lds-roller {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}




.controls {
  height: 2.5em;
  position: fixed;
  bottom: 0%;
  right: 0%;
  width: 50px;
  /* background-color: #ff0000; */
  opacity: 1;
  transition: all .3s ease-in-out;

  /* visibility: hidden; */
}

.controls:hover {
  width: 100%;
  /* background-color: #ff0000; */
  opacity: 1;

}

.controls ul {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;

  list-style: none;
  margin: 0;
  background: deepskyblue;

  height: 100%;
  align-items: center;
  justify-content: right;
  font-size: 100%;

}

.halfcircle {
  float: left;
  width: 3em;
  height: 100%;
  border-radius: 50% 0 0 50%;

  background: deepskyblue;
}

.controls ul a {

  text-decoration: none;
  display: block;
  padding: 0.7em 1em;
  /* background-image: linear-gradient(to bottom, rgba(240, 255, 40, 1) 0%, rgba(240, 255, 40, 1) 100%), linear-gradient(to bottom, rgba(240, 40, 40, 1) 0%, rgba(240, 40, 40, 1) 100%);
  background-clip: content-box, padding-box; */
  color: white;
}

.controlHolder {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;

  list-style: none;
  margin: 0;


  align-items: center;
  justify-content: left;
}

.controls ul .hexagon {
  --s: 25px;
  /* size  */
  --m: 1px;
  /* margin */
  --f: calc(var(--s) * 1.7320508 + 4 * var(--m) - 0.5px);
  cursor: grabbing !important;
  background: rgb(122, 121, 121);
  width: var(--s);
  margin: var(--m);
  height: calc(var(--s) * 1.1547);
  /* font-size: 70%; */
  display: inline-block;
  font-size: initial;
  /* we reset the font-size if we want to add some content */
  clip-path: polygon(0% 25%, 0% 75%, 50% 100%, 100% 75%, 100% 25%, 50% 0%);

  text-align: center;
  line-height: 1.7;

  margin-bottom: calc(var(--m) - var(--s) * 0.2886);
  z-index: 1;
}

.controls ul .hexagon.start {
  background: greenyellow;
}

.controls ul .hexagon.end {
  background: green !important;
}

.controls ul .hexagon.obsticle {
  background: rgb(40, 40, 40);
}

.controls li ul {
  display: none;
  height: auto;
  position: absolute;
  z-index: 100;
  /* margin-top: 5px; */
  bottom: 100%;
  background: #27ae60;
  border-radius: 6px 6px 6px 0px;
  /* width: 100%; */
  padding: 10px 2px;
  box-shadow: 0px 20px 100px 0px rgba(0, 0, 0, 0.5);
}

.controls li:hover ul {
  display: block;
}


.controls li:hover ul a {
  display: block;
}

/* Change the background color of the dropup button when the dropup content is shown */
.controls li:hover ul a:hover {
  background-color: #19703d;
}

.controls ul a:hover {
  background: #19703d;
}