@font-face {
    font-family: 'Sarah';
    src: url("/Moonloops/Sarah-Regular-New.otf");
  }

* {
    line-height: 0 !important;
}

  html,
  body {
    image-rendering: smooth;
    height: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: (white) no-repeat center center fixed;
    background-size: cover;
    line-height: 0 !important;
  }

  @media (max-width: 768px) {
    canvas {
      width: 85vw;
      /* Make canvas 80% of the viewport width on smaller screens */
      height: 85vw;
      /* Adjust the height to maintain the aspect ratio */
    }
  }

  @media (min-width: 769px) {
    canvas {
      width: 80vw;
      /* Make canvas 80% of the viewport width on smaller screens */
      height: 80vw;
      /* Adjust the height to maintain the aspect ratio */
    }
  }

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

  canvas {
    border: 1px solid black;
    display: none;
  }

  #startScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    height: 100vh;
    margin: auto;
    /* Ensure full viewport height for vertical centering */
  }

  #startScreen button {
    padding: 0;
    width: 40%;

    height: auto;
    font-size: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #startScreen button img {
    width: 80%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  #startScreen button span {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-family: Sarah, Arial, sans-serif;
    font-size: 20px;
    pointer-events: none;
  }

  #startScreen .scoreBar {
    opacity: 0;
  }

  #winScreen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
  }

  #winScreen button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: green;
    border: none;
    color: white;
  }

  #gameOverScreen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    height: 100vh;
    /* Ensure full viewport height for vertical centering */
  }

  #gameOverScreen button {
    padding: 0;
    width: 40%;
    height: auto;
    font-size: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #gameOverScreen button img {
    width: 80%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  #gameOverScreen button span {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-family: Sarah, Arial, sans-serif;
    font-size: 20px;
    pointer-events: none;
  }

  

  #winScreen button {
    padding: 0;
    width: 40%;
    height: auto;
    font-size: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #winScreen button img {
    width: 80%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  #winScreen button span {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-family: Sarah, Arial, sans-serif;
    font-size: 20px;
    pointer-events: none;
  }

  #winScreen .winButtons {
    display: flex;
    flex-direction: row;
    gap: 2vw;
    justify-content: center;
    align-items: center;
    margin-bottom: 1em;
  }


  /* Score bar styling */
  #scoreBar {
    display: none;
    /* Hide by default */
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 85vw;
  }

  #logo {
    height: auto;
    width: 40%;
  }

  #scoreDisplay {
    font-family: 'Sarah', Arial, sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: black;
  }

  h1 {
    color: black;
    font-weight: bolder;
    font-family: Sarah;
    font-size: 5vw;
  }

  #winSreen h1, p{
margin: 1%;
  }

  #gameOverScreen h1, p{
    margin: 1%;
      }

  p {
    color: black;
    font-family: Sarah;
  }

  .startButton {
    font-family: Sarah;
    font-size: 20px;
    color: black;
    background-color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    background-image: url("Moonloops/previewbutton.gif");
    height: 80%;
width: auto;
  }

  .restartButton {
    font-family: Sarah;
    font-size: 20px;
    color: black;
    background-color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    background-image: url("Moonloops/previewbutton.gif");
    height: 80%;
width: auto;
  }

  #logoStart {
    width: 60%;
    height: auto;
  }

  .textStart {
    position: relative;
    top: -3.5%;
    /* Remove negative offset */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
#scoreBar p{
  font-weight: bolder;
  font-size: 200%;
}

p {
  font-weight: bolder;
  font-size: 5vw;
}