/* ==========================================================================
   WALLACE BROS: LISBON FURY - cabinet
   Canvas is 384x288 (4:3). Everything here is the furniture around it.
   ========================================================================== */

@font-face {
  font-family: 'Press Start 2P';
  src: url('press-start-2p.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --neon-pink: #ff3aa8;
  --neon-cyan: #21e8ff;
  --neon-gold: #ffc61e;
  --chrome: #3a3550;
  --deep: #0a0714;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  /* A back-alley arcade at night: magenta spill, everything else dark. */
  background:
    radial-gradient(ellipse 70% 50% at 50% 35%, #2a0f3d 0%, #130a20 55%, #060310 100%),
    var(--deep);
}

#cab {
  width: min(100%, calc((100vh - 200px) * 4 / 3 + 48px), 880px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Marquee ------------------------------------------------------------ */
#marquee {
  text-align: center;
  padding: 9px 10px 7px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #1d1630 0%, #0d0918 100%);
  border: 2px solid var(--chrome);
  border-bottom: 3px solid #000;
}
.neon {
  display: block;
  font-size: clamp(10px, 1.9vw, 18px);
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow:
    0 0 4px var(--neon-pink), 0 0 10px var(--neon-pink),
    0 0 22px rgba(255, 58, 168, 0.55), 0 2px 0 #000;
}
.sub {
  display: block;
  margin-top: 6px;
  font-size: clamp(5px, 0.95vw, 9px);
  letter-spacing: 0.18em;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px rgba(33, 232, 255, 0.7);
}

/* --- Bezel and screen --------------------------------------------------- */
#bezel {
  padding: clamp(8px, 2vw, 18px);
  border-radius: 10px;
  background: linear-gradient(160deg, #241d38 0%, #14102310 40%, #0b0816 100%), #141023;
  border: 2px solid #000;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.07),
    inset 0 -3px 0 rgba(0, 0, 0, 0.6),
    0 14px 44px rgba(0, 0, 0, 0.8);
}

#screen {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  border: 2px solid #000;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.95), 0 0 24px rgba(255, 58, 168, 0.12);
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  background: #000;
}

#scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.24) 0px, rgba(0, 0, 0, 0.24) 1px,
    rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0) 3px
  );
  mix-blend-mode: multiply;
}
#glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.5) 100%);
}
@media (prefers-reduced-motion: reduce) { #scanlines { opacity: 0.3; } }

/* --- Control panel ------------------------------------------------------ */
#panel {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 4px 4px 9px 9px;
  background: linear-gradient(180deg, #1d1731 0%, #0e0a1a 100%);
  border: 2px solid var(--chrome);
  border-top: 3px solid #000;
}
.stick { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stick .row { display: flex; gap: 4px; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

#panel button {
  font-family: inherit;
  font-size: 10px;
  color: #140f22;
  border: 0;
  border-radius: 8px;
  padding: 12px 13px;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(180deg, #d9d4e8, #9d97b4);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
#panel button small { display: block; font-size: 7px; opacity: 0.65; margin-top: 3px; }
#panel button:active, #panel button.down {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.35);
}
#panel .p { background: linear-gradient(180deg, #ff7ac4, var(--neon-pink)); }
#panel .k { background: linear-gradient(180deg, #74f0ff, var(--neon-cyan)); }
#panel .s { background: linear-gradient(180deg, #ffe07a, var(--neon-gold)); }

#hint {
  margin: 0;
  text-align: center;
  font-size: 7px;
  line-height: 1.8;
  color: #6b6288;
}
#hint b { color: var(--neon-gold); }

#music {
  position: fixed;
  top: 10px;
  left: 10px;
  font-family: inherit;
  font-size: 9px;
  color: #fff;
  background: #1d1731;
  border: 1px solid var(--chrome);
  border-radius: 5px;
  padding: 8px 10px;
  cursor: pointer;
}
