@font-face {
  font-family: "NHU";
  src: url("/fonts/NHU-Regular.ttf");
}

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: fixed;
  font-family: "NHU", sans-serif;
  font-size: 1rem;
  color: #eee;
}

body {
  padding: 2rem;
  box-sizing: border-box;
  background-color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

a, .restart {
  color: #63c4ff;
  cursor: pointer;
}

h1 {
  font-size: 1rem;
}

hr {
  border: none;
  width: 50%;
  height: 1px;
  background-color: #555;
  opacity: 0.2;
}

#snakeCanvas {
  position: absolute;
  z-index: -1;
}

.wrapper {
  max-width: 67rem;
  height: 28rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.portrait {
  height: 100%;
  flex: 2.4;
  overflow: hidden;
  opacity: 0.8;
}

.portrait img {
  height: 100%;
  transform: translate(-15%, 0);
  color: transparent;
}

.info {
  flex: 3;
  padding: 1rem 2rem;
  height: 100%;
  box-sizing: border-box;
  background-color: #1c1c1cb3;
}

.links {
  line-height: 2rem;
  margin-bottom: 0;
}

.links a {
  margin-right: 0.5rem;
  padding: 0.5rem 0;
}

.arrowKeys {
  position: absolute;
  bottom: 0.7rem;
  text-align: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.arrowKeys p {
  margin: auto;
}

.arrowKeys img {
  width: 5rem;
}

.scoreWrap {
  position: absolute;
  opacity: 0;
  transition: opacity 0.3s;
  bottom: 1rem;
  left: 1rem;
}

.scoreWrap p {
  margin: 0;
}

@media screen and (max-width: 1150px) {
  html {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 950px) {
  html {
    font-size: 0.75rem;
  }
}

@media screen and (max-width: 850px) {
  .wrapper {
    display: block;
    max-width: 40rem;
    height: auto;
  }

  .portrait {
    height: 20rem;
  }

  .portrait img {
    transform: translate(0, -15%);
    height: 30rem;
  }

  .arrowKeys {
    font-size: 0.8rem;
  }

  .arrowKeys img {
    width: 4rem;
  }
}

@media screen and (max-width: 550px) {
  .wrapper {
    max-width: 35rem;
  }
}

@media screen and (max-width: 450px) {
  .wrapper {
    width: 100%;
    max-width: none;
  }

  .portrait {
    height: 15rem;
  }

  .portrait img {
    transform: translate(0, -15%);
    height: 27rem;
  }

  .info {
    padding: 1rem 1rem;
  }
}

@media screen and (max-width: 360px) {
  .portrait {
    height: 15rem;
  }

  .portrait img {
    transform: translate(-10%, -15%);
    height: 24rem;
  }
}

@media screen and (max-width: 300px) {
  .portrait {
    height: 10rem;
  }

  .portrait img {
    transform: translate(-10%, -15%);
    height: 20rem;
  }
}

@media screen and (max-width: 270px) {
  .portrait {
    display: none;
  }
}

@media screen and (max-width: 850px) and (max-height: 680px) {
  html {
    font-size: 0.7rem;
  }
}


@media screen and (max-width: 415px) and (max-height: 680px) {
  .portrait img {
    height: 24rem;
  }

  .portrait {
    height: 10rem;
  }
}

@media screen and (max-width: 360px) and (max-height: 680px) {
  body {
    padding: 1rem;
  }

  .portrait img {
    height: 23rem;
  }

  .portrait {
    height: 8rem;
  }

  .info {
    padding: 1rem 1rem;
  }
}

@media screen and (max-width: 300px) and (max-height: 680px) {
  .portrait img {
    transform: translate(-15%, -15%);
  }
}

@media screen and (max-width: 850px) and (max-height: 700px) {
  .portrait {
    height: 15rem;
  }
}

@media screen and (max-width: 850px) and (max-height: 640px) {
  .portrait {
    height: 12rem;
  }

  .portrait img {
    height: 28rem;
  }
}

@media screen and (max-width: 850px) and (max-height: 550px) {
  .portrait {
    display: none;
  }
}

@media screen and (max-width: 400px) and (max-height: 600px) {
  .portrait img {
    height: 24rem;
    transform: translate(-10%, -15%);
  }

  .portrait {
    height: 10rem;
  }
}
