/* The room is one 16:9 stage that covers the window (cropped top/bottom on wide screens, scrollable sideways on
   narrow ones), with the idle video under absolutely placed, perspective-warped slots. One warm look by choice. */
:root {
  color-scheme: dark;
  --ink: #1b120b;
  --paper: #f6ead9;
  --muted: #cdb79e;
  --lamp: #f2a541;
  --glass: rgba(18, 11, 6, 0.78);
  --ui: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --pixel: "Press Start 2P", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #120c08; color: var(--paper); font-family: var(--ui); overflow: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }

.room { position: fixed; inset: 0; overflow: hidden; }
.room.pan { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.room.pan::-webkit-scrollbar { display: none; }
.stage { position: absolute; left: 0; top: 0; overflow: hidden; }
.room:not(.pan) .stage { left: 50%; transform: translateX(-50%); }
.plate, .idle { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.slots { position: absolute; inset: 0; }

.slot { position: absolute; inset: 0; pointer-events: none; -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; transition: filter .25s ease; }
.content { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: auto; overflow: hidden; display: block; text-decoration: none; }
.slot-screen .content { background: #05070c; }
.slot-screen.hot { filter: brightness(1.18) saturate(1.1); }
.scr video, .scr img, .pst img, .box img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* CRT glass: scanlines, a soft vignette and a highlight, over whatever plays on a screen */
.crt { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 30% 18%, rgba(255, 255, 255, .13), transparent 42%),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, .55) 100%),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px); }

/* attract screen for a game without a preview clip */
.slot-screen .title-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9em; padding: 8%;
  text-align: center; font-family: var(--pixel); line-height: 1.35;
  background: radial-gradient(circle at 50% 40%, hsl(var(--h) 70% 30%), hsl(var(--h) 75% 9%) 70%); }
.tc-title { color: hsl(var(--h) 90% 82%); text-shadow: 0 0 .4em hsl(var(--h) 100% 60%), .12em .12em 0 hsl(var(--h) 80% 20%); text-wrap: balance; }
.tc-start { font-size: .42em; color: #fff7d6; letter-spacing: .1em; text-transform: uppercase; }
@media (prefers-reduced-motion: no-preference) { .tc-start { animation: blink 1.2s steps(2, start) infinite; } }
@keyframes blink { to { visibility: hidden; } }

/* posters and boxes sit under the room's warm light */
.light { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(180deg, rgba(255, 214, 160, .95), rgba(214, 150, 92, .9)); }
.pst::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .08) 20%, transparent 45%); }
.spine { display: flex; align-items: center; padding: 0 4%; font-family: var(--display); letter-spacing: .04em;
  text-transform: uppercase; white-space: nowrap; color: hsl(var(--h) 80% 75%); background: hsl(var(--h) 45% 14%); }

/* UI */
.brand { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); left: max(16px, env(safe-area-inset-left, 0px)); z-index: 5; }
.logo { font-family: var(--display); font-size: 26px; text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
  background: var(--glass); padding: 4px 12px 2px; border-radius: 4px; backdrop-filter: blur(6px); }
.logo span { color: var(--lamp); }

.card { position: fixed; z-index: 6; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 64px);
  width: min(360px, calc(100vw - 32px)); background: var(--glass); backdrop-filter: blur(10px); border: 1px solid rgba(242, 165, 65, .35);
  border-radius: 6px; padding: 14px 16px; pointer-events: none; }
.card-top { display: flex; align-items: center; gap: 8px; }
.card-kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--lamp); }
.card-title { font-family: var(--display); font-size: 34px; line-height: 1; text-transform: uppercase; margin: 4px 0 6px; }
.card-tag { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.card-cta { font-size: 13px; font-weight: 700; color: var(--lamp); }

.bar { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(16px, env(safe-area-inset-left, 0px));
  pointer-events: none; }
.hint { font-size: 13px; color: var(--paper); background: var(--glass); padding: 5px 10px; border-radius: 4px; backdrop-filter: blur(6px); }
.all { pointer-events: auto; font: 700 13px var(--ui); color: var(--ink); background: var(--lamp); border: 0; border-radius: 4px; padding: 8px 14px; cursor: pointer; }

.all-panel { position: fixed; z-index: 7; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 60px);
  width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 640px); overflow: auto; background: rgba(18, 11, 6, .92);
  backdrop-filter: blur(12px); border: 1px solid rgba(242, 165, 65, .35); border-radius: 6px; padding: 12px 14px; }
.all-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -12px; background: inherit; padding: 4px 0 8px; }
.all-head h2 { margin: 0; font-family: var(--display); font-size: 26px; text-transform: uppercase; }
.close { font: 13px var(--ui); color: var(--paper); background: transparent; border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.all-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.all-panel a { display: block; text-decoration: none; padding: 8px 8px; border-radius: 4px; }
.all-panel a:hover, .all-panel a:focus-visible { background: rgba(242, 165, 65, .14); }
.all-panel b { display: block; font-size: 15px; }
.all-panel span { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }

.slots { opacity: 0; transition: opacity .6s ease; }
.ready .slots { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slots, .slot { transition: none; } }
.all-page { display: block; margin-top: 8px; font-size: 13px; color: var(--lamp); }
.noscript { position: fixed; z-index: 9; left: 16px; right: 16px; bottom: 80px; background: var(--glass); padding: 12px 14px; border-radius: 6px; }

/* stills drift slowly so a screen without a clip still feels switched on */
@media (prefers-reduced-motion: no-preference) {
  .scr img.drift { animation: drift 23s ease-in-out infinite alternate; transform-origin: 40% 45%; }
}
@keyframes drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.12) translate(-2.5%, -1.5%); } }

