* {
  margin: 0;
  padding: 0;
}

.hidden {
  display: none;
}

body {
  background-color: #f7ffef;
  font-family: "Poppins", sans-serif;
  position: relative;
}

header {
  text-align: center;
  padding-bottom: 10px;
}

h1 {
  font-size: 45px;
  color: #363f2d;
  padding-top: 1rem;
}

h3 {
  color: #363f2d;
}
.back-btn {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  margin: 10px auto;
  text-decoration: none;
  font-size: 18px;
  width: 7rem;
  background: #c0ceb2;
  border: none;
  box-shadow: 0px 5px 4px rgba(0, 0, 0, 0.25);
  border-radius: 19px;
}
.back-btn a {
  text-decoration: none;
  color: #000000;
}

#setup-game {
  display: flex;
  justify-content: center;
}

#setup-game > * {
  margin: 2rem 0 1rem 0;
  padding-left: 50px;
  padding-right: 50px;
  display: flex;
  align-items: center;
}

#start-btn {
  justify-self: center;
  padding: 1rem 1.8rem;
  border-radius: 30px;
  border: none;
  background: #c0ceb2;
  background: #a9b69c;
  box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.36), inset 5px 5px 10px #ddeccd;
  font-size: 1rem;
  transition: all 0.3s;
}

#start-btn:hover {
  box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.36), inset -5px -5px 10px #ddeccd;
}

#diff,
#time,
#theme {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

#diff > div,
#time > div {
  margin-bottom: 1rem;
}

p#timer,
p#lives {
  font-size: 25px;
  font-weight: bold;
  text-align: center;
  padding-top: 1rem;
  color: #363f2d;
}

#game {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

#number-container > p {
  border-radius: 20%;
  width: 60px;
  height: 60px;
  font-size: 40px;
  margin: 5px 0 5px 50px;
  text-align: center;
  background: #c0ceb2;
  box-shadow: inset -6px -6px 12px rgba(255, 255, 255, 0.8), inset 6px 6px 12px rgba(0, 0, 0, 0.8);
}

#number-container > p:hover {
  cursor: pointer;
  background-color: #ffba08;
}

#board {
  padding-top: 10px;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  width: 600px;
  height: 600px;
}

#rules {
  text-align: center;
  padding: 2rem 0 4rem 0;
  background: #c0ceb2;
  box-shadow: inset -10px -10px 20px -3px rgba(255, 255, 255, 0.54), inset 10px 10px 20px -5px rgba(0, 27, 32, 0.5);
  width: 55rem;
  margin: 0 auto;
  border-radius: 40px;
  line-height: 1.5;
}
.tile {
  border: 1px solid black;
  width: 60px;
  height: 60px;
  text-align: center;
  margin: 0px;
  vertical-align: middle;
  font-size: 40px;
  background: #c0ceb2;
  box-shadow: inset 10px 10px 20px -3px rgba(255, 255, 255, 0.8), inset -10px -10px 20px -5px rgba(0, 27, 32, 0.5);
}

.tile:hover {
  cursor: pointer;
  background-color: #0096c7;
}

p.selected {
  background-color: #5b6b4a;
}

p.incorrect {
  background-color: red;
}

.rightBorder {
  border-right: 4px solid black;
}

.bottomBorder {
  border-bottom: 4px solid black;
}
footer {
  background-color: lightgrey;
  text-align: center;
  width: 100vw;
}

