* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0a0a0f; color: #eee; font-family: monospace; overflow: hidden; width: 100vw; height: 100dvh; display: flex; flex-direction: column; }

#header {
  padding: 8px 12px;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
}
#header h1 { font-size: 13px; color: #ccc; letter-spacing: 2px; text-transform: uppercase; }
#status { margin-left: auto; }

#main-area { flex: 1; display: flex; overflow: hidden; }
#canvas-wrap { flex: 1; position: relative; overflow: hidden; }

#sidebar {
  display: none;
  width: 220px;
  flex-shrink: 0;
  padding: 16px;
  background: rgba(0,0,0,0.5);
  border-right: 1px solid #222;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.5;
  color: #999;
}
#sidebar h2 { font-size: 13px; color: #ccc; margin-bottom: 10px; letter-spacing: 1px; text-transform: uppercase; }
#sidebar h3 { font-size: 11px; color: #aaa; margin-top: 14px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
#sidebar p { margin-bottom: 8px; }
#sidebar .rule { text-align: center; font-size: 14px; color: #ddd; padding: 6px 0; }
#sidebar ul { list-style: none; padding: 0; }
#sidebar li { margin-bottom: 4px; }
#sidebar strong { color: #ccc; }
#sidebar em { color: #aac; font-style: normal; }

@media (min-width: 800px) {
  #sidebar { display: block; }
}
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; cursor: crosshair; touch-action: none; }

#tooltip {
  position: absolute;
  background: rgba(0,0,0,0.85);
  border: 1px solid #333;
  padding: 6px 10px;
  font-size: 11px;
  pointer-events: none;
  display: none;
  z-index: 10;
  white-space: nowrap;
}

#controls {
  padding: 8px 12px;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
  font-size: 11px;
}
button {
  background: #1a1a2e;
  border: 1px solid #333;
  color: #ccc;
  padding: 4px 10px;
  cursor: pointer;
  font-family: monospace;
  font-size: 11px;
}
button:hover { background: #252540; border-color: #555; }
label { color: #888; display: flex; align-items: center; gap: 6px; }
input[type=range] { width: 80px; }
select {
  background: #1a1a2e;
  border: 1px solid #333;
  color: #ccc;
  padding: 3px 6px;
  font-family: monospace;
  font-size: 11px;
}