/* clicking a screen: rush into it, then fade to black while the game loads */
.stage { transition: transform .65s cubic-bezier(.55, 0, .85, .35); }
.stage.diving { transform: scale(var(--dive, 4)); }
.room:not(.pan) .stage.diving { transform: translateX(-50%) scale(var(--dive, 4)); }
body::after { content: ""; position: fixed; inset: 0; z-index: 20; background: #000; opacity: 0; pointer-events: none; transition: opacity .35s ease .35s; }
body.leaving::after { opacity: 1; }
body.leaving .brand, body.leaving .bar, body.leaving .card { opacity: 0; transition: opacity .2s; }

/* cabinet marquee: a backlit sign with the game's title */
.marquee { display: flex; align-items: center; justify-content: center; overflow: hidden;
  background:
    radial-gradient(120% 140% at 50% 50%, hsl(var(--h) 70% 22%), hsl(var(--h) 80% 7%) 75%),
    #0a0610; box-shadow: inset 0 0 18px rgba(0, 0, 0, .7); }
.marquee span { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; line-height: 1; white-space: nowrap;
  font-style: italic; padding: 0 4%;
  background: linear-gradient(180deg, #fff6c9 0%, hsl(calc(var(--h) + 40) 100% 66%) 45%, hsl(var(--h) 95% 52%) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: .035em rgba(25, 8, 40, .85);
  filter: drop-shadow(0 0 .12em hsl(var(--h) 100% 60% / .9)) drop-shadow(.06em .06em 0 rgba(0, 0, 0, .7)); }
.slot-marquee.hot { filter: brightness(1.25); }

/* the camera layer: parallax moves it, the dive scales the stage around it */
.cam { position: absolute; inset: 0; will-change: transform; }

/* screen glow: light from each screen spilling onto its bezel and the room, coloured by what's playing */
.glows { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.glow { position: absolute; left: 0; top: 0; transform-origin: 0 0; opacity: .6; filter: blur(5px) saturate(1.5);
  -webkit-mask-image: radial-gradient(closest-side, #000 58%, transparent 100%); mask-image: radial-gradient(closest-side, #000 58%, transparent 100%);
  transition: opacity .35s ease; }
.glows.focus .glow { opacity: .35; }
.glows .glow.hot { opacity: .9; }

/* hover: the chosen screen powers up, the rest of the wall dims a little */
.content.scr { cursor: pointer; }
.slots.focus .slot-screen:not(.hot) { filter: brightness(.72) saturate(.85); }
.slots.focus .slot-marquee:not(.hot) { filter: brightness(.8); }
.slot-screen.hot { filter: brightness(1.16) saturate(1.12); }
.scr::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background-image: var(--noise); background-size: 96px 96px; mix-blend-mode: screen; }
@media (prefers-reduced-motion: no-preference) {
  .slot-screen.zap .scr::before { animation: zap .32s steps(6) 1; }
  .slot-screen.zap .scr > video, .slot-screen.zap .scr > img { animation: surge .45s ease-out 1; }
}
@keyframes zap { 0% { opacity: .9; background-position: 0 0; } 50% { opacity: .55; background-position: 37px 61px; } 100% { opacity: 0; background-position: 71px 13px; } }
@keyframes surge { 0% { filter: brightness(2.1) contrast(.7); } 100% { filter: none; } }

/* sound toggle */
.sound { position: fixed; z-index: 6; top: calc(env(safe-area-inset-top, 0px) + 14px); right: max(16px, env(safe-area-inset-right, 0px));
  display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--ui); color: var(--paper); background: var(--glass);
  border: 1px solid rgba(242, 165, 65, .35); border-radius: 999px; padding: 6px 12px 6px 9px; backdrop-filter: blur(6px); cursor: pointer; }
.sound svg { width: 20px; height: 20px; }
.sound .waves { display: none; }
.sound.on { color: var(--ink); background: var(--lamp); border-color: var(--lamp); }
.sound.on .waves { display: inline; }
.sound.on .cross { display: none; }

/* development stage labels: WIP (striped, like site tape) and Beta */
.badge { display: inline-block; font: 800 11px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px 3px;
  border-radius: 3px; vertical-align: middle; font-style: normal; }
.badge-wip { color: #1b120b; background: repeating-linear-gradient(-45deg, #f2c14e 0 6px, #e8a93a 6px 12px); }
.badge-beta { color: #08202a; background: #6fd3e6; }
.all-panel b .badge { margin-left: 6px; font-size: 10px; padding: 3px 6px 2px; }
/* the sticker on a screen: a bit of tape stuck to the glass, shown while the screen is pointed at */
.sticker { position: absolute; z-index: 3; top: 6%; right: 5%; font-size: 34px; padding: 8px 14px 6px; transform: rotate(6deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s ease, transform .25s ease; pointer-events: none; }
.slot-screen.hot .sticker, .scr:focus-visible .sticker { opacity: 1; transform: rotate(3deg) scale(1.04); }
