:root {
  font-family: "Varela Round", system-ui, sans-serif; /* Google Font */
  --medium: #ff69cd;
  --light: #ffdaf3;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  max-width: 600px;
  margin: 0.5em auto;
  display: grid;
  gap: 0.5em;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: 300%;
  color: var(--medium);
}

a {
  text-decoration: none;
  position: relative;
}

a::before {
  content: ''; /* Necessary for the pseudo-element to be generated */
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  width: 0; 
  height: 0; 
  border-left: 1rem solid var(--light); /* Color of the triangle */
  border-top: 0.75rem solid transparent;
  border-bottom: 0.75rem solid transparent;

}

a, summary {
  height: 3rem;
  width: 3rem;
  border: 3px solid var(--light);
  border-radius: 1rem;
  background-color: var(--medium);
  border-color: var(--light);
  color: black;
  font-size: 200%;
  font-weight: bold;
  text-align: center;
  user-select: none;
  outline: none;
}

a:hover, summary:hover {
  border-color: var(--medium);
  background-color: var(--light);
  color: var(--medium);
}

a:hover::before {
  border-left-color: var(--medium);
}

summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  color: var(--light);
  padding-block-start: 0.1rem;
  padding-inline-start: 0.1rem;
}

summary[open] {
  color: var(--medium);
}

summary::-webkit-details-marker,
summary::marker {
  display: none;
}

header {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 0.5em;
}

details > div {
  position: absolute;
  top: 0;
  left: 3.5em;
  z-index: 1;
  background-color: white;
  border: 3px solid var(--medium);
  border-radius: 1em;
  padding: 0.5em;
  user-select: none;
}

canvas {
  border: 3px solid var(--medium);
  border-radius: 1rem;
  max-width: 600px;
  max-height: 600px;
}

#steering::after {
  content: "Use left/right arrows";
}

@media(hover: none) {
  #steering::after {
    content: 'Tap left/right';
  }
}

@media(max-width: 600px) {
  body {
    width: 100vw;
  }

  h1 {
    font-size: 200%;
  }

  canvas {
    width: 100vw;
    height: 100vw;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}
