* {
  box-sizing: border-box;
}
html {
  background: #0a1115;
  color: #e9efdf;
  font-family: Arial, Helvetica, sans-serif;
  color-scheme: dark;
}
body {
  margin: 0;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid #dbff69;
  outline-offset: 4px;
}
main {
  max-width: 1380px;
  margin: auto;
  padding: 0 5%;
}
header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  color: #f3f4e5;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1.3px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand small {
  font: 10px monospace;
  color: #7f918e;
  border-left: 1px solid #36403e;
  padding-left: 16px;
  margin-left: 8px;
}
.brand-icon {
  font-size: 25px;
  font-style: italic;
  letter-spacing: -4px;
  background: #d7ff62;
  color: #15211b;
  padding: 5px 10px 5px 5px;
  transform: skew(-7deg);
}
.tools {
  display: flex;
  gap: 10px;
}
.tools button {
  background: transparent;
  border: 1px solid #34403e;
  color: #b6c6ba;
  padding: 10px 12px;
  font: 12px monospace;
  min-height: 40px;
}
.tools button:hover {
  border-color: #d7ff62;
  color: #d7ff62;
}
.cabinet {
  border: 1px solid #3e4b43;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 24px 100px #0007;
}
.topline,
.bottomline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #121e21;
  padding: 14px 20px;
  font: 11px monospace;
  letter-spacing: 1.5px;
  color: #9baea1;
}
.topline i {
  display: inline-block;
  background: #d7ff62;
  border-radius: 50%;
  height: 6px;
  width: 6px;
  margin-right: 8px;
  box-shadow: 0 0 12px #d7ff6277;
}
.topline span:last-child {
  color: #d7ff62;
}
.screen {
  position: relative;
  aspect-ratio: 16/9;
  isolation: isolate;
  background: #162e32;
  overflow: hidden;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  touch-action: none;
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(90deg, #071816a6, #06171466, #07181699);
  text-align: center;
}
.overlay[hidden],
.hud[hidden] {
  display: none;
}
.eyebrow {
  font: 12px monospace;
  letter-spacing: 4px;
  color: #e9f8c9;
  margin-bottom: 16px;
}
h1 {
  margin: 0;
  font-size: clamp(42px, 7.6vw, 104px);
  line-height: 0.84;
  font-weight: 1000;
  font-style: italic;
  letter-spacing: -5px;
  color: #f5f4d4;
  text-shadow:
    5px 6px 0 #102f2a,
    7px 8px 0 #081917;
}
h1 em {
  color: #d7ff62;
  font-style: inherit;
}
#description {
  font: 15px monospace;
  color: #d5e2c6;
  margin: 23px 10px;
}
.start {
  background: #d7ff62;
  color: #13231b;
  padding: 17px 25px;
  min-width: 225px;
  border: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.8px;
  box-shadow: 4px 4px 0 #071b13;
}
.start:hover {
  background: #e7ff9e;
  transform: translateY(-2px);
}
.start span {
  margin-left: 30px;
}
.start-note {
  font: 10px monospace;
  letter-spacing: 2px;
  margin-top: 18px;
  color: #b2c5aa;
}
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    #0719111a 4px
  );
  z-index: 5;
}
.hud {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-shadow: 2px 2px #10201d;
  font: 15px monospace;
}
.hud > div:first-child {
  width: 25%;
}
.hud b {
  display: block;
}
.hud #lives {
  font-size: 16px;
  color: #ff775f;
  margin-left: 12px;
}
.health {
  height: 12px;
  border: 2px solid #e9efcf;
  background: #15211b;
  margin-top: 8px;
}
.health > div {
  height: 100%;
  background: #d7ff62;
  transition: width 0.15s;
}
.hud-center {
  text-align: center;
}
.hud small {
  display: block;
  font-size: 11px;
  margin-top: 7px;
  color: #e2edbf;
}
.score {
  text-align: right;
}
.score b {
  font-size: 21px;
}
.stage-toast {
  position: absolute;
  top: 27%;
  left: 0;
  right: 0;
  text-align: center;
  font: bold 22px monospace;
  color: #e4ff85;
  text-shadow: 2px 3px #122f2d;
  pointer-events: none;
}
.bottomline {
  font-size: 10px;
  padding: 12px 20px;
}
.bottomline span:last-child {
  color: #d7ff62;
}
footer {
  padding: 25px 0;
}
footer > div {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #9fb0a7;
}
.label {
  font: 10px monospace;
  letter-spacing: 1.5px;
  color: #d7ff62;
}
kbd {
  font: 11px monospace;
  background: #172325;
  padding: 5px;
  border: 1px solid #3a4742;
  border-radius: 3px;
  color: #e5eedc;
  margin-right: 5px;
}
footer small {
  color: #73867b;
  font-size: 10px;
}
footer p {
  font: 11px monospace;
  color: #6d837a;
  margin-top: 24px;
}
footer p span {
  padding: 0 10px;
}
.touch {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  touch-action: none;
  user-select: none;
}
.touch button {
  touch-action: none;
  border: 1px solid #485c49;
  background: #1c302b;
  color: #e4efcc;
  min-height: 50px;
  min-width: 50px;
  border-radius: 8px;
  font-size: 17px;
  user-select: none;
  -webkit-user-select: none;
}
.touch button.pressed {
  background: #d7ff62;
  color: #14221a;
}
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 50px);
  gap: 4px;
}
.dpad button:first-child {
  grid-column: 2;
}
.dpad button:nth-child(2) {
  grid-row: 2;
  grid-column: 1;
}
.dpad button:nth-child(3) {
  grid-row: 2;
  grid-column: 2;
}
.dpad button:nth-child(4) {
  grid-row: 2;
  grid-column: 3;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.actions button {
  height: 65px;
  width: 65px;
  border-radius: 50%;
  font: bold 11px Arial;
}
.actions small {
  display: block;
  margin-top: 4px;
  opacity: 0.5;
}
.actions .attack {
  background: #d7ff62;
  color: #112617;
  border-color: #d7ff62;
  height: 78px;
  width: 78px;
}
.actions .special {
  color: #ffc67a;
}
.screen:fullscreen {
  width: 100vw;
  height: 100dvh;
  aspect-ratio: auto;
}
.screen:fullscreen canvas {
  object-fit: contain;
}
.screen:fullscreen .touch {
  position: absolute;
  bottom: 10px;
  left: 15px;
  right: 15px;
  z-index: 8;
}
.screen:fullscreen .hud {
  top: 15px;
}
@media (pointer: coarse) {
  .touch {
    display: flex;
  }
  footer > div {
    display: none;
  }
}
@media (max-width: 700px) {
  main {
    padding: 0 12px;
  }
  header {
    height: 70px;
  }
  .brand {
    font-size: 11px;
    gap: 10px;
    letter-spacing: 0.6px;
  }
  .brand small,
  .tools span {
    display: none;
  }
  .tools {
    gap: 5px;
  }
  .tools button {
    padding: 8px;
  }
  .topline,
  .bottomline {
    font-size: 8px;
    letter-spacing: 0.4px;
    padding: 10px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 2px;
    margin-bottom: 10px;
  }
  h1 {
    font-size: clamp(32px, 10vw, 64px);
    letter-spacing: -2px;
  }
  #description {
    font-size: 10px;
    margin: 13px 0;
  }
  .start {
    padding: 10px 18px;
    min-width: 180px;
    font-size: 11px;
  }
  .start-note {
    font-size: 8px;
    margin-top: 10px;
  }
  .hud {
    left: 10px;
    right: 10px;
    top: 8px;
    font-size: 9px;
  }
  .hud #lives {
    font-size: 10px;
    margin-left: 0;
  }
  .hud small {
    font-size: 8px;
  }
  .score b {
    font-size: 14px;
  }
  .health {
    height: 8px;
    margin-top: 4px;
  }
  .stage-toast {
    font-size: 14px;
  }
  .bottomline span:first-child {
    max-width: 70%;
  }
  footer {
    padding: 7px 0;
  }
  footer p {
    font-size: 9px;
    line-height: 1.8;
  }
  .actions {
    gap: 5px;
  }
  .actions button {
    height: 52px;
    width: 52px;
    font-size: 9px;
  }
  .actions .attack {
    height: 64px;
    width: 64px;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  main {
    max-width: 800px;
    padding: 0 8px;
  }
  header {
    height: 42px;
  }
  .brand-icon {
    font-size: 19px;
  }
  .topline,
  .bottomline,
  footer {
    display: none;
  }
  .cabinet {
    max-width: 690px;
    margin: auto;
  }
  .screen {
    max-height: calc(100dvh - 50px);
  }
  .touch {
    position: fixed;
    bottom: 15px;
    left: 18px;
    right: 18px;
    z-index: 8;
    opacity: 0.78;
    pointer-events: none;
  }
  .touch button {
    pointer-events: auto;
  }
  .dpad {
    grid-template-columns: repeat(3, 42px);
  }
  .touch .dpad button {
    min-width: 42px;
    min-height: 42px;
  }
  .overlay {
    padding-bottom: 15px;
  }
  h1 {
    font-size: 58px;
  }
}
.fullscreen-tools {
  display: none;
}
.screen:fullscreen .fullscreen-tools {
  display: flex;
  gap: 8px;
  position: absolute;
  right: 15px;
  top: 78px;
  z-index: 9;
}
.fullscreen-tools button {
  background: #14271fdd;
  color: #e9f4d3;
  border: 1px solid #8caa78;
  padding: 10px 15px;
  min-height: 44px;
}
