/* Free Play's floor: arcade carpet underfoot, a neon sign over the door, a cabinet for each machine, and the prize
   counter at the back. Each cabinet wears its own game's colours: Roll Up's red and gold marquee, Tilt's amber backbox. */

@font-face { font-family: "Bungee Outline"; src: url(../fonts/bungee-outline.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --carpet: #0d0b1f;
  --ink: #fbeed2;
  --ink2: rgba(251, 238, 210, .76);
  --ink3: rgba(251, 238, 210, .52);
  --line: rgba(251, 238, 210, .14);
  --pink: #ff5fa2;
  --teal: #4ff0e0;
  --gold: #ffd36a;
  --sign: "Bungee Outline", "Bungee", Impact, sans-serif;
  --disp: "Bungee", Impact, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--carpet); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 16px/1.45 var(--body); -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px));
  /* the carpet: neon squiggles, rings, triangles and stars, the kind every arcade has */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 95, 162, .16), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' opacity='.2'%3E%3Cpath d='M14 30l12-14 12 14 12-14 12 14' stroke='%23ff4f9a'/%3E%3Ccircle cx='132' cy='40' r='13' stroke='%233fe0d0'/%3E%3Cpath d='M40 120l18-30 18 30z' stroke='%23ffd23f'/%3E%3Cpath d='M104 110c10-14 20 14 30 0s20 14 30 0' stroke='%238a6bff'/%3E%3Cpath d='M150 150l14 14M164 150l-14 14' stroke='%23ff4f9a'/%3E%3Ccircle cx='22' cy='160' r='7' stroke='%23ffd23f'/%3E%3C/g%3E%3Cg fill='%23fbeed2' opacity='.22'%3E%3Ccircle cx='90' cy='20' r='2'/%3E%3Ccircle cx='70' cy='64' r='1.6'/%3E%3Ccircle cx='160' cy='90' r='2'/%3E%3Ccircle cx='100' cy='160' r='1.6'/%3E%3Ccircle cx='12' cy='86' r='1.6'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 180px 180px,
    var(--carpet);
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- the door: the sign and the tickets in your pocket ---------- */
.door { max-width: 900px; margin: 0 auto; padding: 34px 0 10px; text-align: center; }
.sign { margin: 0; font: 400 clamp(58px, 17vw, 112px)/.95 var(--sign); letter-spacing: .01em; text-wrap: balance; }
.sign span { display: inline-block; }
.sign .free { color: #ffd0e3; text-shadow: 0 0 4px var(--pink), 0 0 14px var(--pink), 0 0 34px rgba(255, 95, 162, .7); }
.sign .play {
  color: #d6fffb; text-shadow: 0 0 4px var(--teal), 0 0 14px var(--teal), 0 0 34px rgba(79, 240, 224, .7);
  animation: buzz 3.2s steps(1) .4s both; /* a tube that catches on its second go, once */
}
@keyframes buzz { 0% { opacity: .2; } 6% { opacity: 1; } 9% { opacity: .3; } 12% { opacity: 1; } 18% { opacity: .55; } 20%, 100% { opacity: 1; } }
.lede { max-width: 30em; margin: 14px auto 18px; color: var(--ink2); font-size: 16px; text-wrap: balance; }
.purse {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: rgba(13, 11, 31, .7); border: 1px solid rgba(255, 211, 106, .45); font-weight: 600; color: var(--ink2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.purse b { font: 400 18px var(--disp); color: var(--gold); }

/* ---------- the machines ---------- */
.floor {
  max-width: 900px; margin: 26px auto 0; display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start;
}
.cab {
  --trim: #c23a2e; --trim2: #7a1c16; --go: linear-gradient(#e2513f, #c23a2e); --go-edge: #7a1c16; --go-ink: #fff6e6;
  display: flex; flex-direction: column; text-decoration: none; border-radius: 20px 20px 12px 12px; overflow: hidden;
  background: linear-gradient(90deg, var(--trim2) 0 6px, #19131f 6px calc(100% - 6px), var(--trim2) calc(100% - 6px));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 18px 40px rgba(0, 0, 0, .55), 0 0 60px -20px var(--trim);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cab:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 24px 46px rgba(0, 0, 0, .6), 0 0 70px -14px var(--trim); }
.cab:active { transform: translateY(0); }
.cab:focus-visible { outline-offset: 6px; }
.cab.tilt { --trim: #ffa53a; --trim2: #6a3a0c; --go: linear-gradient(#ffb04d, #f07a1a); --go-edge: #a2420c; --go-ink: #2a1200; }

.marquee {
  position: relative; display: block; margin: 10px 14px 0; padding: 16px 12px 14px; border-radius: 12px; text-align: center;
  font: 400 30px/1 var(--disp); letter-spacing: .03em;
}
.roll-up .marquee {
  color: var(--ink); background: linear-gradient(#8e1c22, #55101a); border: 2px solid #f2c14e; text-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.roll-up .marquee::before, .roll-up .marquee::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 6px;
  background: radial-gradient(circle, #ffe3a1 0 2px, rgba(255, 210, 120, .35) 2.6px, transparent 3.4px) 0 0 / 14px 6px repeat-x;
  animation: chase .9s steps(2) infinite;
}
.roll-up .marquee::before { top: 4px; }
.roll-up .marquee::after { bottom: 4px; animation-delay: .45s; }
@keyframes chase { 50% { background-position: 7px 0; } }
.tilt .marquee {
  color: #ffa53a; background: #120a02 radial-gradient(rgba(255, 165, 58, .08) 1px, transparent 1.2px) 0 0 / 4px 4px;
  box-shadow: inset 0 0 0 1px #3a2208, inset 0 2px 10px rgba(0, 0, 0, .8); border: 2px solid #3a2208;
  text-shadow: 0 0 6px rgba(255, 140, 30, .8), 0 0 18px rgba(255, 120, 20, .4);
}

.screen {
  display: block; margin: 12px 14px 0; padding: 8px; border-radius: 12px; background: #050407;
  box-shadow: inset 0 0 0 2px #2a2230, inset 0 0 24px rgba(0, 0, 0, .9);
}
.screen img { display: block; width: 100%; height: auto; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }

.panel {
  display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 12px 0 0; padding: 14px 18px 18px; text-align: center;
  background: linear-gradient(#211a2b, #15101c); border-top: 1px solid rgba(255, 255, 255, .06);
}
.what { color: var(--ink2); font-size: 15px; text-wrap: balance; }
.stat { min-height: 1.4em; color: var(--ink); font-weight: 600; font-size: 14px; }
.coin {
  padding: 3px 10px; border-radius: 4px; background: #120a02; box-shadow: inset 0 0 0 1px #3a2208;
  font: 400 11px/1.3 var(--disp); letter-spacing: .14em; text-transform: uppercase; color: #ff7a3a;
  text-shadow: 0 0 6px rgba(255, 110, 40, .8); animation: blink 2.6s steps(1) infinite;
}
@keyframes blink { 70% { opacity: .35; } }
.go {
  display: block; width: 100%; padding: 13px 18px; border-radius: 12px; background: var(--go); color: var(--go-ink);
  font: 400 19px var(--disp); letter-spacing: .03em; box-shadow: 0 4px 0 var(--go-edge);
}
.cab:active .go { transform: translateY(2px); box-shadow: 0 2px 0 var(--go-edge); }

/* ---------- the prize counter at the back ---------- */
.booth { max-width: 900px; margin: 34px auto 0; }
.booth-in {
  padding: 18px 18px 20px; border-radius: 18px; text-align: center;
  background: linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)), #1a1233;
  border: 1px solid var(--line); box-shadow: 0 -6px 0 #6b3d1c inset, 0 18px 40px rgba(0, 0, 0, .45);
}
.booth h2 { margin: 0; font: 400 24px var(--disp); }
.booth-what { margin: 6px auto 14px; max-width: 32em; color: var(--ink2); font-size: 15px; text-wrap: balance; }
.shelf {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; min-height: 60px; padding: 10px 12px; margin: 0 0 14px; border-radius: 14px;
  background: linear-gradient(transparent 72%, rgba(120, 70, 30, .5) 72% 80%, transparent 80%), rgba(251, 238, 210, .04);
  border: 1px solid var(--line); font-size: 32px; line-height: 1.2; align-items: flex-end;
}
.shelf .empty { font-size: 14px; color: var(--ink3); align-self: center; }
.shelf span { position: relative; }
.shelf sub { position: absolute; right: -4px; bottom: -2px; font: 700 11px var(--body); background: #c23a2e; border-radius: 999px; padding: 1px 5px; }
.trade {
  min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1px solid rgba(255, 211, 106, .55);
  background: rgba(255, 211, 106, .12); color: var(--gold); font: 400 17px var(--disp);
}
.trade:active { background: rgba(255, 211, 106, .22); }

.jd-foot { margin: 28px 0 0; padding: 0 0 28px; text-align: center; font-size: 13px; color: var(--ink3); }
.jd-foot a { color: var(--ink3); text-decoration: none; }
.jd-foot a:hover, .jd-foot a:focus-visible { color: var(--ink2); text-decoration: underline; }
.jd-foot span { margin: 0 6px; }
.noscript { text-align: center; color: var(--ink2); }

@media (prefers-reduced-motion: reduce) {
  .sign .play, .roll-up .marquee::before, .roll-up .marquee::after, .coin { animation: none; }
  .cab { transition: none; }
}
