* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #8ed8ff;
  font-family: Arial, sans-serif;
  touch-action: none;
}

#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

#game-ui {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

#score,
#lives {
  font-size: 24px;
  font-weight: bold;
}

#hint {
  margin-top: 8px;
  padding: 8px 12px;
  max-width: 420px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 12px;
  background: rgba(32, 48, 64, 0.32);
}

#info {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.9;
}

#start-screen,
#game-over-screen,
#win-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 74, 105, 0.45);
  backdrop-filter: blur(4px);
}

.hidden {
  display: none !important;
}

.panel {
  width: min(90vw, 440px);
  padding: 28px;
  text-align: center;
  color: #203040;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.panel h1 {
  margin: 0 0 12px;
  font-size: 30px;
}

.panel p {
  margin: 0 0 22px;
  line-height: 1.5;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 22px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  background: #2f9c5c;
  cursor: pointer;
  box-shadow: 0 6px 0 #1f6f3f;
}

button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #1f6f3f;
}

#mobile-controls {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: 18px;
  z-index: 15;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: auto;
}

#mobile-controls button {
  min-width: 64px;
  height: 58px;
  border-radius: 18px;
  background: rgba(35, 48, 62, 0.72);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.25);
}

#jump-button {
  min-width: 104px;
  background: rgba(237, 151, 42, 0.86) !important;
}

@media (min-width: 900px) {
  #mobile-controls {
    display: none;
  }
}
