:root {
  color-scheme: dark;
  --ink: #f4f2e9;
  --muted: #7e8495;
  --dim: #3d4350;
  --night: #090d1a;
  --arena: #0d1020;
  --line: rgba(124, 140, 173, 0.18);
  --coral: #ff745f;
  --coral-deep: #ca4c44;
  --acid: #d9f568;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 76% 14%, rgba(33, 52, 70, 0.48), transparent 31rem),
    radial-gradient(circle at 4% 94%, rgba(83, 49, 76, 0.2), transparent 28rem),
    var(--night);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
button:focus-visible,
[tabindex]:focus-visible {
  outline: none;
}

button:focus-visible,
.game-arena:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 245, 104, 0.34);
}

.arcade-app {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.arcade-noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.arcade-wrap {
  width: min(990px, calc(100vw - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 50px 0 32px;
}

.arcade-header,
.game-footer {
  display: flex;
  align-items: center;
}

.arcade-header {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 31px;
}

.brand-kicker,
.score-label,
.footer-copy,
.arena-edge-label,
.game-state-label,
.keyboard-key {
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.brand-kicker {
  margin: 0 0 5px;
  color: var(--acid);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.brand-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.brand-title span {
  color: var(--coral);
}

.score-strip {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 198px;
  padding: 15px 19px;
  border: 1px solid rgba(113, 129, 160, 0.18);
  border-radius: 15px;
  background: rgba(17, 24, 38, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.score-cell {
  display: grid;
  gap: 4px;
}

.score-cell:last-child {
  justify-items: end;
}

.score-label {
  color: var(--muted);
  font-size: 9px;
}

.score-value {
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 20px;
  line-height: 1;
}

.score-value.is-best {
  color: var(--acid);
}

.score-divider {
  width: 1px;
  height: 31px;
  background: var(--line);
}

.game-frame {
  padding: 1px;
  border-radius: 28px;
  background: linear-gradient(140deg, rgba(138, 156, 192, 0.3), rgba(68, 77, 107, 0.12));
}

.game-arena {
  position: relative;
  height: clamp(480px, 67vh, 650px);
  overflow: hidden;
  border-radius: 27px;
  background:
    radial-gradient(circle at 54% 42%, rgba(28, 37, 75, 0.26), transparent 30rem),
    var(--arena);
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
}

.arena-grid,
.arena-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.arena-grid {
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(124, 140, 173, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 140, 173, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

.arena-scanlines {
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.35) 4px,
    transparent 5px
  );
}

.arena-orbit {
  position: absolute;
  width: min(62vw, 600px);
  aspect-ratio: 1.4;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(124, 140, 173, 0.13);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  pointer-events: none;
}

.arena-orbit::before,
.arena-orbit::after {
  position: absolute;
  content: "";
  inset: 10%;
  border: 1px solid rgba(124, 140, 173, 0.09);
  border-radius: 50%;
}

.arena-orbit::after {
  inset: 20%;
}

.arena-pip {
  position: absolute;
  top: 7%;
  right: 21%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 15px rgba(217, 245, 104, 0.8);
}

.arena-pip.coral {
  top: auto;
  right: auto;
  bottom: 8%;
  left: 11%;
  background: var(--coral);
  box-shadow: 0 0 15px rgba(255, 116, 95, 0.8);
}

.ball {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 25%, #fff5c2 0 6%, transparent 7%),
    radial-gradient(circle at 38% 34%, #ffb19b, var(--coral) 51%, var(--coral-deep) 100%);
  box-shadow:
    0 12px 22px rgba(255, 91, 72, 0.22),
    inset -7px -8px 12px rgba(104, 35, 41, 0.24),
    inset 5px 4px 8px rgba(255, 255, 255, 0.22);
  will-change: transform;
  pointer-events: none;
}

.ball::after {
  position: absolute;
  content: "";
  top: 11px;
  left: 10px;
  width: 8px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 247, 193, 0.8);
  transform: rotate(35deg);
}

.ball.is-popping {
  animation: ball-pop 180ms ease-out;
}

@keyframes ball-pop {
  0% { filter: brightness(1); }
  42% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

.arena-edge-label {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 18px;
  color: rgba(126, 132, 149, 0.36);
  font-size: 9px;
  pointer-events: none;
}

.arena-edge-label:not(.right) {
  right: auto;
  left: 20px;
}

.play-hint {
  position: absolute;
  right: 0;
  bottom: 19px;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.cursor-mark {
  width: 9px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 5px 5px 6px 1px;
  transform: rotate(-28deg);
}

.keyboard-key {
  padding: 5px 6px 4px;
  border: 1px solid rgba(126, 132, 149, 0.28);
  border-radius: 4px;
  color: rgba(126, 132, 149, 0.74);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.game-overlay {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: radial-gradient(circle, rgba(13, 16, 32, 0.04), rgba(13, 16, 32, 0.3));
  pointer-events: none;
}

.game-overlay[hidden] {
  display: none;
}

.overlay-card {
  display: grid;
  justify-items: center;
  max-width: 300px;
  text-align: center;
}

.overlay-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 17px;
  border-radius: 16px;
  color: #151723;
  background: var(--coral);
  box-shadow: 0 11px 24px rgba(255, 116, 95, 0.22);
}

.overlay-mark svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.game-state-label {
  margin: 0 0 8px;
  color: var(--acid);
  font-size: 9px;
}

.game-state-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 51px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.game-state-copy {
  max-width: 250px;
  margin: 15px 0 0;
  color: #858b9d;
  font-size: 15px;
  line-height: 1.55;
}

.start-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  margin-top: 25px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  color: #161623;
  background: var(--coral);
  box-shadow: 0 8px 0 var(--coral-deep), 0 14px 27px rgba(255, 116, 95, 0.18);
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: auto;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.start-button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.start-button:active {
  box-shadow: 0 3px 0 var(--coral-deep), 0 8px 18px rgba(255, 116, 95, 0.16);
  transform: translateY(5px);
}

.button-arrow {
  font-size: 18px;
  line-height: 0;
}

.score-form {
  width: min(100%, 300px);
  margin-top: 21px;
  padding-top: 17px;
  border-top: 1px solid rgba(126, 132, 149, 0.2);
  pointer-events: auto;
}

.score-form-label,
.leaderboard-kicker,
.leaderboard-state,
.leaderboard-rank,
.leaderboard-score {
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.score-form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
}

.score-form-row {
  display: flex;
  gap: 7px;
}

.score-form input {
  min-width: 0;
  flex: 1;
  height: 39px;
  padding: 0 10px;
  border: 1px solid rgba(126, 132, 149, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(9, 13, 26, 0.64);
  font: 13px Arial, Helvetica, sans-serif;
}

.score-form input::placeholder {
  color: rgba(126, 132, 149, 0.72);
}

.score-form input:focus-visible {
  border-color: var(--acid);
  outline: 2px solid rgba(217, 245, 104, 0.24);
  outline-offset: 1px;
}

.score-submit,
.leaderboard-refresh {
  border: 1px solid rgba(255, 116, 95, 0.38);
  color: var(--coral);
  background: rgba(255, 116, 95, 0.09);
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  text-transform: uppercase;
}

.score-submit {
  min-width: 64px;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.score-submit:hover,
.leaderboard-refresh:hover {
  background: rgba(255, 116, 95, 0.16);
}

.score-submit:disabled,
.leaderboard-refresh:disabled {
  cursor: wait;
  opacity: 0.55;
}

.score-form-status {
  min-height: 14px;
  margin: 8px 0 0;
  color: var(--acid);
  font-family: "Courier New", Courier, monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.leaderboard-panel {
  margin-top: 22px;
  padding: 24px 26px 21px;
  border: 1px solid rgba(113, 129, 160, 0.18);
  border-radius: 20px;
  background: rgba(13, 16, 32, 0.68);
}

.leaderboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.leaderboard-kicker {
  margin: 0 0 6px;
  color: var(--acid);
  font-size: 9px;
}

.leaderboard-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.leaderboard-refresh {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 17px;
  line-height: 1;
}

.leaderboard-state {
  margin: 18px 0 11px;
  color: var(--muted);
  font-size: 9px;
}

.leaderboard-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid rgba(124, 140, 173, 0.1);
  border-radius: 9px;
  background: rgba(17, 24, 38, 0.5);
}

.leaderboard-rank {
  color: var(--muted);
  font-size: 10px;
}

.leaderboard-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  color: var(--acid);
  font-size: 13px;
}

.leaderboard-empty {
  padding: 14px 0 3px;
  color: var(--muted);
  font-size: 14px;
}

.game-footer {
  gap: 9px;
  padding-top: 17px;
}

.footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(217, 245, 104, 0.55);
}

.footer-copy {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.footer-copy strong {
  color: var(--acid);
  font-weight: 400;
}

.footer-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

@media (max-width: 620px) {
  .arcade-wrap {
    width: calc(100vw - 28px);
    padding-top: 28px;
  }

  .arcade-header {
    align-items: flex-end;
    margin-bottom: 23px;
  }

  .brand-title {
    font-size: 46px;
  }

  .score-strip {
    min-width: 155px;
    gap: 14px;
    padding: 12px 13px;
  }

  .score-value {
    font-size: 18px;
  }

  .game-arena {
    height: calc(100vh - 205px);
    min-height: 440px;
    max-height: 610px;
  }

  .leaderboard-panel {
    padding: 21px 16px 17px;
  }

  .arena-orbit {
    width: 125vw;
  }

  .arena-edge-label {
    display: none;
  }

  .play-hint {
    bottom: 20px;
  }
}

@media (max-width: 410px) {
  .brand-kicker {
    font-size: 8px;
  }

  .brand-title {
    font-size: 40px;
  }

  .score-strip {
    min-width: 137px;
    gap: 9px;
    padding-inline: 10px;
  }

  .score-label {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}:root {
  color-scheme: dark;
  --ink: #f4f2e9;
  --muted: #7e8495;
  --dim: #3d4350;
  --night: #090d1a;
  --arena: #0d1020;
  --line: rgba(124, 140, 173, 0.18);
  --coral: #ff745f;
  --coral-deep: #ca4c44;
  --acid: #d9f568;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 76% 14%, rgba(33, 52, 70, 0.48), transparent 31rem),
    radial-gradient(circle at 4% 94%, rgba(83, 49, 76, 0.2), transparent 28rem),
    var(--night);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
button:focus-visible,
[tabindex]:focus-visible {
  outline: none;
}

button:focus-visible,
.game-arena:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 245, 104, 0.34);
}

.arcade-app {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.arcade-noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.arcade-wrap {
  width: min(990px, calc(100vw - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 50px 0 32px;
}

.arcade-header,
.game-footer {
  display: flex;
  align-items: center;
}

.arcade-header {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 31px;
}

.brand-kicker,
.score-label,
.footer-copy,
.arena-edge-label,
.game-state-label,
.keyboard-key {
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.brand-kicker {
  margin: 0 0 5px;
  color: var(--acid);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.brand-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.brand-title span {
  color: var(--coral);
}

.score-strip {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 198px;
  padding: 15px 19px;
  border: 1px solid rgba(113, 129, 160, 0.18);
  border-radius: 15px;
  background: rgba(17, 24, 38, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.score-cell {
  display: grid;
  gap: 4px;
}

.score-cell:last-child {
  justify-items: end;
}

.score-label {
  color: var(--muted);
  font-size: 9px;
}

.score-value {
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 20px;
  line-height: 1;
}

.score-value.is-best {
  color: var(--acid);
}

.score-divider {
  width: 1px;
  height: 31px;
  background: var(--line);
}

.game-frame {
  padding: 1px;
  border-radius: 28px;
  background: linear-gradient(140deg, rgba(138, 156, 192, 0.3), rgba(68, 77, 107, 0.12));
}

.game-arena {
  position: relative;
  height: clamp(480px, 67vh, 650px);
  overflow: hidden !important;
  border-radius: 27px;
  background:
    radial-gradient(circle at 54% 42%, rgba(28, 37, 75, 0.26), transparent 30rem),
    var(--arena);
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
}

.arena-grid,
.arena-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.arena-grid {
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(124, 140, 173, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 140, 173, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

.arena-scanlines {
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.35) 4px,
    transparent 5px
  );
}

.arena-orbit {
  position: absolute;
  width: min(62vw, 600px);
  aspect-ratio: 1.4;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(124, 140, 173, 0.13);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  pointer-events: none;
}

.arena-orbit::before,
.arena-orbit::after {
  position: absolute;
  content: "";
  inset: 10%;
  border: 1px solid rgba(124, 140, 173, 0.09);
  border-radius: 50%;
}

.arena-orbit::after {
  inset: 20%;
}

.arena-pip {
  position: absolute;
  top: 7%;
  right: 21%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 15px rgba(217, 245, 104, 0.8);
}

.arena-pip.coral {
  top: auto;
  right: auto;
  bottom: 8%;
  left: 11%;
  background: var(--coral);
  box-shadow: 0 0 15px rgba(255, 116, 95, 0.8);
}

.ball {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 25%, #fff5c2 0 6%, transparent 7%),
    radial-gradient(circle at 38% 34%, #ffb19b, var(--coral) 51%, var(--coral-deep) 100%);
  box-shadow:
    0 12px 22px rgba(255, 91, 72, 0.22),
    inset -7px -8px 12px rgba(104, 35, 41, 0.24),
    inset 5px 4px 8px rgba(255, 255, 255, 0.22);
  will-change: transform;
  pointer-events: none;
}

.ball::after {
  position: absolute;
  content: "";
  top: 11px;
  left: 10px;
  width: 8px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 247, 193, 0.8);
  transform: rotate(35deg);
}

.ball.is-popping {
  animation: ball-pop 180ms ease-out;
}

@keyframes ball-pop {
  0% { filter: brightness(1); }
  42% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

.arena-edge-label {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 18px;
  color: rgba(126, 132, 149, 0.36);
  font-size: 9px;
  pointer-events: none;
}

.arena-edge-label:not(.right) {
  right: auto;
  left: 20px;
}

.play-hint {
  position: absolute;
  right: 0;
  bottom: 19px;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.cursor-mark {
  width: 9px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 5px 5px 6px 1px;
  transform: rotate(-28deg);
}

.keyboard-key {
  padding: 5px 6px 4px;
  border: 1px solid rgba(126, 132, 149, 0.28);
  border-radius: 4px;
  color: rgba(126, 132, 149, 0.74);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.game-overlay {
  position: absolute !important;
  z-index: 3;
  inset: 0 !important;
  display: grid;
  place-items: center;
  padding: 28px;
  background: radial-gradient(circle, rgba(13, 16, 32, 0.04), rgba(13, 16, 32, 0.3));
  pointer-events: none;
  overflow-y: auto;
}

.game-overlay[hidden] {
  display: none !important;
}

.game-overlay ~ .game-overlay {
  display: none !important;
}

.overlay-card {
  display: grid;
  justify-items: center;
  max-width: 300px;
  text-align: center;
}

.overlay-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 17px;
  border-radius: 16px;
  color: #151723;
  background: var(--coral);
  box-shadow: 0 11px 24px rgba(255, 116, 95, 0.22);
}

.overlay-mark svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.game-state-label {
  margin: 0 0 8px;
  color: var(--acid);
  font-size: 9px;
}

.game-state-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 51px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.game-state-copy {
  max-width: 250px;
  margin: 15px 0 0;
  color: #858b9d;
  font-size: 15px;
  line-height: 1.55;
}

.start-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  margin-top: 25px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  color: #161623;
  background: var(--coral);
  box-shadow: 0 8px 0 var(--coral-deep), 0 14px 27px rgba(255, 116, 95, 0.18);
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: auto;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.start-button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.start-button:active {
  box-shadow: 0 3px 0 var(--coral-deep), 0 8px 18px rgba(255, 116, 95, 0.16);
  transform: translateY(5px);
}

.button-arrow {
  font-size: 18px;
  line-height: 0;
}

.score-form {
  width: min(100%, 300px);
  margin-top: 21px;
  padding-top: 17px;
  border-top: 1px solid rgba(126, 132, 149, 0.2);
  pointer-events: auto;
}

.score-form-label,
.leaderboard-kicker,
.leaderboard-state,
.leaderboard-rank,
.leaderboard-score {
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.score-form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
}

.score-form-row {
  display: flex;
  gap: 7px;
}

.score-form input {
  min-width: 0;
  flex: 1;
  height: 39px;
  padding: 0 10px;
  border: 1px solid rgba(126, 132, 149, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(9, 13, 26, 0.64);
  font: 13px Arial, Helvetica, sans-serif;
}

.score-form input::placeholder {
  color: rgba(126, 132, 149, 0.72);
}

.score-form input:focus-visible {
  border-color: var(--acid);
  outline: 2px solid rgba(217, 245, 104, 0.24);
  outline-offset: 1px;
}

.score-submit,
.leaderboard-refresh {
  border: 1px solid rgba(255, 116, 95, 0.38);
  color: var(--coral);
  background: rgba(255, 116, 95, 0.09);
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  text-transform: uppercase;
}

.score-submit {
  min-width: 64px;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.score-submit:hover,
.leaderboard-refresh:hover {
  background: rgba(255, 116, 95, 0.16);
}

.score-submit:disabled,
.leaderboard-refresh:disabled {
  cursor: wait;
  opacity: 0.55;
}

.score-form-status {
  min-height: 14px;
  margin: 8px 0 0;
  color: var(--acid);
  font-family: "Courier New", Courier, monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.leaderboard-panel {
  margin-top: 22px;
  padding: 24px 26px 21px;
  border: 1px solid rgba(113, 129, 160, 0.18);
  border-radius: 20px;
  background: rgba(13, 16, 32, 0.68);
}

.leaderboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.leaderboard-kicker {
  margin: 0 0 6px;
  color: var(--acid);
  font-size: 9px;
}

.leaderboard-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.leaderboard-refresh {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 17px;
  line-height: 1;
}

.leaderboard-state {
  margin: 18px 0 11px;
  color: var(--muted);
  font-size: 9px;
}

.leaderboard-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid rgba(124, 140, 173, 0.1);
  border-radius: 9px;
  background: rgba(17, 24, 38, 0.5);
}

.leaderboard-rank {
  color: var(--muted);
  font-size: 10px;
}

.leaderboard-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  color: var(--acid);
  font-size: 13px;
}

.leaderboard-empty {
  padding: 14px 0 3px;
  color: var(--muted);
  font-size: 14px;
}

.game-footer {
  gap: 9px;
  padding-top: 17px;
}

.footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(217, 245, 104, 0.55);
}

.footer-copy {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.footer-copy strong {
  color: var(--acid);
  font-weight: 400;
}

.footer-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

@media (max-width: 620px) {
  .arcade-wrap {
    width: calc(100vw - 28px);
    padding-top: 28px;
  }

  .arcade-header {
    align-items: flex-end;
    margin-bottom: 23px;
  }

  .brand-title {
    font-size: 46px;
  }

  .score-strip {
    min-width: 155px;
    gap: 14px;
    padding: 12px 13px;
  }

  .score-value {
    font-size: 18px;
  }

  .game-arena {
    height: auto !important;
    min-height: 520px !important;
    max-height: none !important;
    padding-bottom: 40px;
  }

  .game-overlay {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    min-height: 100%;
    padding: 20px 10px !important;
  }

  .overlay-card {
    transform: none !important;
    margin: 0 auto;
    width: 100%;
  }

  .leaderboard-panel {
    padding: 21px 16px 17px;
  }

  .arena-orbit {
    width: 125vw;
  }

  .arena-edge-label {
    display: none;
  }

  .play-hint {
    bottom: 20px;
  }
}

@media (max-width: 410px) {
  .brand-kicker {
    font-size: 8px;
  }

  .brand-title {
    font-size: 40px;
  }

  .score-strip {
    min-width: 137px;
    gap: 9px;
    padding-inline: 10px;
  }

  .score-label {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
:root {
  color-scheme: dark;
  --ink: #f4f2e9;
  --muted: #7e8495;
  --dim: #3d4350;
  --night: #090d1a;
  --arena: #0d1020;
  --line: rgba(124, 140, 173, 0.18);
  --coral: #ff745f;
  --coral-deep: #ca4c44;
  --acid: #d9f568;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 76% 14%, rgba(33, 52, 70, 0.48), transparent 31rem),
    radial-gradient(circle at 4% 94%, rgba(83, 49, 76, 0.2), transparent 28rem),
    var(--night);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
button:focus-visible,
[tabindex]:focus-visible {
  outline: none;
}

button:focus-visible,
.game-arena:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 245, 104, 0.34);
}

.arcade-app {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.arcade-noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.arcade-wrap {
  width: min(990px, calc(100vw - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 50px 0 32px;
}

.arcade-header,
.game-footer {
  display: flex;
  align-items: center;
}

.arcade-header {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 31px;
}

.brand-kicker,
.score-label,
.footer-copy,
.arena-edge-label,
.game-state-label,
.keyboard-key {
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.brand-kicker {
  margin: 0 0 5px;
  color: var(--acid);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.brand-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.brand-title span {
  color: var(--coral);
}

.score-strip {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 198px;
  padding: 15px 19px;
  border: 1px solid rgba(113, 129, 160, 0.18);
  border-radius: 15px;
  background: rgba(17, 24, 38, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.score-cell {
  display: grid;
  gap: 4px;
}

.score-cell:last-child {
  justify-items: end;
}

.score-label {
  color: var(--muted);
  font-size: 9px;
}

.score-value {
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 20px;
  line-height: 1;
}

.score-value.is-best {
  color: var(--acid);
}

.score-divider {
  width: 1px;
  height: 31px;
  background: var(--line);
}

.game-frame {
  padding: 1px;
  border-radius: 28px;
  background: linear-gradient(140deg, rgba(138, 156, 192, 0.3), rgba(68, 77, 107, 0.12));
}

.game-arena {
  position: relative;
  height: clamp(480px, 67vh, 650px);
  overflow: hidden !important;
  border-radius: 27px;
  background:
    radial-gradient(circle at 54% 42%, rgba(28, 37, 75, 0.26), transparent 30rem),
    var(--arena);
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
}

.arena-grid,
.arena-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.arena-grid {
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(124, 140, 173, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 140, 173, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

.arena-scanlines {
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.35) 4px,
    transparent 5px
  );
}

.arena-orbit {
  position: absolute;
  width: min(62vw, 600px);
  aspect-ratio: 1.4;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(124, 140, 173, 0.13);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  pointer-events: none;
}

.arena-orbit::before,
.arena-orbit::after {
  position: absolute;
  content: "";
  inset: 10%;
  border: 1px solid rgba(124, 140, 173, 0.09);
  border-radius: 50%;
}

.arena-orbit::after {
  inset: 20%;
}

.arena-pip {
  position: absolute;
  top: 7%;
  right: 21%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 15px rgba(217, 245, 104, 0.8);
}

.arena-pip.coral {
  top: auto;
  right: auto;
  bottom: 8%;
  left: 11%;
  background: var(--coral);
  box-shadow: 0 0 15px rgba(255, 116, 95, 0.8);
}

.ball {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 25%, #fff5c2 0 6%, transparent 7%),
    radial-gradient(circle at 38% 34%, #ffb19b, var(--coral) 51%, var(--coral-deep) 100%);
  box-shadow:
    0 12px 22px rgba(255, 91, 72, 0.22),
    inset -7px -8px 12px rgba(104, 35, 41, 0.24),
    inset 5px 4px 8px rgba(255, 255, 255, 0.22);
  will-change: transform;
  pointer-events: none;
}

.ball::after {
  position: absolute;
  content: "";
  top: 11px;
  left: 10px;
  width: 8px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 247, 193, 0.8);
  transform: rotate(35deg);
}

.ball.is-popping {
  animation: ball-pop 180ms ease-out;
}

@keyframes ball-pop {
  0% { filter: brightness(1); }
  42% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

.arena-edge-label {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 18px;
  color: rgba(126, 132, 149, 0.36);
  font-size: 9px;
  pointer-events: none;
}

.arena-edge-label:not(.right) {
  right: auto;
  left: 20px;
}

.play-hint {
  position: absolute;
  right: 0;
  bottom: 19px;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.cursor-mark {
  width: 9px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 5px 5px 6px 1px;
  transform: rotate(-28deg);
}

.keyboard-key {
  padding: 5px 6px 4px;
  border: 1px solid rgba(126, 132, 149, 0.28);
  border-radius: 4px;
  color: rgba(126, 132, 149, 0.74);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.game-overlay {
  position: absolute !important;
  z-index: 3;
  inset: 0 !important;
  display: grid;
  place-items: center;
  padding: 28px;
  background: radial-gradient(circle, rgba(13, 16, 32, 0.04), rgba(13, 16, 32, 0.3));
  pointer-events: none;
  overflow-y: auto;
}

.game-overlay[hidden] {
  display: none !important;
}

.game-overlay ~ .game-overlay {
  display: none !important;
}

.overlay-card {
  display: grid;
  justify-items: center;
  max-width: 300px;
  text-align: center;
}

.overlay-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 17px;
  border-radius: 16px;
  color: #151723;
  background: var(--coral);
  box-shadow: 0 11px 24px rgba(255, 116, 95, 0.22);
}

.overlay-mark svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.game-state-label {
  margin: 0 0 8px;
  color: var(--acid);
  font-size: 9px;
}

.game-state-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 51px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.game-state-copy {
  max-width: 250px;
  margin: 15px 0 0;
  color: #858b9d;
  font-size: 15px;
  line-height: 1.55;
}

.start-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  margin-top: 25px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  color: #161623;
  background: var(--coral);
  box-shadow: 0 8px 0 var(--coral-deep), 0 14px 27px rgba(255, 116, 95, 0.18);
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: auto;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.start-button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.start-button:active {
  box-shadow: 0 3px 0 var(--coral-deep), 0 8px 18px rgba(255, 116, 95, 0.16);
  transform: translateY(5px);
}

.button-arrow {
  font-size: 18px;
  line-height: 0;
}

.score-form {
  width: min(100%, 300px);
  margin-top: 21px;
  padding-top: 17px;
  border-top: 1px solid rgba(126, 132, 149, 0.2);
  pointer-events: auto;
}

.score-form-label,
.leaderboard-kicker,
.leaderboard-state,
.leaderboard-rank,
.leaderboard-score {
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.score-form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
}

.score-form-row {
  display: flex;
  gap: 7px;
}

.score-form input {
  min-width: 0;
  flex: 1;
  height: 39px;
  padding: 0 10px;
  border: 1px solid rgba(126, 132, 149, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(9, 13, 26, 0.64);
  font: 13px Arial, Helvetica, sans-serif;
}

.score-form input::placeholder {
  color: rgba(126, 132, 149, 0.72);
}

.score-form input:focus-visible {
  border-color: var(--acid);
  outline: 2px solid rgba(217, 245, 104, 0.24);
  outline-offset: 1px;
}

.score-submit,
.leaderboard-refresh {
  border: 1px solid rgba(255, 116, 95, 0.38);
  color: var(--coral);
  background: rgba(255, 116, 95, 0.09);
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  text-transform: uppercase;
}

.score-submit {
  min-width: 64px;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.score-submit:hover,
.leaderboard-refresh:hover {
  background: rgba(255, 116, 95, 0.16);
}

.score-submit:disabled,
.leaderboard-refresh:disabled {
  cursor: wait;
  opacity: 0.55;
}

.score-form-status {
  min-height: 14px;
  margin: 8px 0 0;
  color: var(--acid);
  font-family: "Courier New", Courier, monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.leaderboard-panel {
  margin-top: 22px;
  padding: 24px 26px 21px;
  border: 1px solid rgba(113, 129, 160, 0.18);
  border-radius: 20px;
  background: rgba(13, 16, 32, 0.68);
}

.leaderboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.leaderboard-kicker {
  margin: 0 0 6px;
  color: var(--acid);
  font-size: 9px;
}

.leaderboard-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.leaderboard-refresh {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 17px;
  line-height: 1;
}

.leaderboard-state {
  margin: 18px 0 11px;
  color: var(--muted);
  font-size: 9px;
}

.leaderboard-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid rgba(124, 140, 173, 0.1);
  border-radius: 9px;
  background: rgba(17, 24, 38, 0.5);
}

.leaderboard-rank {
  color: var(--muted);
  font-size: 10px;
}

.leaderboard-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  color: var(--acid);
  font-size: 13px;
}

.leaderboard-empty {
  padding: 14px 0 3px;
  color: var(--muted);
  font-size: 14px;
}

.game-footer {
  gap: 9px;
  padding-top: 17px;
}

.footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(217, 245, 104, 0.55);
}

.footer-copy {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.footer-copy strong {
  color: var(--acid);
  font-weight: 400;
}

.footer-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

@media (max-width: 620px) {
  .arcade-wrap {
    width: calc(100vw - 28px);
    padding-top: 28px;
  }

  .arcade-header {
    align-items: flex-end;
    margin-bottom: 23px;
  }

  .brand-title {
    font-size: 46px;
  }

  .score-strip {
    min-width: 155px;
    gap: 14px;
    padding: 12px 13px;
  }

  .score-value {
    font-size: 18px;
  }

  .game-arena {
    height: 520px;
    min-height: 520px;
    max-height: 75vh;
  }

  .game-overlay {
    padding: 10px !important;
    align-items: center !important;
    overflow-y: auto !important;
  }

  .overlay-card {
    transform: scale(0.78);
    transform-origin: top center;
    margin-bottom: -40px;
  }

  .leaderboard-panel {
    padding: 21px 16px 17px;
  }

  .arena-orbit {
    width: 125vw;
  }

  .arena-edge-label {
    display: none;
  }

  .play-hint {
    bottom: 20px;
  }
}

@media (max-width: 410px) {
  .brand-kicker {
    font-size: 8px;
  }

  .brand-title {
    font-size: 40px;
  }

  .score-strip {
    min-width: 137px;
    gap: 9px;
    padding-inline: 10px;
  }

  .score-label {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
