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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Fondo espacial */
body {
  background: radial-gradient(circle at top, #020617 0%, #020617 45%, #000000 100%);
  color: #ffffff;
}

/* Canvas pantalla completa */
#gameCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

/* UI superior */
#ui-top {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

#title {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e5e7eb;
  text-shadow: 0 0 14px rgba(15, 23, 42, 0.9);
}

#subtitle {
  margin-top: 6px;
  font-size: clamp(0.7rem, 1.6vw, 0.9rem);
  color: #9ca3af;
  max-width: 640px;
  padding: 0 16px;
}

/* HUD inferior */
#ui-bottom {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.hud-item {
  font-size: clamp(0.7rem, 1.6vw, 0.9rem);
  color: #e5e7eb;
}

#score,
#best {
  color: #93c5fd;
  font-weight: 600;
}

#status {
  color: #a5b4fc;
}

/* HUD compacto en móvil */
@media (max-width: 480px) {
  #ui-bottom {
    flex-direction: column;
    border-radius: 18px;
  }
}
