/* The promo's way in (/go, the QR code's link, js/go.js): an arcade tapping game over the studio while it loads, from
   one big button to a ring of ten, which becomes the board. Only in go mode (html.go-mode); everything here is the
   overlay's own. */

.go-mode .loading { display: none; }

.go-arcade {
  --go-red: #ff2d46; --go-red-deep: #7d0014;
  --go-cyan: #19d3ff; --go-pink: #ff2e88; --go-gold: #ffc629;
  position: fixed; inset: 0; z-index: 200; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  background: #07040f; color: #fff; font-family: 'Chakra Petch', system-ui, sans-serif;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.9s ease, opacity 0.9s ease;
}
.go-arcade * { -webkit-tap-highlight-color: transparent; }
.go-arcade.revealing { background-color: transparent; pointer-events: none; }
.go-arcade.revealing > :not(.go-flash):not(.go-fx) { opacity: 0; transform: scale(1.4); transition: opacity 0.6s ease, transform 0.9s cubic-bezier(.5, 0, .8, .4); }
.go-arcade.gone { opacity: 0; }

/* ---- the room: a neon floor running at you, stars over it, scanlines over everything ---------------------------- */
.go-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.go-stars { position: absolute; inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 32% 8%, #cfe 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 74% 14%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 30%, #fdf 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 26%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 22% 38%, #def 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 40%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 6% 50%, #fff 50%, transparent 51%),
    radial-gradient(120% 70% at 50% 0%, #2a0d4e 0%, #120626 45%, #07040f 75%);
  animation: go-twinkle 3s ease-in-out infinite alternate; }
.go-sun { position: absolute; left: 50%; bottom: 34%; width: min(92vw, 520px); aspect-ratio: 1; translate: -50% 50%; border-radius: 50%;
  background: linear-gradient(180deg, #ffe66d 0%, #ff8a3d 38%, #ff2e88 64%, #7a1fd1 100%);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 19px), linear-gradient(#000 45%, transparent 85%);
  -webkit-mask-composite: source-in; mask-image: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 19px);
  opacity: 0.32; filter: blur(0.3px); transition: opacity 0.6s ease; }
.go-grid { position: absolute; left: -60%; right: -60%; bottom: -6%; height: 42%;
  background-image: linear-gradient(var(--go-grid, #ff2fd6) 2px, transparent 2px), linear-gradient(90deg, var(--go-grid, #ff2fd6) 2px, transparent 2px);
  background-size: 56px 56px; transform: perspective(240px) rotateX(68deg); transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(transparent 0%, #000 45%); mask-image: linear-gradient(transparent 0%, #000 45%);
  animation: go-floor var(--go-speed, 1.1s) linear infinite; opacity: 0.55; }
.go-scan { position: absolute; inset: 0; z-index: 9; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
              radial-gradient(130% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }
.go-fx { position: absolute; inset: 0; z-index: 8; pointer-events: none; width: 100%; height: 100%; }
.go-flash { position: absolute; inset: 0; z-index: 10; pointer-events: none; background: #fff; opacity: 0; }
.go-flash.on { animation: go-flash 0.5s ease-out; }
.go-flash.big { animation: go-flash 1.1s ease-out forwards; }

/* ---- the scoreboard ------------------------------------------------------------------------------------------- */
.go-top { position: relative; z-index: 2; width: min(100%, 520px); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  font-family: 'Pixelify Sans', monospace; transition: opacity 0.4s ease; }
.go-score small, .go-best small { display: block; font-size: 11px; letter-spacing: 0.24em; color: var(--go-cyan); }
.go-score b { display: block; font-size: 26px; line-height: 1; letter-spacing: 0.06em; color: #fff;
  text-shadow: 0 0 10px var(--go-pink), 0 0 2px #fff; font-variant-numeric: tabular-nums; }
.go-score b.bump { animation: go-bump 0.18s ease-out; }
.go-combo { font-size: 24px; line-height: 1; color: var(--go-gold); text-shadow: 0 0 12px #ff8a00; opacity: 0; transition: opacity 0.2s ease; text-align: right; }
.go-combo.on { opacity: 1; }
.go-combo small { display: block; font-size: 11px; letter-spacing: 0.24em; color: var(--go-gold); opacity: 0.8; }
.go-attract .go-top { opacity: 0; }

.go-logo { position: relative; z-index: 2; width: min(46vw, 210px); margin-top: 2px; transition: width 0.5s cubic-bezier(.3, 1.4, .5, 1), margin 0.5s ease;
  filter: drop-shadow(0 0 16px rgba(255, 46, 136, 0.45)); }
.go-logo img { display: block; width: 100%; height: auto; }
.go-attract .go-logo { width: min(80vw, 380px); margin-top: 4vh; animation: go-marquee 2.4s ease-in-out infinite alternate; }

/* ---- the big call --------------------------------------------------------------------------------------------- */
.go-call { position: relative; z-index: 3; margin: 1.2vh 0 0; padding: 0 4px; max-width: 100%;
  font: 900 clamp(46px, 15.5vw, 104px)/0.92 'Orbitron', system-ui, sans-serif; letter-spacing: 0.01em; text-align: center; text-transform: uppercase;
  background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%),
                    linear-gradient(180deg, #ffffff 0%, #fff1b8 34%, #ffc629 50%, #ff7a00 58%, #ffe08a 82%, #ffffff 100%);
  background-size: 260% 100%, 100% 100%; background-position: 120% 0, 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #2b0a40;
  filter: drop-shadow(0 0 14px rgba(255, 46, 136, 0.7)) drop-shadow(0 5px 0 #14031f);
  animation: go-shine 2.2s linear infinite; }
.go-call.pop { animation: go-pop 0.5s cubic-bezier(.2, 1.7, .4, 1), go-shine 2.2s linear infinite; }
.go-call.hot { background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%),
                                  linear-gradient(180deg, #fff6c2 0%, #ffd23f 30%, #ff6a00 55%, #ff1f4b 78%, #ffe08a 100%); }
.go-call.cool { background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%),
                                   linear-gradient(180deg, #ffffff 0%, #b9f6ff 35%, #19d3ff 52%, #6b5bff 70%, #e6fbff 100%); }
.go-call.small { font-size: clamp(34px, 11vw, 72px); }
.go-sub { position: relative; z-index: 3; margin: 1vh 0 0; min-height: 1.3em; text-align: center;
  font: 600 clamp(15px, 4.4vw, 20px)/1.3 'Chakra Petch', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: #d9ccff;
  text-shadow: 0 0 10px rgba(122, 31, 209, 0.9); }
.go-sub.blink { animation: go-blink 1s steps(2, start) infinite; color: #fff; }

/* ---- the pad: where the buttons are --------------------------------------------------------------------------- */
.go-pad { position: relative; z-index: 4; flex: 1; width: min(100%, 520px); min-height: 0; display: grid; place-items: center; }
.go-pad.duo { grid-template-columns: 1fr 1fr; gap: 6vw; }
.go-pad.ring { --ring: min(78vw, 46vh, 400px); }
.go-ring { position: relative; width: var(--ring); height: var(--ring); }
.go-ring .go-arc { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.go-hub { position: absolute; left: 50%; top: 50%; width: 34%; translate: -50% -50%; pointer-events: none; opacity: 0.85;
  filter: drop-shadow(0 0 14px rgba(255, 198, 41, 0.6)); }
.go-hub img { display: block; width: 100%; height: auto; }

/* ---- the arcade button: a chrome bezel, a coloured skirt, a glossy dome with a glint across it ------------------- */
.go-arc { --size: min(58vw, 34vh, 240px); --c1: var(--go-red); --c2: var(--go-red-deep); --travel: calc(var(--size) * 0.07);
  position: relative; width: var(--size); height: var(--size); padding: 0; border: 0; border-radius: 50%; background: none;
  cursor: pointer; touch-action: none; outline: none; transition: scale 0.25s cubic-bezier(.3, 1.6, .5, 1), opacity 0.3s ease, translate 0.6s cubic-bezier(.4, 0, .2, 1); }
.go-arc:focus-visible { box-shadow: 0 0 0 4px var(--go-cyan); }
.go-arc > span { position: absolute; border-radius: 50%; pointer-events: none; }
.go-arc-bezel { inset: 0; background: radial-gradient(circle at 50% 22%, #6e6e86 0%, #2a2a3a 46%, #0b0b12 74%, #000 100%);
  box-shadow: 0 calc(var(--size) * 0.07) calc(var(--size) * 0.14) rgba(0, 0, 0, 0.8), inset 0 2px 1px rgba(255, 255, 255, 0.35), inset 0 -4px 10px rgba(0, 0, 0, 0.8); }
.go-arc-chrome { inset: 6%; background: conic-gradient(from 210deg, #ffffff, #8b8ba6, #2b2b3a, #d7d7ea, #ffffff, #6e6e88, #20202c, #f3f3ff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6); }
.go-arc-well { inset: 11%; background: radial-gradient(circle at 50% 70%, #000 30%, #1a0a14 100%); box-shadow: inset 0 calc(var(--size) * 0.03) calc(var(--size) * 0.05) #000; }
.go-arc-skirt { inset: 13%; background: linear-gradient(180deg, color-mix(in srgb, var(--c2) 70%, black), color-mix(in srgb, var(--c2) 40%, black));
  translate: 0 0; }
.go-arc-dome { inset: 13%; translate: 0 calc(var(--travel) * -1); overflow: hidden;
  background: radial-gradient(circle at 50% 26%, color-mix(in srgb, var(--c1) 35%, white) 0%, var(--c1) 34%, var(--c2) 80%, color-mix(in srgb, var(--c2) 55%, black) 100%);
  box-shadow: inset 0 calc(var(--size) * -0.03) calc(var(--size) * 0.06) rgba(0, 0, 0, 0.45), inset 0 calc(var(--size) * 0.015) 0 rgba(255, 255, 255, 0.4),
              0 calc(var(--travel) * 0.9) 0 color-mix(in srgb, var(--c2) 55%, black);
  transition: translate 0.07s ease-out, filter 0.15s ease, box-shadow 0.07s ease-out; }
.go-arc-shine { inset: 6% 20% 52% 20%; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0)); filter: blur(0.5px); }
.go-arc-dome::after { content: ""; position: absolute; inset: -20%; background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, 0.75) 50%, transparent 58%);
  translate: -120% 0; animation: go-glint 2.6s ease-in-out infinite; animation-delay: var(--glint-delay, 0s); mix-blend-mode: screen; }
.go-arc-label { inset: 13%; translate: 0 calc(var(--travel) * -1); display: grid; place-items: center; transition: translate 0.07s ease-out;
  font: 900 calc(var(--size) * 0.13)/1 'Orbitron', sans-serif; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 10px rgba(255, 255, 255, 0.4); }
.go-arc-glow { inset: -8%; background: radial-gradient(circle, color-mix(in srgb, var(--c1) 70%, transparent) 30%, transparent 70%); opacity: 0;
  transition: opacity 0.15s ease; z-index: -1; }
/* Twinkles round the rim: the button glistens. */
.go-arc-spark { width: 12%; height: 12%; background: radial-gradient(circle, #fff 0 18%, transparent 20%),
  conic-gradient(from 0deg, transparent 0 10%, #fff 12% 13%, transparent 15% 35%, #fff 37% 38%, transparent 40% 60%, #fff 62% 63%, transparent 65% 85%, #fff 87% 88%, transparent 90%);
  border-radius: 0; scale: 0; animation: go-twinkle-spark 2.2s ease-in-out infinite; animation-delay: var(--d); }
.go-arc .s1 { left: 18%; top: 14%; --d: 0.2s; } .go-arc .s2 { right: 12%; top: 34%; --d: 1.1s; } .go-arc .s3 { left: 30%; bottom: 14%; --d: 1.7s; }

.go-arc.down .go-arc-dome, .go-arc.down .go-arc-label { translate: 0 0; }
.go-arc.down .go-arc-dome { filter: brightness(1.35) saturate(1.15); box-shadow: inset 0 calc(var(--size) * -0.02) calc(var(--size) * 0.05) rgba(0, 0, 0, 0.5), 0 0 0 transparent; }
.go-arc.down .go-arc-glow, .go-arc.lit .go-arc-glow { opacity: 1; }
.go-arc.lit .go-arc-dome { filter: brightness(1.2) saturate(1.2); }
.go-arc.lit { animation: go-lit 0.7s ease-in-out infinite alternate; }
.go-arc.dim .go-arc-dome { filter: brightness(0.38) saturate(0.55); }
.go-arc.dim .go-arc-label, .go-arc.dim .go-arc-spark { opacity: 0.25; }
.go-arc.enter { animation: go-enter 0.55s cubic-bezier(.2, 1.6, .4, 1) both; }
.go-arc.burst { scale: 1.35; opacity: 0; transition: scale 0.35s ease-out, opacity 0.35s ease-out; }
.go-arc.small { --size: calc(var(--ring) * 0.21); }
.go-arc.giant { --size: min(70vw, 38vh, 290px); }

/* The hold button's charge, round its rim. */
.go-charge { position: absolute; inset: -9%; width: 118%; height: 118%; rotate: -90deg; pointer-events: none; overflow: visible; }
.go-charge circle { fill: none; stroke-width: 6; }
.go-charge .track { stroke: rgba(255, 255, 255, 0.12); }
.go-charge .fill { stroke: var(--go-gold); stroke-linecap: round; filter: drop-shadow(0 0 6px #ffb300); transition: stroke 0.2s ease; }
.go-charge.full .fill { stroke: #fff; }

/* ---- the hype meter ------------------------------------------------------------------------------------------- */
.go-meter { position: relative; z-index: 3; width: min(100%, 480px); margin: 1vh 0 0; display: flex; align-items: center; gap: 10px; transition: opacity 0.4s ease; }
.go-meter-label { font: 700 12px/1 'Pixelify Sans', monospace; letter-spacing: 0.2em; color: var(--go-cyan); writing-mode: horizontal-tb; }
.go-leds { flex: 1; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; padding: 5px; border: 1px solid rgba(25, 211, 255, 0.45);
  background: rgba(0, 0, 0, 0.55); box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.8), 0 0 14px rgba(25, 211, 255, 0.15); }
.go-leds i { height: 18px; background: #1a1030; border-radius: 2px; transition: background-color 0.08s linear, box-shadow 0.08s linear; }
.go-leds i.on { background: var(--led); box-shadow: 0 0 8px var(--led), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.go-meter.max .go-leds { animation: go-max 0.25s steps(2, start) infinite; }
.go-attract .go-meter { opacity: 0; }

/* ---- floating score, the footer --------------------------------------------------------------------------------- */
.go-float { position: absolute; z-index: 7; pointer-events: none; translate: -50% -50%; white-space: nowrap;
  font: 700 22px/1 'Pixelify Sans', monospace; color: #fff; text-shadow: 0 0 10px var(--c, #ff2e88), 0 2px 0 #000;
  animation: go-float 0.9s ease-out forwards; }
.go-float.big { font: 900 30px/1 'Orbitron', sans-serif; color: var(--go-gold); }
.go-foot { position: relative; z-index: 5; width: min(100%, 520px); display: flex; justify-content: space-between; align-items: center; margin-top: 8px;
  font: 600 13px/1 'Chakra Petch', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; }
.go-foot button, .go-foot a { color: #b8a8e8; background: none; border: 0; padding: 8px 4px; font: inherit; letter-spacing: inherit; text-decoration: none; cursor: pointer; }
.go-foot button:focus-visible, .go-foot a:focus-visible { outline: 2px solid var(--go-cyan); }
.go-haptic { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.go-arcade.shake { animation: go-shake 0.35s linear; }
.go-arcade.shake-big { animation: go-shake-big 0.6s linear; }

@keyframes go-twinkle { from { filter: brightness(0.85); } to { filter: brightness(1.15); } }
@keyframes go-floor { to { background-position: 0 56px, 0 0; } }
@keyframes go-flash { from { opacity: 0.95; } to { opacity: 0; } }
@keyframes go-bump { 50% { transform: scale(1.18); } }
@keyframes go-marquee { from { transform: scale(1); filter: drop-shadow(0 0 12px rgba(255, 46, 136, 0.4)); } to { transform: scale(1.04); filter: drop-shadow(0 0 26px rgba(25, 211, 255, 0.6)); } }
@keyframes go-shine { from { background-position: 130% 0, 0 0; } to { background-position: -130% 0, 0 0; } }
@keyframes go-pop { from { transform: scale(1.9) rotate(-5deg); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes go-blink { to { visibility: hidden; } }
@keyframes go-glint { 0%, 55% { translate: -120% 0; } 85%, 100% { translate: 120% 0; } }
@keyframes go-twinkle-spark { 0%, 70%, 100% { scale: 0; rotate: 0deg; } 80% { scale: 1; rotate: 45deg; } 90% { scale: 0.3; rotate: 90deg; } }
@keyframes go-lit { from { filter: drop-shadow(0 0 6px var(--c1)); } to { filter: drop-shadow(0 0 22px var(--c1)) brightness(1.08); } }
@keyframes go-enter { from { scale: 0; rotate: -25deg; } to { scale: 1; rotate: 0deg; } }
@keyframes go-max { to { box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.8), 0 0 26px rgba(255, 46, 136, 0.9); border-color: #ff2e88; } }
@keyframes go-float { from { opacity: 1; transform: translateY(0) scale(0.8); } 20% { transform: translateY(-14px) scale(1.15); } to { opacity: 0; transform: translateY(-80px) scale(1); } }
@keyframes go-shake { 0%, 100% { translate: 0 0; } 20% { translate: -5px 3px; } 40% { translate: 5px -3px; } 60% { translate: -4px -2px; } 80% { translate: 3px 2px; } }
@keyframes go-shake-big { 0%, 100% { translate: 0 0; } 10% { translate: -12px 6px; } 20% { translate: 11px -8px; } 30% { translate: -9px -5px; } 40% { translate: 8px 7px; }
  55% { translate: -6px 3px; } 70% { translate: 4px -3px; } 85% { translate: -2px 2px; } }

@media (prefers-reduced-motion: reduce) {
  .go-grid, .go-stars, .go-arc-dome::after, .go-arc-spark, .go-call, .go-attract .go-logo, .go-arc.lit { animation: none; }
  .go-arcade.shake, .go-arcade.shake-big { animation: none; }
  .go-flash.on, .go-flash.big { animation-duration: 0.2s; }
}
@media (min-aspect-ratio: 4/5) {
  /* A wide screen (someone opened the link on a computer): the game in a phone-shaped column down the middle. */
  .go-call { font-size: clamp(46px, 9vh, 104px); }
}
