@import url('https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* STYLING VARIABLES */
:root {
  --light-color: #f4efea;
  --dark-color: #292321;
  --btn-color: #00c1b5;
  --human-card-color: #f9cdcd;
  --computer-card-color: #fcf9ee;
  --winner-color: #adf7d1;
  --box-shadow: 3px 3px 1px rgba(0, 0, 0, 0.9);
}

/* BASIC STYLING */
body {
  height: 100vh;
  background-color: var(--light-color);
  color: var(--dark-color);
  font-family: 'Work Sans', sans-serif;
  font-weight: bold;

  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

main {
  height: 33.5rem;
  width: 45rem;
  overflow: hidden;
  border-radius: 5px;
  position: relative;
}

a {
  color: var(--dark-color);
  text-decoration: none;
}

a:hover {
  color: var(--btn-color);
}

/* UTILITY CLASSES */
.btn {
  padding: 0.7rem 0.8rem;
  border: 3px solid var(--dark-color);
  box-shadow: var(--box-shadow);
  border-radius: 10px;
  background-color: var(--btn-color);
  text-transform: uppercase;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  filter: brightness(90%);
}

.btn:active {
  transform: translateY(5px);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* RESET BUTTON */
.btn-reset {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

/* PLAYERS LAYOUT*/
.players {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.card {
  height: 100%;
  flex: 1;
  text-transform: uppercase;
  text-align: center;
  padding: 2rem;
  border: 3px solid var(--dark-color);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

/* PLAYERS ELEMENTS */
.game-phase {
  margin-top: 2rem;
  padding: 0.6rem;
  border: 3px solid var(--dark-color);
  box-shadow: 5px 5px 1px var(--btn-color);
  border-radius: 5px;
  background-color: var(--dark-color);
  color: #fff;
  text-transform: uppercase;

  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -25%);
  z-index: 10;
}

.player-human {
  background-color: var(--human-card-color);
}

.player-computer {
  background-color: var(--computer-card-color);
  border-left: none;
}

.score-human,
.score-computer {
  font-size: 3rem;
  font-size: bold;
}

.choice-human,
.choice-computer {
  height: 100px;
  margin-top: 1.4rem;
  width: 100px;
}

.win-marker {
  margin-right: 0.5rem;
  padding: 0.1rem 0.2rem;
  border-radius: 50%;
  border: 2px solid var(--dark-color);
  box-shadow: 3px 3px 1px var(--dark-color);
  background-color: var(--btn-color);
}

/* BOARD LAYOUT */
.board {
  width: 37.5rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255);
  border: 3px solid var(--dark-color);
  border-radius: 5px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translate(-50%, -3%);
  z-index: 10;
}

/* ROUND BOARD ELEMENTS */
.round-board {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.round-outcome {
  font-weight: bold;
  text-transform: uppercase;
}

/* MOVE BOARD LAYOUT */
.moves-flex {
  height: 100px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: start;
  gap: 3rem;
}

/* MOVES ELEMENTS */
.moves-flex .btn {
  border-radius: 50%;
  padding: 0.5rem;
}

.moves-flex .btn:hover {
  border: 3px solid var(--dark-color);
}

.moves-flex figure {
  height: 70px;
  width: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.moves-flex figure img {
  height: 70%;
  width: 70%;
  margin-bottom: 0.2rem;
}

.moves-flex figcaption {
  font-size: 0.6rem;
}

/* VISIBILITY CLASSES */
.hidden {
  visibility: hidden;
}

.removed {
  display: none;
}

/* MOVE IMAGES */
/* These images are displayed on the screen only after their corresponding buttons are clicked by the player. */
.rock {
  background: url('../images/rock.svg') center center/contain no-repeat;
}

.paper {
  background: url('../images/paper.svg') center center/contain no-repeat;
}

.scissors {
  background: url('../images/scissors.svg') center center/contain no-repeat;
}

/* GAME SETUPS */
.winner-setup {
  background-color: var(--winner-color);

  .game-winner {
    font-size: 1.5rem;
    font-weight: bold;
    visibility: visible;
  }
}

/* FOOTER */
footer {
  margin-top: 1rem;
}
