*, *::before, *::after {
    margin: 0;
    box-sizing: border-box;
        /* border: red solid 1px; */

}

html, body {
    display: flex;
    flex-direction: column;
    margin: 0;    
    padding: 0;
    font-family: 'Press Start 2P', cursive;
    color:#fff;
    overflow: hidden;
  }

/* Backgrounds */

body {
    display: flex;
    flex-direction: row;
    height: 100vh;
    margin: 0;
  }
  
.left,
.right,
.center {
    height: 100%;
}

  .left, .right {
    flex-grow: 0;
    width: 0;
    margin-top: 0;
    background-clip: content-box;
    background-image: url('images/background-left1-1.png');
    background-repeat: repeat-x;
    animation: background-animation-sides 1s infinite;
    box-sizing: border-box;
  }
  
  .left {
    background-position: right center;
    background-size: 28px 100vh;
  }
  
  .right {
    background-position: left center;
    background-size: 28px 100%;
    overflow-x: hidden  }
  
  .center {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-image: url('images/background-center1-1.png');
    background-repeat: repeat-x;
    background-size: 28px 100%;
    animation: background-animation-center 1s infinite;
  }

main {
    display: flex;
    flex-direction: column;
    align-items: center;
} 

.character-card {
    position: relative;
    width: 40vw;
    max-width: 230px;
    height:30vh;
    margin-top: 2vh;
    padding: 1vh 1vw;
    border: 0.08rem solid #000721;
    border-radius: 14px;
    background: #231d24;
    font-size: 1.6rem;
    text-align: center;
    color: white;
    box-shadow: inset 0px 0px 6px 2px rgba(100,100,100,0.2),                0px 0px 10px rgba(117,182,214,0.2);
}

#hero {
  order: 1;
}

#monster {
  margin-top: 10vh;

}
.name {
    width:100%;
    font-size: 80%;
    text-align: center;
    letter-spacing: 0.08em;
}

.avatar {
    width: 12vh;
    max-width:100%;
    border: 2px solid #000721;
    border-radius: 10px;
    background-color: rgba(0, 7, 33, 0.8);
    opacity: 0.8;
}

.health {
    margin: 2vh 0;
    margin-left: 5%;
    font-size:40%;
    font-weight: normal;
    text-align: left;
    color:#ccc;
    letter-spacing: 0.03em}

.health b {
    font-weight: bold;
    color:#fff;
}

.health-bar-outer {
    width:90%;
    height: 1vh;
    margin: 2vh 5%;
    border-radius: 2px;
    background: #171217;
}

.health-bar-outer .health-bar-inner {
    background:  #00FF00;
    height: 100%;
    border-radius: 2px;
}

.health-bar-outer .danger1 {
    background: #81FF00;
}

.health-bar-outer .danger2 {
  background: #FCFD03;
}

.health-bar-outer .danger3 {
  background: #FF8100;
}

.health-bar-outer .danger4 {
  background:#FF0000;
}

.dice-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left:0px;
    right:0;
    bottom:0;
    width:100%;
    height: 20%;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    background: #000721;
    gap: .5rem;
}

.dice, .placeholder-dice{
    width:5.5vh;
    height:5.5vh;
    border:1px solid #666;
    border-radius: 5px;
    background: #fff;   
    text-align: center;
    color:#000721;
    line-height: 6vh;
}

.dice-container .placeholder-dice{
    background-color: transparent;
}

button {
  display: inline-block;
  width: 40vh;
  max-width: 360px;
  height: 9vh;
  margin: 0.5rem auto;
  padding-left:5vw;
  padding-right:5vw;
  border: 2px solid #963404;
  border-radius: 6px;
  background-color: #fcc02a;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.5em;
  text-decoration: none;
  color:#963404;
  cursor: pointer;
  box-shadow: 0px 6px 10px -4px rgba(0,0,0,0.4);
}

#play-again-button {
  font-size: 1.2em;
  padding: 2vh 0;
}

.end-game{
    margin-bottom: auto;
    margin-top: 10em;
    font-size: 0.8em;
    text-align: center;
    letter-spacing: 0.05em;
    line-height: 1.5;
}

.end-emoji{
    font-size: 5rem;
}

.hidden {
  display: none;
}

/* Media queries */

@media (min-width: 768px) {
  .dice, .placeholder-dice{
    height: 5.5vh;
    width: 5.5vh;
  }
  
  .health {
    font-size: 0.6em;
  }
}

@media (min-width: 1024px) {
  main {
    justify-content: center;
    flex-direction: row-reverse;
    gap: 5vh;
  }

  .character-card {
    height: 55vh;
    margin-bottom: 5vh;
    margin-top: 15vh;
    width: 20vw;
    max-width: 345px;
  }

  .name {
    font-size: 1.2em;
    margin: 1rem;
  }

  .health-bar-outer {
    margin: 3vh 5%;
  }

  .avatar {
    width: 70%;
  }

  .dice, .placeholder-dice{
    height: 5.5vh;
    width: 5.5vh;
  }

  #hero,
  #monster {
    margin-top: unset;
  }

  button {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 16vh;
  }
  .end-game {
    letter-spacing: 0.05em;
    font-size: 1em;
    margin-top: 10em;
  }
  #play-again-button {
    padding: 0;
  }
}

@media (min-width: 1366px) {
  .center {
    width: 1008px;
  }    

  .left, .right {
    min-width: 180px;
    flex-grow: 1;
  }

  .dice, .placeholder-dice{
    height: 8vh;
    width: 8vh;
  }

  .health {
    font-size: 0.8em;
  }
  }

  @media (min-width: 1704px) {
    .center {
      width: 1344px
    }
  }

/* Animations */

#peach1,
#peach2 {
  width: 50vw;
  height: 50vh;
  transform: scale(33%);
  position: absolute;
  background: url("images/peach1.png") no-repeat;
  background-size: contain;
  background-position: bottom;
  overflow: hidden;
}

@keyframes background-animation-sides {
  0% {
    background-image: url('images/background-left1-1.png');
  }
  50% {
      background-image: url('images/background-left1-2.png');
  }
  100% {
      background-image: url('images/background-left1-1.png');
  }
}

@keyframes background-animation-center {
  0% {
    background-image: url('images/background-center1-1.png');
  }
  50% {
    background-image: url('images/background-center1-2.png');
  }
  100% {
      background-image: url('images/background-center1-1.png');
  }
}