body {
  display: flex;
  justify-content: center;
  height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(to top, #6ec6ff, #e0f7fa);
}

.game {
  width: 90%;
  max-width: 700px;
  aspect-ratio: 7 / 2.5; 
  border: 2px solid #0288d1;
  position: relative;
  overflow: hidden;
}

header{
  margin: 1rem;
  font-size: 18px;
  font-weight: bold;
  color: #01579b;

}

section {
  text-align: center;
}

#player {
  width: 7%;
  height: 20%;
  background: url("../assets/images/panda1.png") no-repeat center/contain;
  position: absolute;
  bottom: 0;
  left: 2%;
  transition: left 0.1s linear;
}

#obstacle {
  width: 7%;
  height: 20%;
  background: url("../assets/images/spourwater.png") no-repeat center/contain;
  position: absolute;
  bottom: 0;
  right: -10%;
}

#goal {
  width: 7%;
  height: 20%;
  background: url("../assets/images/yatch.png") no-repeat center/contain;
  position: absolute;
  bottom: 0;
  right: 2%;
}


#game-over {
  font-size: 20px;
  font-weight: bold;
  color: red;
}

#score {
  font-size: 16px;
  font-weight: bold;
  margin-top: 8px;
  color: #01579b;
}

#welcome-screen {
  position: fixed; /* makes it float above everything */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #a2d4f5, #ffffff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1000; /* ensure it's on top */
}

#start-button {
  padding: 12px 24px;
  font-size: 1.2em;
  cursor: pointer;
  background-color: #4caf50;
  color: white;
  border: none;
}

#welcome-screen-img {
  width: 150px;
  max-width: 40%;
  height: auto;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

/* floating panda on welcome screen */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}