body {
  text-align: center;
  padding-top: 25px;
  font-family: "Press Start 2p";
}

.black {
  background-color: black;
}
.fumny_alert {
  display: none;
}
.absolute {
  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
  margin-bottom: auto;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@media (max-width: 900px) {
  .snake {
    display: none;
  }
  .fumny_pic {
    max-width: 250px;
  }
  .fumny_alert {
    display: block;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 100px;
    text-align: center;
  }
  .fumny_text {
    color: white;
    font-size: 24px;
    font-weight: 400px;
    font-family: "Montserrat";
    display: inline-block;
  }
}
#canvas {
  position: relative;
}

.game-alert {
  position: absolute;
  width: 350px;
  height: 300px;
  background-color: white;
  border-radius: 5px;
  z-index: 2;
}
.game-restart {
  border: 2px solid blueviolet;
  border-radius: 3px;
  display: inline-block;
  padding: 10px 15px;
  margin: 0;
  text-decoration: none;
  background: rgb(31, 31, 93);
  cursor: pointer;
  transition: background 250ms ease-in-out, transform 150ms ease;
}
.game-over {
  font-size: 24px;
}

.game-result {
  margin-top: 30px;
  margin-bottom: 30px;
  font-size: 16px;
}
.game-joke {
  font-size: 16px;
  margin-bottom: 30px;
}
.svg-restart {
  width: 40px;
  height: 40px;
  fill: blueviolet;
}
.display-none {
  display: none;
}
.snake-header {
  max-width: 1350px;
  margin: 0 auto;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-score {
  margin: 0px;
  margin-top: 10px;
  color: white;
  font-size: 22px;
}
.black-fz {
  color: black;
}
.medium-width {
  max-width: 1140px;
}
.first-alert {
  position: absolute;
  width: 395px;
  height: 450px;
  background-color: white;
  z-index: 2;
  border-radius: 5px;
}
.message {
  max-width: 350px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.5;
}
.message:nth-child(1) {
  margin-top: 20px;
  margin-bottom: 20px;
}
.message:nth-child(2) {
  margin-bottom: 10px;
}
.message-img {
  margin-top: 20px;
  margin-bottom: 20px;
  border-radius: 2px;
}
.close-button {
  text-decoration: none;
  display: inline-block;
  padding: 8px 8px;
  color: #8c52a7ad;
  transition: 0.4s;
}
.close-button:hover {
  color: purple;
}
.title {
  display: inline-block;
  font-size: 40px;
  margin: 0;
  letter-spacing: 6px;
}
.smaller-fz {
  margin-top: 10px;
  font-size: 28px;
}
.neon-title {
  animation: flicker 1.5s infinite alternate;
  color: #fff;
  font-weight: 400;
}
@keyframes flicker {
  0%,
  18%,
  22%,
  25%,
  53%,
  57%,
  100% {
    text-shadow: 0 0 4px #fff, 0 0 11px #fff, 0 0 19px #fff, 0 0 40px #0fa,
      0 0 80px #0fa, 0 0 90px #0fa, 0 0 100px #0fa, 0 0 150px #0fa;
  }

  20%,
  24%,
  55% {
    text-shadow: none;
  }
}

.settings-button {
  text-decoration: none;
  display: inline-block;
  margin: 10px 20px;
  padding: 15px 30px;
  overflow: hidden;
  border: 2px solid;
  border-bottom-width: 4px;
  font-family: "Press start 2p", sans-serif;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 2px;
  color: rgb(30, 71, 255);
  background: rgba(255, 255, 255, 1);
  -webkit-transition: color 0.3s, background 0.5s;
  transition: color 0.3s, background 0.5s;
}
.settings-button:hover {
  -webkit-animation: stripes 0.75s infinite linear;
  animation: stripes 0.75s infinite linear;
  background: -webkit-linear-gradient(
    45deg,
    rgba(30, 45, 255, 1) 25%,
    rgba(255, 255, 255, 1) 25%,
    rgba(255, 255, 255, 1) 50%,
    rgba(30, 45, 255, 1) 50%,
    rgba(30, 45, 255, 1) 75%,
    rgba(255, 255, 255, 1) 75%,
    rgba(255, 255, 255, 1)
  );
  background: linear-gradient(
    45deg,
    rgba(30, 45, 255, 1) 25%,
    rgba(255, 255, 255, 1) 25%,
    rgba(255, 255, 255, 1) 50%,
    rgba(30, 45, 255, 1) 50%,
    rgba(30, 45, 255, 1) 75%,
    rgba(255, 255, 255, 1) 75%,
    rgba(255, 255, 255, 1)
  );
  background-size: 10px 10px;
  color: #ff5050;
}
@-webkit-keyframes stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 0;
  }
}
@keyframes stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 0;
  }
}
.game-settings {
  position: absolute;
  width: 300px;
  height: 425px;
  background-color: white;
  border-radius: 5px;
  z-index: 2;
}

