* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  background-color: black;
  color: white;
  display: flex;
  flex-direction: column;
}

/* ── Custom titlebar ─────────────────────────────────────────────────────────── */
#titlebar {
  display: flex;
  align-items: center;
  height: 32px;
  background: #0d0d0d;
  border-bottom: 1px solid #1e1e1e;
  flex-shrink: 0;
  -webkit-app-region: drag;
  user-select: none;
}

#titlebar-drag {
  flex: 1;
  padding-left: 12px;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #555;
  text-transform: uppercase;
}

#titlebar-controls {
  display: flex;
  -webkit-app-region: no-drag;
}

#titlebar-controls button {
  width: 46px;
  height: 32px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#titlebar-controls button:hover {
  background: #222;
  color: #ccc;
}

#btn-close:hover {
  background: #c0392b;
  color: #fff;
}

/* ── Canvas ──────────────────────────────────────────────────────────────────── */
canvas {
  display: block;
  flex: 1;
}
