/* iomega · game.css — the game layer, ANALOGUE OS EDITION (2026-09-03).
   Was the Mega Man pause screen; now it follows the Pocket: pure black screens,
   grotesque type, grey secondary, thin bars, and the white-pill selection.
   Class names unchanged so game.js is untouched. */

:root {
  --po-black: #000000;
  --po-white: #ffffff;
  --po-grey: #8b8b8b;
  --po-dim: #5a5a5a;
  --po-line: #1c1c1c;
  --po-line-2: #2a2a2a;
  --po-font: "Helvetica Neue", Helvetica, Inter, "Segoe UI", Arial, sans-serif;
}

/* ---------- the chip (util-row): status-bar text, not a badge ---------- */
.game-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--po-line-2);
  border-radius: 999px;
  font-family: var(--po-font);
  font-weight: 500;
  font-size: 12px;
  color: var(--po-white);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.game-chip:hover { background: #fff; color: #000; border-color: #fff; }
.game-chip:hover .gc-lv, .game-chip:hover .gc-tr { color: #000; }
.gc-lv { color: var(--po-white); font-weight: 600; }
.gc-tr { color: var(--po-grey); }
.gc-bar {
  width: 44px;
  height: 2px;
  background: var(--po-line-2);
  display: inline-block;
  overflow: hidden;
}
.gc-bar > span { display: block; height: 100%; background: currentColor; }

/* ---------- the status screen: a Pocket page ---------- */
.nes-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--po-black);
}
.nes-frame {
  position: relative;   /* anchors the celebrations toggle top-right */
  width: min(560px, 100%);
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: 34px 24px calc(env(safe-area-inset-bottom, 0px) + 28px);
  background: var(--po-black);
  font-family: var(--po-font);
  color: var(--po-white);
  border: none;
  outline: none;
  box-shadow: none;
  animation: po-fade 0.18s ease both;
}
@keyframes po-fade { from { opacity: 0; } to { opacity: 1; } }
.nes-title { margin: 0 0 6px; }
.nes-title span {
  display: block;
  padding: 0;
  background: none;
  border: none;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--po-white);
}
.nes-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.nes-level { margin-top: 4px; }
.nes-label { color: var(--po-grey); font-size: 13px; font-weight: 400; min-width: 0; }
.nes-num { font-size: 15px; font-weight: 600; }
.nes-level .nes-label::after { content: ""; }
.nes-ticks {
  flex: 1;
  height: 2px;
  border: none;
  background: var(--po-line-2);
  overflow: hidden;
}
.nes-ticks > span { display: block; height: 100%; background: var(--po-white); }
.nes-exp-num {
  justify-content: space-between;
  font-size: 12px;
  font-weight: 400;
  color: var(--po-grey);
  margin: 4px 0 0;
}

