/* ============================================================
   NABU PC BROWSER EMULATOR — "Play in browser" panel on the
   software detail page. Built by js/emu/player.js.
   Layered on retro-theme.css; reuses its --retro-* tokens.
   ============================================================ */

.sw-emu {

  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sw-emu-intro {

  color: var(--retro-ice);
  margin: 0;
}

.sw-emu-notice {

  color: #ffe08a;
  margin: 0;
  font-size: 0.9rem;
}

/* ----- Cover shown before the NABU is powered on ----- */
.sw-emu-player {

  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.sw-emu-cover {

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 420px;
  padding: 1rem;
  color: var(--retro-white);
  background:
    radial-gradient(ellipse at center, rgba(0, 180, 255, 0.22), rgba(0, 8, 20, 0.95) 70%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 240, 255, 0.05) 3px 4px);
  border: 2px solid rgba(0, 240, 255, 0.45);
  border-radius: 10px;
  box-shadow: 0 0 28px rgba(0, 180, 255, 0.2);
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sw-emu-cover:hover,
.sw-emu-cover:focus-visible {

  border-color: var(--retro-cyan);
  box-shadow: var(--retro-glow-cyan);
  outline: none;
}

.sw-emu-cover-icon.mud-icon-root {

  font-size: 4rem;
  width: 4rem;
  height: 4rem;
  color: var(--retro-cyan);
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.7));
}

.sw-emu-cover-title {

  font-family: 'Press Start 2P', 'VT323', monospace;
  font-size: 1rem;
  color: var(--retro-cyan);
}

.sw-emu-cover-sub {

  font-size: 0.9rem;
  color: var(--retro-ice);
}

.nemu {

  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* ----- Screen: 288x216 frame (256x192 + border) scaled up, crisp pixels ----- */
.nemu-screen {

  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border: 2px solid rgba(0, 240, 255, 0.45);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 28px rgba(0, 180, 255, 0.25), inset 0 0 40px rgba(0, 0, 0, 0.8);
  outline: none;
  cursor: pointer;
}

.nemu-screen:focus-visible {

  border-color: var(--retro-cyan);
  box-shadow: var(--retro-glow-cyan);
}

.nemu-screen:fullscreen {

  border: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nemu-canvas {

  display: block;
  width: 100%;
  height: 100%;
  /* crisp-edges first for Firefox; pixelated last wins in Chromium and Safari. */
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.nemu-screen:fullscreen .nemu-canvas {

  width: auto;
  height: 100%;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  object-fit: contain;
}

/* ----- Overlay: loading / "click to play" ----- */
.nemu-overlay {

  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 8, 20, 0.62);
  transition: opacity 0.2s ease;
}

.nemu-overlay-hidden {

  opacity: 0;
  pointer-events: none;
}

.nemu-overlay-text {

  font-family: 'Press Start 2P', 'VT323', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: center;
  color: var(--retro-cyan);
  text-shadow: var(--retro-glow-cyan);
}

/* ----- Unsupported feature notice ----- */
.nemu-notice {

  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(255, 196, 0, 0.55);
  border-radius: 6px;
  background: rgba(255, 196, 0, 0.08);
  color: #ffe08a;
  font-size: 0.9rem;
}

/* ----- Toolbar ----- */
.nemu-bar {

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.nemu-btn {

  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  padding: 0.35rem 0.8rem;
  color: var(--retro-white);
  background: rgba(0, 83, 164, 0.35);
  border: 1px solid rgba(0, 180, 255, 0.55);
  border-radius: 4px;
  cursor: pointer;
}

.nemu-btn:hover,
.nemu-btn:focus-visible {

  background: rgba(0, 180, 255, 0.25);
  border-color: var(--retro-cyan);
  outline: none;
}

.nemu-status {

  margin-left: auto;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: var(--retro-ice);
}

/* ----- Key legend ----- */
.nemu-help {

  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.8rem;
  color: var(--retro-ice);
}

.nemu-help kbd {

  font-family: 'Share Tech Mono', monospace;
  padding: 0 0.3rem;
  border: 1px solid rgba(168, 216, 255, 0.45);
  border-radius: 3px;
  background: rgba(0, 18, 51, 0.7);
  color: var(--retro-white);
}
