@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap');

:root {
  --background-color: #fadab4;
  --white: #fff7ed;
  --beige: #f8b860;
  --light-brown: #8d4926;
  --dark-brown: #412010;
  --secondary-color: #6c757d;
  --positive-color: #3fae48;
  --negative-color: #E50014;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: 'Press Start 2P', cursive;
  background-color: var(--background-color);
  height: 100%;
  overflow: hidden;
  background-color: #FADAB4;
  font-size: 16px;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#user-interface {
  z-index: 0;
}

ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

li {
  font-size: 1rem;
  font-size: clamp(0.5rem, 0.3333rem + 0.7619vw, 1rem);
  display: inline-block;
  box-sizing: border-box;
  min-width: 16rem;
  padding: 1.5rem 3rem;
  background-color: var(--white);
  border: 3px solid var(--dark-brown);
  border-radius: 10px;
  text-align: start;
  box-shadow: 4px 6px 0px 0px rgba(26, 18, 6, 0.75);
}

li:hover {
  box-shadow: 1px 1px 0px 0px rgba(26, 18, 6, 0.75);
  transform: translateY(4px);
  /* border-color: var(--white); */
}


.button-style {
  background-color: var(--light-brown);
  font-family: 'Press Start 2P', cursive;
  margin-top: 50px;
  width: 180px;
  height: 50px;
  border-radius: 10px;
  border: 3px solid (141, 73, 38);
}

.next-button {
  background-color: #F8B860;
  box-sizing: border-box;
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(0.5rem, 0.3333rem + 0.7619vw, 1rem);
  padding: 1.2rem 2.4rem;
  border-radius: 20px;
  border: 3px solid (141, 73, 38);
  margin-top: 2rem;
  cursor: pointer;
  margin-bottom: 2rem;
}

.next-button:hover {
  color: var(--white);
  transform: scale(1.02);
   background-color: var(--light-brown);
}

#next-question-button.button-disabled:hover {
  cursor: default;
  background-color: #F8B860;
  transform: scale(1);
  color: #B18648;
}


/* QUESTION PAGE */
.status-bar {
  align-self: start; /*this line moves the div from the middle to the top of the page */
  display: flex;
  width: 68vw;
  margin: 0 auto;
  align-items: center;
  justify-content: space-evenly;
}

.centered {
  text-align: center; 
  width: 60%;
}

.scrollable {
  height: auto;
  max-height: 80vh;
  overflow: auto;
}

/* basic styles for Input name */

.name-input {
  display: block;
  margin-top: 2em;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 1em;
}

.button-style {
  width: 10em;
  height: auto;
  display: block;
  margin-top: 2em;
  margin-left: 2em;
 }

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.progress-container {
  height: 1.4rem;
  width: 50vw;
  border-radius: 0.4rem;
  background: var(--white);
  position: relative;
}

.progress-container #progress {
  height: 100%;
  width: 0;
  border-radius: 0.4rem;
  background: var(--beige);
  transition: width 0.4s ease;
  transition-duration: 2s;
  position: relative;
}

/* MARIO PROGRESS */
.progress-container #progress::after {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  position: absolute;
  top: -28px;
  right: -45px;
  background-image: url('../src/images/mario_run.gif');
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 2rem;
}


/* ===== Question Page ==== */

/* Status bar */
.points-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.points {
  margin-bottom: 2.2rem;
}

.house {
  background-image: url(../src/images/castle.png);
  background-size: cover;
  width: 70px;
  height: 70px;
}

/* Main Container */
.main-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  gap: 1.5rem;
  background-color: var(--beige);
  border: 4px solid var(--light-brown);
  border-radius: 10px;
  margin: 0 auto;
  padding: 4rem 0;
  height: 60vh;
}

