:root {
  --bg: #0f172a;
  --card: #0b1220;
  --accent: #7c3aed;
  --muted: #94a3b8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg), #071024);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  color: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.app {
  width: 100%;
  max-width: 1100px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}
.controls {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.controls h2 {
  margin: 0;
  font-size: 16px;
  color: #e6eef8;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
}
label {
  font-size: 13px;
  color: var(--muted);
  min-width: 80px;
}
input[type="color"],
input[type="range"],
select {
  flex: 1;
}
button {
  background: var(--accent);
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.canvas-wrap {
  background: linear-gradient(180deg, #071229, #071633);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.canvas-area {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
canvas {
  display: block;
  width: 100%;
  height: 60vh;
  max-height: 80vh;
  background-color: white;
  touch-action: none;
}
.tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
}
@media (max-width: 880px) {
  .app {
    grid-template-columns: 1fr;
  }
  .controls {
    order: 2;
  }
  canvas {
    height: 50vh;
  }
}
