* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Gabarito', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

html {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  background-color: #f7f7f7;
  overflow: hidden;
}

body {
  background-color: #f7f7f7;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

h1 {
  font-size: 8vmin;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
}

p {
  font-size: 2.5vmin;
  font-weight: 400;
}

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title p,
.title a {
  font-weight: 900;
  text-transform: uppercase;
  color: #999;
}

.title a:hover {
  color: #3498db;
}

#time,
#correct,
#incorrect,
.game-grid span {
  font-size: 8vmin;
  font-weight: 800;
}

.game-grid input {
  width: 42.5vmin;
  font-size: 8vmin;
  font-weight: 800;
  text-align: center;
  background-color: #eee;
  outline: none;
  border: none;
  border-radius: 1vmin;
  border-top: 2px solid #ddd;
  border-bottom: 2px solid #fff;
}

#time {
  font-size: 10vmin;
  font-weight: 800;
  background-color: #34495e;
  border-radius: 100%;
  width: 20vmin;
  height: auto;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.sum-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 1.5vmin;
}

label,
.sum-options p,
.multiplier-display p {
  font-size: 2vmin;
  font-weight: 800;
}

#add,
#subtract,
#multiply {
  margin-left: 0.5vmin;
  margin-right: 0.5vmin;
}

.option {
  display: flex;
  align-items: center;
}

.option p {
  margin-left: 1vmin;
}

.container {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  padding: 5vmin;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

.correctAndIncorrect,
.correctCount,
.incorrectCount {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.correctAndIncorrect {
  flex-direction: row-reverse;
  width: 90vw;
  max-width: 500px;
  background-color: #ffda79;
  padding: 2vmin;
  border-radius: 1vmin;
  justify-content: space-around;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.settings {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  align-items: center;
  justify-content: space-evenly;
}

.gameHolder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
  height: 90vh;
  height: 90svh;
}

.game-grid {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: 'sum input';
  width: 100vw;
  column-gap: 2vmin;
  align-items: center;
}

.sum-section {
  grid-area: sum;
  justify-self: end;
}

.input-section {
  grid-area: input;
  justify-self: start;
}

/* When screen width is less than 1400px, stack items vertically */
@media (max-width: 1079px) {
  .game-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      'sum'
      'input';
    justify-items: center; /* Center align items */
  }

  .sum-section {
    justify-self: center;
  }

  .input-section {
    justify-self: center;
  }

  .container {
    padding: 0;
  }

  .gameHolder {
    height: 100vh;
    height: 100svh;
    justify-content: space-around;
  }
}

.game-grid > section > * {
  font-size: 12.5vmin !important;
}

.game-grid input::-webkit-outer-spin-button,
.game-grid input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

button {
  padding: 2vmin 3vmin;
  cursor: pointer;
  border: none;
  background-color: #16a085;
  border-radius: 1vmin;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

button p {
  font-size: 3vmin;
  color: #eee;
  text-transform: uppercase;
  font-weight: 800;
}

button:hover {
  background-color: #1abc9c;
}
.correct {
  color: #16a085;
  font-weight: 900;
}
.incorrect {
  color: #c0392b;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 2px solid #111;
  border-radius: 1vmin;
  padding: 2vmin;
  font-size: 2vmin;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

select:hover {
  border-color: #333;
}

select:focus {
  border-color: #555;
  box-shadow: 0px 0px 8px rgba(40, 167, 69, 0.5);
}

select::-ms-expand {
  display: none;
}
select {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23111111" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0vmin center;
  background-size: 4vmin;
  padding-right: 4vmin;
}

.summary-panel {
  position: absolute;
  z-index: 99;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  width: 95vw;
  height: 95vh;
  height: 95svh;
  background-color: #fafafa;
  border-radius: 1vmin;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#summary,
#finalScore {
  height: 35vh;
  max-height: 35vh;
  width: 100%;
  text-align: center;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#summary {
  width: fit-content;
  padding: 2vmin 5vmin;
  background-color: #eee;
  border-radius: 1vmin;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #fff;
  line-height: 1.5;
}

#summary p,
#finalScore p {
  font-size: 2.25vmin;
  font-weight: 600;
}

#summary p:first-of-type,
#finalScore p:first-of-type {
  font-size: 4vmin;
  font-weight: 900;
}

.final-score-text,
.multiplier-display {
  margin-top: 3vmin;
  font-size: 3vmin !important;
  font-weight: 600 !important;
  background-color: #ffda79;
  padding: 1vmin 2vmin;
  border-radius: 1vmin;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
  display: flex;
  align-items: center;
  column-gap: 1vmin;
}

.final-score-text span {
  font-size: 7vmin !important;
  font-weight: 900;
}

/* -------------------------------------------------------------------------- */
/*                                   DIALOG                                   */
/* -------------------------------------------------------------------------- */

.custom-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 299;
}