.question-image-container {
  max-width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.question-image {
  border-radius: 4px;
  animation: image-slide .3s ease-in-out both;
  border: 4px solid var(--dark-brown)
}

@keyframes image-slide {
  0% {
    transform: translateY(50px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.question {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  letter-spacing: .3rem;
  line-height: 2.2rem;
  animation: animate .5s ease-in-out both;
 }

@keyframes animate {
  0% {
    transform: rotateX(80deg);
    opacity: 0;
  }
  100% {
    transform: rotateX(0);
    opacity: 1;
  }
}

.hint {
  font-size: 1rem;
  background-color: var(--white);
  line-height: 2;
  border: 4px solid var(--positive-color);
  border-radius: 6px;
  padding: 1rem;
  max-height: 30ch;
  overflow: auto;
  animation: animate  .7s ease-in-out both;
  font-size: clamp(0.5rem, 0.3333rem + 0.7619vw, 1rem);
  }

.yes {
  background-color: var(--positive-color);
}

.no {
  background-color: var(--negative-color);
}

/* Mario pop-up  */
.happy-mario {
  background-image: url('../src/images/happy-mario.png');
  background-size: cover;
  rotate: 90deg;
  width: 150px;
  height: 150px;
  left: 80%;
  position: absolute;
  display: none;
}

.hello-happy-mario {
  animation: move-right 1s forwards;
  display: block;
  z-index: -1;
}
@keyframes move-right {
  from {
    left: 70%;
    opacity: 0.5;
  }
  to {
    left: 80%;
    opacity: 1;
  }
}

.sad-mario {
  background-image: url('../src/images/sad-mario.png');
  background-size: cover;
  width: 200px;
  height: 230px;
  /* z-index: ; */
  display: none;
  left: 5rem;
}



.hello-sad-mario {
  animation: move-up 1s forwards;
  position: fixed;
  display: block;
}

@keyframes move-up {
  from {
    bottom: -50%;
    opacity: 0.5;
  }
  to {
    bottom: 0%;
    opacity: 1;
  }
}

/* Welcome page */

.welcome-page-div {
  display: flex;
  flex-direction: column;
}

.welcome-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 1.5rem;
  background-color: var(--beige);
  border: 4px solid var(--light-brown);
  border-radius: 10px;
  margin: 0 auto;
  height: 50vh;
  width: 50vw;
  margin-bottom: 60px;
}

.welcome-page-heading {
  font-size: 3.15rem;
}

.name-label {
  font-size: 1.25rem;
}

.name-input {
  width: 250px;
  height: 50px;
  border: 2px solid;
  border-radius: 10px;
  caret-color: var(--negative-color);
  font-family: 'Press Start 2P', cursive;
}

.name-input:focus {
  font-family: 'Press Start 2P', cursive;
}

.start {
  display: flex;
  align-items: center;
  margin: 0 auto;
}

.button-style-start {
  font-size: clamp(0.5rem, 0.3333rem + 0.7619vw, 1rem);
  background-color: #f8b860;
  box-sizing: border-box;
  font-family: 'Press Start 2P', cursive;
  padding: 1.2rem 2.4rem;
  border-radius: 20px;
  border: 3px solid (141, 73, 38);
  margin-top: 2rem;
  cursor: pointer;
}

.button-style-start:hover {
  color: var(--white);
  transform: scale(1.02);
  background-color: var(--light-brown);
}

.toads {
  width: 100px;
}

.toad1 {
  order: -1;
}


/* Media queries */

@media  (max-width: 1024px) {
  html {
    font-size: 10px;
  }
  .status-bar {
    width: 100%;
  }

  .main-container {
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    width: 80vw;
    min-height: 50vh;
  }

  .centered {
    width: auto;
  }

  .question-image-container {
    max-width: 90%;
    padding: 1.5rem;
    margin-top: 4rem;
    gap: 5rem;
    flex-grow: 1;
 
  }

  .hint {
    border: 4px solid var(--positive-color);
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
  }

  li {
    min-width: 13rem;
    padding: 1.2rem 2.2rem;
    text-align: center;
  }

  .happy-mario {
    display: none;
  }
  .sad-mario {
    display: none;
  }

  .next-button {
    margin-top: 5rem;
  }
  
  .welcome-section {
    width: 80vw;
  }
  .final-page-div {
    width: 80vw;
  }
}

@media  (max-width: 720px) {
    html {
    font-size: 10px;
    }

    ul {
    margin-bottom: 4rem;
    }

    .question-image-container {
    margin-top: 2rem;
    gap: 1.2rem;
    }

    .main-container {
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    width: 88vw;
    }

    .house {
      width: 50px;
      height: 50px;
    }
}
/* THE Final PAGE */

.final-page-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 1.5rem;
  background-color: var(--beige);
  border: 4px solid var(--light-brown);
  border-radius: 10px;
  margin: 0 auto;
  height: 50vh;
  width: 50vw;
  margin-bottom: 3.75rem;
  font-size: 1.3rem;
  letter-spacing: 2px;
  line-height: 30px;
  padding: 15px;
}

.newgame-button-style {
  font-size: clamp(0.5rem, 0.3333rem + 0.7619vw, 1rem);
  background-color: #f8b860;
  box-sizing: border-box;
  font-family: 'Press Start 2P', cursive;
  border-radius: 20px;
  border: 3px solid (141, 73, 38);
  margin-top: 2rem;
  cursor: pointer;
  width: 180px;
  height: 50px;
}

.newgame-button-style:hover {
  color: var(--white);
  transform: scale(1.02);
  background-color: var(--light-brown);
}

.gif-style {
  width: 80px;
}
.moving-text {
  position: absolute;
  margin-top: 20px;
  right: 0;
  animation: move-left 5s linear 1s infinite running;
  font-size: .8rem;
  white-space: nowrap;
}

.avatar {
  width: 15px;
}

@keyframes move-left {
  0% {
    right: 0;
  }
  100% {
    right: 100%;
  }
}
