:root {
  --yellow: #eccb49;
  --pink: #fe6f76;
  --blue: #261b5a;
  --white: #f6f6f6;
  --brownish: #c0924a;
}

/* Shared */

html {
  max-width: 1200px;
  margin: auto auto;
  font-size: 16px;
}

body {
  background: var(--blue);
  color: var(--white);
  overflow: hidden;
  margin: 0 auto;
  font-family: "Press Start 2P", cursive;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.container {
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  max-width: 1200px;
  width: 100%;
  height: 630px;
}

.border {
  border: var(--brownish) solid 8px;
  border-radius: 12px;
}

.title {
  font-size: 4rem;
  margin: 12px 0;
  color: var(--yellow);
  text-shadow: 6px 6px 0px var(--pink);
}

.back-arrow {
  position: absolute;
  left: 8px;
  top: 12px;
  animation: backarrow 3.7s infinite;
}

@keyframes backarrow {
  0% {
    left: 8px;
  }
  50% {
    left: 24px;
  }
  100% {
    left: 8px;
  }
}

h1,
h2,
h3 {
  margin: 0;
}

p {
  font-size: 0.875rem;
  line-height: 125%;
  margin-bottom: 8px;
}

span {
  color: var(--yellow);
}

/* ########## */
/* index.html */

.frontendman-sitting {
  margin: 0 16px;
}

.adventure {
  font-size: 1.5rem;
}

.move-div {
  animation: movediv 4s linear;
}

@keyframes movediv {
  from {
    margin-right: -500%;
  }
  to {
    margin-right: 0%;
  }
}

.index-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.press-start {
  text-decoration: none;
  font-size: 2rem;
  color: var(--white);
  opacity: 0;
  animation: blink-style 1.5s ease-in 5.5s infinite;
  margin: 1.5rem;
}

.line {
  max-width: 360px;
  width: calc(100%);
}

.copyright {
  font-size: 0.5rem;
}

@keyframes blink-style {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ########## */
/* intro.html */

.dangerous {
  margin: 2rem 0;
  font-size: 1.5rem;
}

.intro-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.nyancat {
  width: 150px;
  height: 90px;
  animation: pulse 5s ease-in-out 4s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* ############### */
/* characters.html */

#fiona-the-frenchie,
#roberto-the-frontendman,
#roberto-the-pizzaman {
  height: 100%;
}

.select-heading {
  font-size: 2.25rem;
  margin: 12px 0;
}

#character-name {
  font-size: 1.25rem;
  margin: 16px 0;
}

#character-about-text {
  font-size: 0.875rem;
  padding: 8px;
}

#characters-container {
  width: 710px;
  height: 300px;
}

#characters-container img:hover {
  transform: scale(1.1);
  transition: transform 1.2s ease-in-out;
  cursor: pointer;
}

.about-container {
  max-width: 1000px;
  width: 1000px;
  height: 190px;
  color: var(--blue);
  background-color: var(--yellow);
  text-align: left;
}

/* ########### */
/* levels.html */

#card-description {
  text-align: left;
  padding: 24px 36px;
}

#card-title {
  margin: 12px 0;
  font-size: 1.5rem;
}

.levels-container {
  width: 1000px;
  height: 550px;
  display: flex;
  justify-content: space-around;
}

.levels-select-container {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  gap: 20px;
}

button {
  font-size: 1.5rem;
  cursor: pointer;
  width: 300px;
  height: 70px;
  font-family: "Press Start 2P", cursive;
  background-color: var(--yellow);
  color: var(--blue);
  gap: 10px;
}

.levels-display-container {
  width: 600px;
  height: 100%;
  background-color: var(--yellow);
  color: var(--blue);
}

.levels-display-container a {
  padding: 16px;
  text-decoration: none;
  color: var(--blue);
}

.levels-display-container a:hover {
  background-color: var(--blue);
  color: var(--yellow);
  transition: 2s;
}

.levels-select-container button:hover {
  background-color: var(--blue);
  color: var(--yellow);
  transition: 2s;
}

.levels-container button:focus {
  background-color: var(--pink);
  color: var(--white);
}

/* ####### */
/* credits */

.frontendman-standing {
  height: 300px;
  width: 200px;
}

.links-container {
  position: relative;
  width: 400px;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 72px;
  border: var(--yellow) solid 8px;
  border-radius: 12px;
  margin-top: 12px;
}

.links {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 24px;
}

.project-links {
  display: flex;
  justify-content: space-between;
  padding: 0 36px;
}

.credits {
  margin: 12px;
}

.link-a {
  color: var(--white);
  text-decoration: none;
  padding: 16px;
}