.game-settings:before,
.game-alert:before,
.first-alert:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  -webkit-box-shadow: 0 0 17px 3px #ffff01, 0 0 4px 2px #ffff01;
  box-shadow: 0 0 17px 3px #ffff01, 0 0 4px 2px #ffff01;
  z-index: -1;
  -webkit-animation-name: gradient-shadow;
  animation-name: gradient-shadow;
  -webkit-animation-timing-function: ease;
  animation-timing-function: ease;
  -webkit-animation-duration: 2s;
  animation-duration: 2s;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}
@-webkit-keyframes gradient-shadow {
  0% {
    -webkit-box-shadow: 0 0 17px 3px #c586c0, 0 0 4px 2px #c586c0;
    box-shadow: 0 0 17px 3px #c586c0, 0 0 4px 2px #c586c0;
  }
  20% {
    -webkit-box-shadow: 0 0 17px 3px #0ff, 0 0 4px 2px #0ff;
    box-shadow: 0 0 17px 3px #0ff, 0 0 4px 2px #0ff;
  }
  40% {
    -webkit-box-shadow: 0 0 17px 3px #0f0, 0 0 4px 2px #0f0;
    box-shadow: 0 0 17px 3px #0f0, 0 0 4px 2px #0f0;
  }
  60% {
    -webkit-box-shadow: 0 0 17px 3px #ffff01, 0 0 4px 2px #ffff01;
    box-shadow: 0 0 17px 3px #ffff01, 0 0 4px 2px #ffff01;
  }
  80% {
    -webkit-box-shadow: 0 0 17px 3px #f00, 0 0 4px 2px #f00;
    box-shadow: 0 0 17px 3px #f00, 0 0 4px 2px #f00;
  }
  100% {
    -webkit-box-shadow: 0 0 17px 3px #c586c0, 0 0 4px 2px #c586c0;
    box-shadow: 0 0 17px 3px #c586c0, 0 0 4px 2px #c586c0;
  }
}

@keyframes gradient-shadow {
  0% {
    -webkit-box-shadow: 0 0 17px 3px #c586c0, 0 0 4px 2px #c586c0;
    box-shadow: 0 0 17px 3px #c586c0, 0 0 4px 2px #c586c0;
  }
  20% {
    -webkit-box-shadow: 0 0 17px 3px #0ff, 0 0 4px 2px #0ff;
    box-shadow: 0 0 17px 3px #0ff, 0 0 4px 2px #0ff;
  }
  40% {
    -webkit-box-shadow: 0 0 17px 3px #0f0, 0 0 4px 2px #0f0;
    box-shadow: 0 0 17px 3px #0f0, 0 0 4px 2px #0f0;
  }
  60% {
    -webkit-box-shadow: 0 0 17px 3px #ffff01, 0 0 4px 2px #ffff01;
    box-shadow: 0 0 17px 3px #ffff01, 0 0 4px 2px #ffff01;
  }
  80% {
    -webkit-box-shadow: 0 0 17px 3px #f00, 0 0 4px 2px #f00;
    box-shadow: 0 0 17px 3px #f00, 0 0 4px 2px #f00;
  }
  100% {
    -webkit-box-shadow: 0 0 17px 3px #c586c0, 0 0 4px 2px #c586c0;
    box-shadow: 0 0 17px 3px #c586c0, 0 0 4px 2px #c586c0;
  }
}

.settings-option {
  display: inline-block;
  margin: 17px 0;
  font-size: 10px;
}
.settings-wrapper {
  margin-left: 20px;

  text-align: left;
}
.settings-select {
  max-height: 22px;
  margin-left: 10px;
}
.save-wrapper {
  margin-top: 15px;
}

.save-button {
  text-decoration: none;
  display: inline-block;
  padding: 8px 8px;
  color: #0f78f1ad;
  transition: 0.4s;
}

.save-button:hover {
  color: #0000ff;
}
.footer {
  text-align: center;
  margin-top: 20px;
  font-family: "Montserrat";
}
.footer-link {
  color: coral;
  margin-right: 20px;
}
.laptop {
  display: none;
}
@media (max-width: 1600px) {
  .canvas {
    display: none;
  }
  .laptop {
    display: block;
    margin: 0 auto;
  }
  .snake-header {
    max-width: 1080px;
    margin-bottom: 10px;
  }
  .title {
    font-size: 25px;
  }
  .settings-button {
    padding: 10px 20px;
    margin-right: 0;
  }
  .user-score {
    font-size: 18px;
    margin-bottom: 5px;
  }
  body {
    padding: 0;
  }
}
