/* GlassBoy: display additivo 600x600, il nero e' trasparente. */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

body { display: flex; align-items: center; justify-content: center; }

#stage {
  position: relative;
  width: 600px;
  height: 600px;
  overflow: hidden;
  background: #000;
}

.screen { position: absolute; inset: 0; }
.hidden { display: none !important; }

/* ---------- Scelta gioco ---------- */
#screen-roms { padding: 40px 48px; display: flex; flex-direction: column; }
#screen-roms h1 { font-size: 40px; font-weight: 700; letter-spacing: 1px; }
#screen-roms .sub { font-size: 22px; color: #9aa4b2; margin: 6px 0 20px; }
.list { display: flex; flex-direction: column; gap: 10px; overflow: hidden; flex: 1; }
.item {
  min-height: 64px;
  padding: 14px 20px;
  border-radius: 16px;
  background: #121418;
  border: 2px solid transparent;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.item .meta { font-size: 16px; color: #8a93a0; }
.item.focus { border-color: #fff; background: #1f232b; }
.hint { font-size: 17px; color: #8a93a0; margin-top: 12px; }

/* ---------- Gioco ---------- */
#screen-game { display: flex; align-items: center; justify-content: center; }
#lcd {
  width: 480px;           /* 3x, cambiato da app.js */
  height: 432px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#pad-indicator {
  position: absolute;
  right: 26px;
  bottom: 26px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #5b6472;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
}

#help {
  position: absolute;
  left: 50px;
  right: 50px;
  top: 120px;
  padding: 22px 26px;
  background: #0d0f13;
  border: 2px solid #3a414c;
  border-radius: 20px;
  font-size: 22px;
  line-height: 1.6;
}
#help b { display: inline-block; min-width: 230px; color: #fff; }
#help div { color: #c9d1db; }
#help .small { font-size: 16px; color: #8a93a0; margin-top: 8px; }

/* ---------- Menu ---------- */
#screen-menu { background: #000; padding: 34px 32px; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 100%;
  align-content: center;
}
.btn {
  height: 74px;
  border-radius: 16px;
  background: #121418;
  border: 2px solid transparent;
  font-size: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}
.btn .val { font-size: 15px; color: #8a93a0; margin-top: 3px; }
.btn.focus { border-color: #fff; background: #1f232b; }
.btn.primary { color: #fff; }

/* ---------- Toast e debug ---------- */
#toast {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 14px;
  background: #15181e;
  border: 1px solid #3a414c;
  font-size: 20px;
  white-space: nowrap;
}

#debug {
  position: absolute;
  left: 8px;
  top: 8px;
  right: 8px;
  font: 13px/1.35 ui-monospace, Consolas, monospace;
  color: #7fffb0;
  white-space: pre;
  pointer-events: none;
}
