*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  touch-action: manipulation;
  overflow: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.game-board{
  width: 100%;
  height: 100vh;
  border-bottom: 3vh solid green;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: linear-gradient(#87CEEB, #E0F6FF);
}

.score {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
               0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
  background: rgba(0, 128, 0, 0.7);
  padding: clamp(0.5rem, 2vw, 1rem);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.timer {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
               0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
  background: rgba(0, 0, 0, 0.45);
  padding: clamp(0.5rem, 2vw, 1rem);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.game-over {
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.game-over h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: red;
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-over .final-score {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: #FFD700;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.pipe {
  position: absolute;
  bottom: 0;
  right: -10vw;
  width: clamp(50px, 8vw, 80px);
  height: auto;
}

.mario {
  width: clamp(80px, 12vw, 150px);
  position: absolute;
  bottom: 0;
  left: 10vw;
}

.clouds {
  width: clamp(300px, 50vw, 550px);
  position: absolute;
  top: clamp(10px, 5vh, 50px);
  animation: clouds-animation 20s infinite linear;
}


@keyframes clouds-animation {
  from {
    right: -60vw;
  }
  to {
    right: 100%;
  }
}

.pipe-animation {
  animation: pipe-animation 2s infinite linear;
}

@keyframes pipe-animation {
  from {
    right: -10vw;
  }
  to {
    right: 100%;
  }
}

.jump {
  animation: jump 800ms ease-out;
}

@keyframes jump {
  0% {
    bottom: 0;
  }
  40% {
    bottom: clamp(150px, 25vh, 200px);
  }
  50% {
    bottom: clamp(150px, 25vh, 200px);
  }
  60% {
    bottom: clamp(150px, 25vh, 200px);
  }
  100% {
    bottom: 0;
  }
}

/* Media Queries for different devices */
@media (max-width: 768px) {
  .mario {
    left: 5vw;
  }
  
  .pipe-animation {
    animation-duration: 2.5s;
  }
}

@media (max-width: 480px) {
  .pipe-animation {
    animation-duration: 3s;
  }
  
  .game-board {
    border-bottom-width: 2vh;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  @keyframes jump {
    0% {
      bottom: 0;
    }
    40%, 50%, 60% {
      bottom: clamp(100px, 20vh, 150px);
    }
    100% {
      bottom: 0;
    }
  }
}