.custom-dialog {
  background-color: #eee;
  padding: 4vmin;
  border-radius: 1vmin;
  max-width: 90%;
  min-width: 500px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 1.75vmin;
  color: #111;
  text-align: center;
  line-height: 2;
  text-wrap: balance;
  transition: background-color 0.25s ease-in;
}

.custom-dialog button {
  margin-top: 4vmin;
}
.custom-dialog button p {
  font-size: 2vmin;
}

/* -------------------------------------------------------------------------- */
/*                                 CHECKBOXES                                 */
/* -------------------------------------------------------------------------- */

.custom-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.custom-checkbox {
  display: grid;
  grid-template-columns: 20% 80%;
  width: 25vmin;
  align-items: center;
  justify-items: center;
  font-size: 2vmin;
  padding: 0;
  margin: 0;
  background-color: #eee;
  border: none;
  border-radius: 1vmin;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  position: relative;
  color: #aaa;
}

.custom-checkbox:hover {
  color: #eee;
  background-color: #fafafa;
}

.custom-checkbox.active {
  background-color: #16a085;
  color: white;
}

.icon-holder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 5vmin;
  background-color: rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 1vmin 0 0 1vmin;
}

.custom-checkbox .check-icon {
  width: 3.5vmin;
  height: 3.5vmin;
  fill: currentColor;
  opacity: 0;
  transition: opacity 0.2s;
}

.custom-checkbox.active .check-icon {
  opacity: 1;
}

/* -------------------------------------------------------------------------- */
/*                                 ANIMATIONS                                 */
/* -------------------------------------------------------------------------- */

.jello-vertical {
  -webkit-animation: jello-vertical 0.9s both;
  animation: jello-vertical 0.9s both;
}

