* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #1e2b52 0%, #0a0f1f 55%, #05070f 100%);
  color: #f4f7ff;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.hud {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  max-width: 320px;
  padding: 12px 14px;
  background: rgba(10, 15, 31, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.hud h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.hud p {
  margin: 6px 0;
  line-height: 1.45;
  font-size: 14px;
  color: #d9e4ff;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

.touch-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 18px;
  pointer-events: none;
}

.move-pad,
.action-pad {
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.move-row,
.action-pad {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  min-width: 58px;
  min-height: 58px;
  border: none;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 6px 18px rgba(0,0,0,0.22);
}

button:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.22);
}

#btn-jump,
#btn-break,
#btn-place,
#btn-rocket,
#btn-fly {
  min-width: 64px;
}

.wing-btn {
  font-size: 26px;
}

@media (max-width: 700px) {
  .hud {
    max-width: 250px;
    padding: 10px 12px;
  }

  .hud h1 {
    font-size: 18px;
  }

  .hud p {
    font-size: 12px;
  }

  button {
    min-width: 52px;
    min-height: 52px;
    font-size: 20px;
  }
}
