* {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  padding: 133px 10px 10px;
  background-color: rgb(80, 80, 80);
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}

#title {
  width: fit-content;
  padding: 0 20px;
  margin: auto;
  border: black 3px solid;
  border-radius: 10px;
  text-align: center;
  background-color: lightgrey;
  pointer-events: auto;
}

/* Placar */
#score-container {
  width: max-content;
  margin: auto;
  text-align: center;
  line-height: 0;
  perspective: 300px;
  pointer-events: auto;
}

#score-container .bar {
  display: inline-block;
  width: 5px;
  height: 10px;
  margin: 0 15px;
  background-color: black;
}

#score-container #plaque {
  display: block;
  background-color: rgb(50, 50, 50);
  padding-top: 5px;
  border: 2px solid black;
  border-radius: 10px;
  font-weight: 900;
  line-height: initial;
  color: white;
  user-select: none;
  cursor: pointer;
  transform-origin: top;
}

#score-container #swing:checked + #plaque {
  animation: balancar 1s ease-in-out infinite alternate;
}

@keyframes balancar {

  from {
    transform: rotateX(-25deg);
  }

  to {
    transform: rotateX(25deg);
  }
}

#score-container #plaque #score {
  display: block;
  padding: 5px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  margin-top: 5px;
}

.bg-score-default {
  background-color: rgb(70, 70, 70);
}

.bg-color-win {
  background-color: green;
}

.bg-color-lose {
  background-color: red;
}

/* Sessao de descrição */
#description-section {
  width: fit-content;
  margin: auto;
  padding: 10px;
  border-radius: 10px;
  background-color: lightgrey;
}

#description-section #rgb-text-container {
  margin: 10px 0;
}

#description-section #rgb-text-container #rgb-text {
  display: block;
  width: fit-content;
  padding: 5px;
  border: 2px solid black;
  border-radius: 10px;
  margin: 0 auto;
  background-color: lightgrey;
  text-align: center;
  box-sizing: border-box;
}

.rgb-text-fixed {
  position: fixed;
  z-index: 1;
  left: 0;
  right: 0;
}

#description-section #buttons {
  margin: 0 auto;
  text-align: center;
}

#description-section #buttons .button {
  display: inline-block;
  margin: 10px 5px 2px;
  padding: 5px 10px;
  border: 1px solid black;
  border-radius: 30px;
  background-color: rgb(100, 100, 100);
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

#description-section #buttons .button:hover {
  background-color: rgb(50, 50, 50);
}

/* Botão auto resetar */
#description-section #buttons #auto-reset-button {
  position: relative;
  z-index: 0;
  color: black;
  background-color: lightgrey;
}

#auto-reset-button:before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background-color: rgb(100, 100, 100);
  border-radius: 100px;
  opacity: 0;
  transition: width 500ms linear, opacity 0ms 500ms;
}

#auto-reset-button:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 40%;
  height: 100%;
  margin-left: 0;
  margin-right: 60%;
  background-color: red;
  border-radius: 100px;
  opacity: 0.5;
  transition: margin 500ms linear;
}

#buttons #auto-reset-check:checked + #auto-reset-button {
  color: white;
}

#buttons #auto-reset-check:checked + #auto-reset-button:before {
  transition: width 500ms linear;
  opacity: 1;
  width: 100%;
}

#buttons #auto-reset-check:checked + #auto-reset-button:hover:before {
  background-color: rgb(50, 50, 50);
}

#buttons #auto-reset-check:checked + #auto-reset-button:after {
  margin-left: 60%;
  margin-right: 0;
  background-color: green;
}

/* Dificuldade */
#difficulty {
  display: inline-block;
}

#difficulty #difficulty-level {
  display: none;
  width: fit-content;
  margin-top: 10px;
  padding: 5px;
  background-color: rgb(170, 170, 170);
  text-align: center;
  font-size: 20px;
  border-radius: 10px;
}

#difficulty #difficulty-level #level {
  padding: 2px 10px;
  width: 100px;
  background-color: white;
  color: black;
  font-size: 16px;
  border: 1px solid black;
  border-radius: 10px;
  box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.7);
  outline: none;
}

#difficulty #difficulty-level #level:focus {
  background-color: lightgrey;
}

/* Círculos coloridos */
#game-view {
  width: fit-content;
  max-width: 500px;
  margin: 20px auto;
  text-align: center;
}

#game-view #answer {
  display: block;
  padding: 5px;
  font-weight: 900;
  background-color: lightgrey;
  color: black;
  border-bottom: 2px solid black;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#game-view #color-balls {
  padding: 10px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.bg-color-balls-default {
  background-color: lightgrey;
}

.ball {
  display: inline-block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid black;
}

.ball:hover {
  width: 48px;
  height: 48px;
  border: 3px solid white;
}
