/*
  NAME: Pearl Chen
  CS 132 Spring 2023

  Factoring out all z-index styles to keep track of stacking, in ascending order
*/

main,
body {
  /* To prevent blocking interactive elements */
  position: relative;
  z-index: -2;
}

/* In game, so that title text is behind foregrounds/backgrounds */
#dino-game,
h3 {
  z-index: -1;
}

.bg.sliding-layer,
#char-creation-view > h3 {
  z-index: 0;
}

header,
#char-creation-view > div > img {
  z-index: 1;
}

/* In game, keeping blinking message above set board */

.bg.sliding-layer:nth-child(3) {
  z-index: 2;
}

#board {
  z-index: 3;
}

.foreground,
.popup {
  position: relative;
  z-index: 4;
}

#err-msg,
#login-success {
  z-index: 5;
}