.wrapper {
  display: inline-flex;
  background: #f7ffef;
  height: 40px;
  width: 380px;
  align-items: center;
  justify-content: space-evenly;
}
.wrapper .time,
.wrapper .diff {
  background: #fff;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin: 0 10px;
  border-radius: 5px;
  cursor: pointer;
  padding: 0 10px;
  border: 2px solid lightgrey;
  transition: all 0.3s ease;
}
.wrapper .time .dot,
.wrapper .diff .dot {
  height: 20px;
  width: 20px;
  background: #d9d9d9;
  border-radius: 50%;
  position: relative;
}
.wrapper .time .dot::before,
.wrapper .diff .dot::before {
  position: absolute;
  content: "";
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  background: #363f2d;
  border-radius: 50%;
  opacity: 0;
  transform: scale(1.5);
  transition: all 0.3s ease;
}
input[type="radio"] {
  display: none;
}
#time-1:checked:checked ~ .time-1,
#time-2:checked:checked ~ .time-2,
#time-3:checked:checked ~ .time-3,
#diff-1:checked:checked ~ .diff-1,
#diff-2:checked:checked ~ .diff-2,
#diff-3:checked:checked ~ .diff-3 {
  border-color: #363f2d;
  background: #363f2d;
}
#time-1:checked:checked ~ .time-1 .dot,
#time-2:checked:checked ~ .time-2 .dot,
#time-3:checked:checked ~ .time-3 .dot,
#diff-1:checked:checked ~ .diff-1 .dot,
#diff-2:checked:checked ~ .diff-2 .dot,
#diff-3:checked:checked ~ .diff-3 .dot {
  background: #fff;
}
#time-1:checked:checked ~ .time-1 .dot::before,
#time-2:checked:checked ~ .time-2 .dot::before,
#time-3:checked:checked ~ .time-3 .dot::before,
#diff-1:checked:checked ~ .diff-1 .dot::before,
#diff-2:checked:checked ~ .diff-2 .dot::before,
#diff-3:checked:checked ~ .diff-3 .dot::before {
  opacity: 1;
  transform: scale(1);
}
.wrapper .time span,
.wrapper .diff span {
  font-size: 20px;
  color: #808080;
}
#time-1:checked:checked ~ .time-1 span,
#time-2:checked:checked ~ .time-2 span,
#time-3:checked:checked ~ .time-3 span,
#diff-1:checked:checked ~ .diff-1 span,
#diff-2:checked:checked ~ .diff-2 span,
#diff-3:checked:checked ~ .diff-3 span {
  color: #fff;
}

@media (max-width: 768px) {
  #setup-game {
    flex-direction: column;
  }
  #setup-game > * {
    display: flex;
    align-items: center;
    margin: 0;
  }

  #rules {
    width: 80vw;
  }
}

@media (max-width: 480px) {
  #rules {
    width: 90vw;
  }

  .tile {
    width: 25px;
    height: 25px;
    font-size: 15px;
    border: 0.2px solid black;
    box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.8), inset -2px -2px 4px rgba(0, 27, 32, 0.5);
  }

  div#number-container > * {
    border-radius: 20%;
    width: 25px;
    height: 25px;
    font-size: 12px;
    margin: 5px 0 5px 50px;
    box-shadow: inset -2px -2px 4px rgba(255, 255, 255, 0.8), inset 2px 2px 4px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #board {
    width: 250px;
    height: 250px;
    border: none;
  }
  .rightBorder {
    border-right: 1px solid black;
  }

  .bottomBorder {
    border-bottom: 1px solid black;
  }

  p#timer,
  p#lives {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding-top: 6px;
  }
  #start-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    box-shadow: inset 6px 6px 12px -3px rgba(0, 0, 0, 0.36), inset -6px -6px 12px -5px #ddeccd;
    font-size: 0.8rem;
  }
  #start-btn:hover {
    box-shadow: inset -6px -6px 12px rgba(0, 0, 0, 0.36), inset 6px 6px 12px #ddeccd;
  }

  .wrapper {
    width: 70vw;
    height: 20px;
  }

  .wrapper .time,
  .wrapper .diff {
    border: 0.6px solid lightgrey;
    margin: 0 5px;
  }

  .wrapper .time .dot,
  .wrapper .diff .dot {
    height: 10px;
    width: 10px;
  }

  .wrapper .time span,
  .wrapper .diff span {
    font-size: 12px;
    color: #808080;
  }

  .wrapper .time .dot::before,
  .wrapper .diff .dot::before {
    top: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    transform: scale(1.5);
  }
}
