@import "note.css";
@import "guitar.css";
@import "meter.css";
@import "message.css";
@import "level-settings.css";
@import "result.css";

body {
  background-color: DarkSlateGray;
}

footer {
  position: fixed;
  bottom: 2%;
  left: 50%;
  transform: translate(-50%, -2%);
  color: FloralWhite;
  font-size: 90%;
  font-style: italic;
  text-align: center;
}

#game {
  position: fixed;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -30%); 
  padding: 10px 20px;
  background-color: FloralWhite;
  display: grid;
  grid-template-rows: 24px 1fr minmax(30px, 60px) 1fr;
  grid-auto-columns: 700px;
  grid-gap: 1em;
  justify-content: center;
  opacity: 1;
}

#meter {
  grid-row: 1;
}

#music {
  grid-row: 2;
  padding-bottom: 1em;
}

#message {
  grid-row: 3;
  align-self: end;
}

#guitar {
  grid-row: 4;
  align-self: start;
}

/* Mobile */
@media only screen and (max-height: 500px) {
  :root {
    --main-font-size: 24px;
    --space: 6px; /* main-font-size * 1/4 */
    --shift-staff-position: 3px; /* space * 1/2 */
  }

  #game {
    grid-template-rows: 10px 1fr minmax(20px, 20px) 1fr;
    grid-auto-columns: 80vw;
    grid-gap: 0;
  }

  #meter {
    font-size: 10px;
  }

  #music {
    padding: 0;
    align-self: center;
    font-size: 24px;
  }

  #message {
    font-size: 12px;
  }

  #guitar {
    margin-top: 0;
    grid-auto-columns: 20px; /* if the following media query fails */
  }

  footer {
    visibility: hidden;
  }

  #result,
  #level-settings {
    font-size: 90%;
  }

  .fretsymbol {
    font-size: 12px;
  }
}

@media (hover: none) and (pointer: none) {
  #guitar {
    grid-auto-columns: 20px;
  }
}

@media only screen and (max-width: 480px) {
  #game {
    padding: 0; 
    display: grid;
    grid-template-rows: 24px 1fr minmax(30px, 60px) 1fr;
    grid-auto-columns: 98vw;
    justify-content: stretch;
    opacity: 1;
  }

  #meter {
    font-size: 14px;
  }

  #message {
    font-size: 18px;
  }

  .fret {
    border-right: 1px solid gold;
  }

  .fretsymbol {
    font-size: 14px;
    border-right: 1px solid FloralWhite;
  }
}


