body {
  margin: 0;
  overflow: hidden;
  background: #222;
}

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

/* Loader */
@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

#loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 5px solid #333;
  border-top: 5px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}
/* Hide the loader when we add the 'hidden' class */
#loader.hidden {
  display: none;
}

#controls-container {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
}
.control-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}
.control-btn svg {
  width: 18px;
  height: 18px;
}
.control-btn:hover {
  background: #e5e5e5;
  color: #000;
}
.control-btn.active {
  background: #232323;
  color: #fff;
}
.control-btn:active {
  transform: scale(0.95);
}

#controls-hint {
  position: absolute;
  top: 30px;
  right: 30px;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border-radius: 5px;
  font-family: sans-serif;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#hint-title {
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#hint-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#hint-list li {
  margin: 4px 0;
}
.hint-hidden {
  opacity: 0;
  transform: translateX(20px);
}
@media (max-width: 768px) {
  #controls-hint {
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 10px;
  }

  #hint-title {
    font-size: 12px;
  }
}

#click-ping {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 2px solid white;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  z-index: 2000;
  position: absolute;
}
#click-ping, .control-btn {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}