@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');
/* Remove margins and padding from all elements */
* {
  margin: 0;
  padding: 0;
  font-family: Arial;
}

/* Without this, there is a 4px gap below the canvas and I don't know why */
body {
  display: flex;
  flex-direction: column;
  background-color: #ADD8E6;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------- Header */

@font-face {
  font-family: snowtopcaps;
  src: url(../fonts/snowtopcaps.ttf);
}

.snowtopfont {
  font-family: snowtopcaps, Geneva, Tahoma, sans-serif;
}

header {
  height: 10.5vh;
  padding-top: 1vh;
  background-image: linear-gradient(white, #ADD8E6);
}

.header-box {
  text-align: center;
  width: 100%;
  margin-top: 5px;
}

.header-box div {
  display: inline-block;
  height: 100px;
  vertical-align: top;
}

@media screen and (min-width: 601px) {
  .header-character {
    height: 5rem;
  }

  header h1 {
    font-size: 4.5rem;
    text-align: center;
    color: black;
    font-weight: normal;
  }
}

@media screen and (max-width: 600px) {
  .header-character {
    height: 3.5rem;
  }

  header h1 {
    font-size: 3rem;
    text-align: center;
    color: black;
    font-weight: normal;
  }
}

/* ---------------------------------------------------------------------- Noscript */

noscript {
  display: flex;
  width: 60vw;
  margin: 2rem auto;
  text-align: center;
  align-items: center;
}

.dead-tux {
  height: 5rem;
  width: 5rem;
  background: url(../animations/penguin/penguin_die04.png) no-repeat center center / contain;
}

.dead-tux:last-of-type {
  transform: scaleX(-1);
}

/* ---------------------------------------------------------------------- Health / Snowballs / Audio bar */

/* ------------------------------ Grid */

.progress-container {
  height: 6vh;
  position: absolute;
  top: 10vh;
  width: 100%;
  border-bottom: 2px solid black;
}

.progress-grid {
  display: grid;
  grid-template-columns: 1fr 3fr 3fr;
  width: 100%;
  height: 100%;
  border-bottom: 2px solid black;
}

.grid-item {
  height: 6vh;
  background-color: #ADD8E6;
}

.grid-item-boss {
  height: 3.5vh;
}

/* ------------------------------ Overall */

.height {
  height: 90%;
}

/* ------------------------------ Overlays */

.snowball-meter, .health-meter {
  height: 100%;
}

.progress-overlay {
  z-index: 2;
  background-color: white;
  border-radius: 15px;
  height: 54%;
  left: 20px;
  padding: 0 10px;
  width: 70%;
  margin-left: 50px;
  position: relative;
  top: -5vh;
}

.snowball-bar-back, .health-bar-back {
  width: 76%;
}

.progress-bar-inner {
  position: relative;
  background-color: blue;
  height: 75%;
  top: 13%;
  z-index: 3;
  border-radius: 10px;
}

#health-bar, #snowball-bar {
  width: 100%;
}

.boss-health-container{
  position: absolute;
  width: 100%;
  padding: 0 0;
  border-radius: 15px;
  top: 16vh;
  z-index: 2;
}

#snowman-name{
  position: absolute;
  left: 50%;
  transform: translate(-50%, 0px);
  z-index: 3;
  top: 7%;
  font-size: 20px;
}

.boss-progress-overlay{
  z-index: 2;
  background-color: white;
  border-radius: 15px;
  left: 0;
  padding: 0 10px;
  width: 92%;
  margin-left: 20px;
  position: relative;
  top: 0.5vh;
}

#boss-health-bar{
  position: relative;
  background-color: limegreen;
  height: 75%;
  top: 13%;
  z-index: 3;
  border-radius: 10px;
  width: 100%;
}

.score-container {
  font-family: 'Orbitron', sans-serif;
  color: black;
  font-weight: bold;
  font-size: 1.2rem;
  padding-left: 0.5rem;
}

/* ------------------------------ Audio button */

.audio-button {
  z-index: 2;
  cursor: pointer;
}

.audio-button:hover,
.audio-button:focus {
  box-sizing: border-box;
  border: 2px solid blue;
}

.hide {
  display: none !important;
}

/* ------------------------------ Instructions button */

/* Hover and focus */
.instructions-click:hover,
.instructions-click:focus,
.play-icon:hover + #play-button,
.pause-icon:hover + #pause-button,
.instructions-i:hover + .instructions-click {
  box-sizing: border-box;
  border: 2px solid blue;
  cursor: pointer;
}

.play-icon,
.pause-icon,
.instructions-i {
  color: black;
  position: relative;
  cursor: pointer;
}

.play-icon,
.pause-icon {
  top: -2vh;
  left: 4vh;
}

.instructions-i {
  top: -20px;
  left: 34px;
}

/* ---------------------------------------------------------------------- Modals */

.invisible {
  visibility: hidden;
}

.opaque-overlay {
  background-color: rgba(0,0,0,0.5);
  height: 100vh;
  width: 100vw;
  z-index: 4;
  position: absolute;
  top: 0;
  left: 0;
}

.modal {
  width: 50%;
  left: 25%;
  position: absolute;
  top: 20vh;
  border: 2px solid black;
  padding: 35px;
  line-height: 30px;
  background-image: url('../background/modals.png');
  z-index: 5;
  color: white;
  text-shadow: 1px 1px 1px black;
  border-radius: 10px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* ------------------------------ Modals text */

.header {
  margin-top: 120px;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  color: black;
  text-shadow: 1px 1px 1px white;
}

.modal-text {
  margin-top: 10px;
  font-size: 1.1rem;
}

.modal-header, .modal-p {
  text-align: center;
}

.modal-header {
  font-size: 2rem;
  margin-bottom: 20px;
}

.text-small {
  font-size: 0.5rem;
}

/* ------------------------------ Modal buttons */

button {
  border-radius: 10px;
  padding: 10px;
}

.replay {
  background-color: limegreen;
}

.game-over-button {
  margin-bottom: 20px;
}

.quit-bad {
  position: absolute;
  padding: 3px;
}

.quit-good {
  background-color: aqua;
  width: 100%;
}

/* ------------------------------ Modals transitions */

@-webkit-keyframes fadeIn {
  from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
    to { opacity: 1; }
}

.modal-animation {
  animation: fadeIn 2s;
}

/* ---------------------------------------------------------------------- Footer */

footer {
  width: 100%;
  background-image: linear-gradient(#ADD8E6, white);
  bottom: 0px;
}

footer li {
  display: inline-block;
  padding: 5px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.copyright {
  text-align: center;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.team-github-links {
  text-align: center;
  margin: 0;
  padding: 0;
}

.team-github-links a {
  text-decoration: none;
  color: black;
}

.team-github-links a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------- Rotate device */

#message-content {
  font-family: snowtopcaps, Geneva, Tahoma, sans-serif;
  font-size: 3rem;
  color: blue;
  text-shadow: .3rem .3rem .5rem grey, -.3rem -.3rem .5rem grey;
  text-align: center;
  width: fit-content;
  margin: 2rem auto;
}

#message-content p {
  padding: 0 20vw;
  margin-bottom: 1.2rem;
}

#message-content img {
  height: 50vw;
  width: 50vw;
  max-height: 50vh;
  max-width: 50vh;
}