/* Importing Roboto font from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@500;700&display=swap");

/* Universal Selector */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables */
:root {
  --background-color: rgb(133, 138, 227);
  --text-color: #fff;
  --container-background-color: rgb(78, 20, 140);
}

/* Displaying body as Flexbox to center horizontally and vertically */
body {
  background-color: var(--background-color);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: "Roboto", sans-serif;
  color: var(--text-color);
}

.title {
  text-align: center;
  font-weight: 700;
  font-size: 2rem;
  text-transform: capitalize;
  padding: 0 3rem;
}

.game {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 0.2rem;
  background-color: var(--container-background-color);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  border-bottom-left-radius: 0rem;
  border-bottom-right-radius: 0rem;
  box-shadow: 0 0 10px rgb(0 0 0 / 34%);
  border: none;
}

#guessTheNumberField {
  font-size: 2rem;
  text-align: center;
  background-color: var(--container-background-color);
  color: var(--text-color);
  outline: none;
  border: none;
}

#result {
  font-size: 1rem;
}

#guessTheNumberBtn {
  font-size: 1.5rem;
  padding: 0.5rem;
  border: none;
  color: #000;
  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
  background-color: var(--text-color);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 0 10px rgb(0 0 0 / 34%);
  height: 4rem;
}

#guessTheNumberBtn:hover {
  background-color: rgba(255, 255, 255, 0.623);
  color: #000;
}

#btnClicked {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
}

.newGame {
  position: absolute;
  bottom: 0.8rem;
  left: 0.8rem;
  font-size: 1rem;
  border: none;
  outline: none;
  border-radius: 2rem;
  padding: 0.5rem;
  color: #000;
  background-color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
}

.newGame:hover {
  background-color: rgba(255, 255, 255, 0.623);
  color: #000;
}

.notActive {
  display: none;
}

/* Chrome, Safari, Edge, Opera  arrows remove*/
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox arrows remove */
input[type="number"] {
  -moz-appearance: textfield;
}

/* Responsive */
@media screen and (max-width: 480px) {
  .title {
    font-size: 2rem;
  }
  #guessTheNumberField {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 450px) {
  .title {
    font-size: 1.5rem;
  }
  #guessTheNumberField {
    font-size: 1rem;
  }
}

@media screen and (max-width: 380px) {
  .title {
    font-size: 1rem;
  }
  #guessTheNumberField {
    font-size: 1rem;
  }
}
