:root {
  --bg: #0e1224;
  --panel: #11162b;
  --text: #e7ecff;
  --muted: #9aa5d1;
  --accent: #5dd6ff;
  --accent-2: #9bffa6;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--text);
  background: radial-gradient(1000px 600px at 70% -10%, #1d2550 0%, var(--bg) 50%);
}

.page { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(17, 22, 43, 0.7);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
}
.brand { font-weight: 800; letter-spacing: 0.3px; }
.help { color: var(--muted); font-size: 13px; }

.stage { display: grid; place-items: center; padding: 16px; }
.canvas-wrap {
  position: relative;
  width: min(92vw, 960px);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: linear-gradient(180deg, #121a36 0%, #0c1022 100%);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
}

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

.hud {
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 12px;
  background: rgba(14, 18, 36, 0.35);
  border: 1px solid rgba(255,255,255,0.06);
}
.hud .label { color: var(--muted); font-size: 12px; margin-right: 6px; }
.hud .value { font-weight: 800; }

.overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center; padding: 24px;
  background: linear-gradient(180deg, rgba(10,14,30,0.6), rgba(10,14,30,0.8));
}
.title { margin: 0 0 8px; font-size: clamp(24px, 4vw, 40px); }
.subtitle { margin: 0 0 14px; color: var(--muted); }
.howto { margin: 0 0 18px; padding: 0; list-style: none; color: var(--muted); }
.howto li { margin: 6px 0; }

.btn {
  appearance: none; border: none; cursor: pointer;
  padding: 10px 16px; border-radius: 10px;
  background: linear-gradient(180deg, var(--accent), #3ab6e0);
  color: #08111e; font-weight: 800; letter-spacing: 0.2px;
  box-shadow: 0 6px 18px rgba(93, 214, 255, 0.35);
}
.btn:active { transform: translateY(1px); }

.toast {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  background: rgba(8, 12, 26, 0.8);
  color: var(--text);
  padding: 8px 12px; border-radius: 10px; font-size: 13px;
  border: 1px solid rgba(255,255,255,0.06);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.toast.show { opacity: 1; }

.footer { color: var(--muted); text-align: center; padding: 12px; font-size: 13px; }

@media (max-width: 640px) {
  .help { display: none; }
}


