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

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: "Comic Sans MS", "Chalkboard SE", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(180deg, #bfe3ff 0%, #e8d9ff 55%, #ffd9ec 100%);
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

#scene.dragging {
  cursor: grabbing;
}

.hud {
  position: fixed;
  z-index: 2;
  color: #4a3b6b;
  user-select: none;
  pointer-events: none;
}

.hud-top {
  top: 20px;
  left: 24px;
}

.hud-top h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow:
    3px 3px 0 #a678e8,
    -1px -1px 0 #a678e8,
    1px -1px 0 #a678e8,
    -1px 1px 0 #a678e8;
  transform: rotate(-2deg);
}

.subtitle {
  margin-top: 4px;
  font-size: clamp(0.8rem, 2vw, 1rem);
  opacity: 0.75;
}

.hud-hint {
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: 2px dashed #b48ae0;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.9rem;
  animation: bob 2s ease-in-out infinite;
  transition: opacity 0.6s;
}

.hud-hint.hidden {
  opacity: 0;
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

.hud-bottom {
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: 0 8px 24px rgba(90, 60, 140, 0.25);
  pointer-events: auto;
}

.btn {
  font-size: 1.1rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #a678e8;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.btn:hover {
  transform: scale(1.12) rotate(-6deg);
  background: #8f5cd9;
}

.btn.active {
  background: #ff6fa5;
}

.speed {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #6b5a94;
}

.speed input {
  width: clamp(90px, 20vw, 160px);
  accent-color: #a678e8;
  cursor: pointer;
}
