body {
  font-family: bpdotssquares, monospace;
  /*background: url("assets/main background.png") center / 100% 100% no-repeat;*/
  border: 150px solid transparent;
  border-top: 100px solid transparent;
  border-bottom: 50px solid transparent;
  border-image-source: url("assets/main background.png");
  border-image-slice: 100 150 50 150 fill;
  border-image-repeat: stretch;
  margin: 0;
}

.anti_border {
  margin: -100px;
  margin-bottom: 0px;
}

@font-face {
  font-family: bpdotssquares;
  src: url(assets/bpdots.squares-bold.otf);
}

img {
  image-rendering: pixelated;
}

/* Start screen */

.start-screen {
  width: min(100vw, 1080px);
  aspect-ratio: 16 / 10;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  image-rendering: pixelated;
}

.game-title {
  position: absolute;
  width: 55%;
  height: auto;
  left: 22.5%;
  top: 12%;
  image-rendering: pixelated;
}

.start-screen button.start-link {
  position: absolute;
  width: 18%;
  left: 41%;
  bottom: 5%;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
  cursor: pointer;
  line-height: 0;
}

.start-link img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.start-link .button-normal {
  display: block;
}

.start-link .button-hover {
  display: none;
}

.start-link:hover .button-normal,
.start-link:focus-visible .button-normal {
  display: none;
}

.start-link:hover .button-hover,
.start-link:focus-visible .button-hover {
  display: block;
}

.start-link:focus-visible {
  outline: 3px solid yellow;
  outline-offset: 4px;
}

/* End-of-game result screen */

.game-result {
  box-sizing: border-box;
  width: min(680px, calc(100% - 2rem));
  margin: 2rem auto;
  padding: 2rem;
  border: 4px solid #222;
  background: #18182c;
  color: #fff;
  text-align: center;
}

.game-result h2 {
  margin-top: 0;
}

.game-result-rank {
  margin: 1rem 0;
  color: #96ec9c;
  font-size: clamp(2rem, 8vw, 4rem);
}

.game-result button {
  margin-top: 1rem;
  padding: 0.8rem 1.2rem;
  border: 3px solid #08080f;
  background: #117711;
  color: #fff;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

/* Difficulty menu */

.difficulty-options {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.difficulty-button {
  position: relative;
  width: 220px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  image-rendering: pixelated;
}

.difficulty-button img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.difficulty-button .button-hover {
  display: none;
}

.difficulty-button:hover .button-normal,
.difficulty-button:focus-visible .button-normal {
  display: none;
}

.difficulty-button:hover .button-hover,
.difficulty-button:focus-visible .button-hover {
  display: block;
}

.difficulty-button span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #202020;
  font: bold 20px monospace;
}

.difficulty-screen {
  min-height: 80vh;
  box-sizing: border-box;
  padding: 40px 16px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.difficulty-title {
  margin: 0 0 24px;
  text-align: center;
}

.difficulty-options {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}