/*
 * 4 · Capsule Arcade: a glossy capsule machine on navy. Neon-trimmed body with marquee bulbs, a
 * neon sign, LED coin counters and a ticker for Pip, items in two-tone capsules behind glass, a
 * CRT screen for the selected item and a big round arcade button to buy. The backpack is a
 * capsule rack with an LED capacity bar.
 */
.m--arcade {
  --body: #24304A; --body-d: #151C2E; --led-bg: #0B0F1A; --neon: #FF6A3D; --neon-2: #FCAA1A; --cyan: #5BD1E8;
  --ink: #FFF1DC; --short: #FF8A7A; --focus: var(--cyan);
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  padding: 26px; border-radius: 28px;
  background: radial-gradient(120% 70% at 50% -10%, rgba(91, 209, 232, 0.16), transparent 60%), linear-gradient(180deg, var(--body), var(--body-d));
  box-shadow: inset 0 0 0 3px var(--neon-2), inset 0 0 0 6px var(--body-d), inset 0 0 0 8px #E14826, 0 0 26px rgba(225, 72, 38, 0.45), 0 18px 34px rgba(10, 15, 30, 0.4);
}
/* marquee bulbs along the top */
.m--arcade .m-bulbs { position: absolute; left: 34px; right: 34px; top: 12px; display: flex; justify-content: space-between; }
.m--arcade .m-bulbs i { width: 7px; height: 7px; border-radius: 50%; background: #FFE7A8; box-shadow: 0 0 6px var(--neon-2), 0 0 12px #E14826; animation: m-bulb 1.2s steps(1) infinite; }
.m--arcade .m-bulbs i:nth-child(odd) { animation-delay: 0.6s; }
@keyframes m-bulb { 50% { opacity: 0.3; } }

/* neon sign */
.m--arcade .m__titlebox { padding: 12px 22px; border-radius: 16px; background: var(--led-bg); box-shadow: inset 0 0 0 2px rgba(252, 170, 26, 0.55), 0 0 18px rgba(252, 170, 26, 0.22); }
.m--arcade .m__title { color: #FFF4D6; text-shadow: 0 0 4px var(--neon-2), 0 0 12px var(--neon-2), 0 0 26px #E14826; animation: m-flicker 7s infinite; }
.m--arcade .m__sub { color: var(--cyan); text-shadow: 0 0 8px rgba(91, 209, 232, 0.7); }
@keyframes m-flicker { 0%, 91%, 100% { opacity: 1; } 92% { opacity: 0.55; } 93% { opacity: 1; } 95% { opacity: 0.7; } }

/* Pip on an LED ticker */
.m--arcade .m__keeper { background: var(--led-bg); color: #BFF4FF; font: 600 13px/1.4 var(--mono); box-shadow: inset 0 0 0 2px #2D3A57; text-shadow: 0 0 6px rgba(91, 209, 232, 0.6); }
.m--arcade .m__who { color: var(--neon-2); text-shadow: 0 0 6px rgba(252, 170, 26, 0.7); }
.m--arcade .m-coin { background: var(--led-bg); color: var(--neon-2); font-family: var(--mono); letter-spacing: 1px; box-shadow: inset 0 0 0 2px #2D3A57, inset 0 2px 8px rgba(0, 0, 0, 0.6); text-shadow: 0 0 8px rgba(252, 170, 26, 0.8); }
.m--arcade .m-coin--gems { color: var(--cyan); text-shadow: 0 0 8px rgba(91, 209, 232, 0.8); }
.m--arcade .m-coin--bag { color: #FFF1DC; text-shadow: none; }
.m--arcade .m-float { text-shadow: 0 0 6px currentColor; }
.m--arcade .m-float.is-down { color: var(--short); }
.m--arcade .m-float.is-up { color: #7FF0A0; }

/* neon pills */
.m--arcade .m-tab { border-radius: 999px; color: #FFE7C2; box-shadow: inset 0 0 0 2px rgba(255, 106, 61, 0.55); transition: box-shadow 0.2s ease, background 0.2s ease; }
.m--arcade .m-tab:hover { box-shadow: inset 0 0 0 2px var(--neon), 0 0 10px rgba(255, 106, 61, 0.4); }
.m--arcade .m-tab[aria-selected='true'] { color: #fff; background: linear-gradient(180deg, #FF7A45, #E14826); box-shadow: 0 0 0 2px var(--neon-2), 0 0 16px rgba(225, 72, 38, 0.8); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }

/* capsules behind glass */
.m--arcade .m__list {
  --cell: 132px; --gap: 14px; padding: 18px; border-radius: 22px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.05) 58%, rgba(255, 255, 255, 0) 70%), radial-gradient(ellipse at 50% 100%, rgba(225, 72, 38, 0.25), transparent 60%), #1B2440;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12), inset 0 10px 30px rgba(0, 0, 0, 0.5);
}
.m--arcade .m-opt { --cap: #E14826; padding: 6px 4px 10px; gap: 8px; border-radius: 16px; }
.m--arcade .m-opt:nth-child(4n + 2) { --cap: var(--neon-2); }
.m--arcade .m-opt:nth-child(4n + 3) { --cap: var(--cyan); }
.m--arcade .m-opt:nth-child(4n + 4) { --cap: #8E5BD6; }
.m--arcade .m-opt__art {
  width: min(96px, 100%); aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cap) 72%, transparent) 0 50%, #FFF4E2 50% 100%);
  box-shadow: inset 0 -7px 10px rgba(0, 0, 0, 0.2), inset 0 6px 10px rgba(255, 255, 255, 0.4), 0 6px 14px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.22);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.m--arcade .m-opt__art::before { content: ''; position: absolute; left: 3%; right: 3%; top: 50%; height: 3px; margin-top: -1.5px; background: rgba(0, 0, 0, 0.2); }
.m--arcade .m-opt__art::after { content: ''; position: absolute; left: 17%; top: 9%; width: 32%; height: 16%; border-radius: 50%; background: rgba(255, 255, 255, 0.6); transform: rotate(-22deg); }
.m--arcade .m-opt__art > .fz-icon, .m--arcade .m-opt__art > .m-glyph { position: relative; }
.m--arcade .m-opt__name { color: #FFF1DC; }
.m--arcade .m-opt__price { padding: 4px 8px; border-radius: 6px; background: var(--led-bg); color: var(--neon-2); font-family: var(--mono); text-shadow: 0 0 6px rgba(252, 170, 26, 0.7); }
.m--arcade .m-opt__price.m-price--gems { color: var(--cyan); text-shadow: 0 0 6px rgba(91, 209, 232, 0.7); }
.m--arcade .m-opt.is-short .m-opt__price { color: var(--short); text-shadow: none; }
.m--arcade .m-opt.is-short .m-opt__art { filter: saturate(0.5) brightness(0.85); }
.m--arcade .m-opt__tag { left: 50%; top: 0; transform: translateX(-50%); border-radius: 999px; background: var(--neon-2); color: var(--led-bg); box-shadow: 0 0 10px rgba(252, 170, 26, 0.7); }
.m--arcade .m-opt:hover .m-opt__art { transform: translateY(-3px); }
.m--arcade .m-opt.is-sel { background: rgba(252, 170, 26, 0.08); }
.m--arcade .m-opt.is-sel .m-opt__art { box-shadow: inset 0 -7px 10px rgba(0, 0, 0, 0.2), inset 0 6px 10px rgba(255, 255, 255, 0.4), 0 0 0 3px var(--neon-2), 0 0 24px 4px rgba(252, 170, 26, 0.6); animation: m-wobble 0.5s ease; }
.m--arcade .m-opt.is-sel .m-opt__name { color: var(--neon-2); text-shadow: 0 0 8px rgba(252, 170, 26, 0.6); }
@keyframes m-wobble { 30% { transform: rotate(-9deg); } 60% { transform: rotate(6deg); } }

/* console with a CRT screen */
.m--arcade .m-detail { padding: 14px; border-radius: 22px; background: linear-gradient(180deg, #2B3756, #1A2238); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1), 0 10px 20px rgba(0, 0, 0, 0.4); }
.m--arcade .m-detail__stage {
  min-height: 196px; border-radius: 18px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 4px), radial-gradient(ellipse at 50% 45%, #1F5A6A, #0B1F2A 72%);
  box-shadow: inset 0 0 0 4px var(--led-bg), inset 0 0 34px rgba(0, 0, 0, 0.65), 0 0 0 2px rgba(91, 209, 232, 0.35);
}
.m--arcade .m-detail__art { filter: drop-shadow(0 0 14px rgba(91, 209, 232, 0.55)); animation: m-hover 3s ease-in-out infinite; }
@keyframes m-hover { 50% { transform: translateY(-6px); } }
.m--arcade .m-detail__tag { border-radius: 999px; background: var(--neon-2); color: var(--led-bg); }
.m--arcade .m-detail__name { color: #FFF4D6; font-family: var(--title-font); text-shadow: 0 0 10px rgba(252, 170, 26, 0.7); }
.m--arcade .m-detail__desc { color: #D9E2F2; }
.m--arcade .m-detail__stats div { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(91, 209, 232, 0.3); }
.m--arcade .m-detail__stats dt { color: var(--cyan); opacity: 1; }
.m--arcade .m-step { background: var(--led-bg); box-shadow: inset 0 0 0 2px #2D3A57; }
.m--arcade .m-step button { color: var(--neon-2); }
.m--arcade .m-step__n { color: #fff; font-family: var(--mono); }
.m--arcade .m-detail__total .m-price { color: var(--neon-2); font-family: var(--mono); text-shadow: 0 0 10px rgba(252, 170, 26, 0.7); }
.m--arcade .m-detail__total .m-price--gems { color: var(--cyan); text-shadow: 0 0 10px rgba(91, 209, 232, 0.7); }
/* the big arcade button */
.m--arcade .m-buy {
  min-height: 66px; border-radius: 999px; font-size: 24px; text-shadow: 0 2px 0 rgba(90, 20, 5, 0.5);
  background: radial-gradient(ellipse at 50% 28%, #FF9A6B, #E14826 55%, #A42A12);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.25), inset 0 3px 0 rgba(255, 255, 255, 0.4), 0 6px 0 #6E1A0A, 0 0 0 4px var(--led-bg), 0 0 0 6px var(--neon-2), 0 0 22px rgba(252, 170, 26, 0.4);
  transition: transform 0.08s, box-shadow 0.08s;
}
.m--arcade .m-buy:active:not([aria-disabled='true']) { transform: translateY(5px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), inset 0 3px 0 rgba(255, 255, 255, 0.4), 0 1px 0 #6E1A0A, 0 0 0 4px var(--led-bg), 0 0 0 6px var(--neon-2), 0 0 30px rgba(252, 170, 26, 0.6); }
.m--arcade .m-buy:focus-visible { outline-offset: 9px; }
.m--arcade .m-ghost { color: var(--cyan); }
.m--arcade .m-project { background: var(--led-bg); color: #E6EEFA; box-shadow: inset 0 0 0 2px #2D3A57; }
.m--arcade .m-bar { background: rgba(255, 255, 255, 0.1); }

/* backpack: capsule rack */
.m--arcade.m-inv .m__list { --slot: 68px; }
.m--arcade .m-slot { border-radius: 50%; background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 70%); box-shadow: inset 0 0 0 2px rgba(91, 209, 232, 0.35), inset 0 -4px 8px rgba(0, 0, 0, 0.4); }
.m--arcade .m-slot.is-empty { background: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08); }
.m--arcade .m-slot.is-sel { box-shadow: inset 0 0 0 3px var(--neon-2), 0 0 16px rgba(252, 170, 26, 0.7); }
.m--arcade .m-slot.is-over { outline-color: var(--short); }
.m--arcade .m-slot__qty { right: 0; bottom: 0; padding: 2px 4px; border-radius: 4px; background: var(--led-bg); color: var(--neon-2); font-family: var(--mono); font-size: 11px; }
.m--arcade .m-cap__bar { height: 16px; border-radius: 4px; background: var(--led-bg); box-shadow: inset 0 0 0 2px #2D3A57; }
.m--arcade .m-cap__bar i { inset: 3px auto 3px 3px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--cyan) 0 9px, transparent 9px 12px); filter: drop-shadow(0 0 4px rgba(91, 209, 232, 0.8)); }
.m--arcade .m-cap__bar.is-full i { background: repeating-linear-gradient(90deg, var(--neon) 0 9px, transparent 9px 12px); filter: drop-shadow(0 0 4px rgba(255, 106, 61, 0.8)); }
.m--arcade .m-cap__num { color: var(--cyan); font-family: var(--mono); }
.m--arcade .m-slot__worn { background: var(--cyan); color: var(--led-bg); }

@media (max-width: 640px) {
  .m--arcade { padding: 22px 14px 16px; border-radius: 22px; }
  .m--arcade .m-bulbs { left: 22px; right: 22px; top: 8px; }
  .m--arcade .m__list { --cell: 100px; --gap: 10px; padding: 12px; }
  .m--arcade .m-opt__art { width: min(80px, 100%); }
  .m--arcade.m-inv .m__list { --slot: 54px; }
  .m--arcade .m-buy { min-height: 58px; font-size: 21px; }
}
