*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
  font-family: 'Barlow Semi Condensed', sans-serif;
  transition: 0.4s;
}

button{
  font-size: 20px;
  letter-spacing: 2px;
  font-weight: 600;
  padding: 8px 32px;
  border-radius: 8px;
  background-color: transparent;
  color: white;
  border: 2px solid white;
  display: block;
  width: max-content;
}

button:hover{
  background-color: white;
  color: hsl(349, 70%, 56%);
  cursor: pointer;
}

body{
  background-image: linear-gradient(hsl(214, 47%, 23%), hsl(237, 49%, 15%));
  background-repeat: no-repeat;
  background-size: cover;
  padding: 40px 20px 0px 20px;
  min-height: 100vh;
  position: relative;
}

.container{
  margin: auto;
}

header{
  width: 100%;
  border: 3px solid hsl(217, 16%, 45%);
  border-radius: 1rem;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 700px;
  margin: auto;
  margin-bottom: 80px;
}

header h1{
  color: white;
  font-size: 40px;
  max-width: 8ch;
  line-height: 36px;
  font-weight: 700;
}

.score{
  background-color: white;
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 48px;
  border-radius: 8px;
}

.score h2{
  color: hsl(229, 64%, 46%);
  font-size: 16px;
  letter-spacing: 3px;
  font-weight: 600;
}

.score span{
  color: hsl(229, 25%, 31%);
  font-weight: 700;
  font-size: 68px;
  line-height: 68px;
}

.action-screen{
  max-width: 900px;
  margin: auto;
}

.pick-screen{
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 380px;
  margin: auto;
  background-image: url(images/bg-triangle.svg);
  background-repeat: no-repeat;
  background-size: 250px;
  background-position: 50% 60%;
  row-gap: 20px;
  transition: 0.4s;
  margin-bottom: 40px;
  cursor: pointer;
}

.pick-screen > div:hover img{
  transform: scale(1.2);
}

.paper, .scissors, .rock{
  padding: 16px;
  width: max-content;
  border-radius: 50%;
  background-image: linear-gradient(hsl(230, 89%, 62%), hsl(230, 89%, 65%));
}

.scissors{
  background-image: linear-gradient(hsl(39, 89%, 49%), hsl(40, 84%, 53%));
  justify-self: end;
}

.rock{
  background-image: linear-gradient(hsl(349, 71%, 52%), hsl(349, 70%, 56%));
  grid-column: 1 / -1;
  justify-self: center;
}

.pick-screen img, .show-picks-screen img{
  padding: 28px;
  background-color: white;
  border-radius: 50%;
  width: 120px;
  height: 120px;
}

.show-picks-screen{
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 60px;
  display: none;
}

.show-picks-screen > div{
  text-align: center;
  color: white;
  letter-spacing: 2px;
  font-weight: 600;
}

.pick{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.pick > div{
  padding: 32px;
}

.pick img{
  padding: 40px;
  width: 200px;
  height: 200px;
}

#house-pick{
  grid-column: 3 / -1;
  align-self: start;
}

#house-pick h2{
  position: relative;
}

#house-pick h2::before{
  content: '';
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: hsl(237, 49%, 15%);
  position: absolute;
  z-index: -1;
  top: 120px;
  left: calc(50% - 100px);
}

#house-pick h2.hide::before {
  display: none;
}

.result{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  display: none;
}

.result span{
  font-size: 60px;
  font-weight: 700;
}

.result button{
  padding: 16px 60px;
  font-size: 1rem;
}

#rules-modal{
  background-color: white;
  width: 450px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 12px;
  row-gap: 60px;
  position: absolute;
  top: calc(50% - 200px);
  left: calc(50% - 225px);
  z-index: 10;
  visibility: hidden;
  transition: 0s;
}

#rules-modal.active {
  visibility: visible;
}

#rules-modal span{
  font-size: 32px;
  font-weight: 700;
  color: hsl(229, 25%, 31%);
  align-self: center;
  transition: 0s;
}

.rules-img{
  justify-self: center;
  grid-column: 1 / -1;
  transition: 0s;
  width: 100%;
  height: auto;
}

.close-modal{
  justify-self: end;
  align-self: center;
  cursor: pointer;
}

#backshadow {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0px;
  left: 0px;
  background-color: rgba(0, 0, 0, 0.4);
  visibility: hidden;
  transition: 0s;
}

#backshadow.active {
  visibility: visible;
}

footer{
  display: flex;
  justify-content: flex-end;
  padding: 40px 0px;
}

@media (max-width: 900px) {
  .pick > div{
    padding: 16px;
  }
  
  .pick img{
    padding: 20px;
    width: 120px;
    height: 120px;
  }

  #house-pick h2::before {
    width: 120px;
    height: 120px;
    left: calc(50% - 60px);
  }

  footer{
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .show-picks-screen{
    grid-template-columns: 1fr 1fr;
  }

  #house-pick {
    align-self: end;
  }

  #house-pick h2::before {
    width: 120px;
    height: 120px;
    left: calc(50% - 60px);
    top: -190px;
  }

  .pick h2 {
    order: 1;
  }
  
  .result{
    grid-row: 2 / -1;
    grid-column: 1 / 4;
    margin-bottom: 40px;
    justify-self: center;
  }

  .pick {
    gap: 40px;
  }
}

@media (max-width: 500px) {
  .logo img{
    width: 100px;
  }

  .score{
    padding: 8px 20px;
    gap: 2px;
  }

  .score h2{
    font-size: 12px;
  }

  #score{
    font-size: 40px;
    line-height: initial;
  }

  .pick-screen{
    gap: 40px;
    background-size: 230px;
  }

  .pick-screen > div:nth-child(1) {
    background-color: red;
    justify-self: end;
  }

  .pick-screen > div:nth-child(2) {
    justify-self: start;
  }

  .show-picks-screen {
    gap: 80px 20px;
  }

  #rules-modal{
    width: 300px;
    left: calc(50% - 150px);
  }

  .pick {
    gap: 28px;
  }

  .pick > div, .pick-screen > div{
    padding: 16px;
  }
  
  .pick img, .pick-screen img{
    padding: 16px;
    width: 80px;
    height: 80px;
  }

  .pick h2 {
    font-size: 1rem;
  }

  #house-pick h2::before {
    width: 120px;
    height: 120px;
    left: calc(50% - 60px);
    top: -152px;
  }
}