body {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000 !important;
  font-family: arial;
  color: #fff;
  background-image: none !important;
  min-height: 100vh;
  min-width: 100vw;
  overscroll-behavior: contain;
  touch-action: manipulation;
}

#instructions {
  font-size: 1.2em;
  margin-bottom: 20px;
  margin-top:16px;
  text-align: center;
  width: 100%;
}

#gameContainer {
  width: 900px;
  height: 600px;
  max-width: 100vw;
  max-height: 100vh;
  position: relative;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
  border-radius: 12px;
  margin: 20px 0;
}

#georgeface {
  position: absolute;
  bottom: 40px;
  left: 80px;
  width: 80px;
  height: 80px;
  background-image: url('./assets/gl-face.png'); /* Use local face image */
  background-size: cover;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

.obstacle {
  position: absolute;
  width: 60px;
  height: 42px;
  background-image: url('./assets/envelope.svg'); /* Replace with cardboard box image URL */
  background-size: cover;
  top: -100px; /* Position off-screen initially */
  left: -100px; /* Position off-screen initially */
}

#obstacle1 {
  right: 0;
}
#obstacle2 {
  right: 225px;
}
#obstacle3 {
  right: 450px;
}
#obstacle4 {
  right: 675px;
}

#gameOverMessage {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-image: url('./assets/game-over.svg'); /* Replace with your game over image URL */
  background-position: center;
  background-size: 500px 200px;
  background-repeat: no-repeat;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

#score {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1.2em;
  font-family: monospace;
}

#livesContainer {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: red;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1.2em;
  font-family: monospace;
  display: flex;
  align-items: center;
}

#startButton {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 40px;
  font-size: 1em;
  cursor: pointer;
  display: block;
  border-radius: 0px;
  color: #5429FF;
  font-family: monospace;
}

@media (max-width: 768px) {
  #gameContainer {
    display: none;
  }

  #mobileMessage {
    display: block;
  }
}

#loadingScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #180c49;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#loadingScreen img {
  max-width: 320px;
  margin-bottom: 32px;
}
#loadingScreen ul {
  color: #fff;
  font-family: monospace;
  font-size: 1.1em;
  text-align: left;
  max-width: 400px;
}
#loadingScreen button {
  margin-top: 32px;
  padding: 12px 36px;
  font-size: 1.2em;
  border-radius: 8px;
  border: none;
  background: #5429ff;
  color: #fff;
  cursor: pointer;
  font-family: monospace;
}

#mobileControls {
  display: none;
}

@media (max-width: 600px) {
  #gameContainer {
    width: 100vw;
    height: 100vh;
    min-width: 0;
    min-height: 0;
  }
  .obstacle, #georgeface {
    width: 32px !important;
    height: 32px !important;
  }
  #score, #livesContainer, .overlay, #gameOverOverlay, #leaderboardOverlay {
    font-size: 1em !important;
    padding: 8px 12px !important;
  }
  #livesContainer {
    top: 12px;
    left: 12px;
  }
  #mobileControls {
    display: flex;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    gap: 16px;
    z-index: 1001;
  }
  #mobileControls button {
    font-size: 2em;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    background: rgba(0,0,0,0.7);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    touch-action: manipulation;
  }
}

body, html {
  overscroll-behavior: contain;
  touch-action: manipulation;
}

.external-link {
  color: #fff;
  font-family: monospace;
  text-decoration: none;
}
