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

:root {
  --bg: #0a0a0f;
  --surface: #14141f;
  --border: #2a2a3a;
  --text: #e8e8f0;
  --text-dim: #8888aa;
  --accent: #7c5cfc;
  --accent-hover: #9a7dff;
  --danger: #ff4466;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  overflow: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  padding: 16px 24px 8px;
  text-align: center;
  z-index: 2;
}

.title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

canvas.dragging {
  cursor: grabbing;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px 16px;
  z-index: 2;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn i,
.btn svg {
  width: 15px;
  height: 15px;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.btn--ghost.active {
  color: var(--danger);
  border-color: var(--danger);
}
