:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #091410;
  color: #e8fff4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 10%, #183b2c, #091410 55%);
}

main {
  width: min(92vw, 760px);
  padding: 2rem 0 max(1rem, env(safe-area-inset-bottom));
}
header { margin-bottom: 1rem; }
h1 { margin: 0; font-size: clamp(2.5rem, 8vw, 5rem); line-height: .9; }
header p { color: #b8d8ca; }
.eyebrow { margin: 0 0 .5rem; color: #75f5ae; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; font-size: .75rem; }
canvas { display: block; width: 100%; height: auto; border: 1px solid #315b48; border-radius: 1rem; background: #07100d; box-shadow: 0 1.5rem 5rem #0008; }
.controls { margin-bottom: .25rem; color: #b8d8ca; }
#status { min-height: 1.5rem; margin-top: 0; color: #e8fff4; }

.touch-controls {
  position: sticky;
  z-index: 2;
  bottom: max(.5rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 8vw, 3rem);
  width: min(100%, 28rem);
  margin: 1rem auto 0;
  padding: .75rem clamp(.75rem, 4vw, 1.25rem) 1rem;
  border: 1px solid #315b48;
  border-radius: 1.75rem;
  background: linear-gradient(180deg, rgb(22 48 38 / 94%), rgb(7 16 13 / 97%));
  box-shadow: 0 .8rem 2rem #0009, inset 0 1px #ffffff18;
  backdrop-filter: blur(12px);
}

.arcade-button {
  position: relative;
  display: grid;
  place-content: center;
  justify-self: center;
  width: clamp(5.75rem, 27vw, 7rem);
  min-width: 5.75rem;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: .42rem solid #211e1d;
  border-radius: 50%;
  color: white;
  font: inherit;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 .48rem 0 #0e0d0c,
    0 .7rem 1.1rem #000b,
    inset 0 .18rem .2rem #ffffff8c,
    inset 0 -.65rem .75rem #5a071c;
  transition: transform 80ms ease, box-shadow 80ms ease, filter 120ms ease;
}

.arcade-button::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 33% 23%, #ffffffb8 0 4%, transparent 21%),
    linear-gradient(165deg, #ff5f75 4%, #db2147 48%, #98102e 100%);
  content: "";
}

.arcade-button--right {
  box-shadow:
    0 .48rem 0 #0e0d0c,
    0 .7rem 1.1rem #000b,
    inset 0 .18rem .2rem #ffffff8c,
    inset 0 -.65rem .75rem #073d73;
}

.arcade-button--right::before {
  background:
    radial-gradient(circle at 33% 23%, #ffffffb8 0 4%, transparent 21%),
    linear-gradient(165deg, #56c8ff 4%, #1677c8 48%, #075093 100%);
}

.arcade-button__arrow,
.arcade-button__label {
  position: relative;
  z-index: 1;
  text-shadow: 0 .12rem .18rem #0009;
}

.arcade-button__arrow {
  font-size: clamp(2.2rem, 10vw, 3rem);
  line-height: .8;
}

.arcade-button__label {
  margin-top: .45rem;
  font-size: .72rem;
}

.arcade-button:hover { filter: brightness(1.08); }

.arcade-button:active {
  transform: translateY(.32rem);
  box-shadow:
    0 .16rem 0 #0e0d0c,
    0 .28rem .55rem #000b,
    inset 0 .15rem .22rem #ffffff70,
    inset 0 -.45rem .7rem #0007;
}

.arcade-button:focus-visible {
  outline: .22rem solid #f9ef96;
  outline-offset: .25rem;
}

@media (min-width: 48rem) and (hover: hover) and (pointer: fine) {
  .touch-controls { display: none; }
}

@media (max-width: 30rem) {
  main { width: min(94vw, 760px); padding-top: 1.25rem; }
  header { margin-bottom: .75rem; }
  .controls { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .arcade-button { transition: none; }
}
