@font-face {
  font-family: "Rubik-Medium";
  src: url("Rubik-Medium.ttf");
}
@font-face {
  font-family: "Rubik-Regular";
  src: url("Rubik-Regular.ttf");
}
@font-face {
  font-family: "Rubik-Italic";
  src: url("Rubik-Italic.ttf");
}
:root {
  --color-purple: #a729f5;
  --color-darkGrey: #313e51;
  --color-greyishBlue: #3b4d66;
  --color-grey: #626c7f;
  --color-cyan: #abc1e1;
  --color-lightGrey: #f4f6fa;
  --color-white: #ffffff;
  --color-green: #26d782;
  --color-red: #ee5454;

  --font-size-heading-L: 64px;
  --font-size-heading-M: 36px;
  --font-size-heading-S: 28px;
  --font-size-regular: 12px;
}

* {
  font-family: "Rubik-Regular";
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: var(--color-greyishBlue);
}

.hidden {
  display: none !important;
}
body {
  background-image: url("pattern-background-mobile-light.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-color: var(--color-lightGrey);
}
body.dark-theme {
  background-image: url("pattern-background-mobile-dark.svg");
  background-color: var(--color-darkGrey);
}
.theme-container {
  width: fit-content;
  margin-left: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
#toggle-button {
  width: 32px;
  height: 20px;
  padding: 4px;
  margin: 0;
  border-radius: 20px;
  position: relative;
  background-color: var(--color-purple);
  outline: none;
  border: none;
}

#ball {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-white);
}
#ball.toggle-right {
  transition: 0.3s;
  margin-left: 12px;
}
#ball.toggle-left {
  transition: 0.3s;
  margin-right: 12px;
}
.theme-icon {
  width: 16px;
  height: 16px;
}

section {
  padding: 32px 24px 0 24px;
}
header {
  padding: 18px 24px 18px 24px;
  display: flex;
}
.game-details-container {
  display: flex;
  align-items: center;
  justify-content: start;
}
.game-mode-name {
  margin-left: 16px;
  font-weight: 600;
}
h1,
h3 {
  font-size: 40px;
  font-family: "Rubik-Regular";
  font-weight: 100;
  margin-bottom: 16px;
}
h1 > strong.dark-theme {
  color: white;
}
h1.dark-theme,
h3.dark-theme,
h2.dark-theme {
  color: white;
}
#menu-details {
  font-family: "Rubik-Italic";
  margin-bottom: 40px;
}
#menu-details.dark-theme {
  color: var(--color-cyan);
}
.buttons-container {
  display: flex;
  flex-direction: column;
}
button {
  font-family: "Rubik-Medium";
  height: 64px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: none;
  background-color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  font-size: 18px;
  padding: 12px;
}

button.dark-theme {
  background-color: var(--color-greyishBlue);
  color: white;
}
.image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 5px;
}
.image-wrapper > img {
  width: 28.5px;
  height: auto;
}
.HTML {
  background-color: #fff1e9;
}
.CSS {
  background-color: #e0fdef;
}
.JavaScript {
  background-color: #ebf0ff;
}
.Accessibility {
  background-color: #f6e7ff;
}

#question-number {
  font-family: "Rubik-Italic";
  font-size: 14px;
}
#question-number.dark-theme {
  color: var(--color-cyan);
}
#current-question-number {
  color: inherit;
  font-weight: 100;
}

#question {
  font-size: 20px;
  font-family: "Rubik-Medium";
  margin-top: 12px;
}
#question.dark-theme {
  color: white;
}

.content-container {
  height: 16px;
  padding: 4px;
  background-color: var(--color-white);
  border-radius: 20px;
  margin: 24px 0 40px 0;
}
.content-container.dark-theme {
  background-color: var(--color-greyishBlue);
}
.content {
  border-radius: 20px;

  background-color: var(--color-purple);
  width: 10%;
  height: 8px;
}
.answer-button > strong {
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: var(--color-lightGrey);
}
.button-text {
  font-size: 18px;
  color: black;
}
.button-text.dark-theme {
  color: white;
}
.answer-button {
  flex: 1;
  height: fit-content;
  gap: 10px;
}

.submit-play-again-button {
  background-color: var(--color-purple);
  height: 56px;
  display: flex;
  justify-content: center;
  color: var(--color-white);
  font-size: 18px;
}

.submit-play-again-button.dark-theme {
  background-color: var(--color-purple);
}

