:root {
  --glow: #a078ff;
}

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,700;12..96,800&display=swap');

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050510;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}

#canvas {
  display: block;
  position: fixed;
  inset: 0;
  touch-action: none;
  cursor: crosshair;
  background:
    radial-gradient(ellipse at 30% 20%, #160b34 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, #0d0221 0%, transparent 55%),
    #050510;
}

#controls { pointer-events: none; }

.panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(20, 10, 40, 0.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(160, 120, 255, 0.22);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
  z-index: 10;
  transition: opacity 0.45s ease;
  pointer-events: auto;
  max-width: 96vw;
  flex-wrap: wrap;
  justify-content: center;
}

.top { top: 14px; }
.bottom { bottom: 22px; }

.panel.dim { opacity: 0.22; }

.chip {
  border: none;
  cursor: pointer;
  color: #d7c8ff;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  padding: 9px 15px;
  border-radius: 999px;
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chip:hover { background: rgba(160, 120, 255, 0.15); }
.chip:active { transform: scale(0.94); }

.chip.active {
  color: #fff;
  background: rgba(160, 120, 255, 0.28);
  box-shadow: 0 0 16px var(--glow), inset 0 0 8px rgba(255, 255, 255, 0.1);
}

.iconbtn { font-size: 20px; padding: 9px 13px; }

#hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #cdbcff;
  font-weight: 300;
  font-size: clamp(18px, 5vw, 30px);
  text-align: center;
  line-height: 1.6;
  text-shadow: 0 0 24px var(--glow), 0 0 48px rgba(120, 64, 255, 0.5);
  pointer-events: none;
  z-index: 5;
  animation: floatPulse 2.6s ease-in-out infinite;
  transition: opacity 0.6s ease;
  padding: 0 20px;
}
#hint .sub {
  display: block;
  margin-top: 8px;
  font-size: 0.5em;
  letter-spacing: 3px;
  opacity: 0.65;
  text-transform: uppercase;
}
#hint.gone { opacity: 0; }

@keyframes floatPulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -52%) scale(1.03); }
}

.remix {
  position: fixed;
  bottom: 6px;
  right: 12px;
  z-index: 10;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.5px;
  color: rgba(200, 180, 255, 0.45);
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.2s;
}
.remix:hover { color: #c8b8ff; }

@media (max-width: 480px) {
  .chip { font-size: 12px; padding: 8px 11px; }
  .iconbtn { font-size: 18px; padding: 8px 11px; }
}