:root {
  --bg: #1c1c26;
  --panel: #242433;
  --text: #e8e8ee;
  --muted: #c8c8d2;
  --bar-track: #323245;
  --hunger: #f07878;
  --energy: #78b8f0;
  --happy: #78dca0;
  --hygiene: #c8aa64;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  display: grid;
  place-items: center;
}

#app {
  display: grid;
  gap: 16px;
  padding: 16px;
}

canvas {
  image-rendering: pixelated;
  width: 384px; /* 16x16 sprite * scale 24px per cell (96 px canvas scaled x4) */
  height: 384px;
  border-radius: 8px;
  background: #c8cdd2;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.panel {
  background: var(--panel);
  padding: 12px;
  border-radius: 8px;
  width: 384px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.title { font-size: 18px; margin-bottom: 8px; }

.bars { display: grid; gap: 8px; }
.bar {
  display: grid;
  grid-template-columns: 70px 1fr 40px;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.barTrack {
  height: 12px;
  background: var(--bar-track);
  border-radius: 6px;
  overflow: hidden;
}
.barFill {
  height: 100%;
  width: 0%;
  background: var(--muted);
  border-radius: 6px;
}

.state, .controls {
  margin-top: 8px;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.controls button {
  background: var(--bar-track);
  color: var(--text);
  border: 1px solid var(--bg);
  border-radius: 4px;
  padding: 8px 4px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.controls button:hover {
  background: #4a4a63;
}

.controls button:active {
  background: #5a5a73;
}

.poops {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(8, 12px);
  gap: 6px;
}
.poop {
  width: 10px;
  height: 10px;
  background: #7a5a34;
  border-radius: 2px;
}
