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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #333; /* Fallback for game container */
}

body {
  display: block; /* Remove flex properties */
  position: relative; /* For positioning controls */
  height: 100%;
  font-family: Arial, sans-serif;
}

.game-container {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #87ceeb;
  border: none; /* Remove border */
  overflow: hidden;
  max-width: none;
  max-height: none;
}

#player {
  position: absolute;
  width: 40px;
  height: 60px;
  background-color: #149728;
  border-radius: 4px;
  left: 50px;
  top: 0; /* Will be positioned by JS */
  z-index: 10; /* Ensure player is above ground */
}

#ground {
  position: absolute;
  width: 100%;
  height: 80px;
  background-color: #8b4513;
  bottom: 0;
  z-index: 1;
}

.platform {
  position: absolute;
  width: 120px;
  height: 20px;
  background-color: #ff6b00;
  border: 2px solid #b34700;
  border-radius: 4px;
  z-index: 5;
}

.instructions {
  display: none; /* Redundant, hide it */
}

/* Mobile Responsive Controls */
.mobile-controls {
  display: none; /* Hidden by default */
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 20;
}

@media (max-width: 768px) {
  .game-container {
    height: 100%; /* Make it full height on mobile too */
    border-width: 0;
  }

  .mobile-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 0;
  }

  .mobile-controls button {
    width: 60px;
    height: 60px;
    font-size: 32px;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    user-select: none;
  }

  .mobile-controls button:active {
    background-color: #ddd;
  }
}