.link-a:hover {
  background-color: var(--yellow);
  color: var(--blue);
  padding: 16px;
}
.speech-bubble {
  position: absolute;
  left: 350px;
  top: -90px;
  animation-name: speech;
  animation-duration: 0.1s;
  animation-delay: 10s;
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes speech {
  to {
    display: block;
    opacity: 1;
  }
}

/* ######### */
/* menu.html */

.body-menu {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
}

.background {
  background: var(--blue);
  background-image: url(img/frontendman_menu.png);
  background-position: left bottom;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  opacity: 0;
  animation: fade-in 9s ease forwards;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.container-menu-links {
  max-width: 500px;
  width: 100%;
  height: 500px;
  font-size: 2.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  gap: 48px;
}

.container-menu-links a {
  color: var(--white);
  text-decoration: none;
  padding: 16px;
}

.container-menu-links a:hover {
  background-color: var(--yellow);
  color: var(--blue);
}

/* ########## */
/* bonus.html */

.lost-levels-container {
  display: inline-block;
  justify-content: center;
  align-items: center;
  width: 90%;
  height: 90%;
  padding: 12px 8px;
  color: var(--blue);
  background-color: var(--yellow);
  text-align: left;
  margin-top: 16px;
}

.lost-level {
  display: inline-flex;
  margin-bottom: 12px;
}

.lost-level a {
  font-size: 0.75rem;
  background-color: var(--blue);
  color: var(--white);
  text-decoration: none;
  padding: 16px;
  margin-right: 8px;
}

.lost-level a:hover {
  background-color: var(--pink);
  color: var(--yellow);
  transition: 2s;
}

.bonus {
  font-size: 1.75rem;
  margin: 12px;
}

.bonuslink .bonuslinktext {
  padding: 16px;
  visibility: hidden;
  width: 300px;
  height: 260px;
  background-color: var(--yellow);
  color: var(--blue);
  text-align: left;
  border: solid 8px var(--blue);
  /* Position the tooltip */
  position: absolute;
  z-index: 1;
}

.bonuslink:hover .bonuslinktext {
  visibility: visible;
}

.bonuslinktext h3 {
  text-decoration: underline;
  text-underline-offset: 8px;
}

.bonuslinktext a {
  display: inline-flex;
  width: 90%;
}

/* #################################################################### */
/* Media query */

/* SHARED */

@media screen and (max-width: 800px) {
  .mobile-bg {
    background-image: url(img/testtest.png);
    width: 100vw;
    height: 100vh;
    background-position: bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0;
    animation: fade-in 9s ease forwards;
  }

  body {
    display: flex;
    height: 100vh;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: auto;
  }

  main {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hide {
    display: none;
  }

  .container {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
  }

  .title {
    font-size: 30px;
    margin: 16px 0 24px 0;
  }

  /* ################################################################### */
  /* TYPOGRAPHY */

  h1,
  h2,
  h3 {
    margin: 0px;
  }

  h2 {
    line-height: 140%;
  }

  p {
    font-size: 12px;
    line-height: 140%;
  }

  h3 {
    margin: 0px;
    font-size: 12px;
  }

  h1 {
    margin: 0px 0;
  }

  /* ################################################################### */
  /* index.html */

  .frontendman-sitting {
    height: 344px;
    width: 340px;
  }

  .adventure {
    line-height: 125%;
    font-size: 16px;
  }

  .move-div {
    animation: none;
  }

  .press-start {
    font-size: 1.5rem;
    margin: 40px 0 60px 0;
    animation: blink-style 1.5s ease-in 3.5s infinite;
  }

  .index-container {
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .intro-container {
    margin: 0 auto;
    width: 100%;
  }

  .index-container {
    width: 100%;
    display: flex;
    align-items: center;
  }

  /* ################################################################### */
  /* credits.html */

  .links-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0px;
    margin-top: 24px;
    border: none;
  }

  .links {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .frontendman-standing {
    height: 300px;
    width: 200px;
  }

  .credits {
    margin: 12px;
  }

  /* ################################################################### */
  /* charachters.html */

  #characters-container {
    width: 340px;
    height: 135px;
  }

  #characters-container img {
    height: 100%;
  }

  .about-container {
    max-width: 325px;
    width: 100%;
    height: 410px;
    padding: 4px;
    margin: 0 8px;
  }

  .border {
    border: var(--brownish) solid 3px;
  }

  .select-heading {
    font-size: 1.25rem;
    margin: 16px 0 12px 0;
  }

  #character-name {
    font-size: 0.75rem;
    margin: 12px 0;
  }

  #character-about-text {
    font-size: 0.75rem;
    padding: 4px;
    margin: 0;
  }

  /* menu */

  .body-menu {
    overflow: hidden;
    width: 100%;
    height: 100%;
    align-items: center;
    margin: 0;
    padding: 0;
  }

  .background {
    background-image: url(img/nyancat.png);
    background-position: bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0;
    margin: 0;
    width: 100%;
    height: 100%;
  }

  .container-menu-links {
    margin-top: 96px;
    position: absolute;
    top: 12px;
    width: 300px;
    height: 200px;
    font-size: 1.5rem;
    gap: 24px;
    padding: 0px;
  }

  .nyancat {
    margin-bottom: 48px;
  }

  .intro-container {
    width: 96%;
    padding: 4px;
  }

  /* ################################################################### */
  /* levels.html */

  #card-title {
    margin: 12px 0;
    font-size: 1rem;
  }

  #card-description {
    text-align: left;
    padding: 12px 18px;
  }

  .levels-container {
    margin-top: 0;
    width: 350px;
    height: 550px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .levels-select-container {
    display: flex;
    flex-wrap: wrap;
    height: 20%;
    width: 96%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .levels-display-container {
    width: 96%;
    height: 400px;
  }

  .levels-display-container img {
    width: 200px;
    height: 135px;
  }

  button {
    font-size: 0.56rem;
    width: 100px;
    height: 45px;
  }

  .project-links {
    padding: 0 12px;
  }

  .project-links a {
    font-size: 10px;
  }

  /* bonus.html */

  .bonus {
    font-size: 1rem;
  }

  .bonuslink:hover .bonuslinktext {
    visibility: hidden;
  }

  .lost-levels-container {
    height: 50vh;
  }
}