/* trophies: list rows; earned = white, locked = dim; hover = the pill */
.nes-trophies { margin-top: 26px; display: block; }
.nes-trophy {
  display: grid;
  grid-template-columns: 40px 1fr auto;   /* tile | name | rarity, one line */
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  margin: 0 -12px;
  border-radius: 999px;
  opacity: 1;
}
.nes-trophy:hover { background: #fff; }
.nes-trophy:hover .nes-tname { color: #000; }
.nes-trophy:hover .nes-tile { border-color: #000; color: #000; background: transparent; }
.nes-tile {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 11px;
  font-weight: 600;
  color: var(--po-white);
  background: transparent;
  border: 1px solid var(--po-line-2);
  border-radius: 8px;
  clip-path: none;
}
.nes-trophy.is-on .nes-tile { background: #fff; color: #000; border-color: #fff; }
.nes-trophy.is-on:hover .nes-tile { background: transparent; }
.nes-tname { font-size: 14px; font-weight: 500; color: var(--po-white); }
.nes-trophy:not(.is-on) .nes-tname { color: var(--po-dim); }
.nes-trophy:not(.is-on) .nes-tile { color: var(--po-dim); border-color: var(--po-line); }
.nes-tbar { display: none; }
.nes-close {
  display: block;
  margin: 26px auto 0;
  padding: 9px 20px;
  background: transparent;
  border: 1px solid var(--po-line-2);
  border-radius: 999px;
  font-family: var(--po-font);
  font-weight: 500;
  font-size: 13px;
  color: var(--po-grey);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.nes-close:hover { background: #fff; color: #000; border-color: #fff; }

/* ---------- trophy toast: a quiet pill drop ---------- */
.nes-toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: #fff;
  color: #000;
  border: none;
  outline: none;
  border-radius: 999px;
  font-family: var(--po-font);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  animation: po-drop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.nes-toast .nes-tile { width: 22px; height: 22px; font-size: 9px; background: #000; color: #fff; border: none; border-radius: 6px; }
.nes-toast.is-out { transition: opacity 0.4s, transform 0.4s; opacity: 0; transform: translateX(-50%) translateY(-12px); }
@keyframes po-drop { from { transform: translateX(-50%) translateY(-24px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* ---------- listeners row ---------- */
.listeners { margin-top: 20px; }
.listeners[hidden] { display: none; }
.listeners-label {
  font-family: var(--po-font);
  font-size: 12px;
  font-weight: 400;
  color: var(--po-grey);
  margin: 0 0 6px;
}
.listener { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.listener::before { content: "●"; color: var(--po-white); font-size: 7px; }
.listener-name { font-size: 14px; font-weight: 500; color: var(--po-white); flex: 1; }
.listener .pill { padding: 6px 14px; cursor: pointer; font-size: 12px; }

/* ---------- the UPGRADE screen: full black, unlocks slam in ---------- */
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.cel-head { margin: 0; font-size: 13px; color: #9a9a9a; }
.cel-items { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.cel-item { opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cel-item.is-slam { animation: cel-slam 320ms cubic-bezier(0.16, 1.1, 0.3, 1) both; }
@keyframes cel-slam {
  from { opacity: 0; transform: scale(2.4); filter: blur(3px); }
  62%  { opacity: 1; transform: scale(0.94); filter: blur(0); }
  to   { opacity: 1; transform: scale(1); }
}
.cel-big {
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.02em;
  padding: 14px 32px;
  border-radius: 999px;
}
.cel-tile {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 21px;
  border-radius: 16px;
}
.cel-sub { font-size: 16px; font-weight: 600; color: #fff; }
.cel-close {
  margin-top: 6px;
  padding: 11px 24px;
  background: none;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  color: #9a9a9a;
  font-size: 13px;
  cursor: pointer;
}
.cel-close:hover { background: #fff; color: #000; border-color: #fff; }

/* xp bar on the upgrade screen — fills after the slams land */
.cel-xprow { display: flex; align-items: center; gap: 12px; width: min(320px, 78vw); }
.cel-lv { font-size: 13px; font-weight: 700; color: #e8e8e8; white-space: nowrap; }
.cel-track { flex: 1; height: 6px; border-radius: 3px; background: #222; overflow: hidden; }
.cel-fill { display: block; height: 100%; background: #fff; border-radius: 3px; transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cel-gain { font-size: 13px; font-weight: 600; color: #9a9a9a; white-space: nowrap; }

/* status screen tabs — Pocket pills, white inversion when active */
.nes-tabs { display: flex; gap: 8px; margin: 14px 0 10px; }
.nes-tab {
  flex: 1;
  padding: 9px 0;
  background: none;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  color: #9a9a9a;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.nes-tab.is-on { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.nes-rarity { justify-self: end; text-align: right; font-size: 11px; color: #555; white-space: nowrap; }
.nes-trophies[hidden] { display: none; }

/* the level pop — the finale, bigger than everything before it */
.cel-levelpop { opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cel-levelpop.is-slam { animation: cel-slam 380ms cubic-bezier(0.16, 1.1, 0.3, 1) both; }
.cel-levelpop .cel-big { font-size: 42px; padding: 18px 44px; }

/* trophy badge on the level chip + the sound toggle */
.game-chip { position: relative; }
.gc-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #000;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.nes-mute {
  position: absolute;
  top: 16px;
  right: 18px;
  margin: 0;
  padding: 7px 14px;
  background: none;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  color: #9a9a9a;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}
.nes-mute:hover { background: #fff; color: #000; border-color: #fff; }

/* the xp receipt — why each point arrived */
.cel-reasons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.cel-reasons li { font-size: 13px; color: #9a9a9a; }
.cel-reasons li span { color: #e8e8e8; font-weight: 600; margin-right: 4px; }