#error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-red);
  font-size: 18px;
}
#error-message > span {
  color: var(--color-red);
}
#error-message > span.dark-theme {
  color: white;
}
#error-message > img {
  margin-right: 8px;
}

h3 {
  margin-bottom: 40px;
}
h3 > strong.dark-theme {
  color: white;
}
.result-container {
  background-color: var(--color-white);
  height: 296px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
  border-radius: 8px;
}
.result-container.dark-theme {
  background-color: var(--color-greyishBlue);
}
.result-container > span.dark-theme {
  color: var(--color-cyan);
}
#score {
  font-size: 88px;
  font-weight: medium;
}
#score.dark-theme {
  color: white;
}
#play-again-button {
  width: 100%;
}
.result-container > span {
  font-size: 18px;
  margin: 0;
}

.result-container > * {
  margin-bottom: 16px;
}

/* tablet screen */
@media screen and (min-width: 768px) {
  body {
    background-image: url("pattern-background-tablet-light.svg");
  }
  body.dark-theme {
    background-image: url("pattern-background-tablet-dark.svg");
  }
  section {
    padding: 64px 48px 0 48px;
  }
  header {
    padding: 18px 48px 18px 48px;
  }
  button > img {
    width: 80px;
    height: 80px;
  }
}

/* desktop screen */
@media screen and (min-width: 1024px) {
  body {
    background-image: url("pattern-background-desktop-light.svg");
    display: flex;
    flex-direction: column;
    min-width: max-content;
  }
  body.dark-theme {
    background-image: url("pattern-background-desktop-dark.svg");
  }
  section {
    padding: 0px 114px 0 114px;
  }
  header {
    padding: 72px 114px 72px 114px;
    max-width: 1400px;
    width: 100%;
    align-self: center;
  }
  main {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  button {
    height: 96px;
    width: 100%;
    font-size: 24px;
  }
  .menu-button .image-wrapper,
  .game-details-container .image-wrapper {
    height: 60px;
    width: 60px;
  }

  .menu-button .image-wrapper > img,
  .game-details-container .image-wrapper > img,
  .theme-container > img {
    height: 40px;
    width: 40px;
  }
  #toggle-button {
    width: 64px;
    height: 40px;
    padding: 4px;
    margin: 0;
    border-radius: 20px;
    position: relative;
    background-color: var(--color-purple);
    outline: none;
    border: none;
  }
  #ball {
    width: 24px;
    height: 24px;
  }
  #ball.toggle-right {
    margin-left: 24px;
  }
  #ball.toggle-left {
    margin-right: 24px !important;
  }
  .answer-button .image-wrapper {
    height: 40px;
    width: 40px;
  }
  .answer-button img {
    height: 40px;
    height: 40px;
  }
  h1,
  h3 {
    font-size: 60px;

    margin-right: 60px;
  }
  #menu-details {
    flex: 1;

    margin-right: 60px;
  }
  h1 > strong {
    font-size: 60px;
  }
  section {
    max-width: 1400px;
  }

  #menu-container {
    flex: 1;
    display: flex;
    flex-direction: row;

    align-self: center;
    justify-self: center;
  }
  .buttons-container {
    flex: 1;
  }
  .menu-heading,
  .button-error-container {
    flex: 1;
  }
  #question-container {
    display: flex;
    flex-direction: row;
    flex: 1;
    gap: 60px;
  }
  .question-heading {
    flex: 1;
  }
  #question {
    font-size: 40px;
  }
  .content-container {
    width: 90%;
    margin-top: 180px;
  }
  #completed-container {
    display: flex;
    width: 100%;
  }
  #completed-container > * {
    flex: 1;
  }
  /*hover state */
  .submit-play-again-button:hover {
    background-color: #d399f7;
  }
}

/*focus state */
.answer-button:focus {
  padding: 9px;
  border: 3px solid var(--color-purple);
}
.answer-button:focus > strong {
  background-color: var(--color-purple);
  color: var(--color-white);
  font-weight: 600;
}
.answer-button.correct {
  padding: 9px;
  border: 3px solid var(--color-green);
}
.answer-button.correct > strong {
  background-color: var(--color-green);
  color: var(--color-white);
  font-weight: 600;
}

.answer-button.wrong {
  padding: 9px;
  border: 3px solid var(--color-red);
}
.answer-button.wrong > strong {
  background-color: var(--color-red);
  color: var(--color-white);
  font-weight: 600;
}
.answer-icon {
  margin-left: auto;
}
