* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

/* - Mobile: 375px - Desktop: 1366px */
:root {
  /* Primary */
  --Scissors-Gradient: hsl(39, 89%, 49%), hsl(40, 84%, 53%);
  --Paper-Gradient: hsl(230, 89%, 62%), hsl(230, 89%, 65%);
  --Rock-Gradient: hsl(349, 71%, 52%), hsl(349, 70%, 56%);
  --Lizard-Gradient: hsl(261, 73%, 60%), hsl(261, 72%, 63%);
  --Cyan: hsl(189, 59%, 53%), hsl(189, 58%, 57%);
  /* Neutral */
  --Dark-Text: hsl(229, 25%, 31%);
  --Score-Text: hsl(229, 64%, 46%);
  --Header-Outline: hsl(217, 16%, 45%);
  --white: white;
  /* Background */
  --Radial-Gradient: hsl(214, 47%, 23%), hsl(237, 49%, 15%);
}

body {
  font-family: "Barlow Semi Condensed", sans-serif;
  background-image: radial-gradient(var(--Radial-Gradient));
  width: 100vw;
  height: 100vh;
}

.main-container {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  color: var(--white);
}


.game-container {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

/* Main Header ------------------------------------ */
.game-container .game-header {
  border: 2px solid var(--Header-Outline);
  border-radius: 10px;
  width: 60%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-image: radial-gradient(var(--Radial-Gradient));
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.game-header h1 {
  color: var(--white);
  width: min-content;
  line-height: .8;
  font-size: 1.2rem;
}

.game-header .score {
  color: var(--Score-Text);
  background-color: var(--white);
  width: 120px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 10px;
  gap: 5px;
}

.score .score-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.game-header .score h3 {
  opacity: .8;
  font-size: .8rem;
  letter-spacing: 2px;
}

.game-header .score .num {
  color: var(--Dark-Text);
  font-size: 3rem;
  width: 100%;
  text-align: center;
}

/* Small Device  */

@media (max-width:768px) {
  .game-header {
    width: 100% !important;
  }

  .game-header .score {
    width: 100px;
    font-size: .8rem;
  }
}


/* Game------------------------------------ */
.game-container .game-design {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.game-design .container {
  position: relative;
  width: 60%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-design .ingame.active {
  display: block;
}

.game-design .ingame {
  position: relative;
  background-image: url("../images/bg-pentagon.svg");
  width: 250px;
  height: 250px;
  margin: auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  display: none;
}

.circle {
  position: absolute;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: all .3s ease;

  &:hover {
    padding: 5px;
  }


}

.circle::before,
.circle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: inherit;
  z-index: -1;
}

.circle::before {
  width: 100%;
  height: 100%;
  padding: 10px;
}

.circle>img {
  width: 50%;
}

.circle#paper::before {
  background-image: radial-gradient(var(--Paper-Gradient));
}

.circle#scissors::before {
  background-image: radial-gradient(var(--Scissors-Gradient));
}

.circle#rock::before {
  background-image: radial-gradient(var(--Rock-Gradient));
}

.circle#lizard::before {
  background-image: radial-gradient(var(--Lizard-Gradient));
}

.circle#spock::before {
  background-image: radial-gradient(var(--Cyan));
}

.circle::after {
  width: calc(100% - 5px);
  height: calc(100% - 5px);
  background-color: #eee;
  z-index: -1;
  border-radius: inherit;
  box-shadow: inset 2px 2px 10px #757575;
}

.ingame .circle#paper {
  right: -10%;
  top: 20%;
}

.ingame .circle#rock {
  right: 5%;
  bottom: -5%;
}

.ingame .circle#scissors {
  left: 50%;
  top: -10%;
  transform: translateX(-50%);
}

.ingame .circle#lizard {
  left: 5%;
  bottom: -5%;
}

.ingame .circle#spock {
  left: -10%;
  top: 20%;
}



/* Start Game */

.startGame.active {
  display: grid !important;
}

.game-design .startGame {
  width: 100%;
  height: 100%;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  text-align: center;
}

.startGame .title {
  font-size: 1.3rem;
  width: 100%;
  text-transform: uppercase;
}

.startGame .image {
  width: 7rem;
  height: 7rem;
  background-color: #182344;
  border-radius: 50%;
  position: relative;

  &:hover {
    padding: 10px;
  }

  cursor:default;
}

.startGame .image.win {
  box-shadow: 0px 0px 0px 40px hsl(229, 25%, 30%),
    0px 0px 0px 60px hsl(229, 29%, 25%), 0px 0px 0px 80px hsl(229, 36%, 25%);
  z-index: -3;
}

.startGame>div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  padding: 10px;
}

.startGame .result .btn {
  display: none;
}

.startGame .result .btn.active {
  display: block;
}

.startGame .result .title {
  font-size: 2rem;
}

.startGame #playAgain {
  padding: 10px;
  /* border: 1px solid var(--white); */
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
  background-color: var(--white);
  color: var(--Dark-Text);

  &:hover {
    background-image: radial-gradient(var(--Score-Text));
    color: var(--white);
  }
}





@media (max-width:768px) {
  .game-design .container {
    /* padding: 50px; */
    width: 100%;
  }

  .startGame {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
  }

  .startGame .result {
    grid-area: 2/1/2/3;
    margin: auto;
    width: 200px;
  }
}

/* Rules Image ------------------------------------ */
.rules {
  position: absolute;
  top: 50%;
  left: -50%;
  transform: translate(-50%, -50%);
  background-color: var(--white);
  width: fit-content;
  z-index: 50;
  padding: 20px;
  border-radius: 10px;
  transition: left 0.5s linear;
}

.rules.active {
  left: 50%;
}

.rules .close {
  position: absolute;
  right: 10px;
  top: 10px;
  cursor: pointer;
}


/* Footer ------------------------------------ */
.main-container footer {
  /* border: 2px solid #fff; */
  width: 100%;
  /* padding: 10px; */
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: capitalize;

}

footer .rules-btn {
  padding: 5px;
  background-color: transparent;
  border: 2px solid var(--Header-Outline);
  border-radius: 6px;
  text-transform: uppercase;
  color: #eee;
  width: 100px;
  min-width: max-content;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

footer #playerName,
footer #highScore {
  border: 1px solid var(--white);
  padding: 3px;
}



@media (max-width:768px) {
  footer {
    flex-direction: column;
    gap: 10px;
  }
}

.info a {
  color: #0ff;
  text-decoration: none;
}


/* Form */

form {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 140%;
  background-image: radial-gradient(var(--Radial-Gradient));
  border: 2px solid #Fff;
  border-radius: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  color: var(--white);
  text-align: center;
  text-transform: uppercase;
}

form input {
  width: 200px;
  padding: 10px;
  border-radius: 10px;
}

form button {
  width: 100px;
  padding: 10px;
  text-transform: uppercase;
  font-size: 1rem;
  cursor: pointer;
}