:root {
  --bg: #05060f;
  --panel: rgba(12, 16, 32, 0.82);
  --text: #e8ecff;
  --muted: #8b93b8;
  --accent: #6ee7ff;
  --accent2: #ff7ab6;
  --good: #7dffa3;
  --border: rgba(110, 231, 255, 0.25);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
}

.wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100%;
}

aside {
  padding: 1.25rem;
  background: linear-gradient(180deg, #0b1020 0%, #070a14 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 2;
  overflow-y: auto;
}

h1 {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  margin: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

select, button, input[type="range"] {
  width: 100%;
}

select, button {
  background: #12182c;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

button.primary {
  background: linear-gradient(135deg, #1a3a55, #3a1a44);
  border-color: var(--accent);
}

button:hover { filter: brightness(1.12); }

.row {
  display: flex;
  gap: 0.5rem;
}
.row button { flex: 1; }

.stat {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  line-height: 1.55;
}
.stat strong { color: var(--good); }

.hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: auto;
  line-height: 1.45;
}

main {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(60, 40, 120, 0.35), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(20, 60, 100, 0.3), transparent 45%),
    var(--bg);
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

@media (max-width: 800px) {
  .wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  aside { max-height: 42vh; }
}
