/* Base styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  overflow: hidden;
  background: #1a2a6c;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  height: 100vh;
  width: 100vw;
}

/* Orientation warning (hidden by default) */
#orientation-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

#gameContainer {
  position: relative;
  overflow: hidden;
  background: transparent;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

canvas {
  display: block;
  background: linear-gradient(to bottom, #0f9ed6, #E0F7FA);
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Game UI elements */
#scoreDisplay {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 16px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

#wd{
    display: none;
}

#highScoreDisplay {
  position: absolute;
  top: 35px;
  left: 10px;
  color: #FFEB3B;
  font-size: 14px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

#title {
  position: absolute;
  top: 10px;
  width: 100%;
  text-align: center;
  color: white;
  font-size: 24px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
  z-index: 100;
}

/* Game Over Screen */
#gameOver {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  display: none;
  z-index: 200;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

#restartBtn , #playBtn {
  padding: 12px 25px;
  font-size: 18px;
  background: #FF5722;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

/* Controls */
#controls {
  position: absolute;
  bottom: 15px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 100;
  touch-action: manipulation;
}

.control-btn {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 20px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#mobileJump {
  position: absolute;
  left: 20px;
  bottom: 35px;
  width: 70px;
  height: 70px;
  background: rgba(224, 11, 11, 0.9);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  user-select: none;
  -webkit-user-select: none;
  z-index: 100;
  touch-action: manipulation;
}

#downBtn {
  position: absolute;
    bottom: 35px;
    right: 20px;
  background: rgba(224, 11, 11, 0.9);
  height: 70px;
  width: 70px;
}

/* Menu Screen */
#menuScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(assets7/menu.jpg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-size: cover;
  align-items: center;
  z-index: 300;
  color: white;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Landscape Mode */
@media screen and (orientation: landscape) {
  #orientation-warning {
    display: none !important;
  }

 
  
  #gameContainer {
    /* Landscape layout adjustments */
    width: 100%;
    height: 100%;
  }
  
  /* Adjust UI elements for landscape */
  #controls {
    bottom: 5%;
    padding: 0 5%;
  }
  
  .control-btn {
    width: 12vw;
    height: 12vw;
    max-width: 80px;
    max-height: 80px;
  }
  
  #mobileJump {
    left: 5%;
    bottom: 10%;
    width: 14vw;
    height: 14vw;
    max-width: 90px;
    max-height: 90px;
  }
  
  #downBtn {
    right: 5%;
    bottom: 10%;
    width: 14vw;
    height: 14vw;
    max-width: 90px;
    max-height: 90px;
  }
}

/* Portrait Mode Warning */
@media screen and (orientation: portrait) and (max-width: 768px) {
  #orientation-warning {
    display: flex;
  }
  
  #gameContainer {
    display: none;
  }
}