@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Space Grotesk', sans-serif;
  background: #0f0f1a;
  color: #e0e0ff;
  overflow: hidden;
  touch-action: none;
}

canvas { display: block; }

#toggleUI {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #a855f7;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
#toggleUI:hover { background: rgba(168, 85, 247, 0.4); transform: translateY(-2px); }

.panel {
  position: fixed;
  top: 80px;
  left: 20px;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 20px;
  z-index: 999;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: translateX(-120%);
}
.panel.visible {
  transform: translateX(0);
}
.panel h2 {
  margin-bottom: 16px;
  font-size: 1.4rem;
  background: linear-gradient(90deg, #a855f7, #f7567c);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
button {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e0e0ff;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}
button:hover {
  background: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}
button.danger { background: rgba(247, 86, 124, 0.2); border-color: rgba(247, 86, 124, 0.4); }
button.danger:hover { background: rgba(247, 86, 124, 0.4); }

.color-btn { position: relative; }
#colorPicker {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.info small {
  opacity: 0.7;
  font-size: 0.8rem;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: rgba(10, 10, 20, 0.8);
  backdrop-filter: blur(10px);
  color: #888;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 900;
  pointer-events: none;
}
.hint { opacity: 0.8; font-style: italic; }