* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(circle at center, #2c3e50 0%, #1a1e24 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
}

#game-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.1);
  background-color: #4ec0ca;
  width: 360px;
  height: 640px;
  max-width: 95vw;
  max-height: 85vh;
  max-height: 85dvh;
  aspect-ratio: 9 / 16;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  cursor: pointer;
}

#hud {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, background-color 0.2s ease;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.08);
}

.hud-btn:active {
  transform: scale(0.92);
}

.footer-info {
  font-size: 13px;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-align: center;
}

.footer-info b {
  color: #f1c40f;
}

@media (max-height: 700px) {
  .footer-info {
    display: none;
  }
}