@-webkit-keyframes jello-vertical {
  0% {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
  30% {
    -webkit-transform: scale3d(0.75, 1.25, 1);
    transform: scale3d(0.75, 1.25, 1);
  }
  40% {
    -webkit-transform: scale3d(1.25, 0.75, 1);
    transform: scale3d(1.25, 0.75, 1);
  }
  50% {
    -webkit-transform: scale3d(0.85, 1.15, 1);
    transform: scale3d(0.85, 1.15, 1);
  }
  65% {
    -webkit-transform: scale3d(1.05, 0.95, 1);
    transform: scale3d(1.05, 0.95, 1);
  }
  75% {
    -webkit-transform: scale3d(0.95, 1.05, 1);
    transform: scale3d(0.95, 1.05, 1);
  }
  100% {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
}
@keyframes jello-vertical {
  0% {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
  30% {
    -webkit-transform: scale3d(0.75, 1.25, 1);
    transform: scale3d(0.75, 1.25, 1);
  }
  40% {
    -webkit-transform: scale3d(1.25, 0.75, 1);
    transform: scale3d(1.25, 0.75, 1);
  }
  50% {
    -webkit-transform: scale3d(0.85, 1.15, 1);
    transform: scale3d(0.85, 1.15, 1);
  }
  65% {
    -webkit-transform: scale3d(1.05, 0.95, 1);
    transform: scale3d(1.05, 0.95, 1);
  }
  75% {
    -webkit-transform: scale3d(0.95, 1.05, 1);
    transform: scale3d(0.95, 1.05, 1);
  }
  100% {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
}

.slide-out-bottom {
  -webkit-animation: slide-out-bottom 0.25s
    cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
  animation: slide-out-bottom 0.25s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
}

@-webkit-keyframes slide-out-bottom {
  0% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    -webkit-transform: translateY(1000px);
    transform: translateY(1000px);
    opacity: 0;
  }
}
@keyframes slide-out-bottom {
  0% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    -webkit-transform: translateY(1000px);
    transform: translateY(1000px);
    opacity: 0;
  }
}

.slide-in-top {
  -webkit-animation: slide-in-top 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    both;
  animation: slide-in-top 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@-webkit-keyframes slide-in-top {
  0% {
    -webkit-transform: translateY(-1000px);
    transform: translateY(-1000px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slide-in-top {
  0% {
    -webkit-transform: translateY(-1000px);
    transform: translateY(-1000px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
}

/* -------------------------------------------------------------------------- */
/*                                CIRCLE BUTTON                               */
/* -------------------------------------------------------------------------- */

.circleButton {
  width: 5vmin;
  height: auto;
  aspect-ratio: 1;
  background-color: #eee;
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 0.2vmin 0.4vmin,
    rgba(0, 0, 0, 0.3) 0px 0.7vmin 1.3vmin -0.3vmin,
    rgba(0, 0, 0, 0.2) 0px -0.3vmin 0px inset;
  cursor: pointer;
}

.circleButton:hover {
  background-color: #fff;
}

.circleButton:hover ~ p {
  visibility: visible;
}

.circleButton svg {
  width: 2.75vmin;
  height: auto;
  aspect-ratio: 1;
  fill: #000;
}

.buttonAndLabel {
  display: flex;
  align-items: center;
  column-gap: 1vmin;
}

.buttonAndLabel p {
  text-transform: uppercase;
  font-size: 1.5vmin;
  color: #000;
  font-weight: 200;
  pointer-events: none;
  visibility: hidden;
}

.menu-buttons {
  position: absolute;
  bottom: 2%;
  left: 2%;
  display: flex;
  flex-direction: column;
  gap: 2vmin;
}

.timeUp {
  width: 100vw;
  height: 100vh;
  height: 100vsh;
  display: none;
  line-height: 1;
  align-items: center;
  justify-content: center;
  position: absolute;
  background-color: #ffda79;
  z-index: 199;
  padding: 5vmin;
}

.timeUp h1 {
  font-size: 20vmin;
}

/* -------------------------------------------------------------------------- */
/*                                  KEYBOARD                                  */
/* -------------------------------------------------------------------------- */

.keyboard {
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 1vmin;
  width: fit-content;
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  background-color: #222;
  border: 0.5vmin solid #111;
  border-radius: 1vmin;
  padding: 1vmin;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

/* --------- Prevent typing 11, for example, from zooming on the key -------- */

#custom-keyboard * {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button,
.key {
  touch-action: manipulation;
}

/* ----------------------------- The key styling ---------------------------- */

.key {
  width: 10vmin;
  height: 10vmin;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6vmin;
  padding: 2vmin;
  background-color: #fafafa;
  border: none;
  border-radius: 1vmin;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
  text-align: center;
  font-weight: 800;
}

.key:hover {
  background-color: #ffda79;
}

.delete {
  color: #fff;
  background-color: #c0392b;
}

.delete:hover {
  background-color: #e74c3c;
}

.enter {
  background-color: #2980b9;
}

.enter svg,
.delete svg {
  fill: #fff;
  width: 5vmin;
}

.enter:hover {
  background-color: #3498db;
}
