:root {
  --ink: #1b1030;
  --bg: #2a1850;
  --pink: #ff5fa2;
  --cyan: #6fe3ff;
  --yellow: #ffe14d;
  --text: #fff7fb;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 50% 20%, #4b2a8a, var(--bg) 60%, #140b28);
  min-height: 100%;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
}
[hidden] {
  display: none !important;
}
main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.logo {
  font:
    900 clamp(56px, 18vw, 104px) / 0.9 'Arial Black',
    system-ui,
    sans-serif;
  margin: 18px 0 0;
  color: var(--yellow);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--pink);
  transform: rotate(-4deg);
}
h2 {
  font:
    900 30px 'Arial Black',
    system-ui,
    sans-serif;
  margin: 8px 0 0;
}
.pitch {
  font-size: 19px;
  margin: 4px 0;
}
.sub {
  margin: 0;
  opacity: 0.85;
}
.privacy {
  font-weight: 700;
  margin: 0;
}
.fine {
  font-size: 13px;
  opacity: 0.7;
}
.fine a {
  color: inherit;
}
.error {
  background: #ff4d6d;
  color: var(--ink);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  margin: 0;
}
.drop {
  width: 100%;
  padding: 34px 16px;
  border: 4px dashed var(--cyan);
  border-radius: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgb(255 255 255 / 0.06);
}
.drop.over {
  background: rgb(111 227 255 / 0.2);
}
.drop input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.drop-big {
  font:
    900 26px 'Arial Black',
    system-ui,
    sans-serif;
}
.demos {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.demo-list,
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
button,
.button {
  font:
    800 16px system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--cyan);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--ink);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.big {
  font-size: 24px;
  padding: 12px 40px;
  background: var(--yellow);
}
button.ghost {
  background: rgb(255 255 255 / 0.85);
}
.video-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.video-wrap video {
  display: block;
  width: 100%;
  max-height: 60dvh;
  object-fit: contain;
}
.tap-layer {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}
.tap-dot {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 4px solid var(--yellow);
  box-shadow: 0 0 0 4px var(--ink);
  pointer-events: none;
}
.pet-boxes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pet-box {
  position: absolute;
  border: 3px dashed var(--yellow);
  border-radius: 14px;
  box-shadow: 0 0 0 3px rgb(0 0 0 / 0.35);
  animation: pet-pulse 1.2s ease-in-out infinite alternate;
}
@keyframes pet-pulse {
  to {
    border-color: #fff;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pet-box {
    animation: none;
  }
}
#scrub {
  width: 100%;
}
.preview-canvas {
  width: min(100%, 360px);
  aspect-ratio: 1;
  border-radius: 24px;
  background: rgb(0 0 0 / 0.25);
}
.progress {
  width: min(100%, 360px);
  height: 10px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.15);
  overflow: hidden;
}
.progress div {
  height: 100%;
  width: 0;
  background: var(--yellow);
  transition: width 0.2s;
}
.name input {
  font:
    800 18px system-ui,
    sans-serif;
  margin-left: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 3px solid var(--ink);
  width: 12ch;
}
.fight main,
main:has(#fight:not([hidden])) {
  max-width: none;
  padding: 0;
}
.fight {
  gap: 0;
  height: 100dvh;
  justify-content: center;
}
.stage {
  position: relative;
  aspect-ratio: 9 / 16;
  height: min(100dvh - 92px, (100vw) * 16 / 9);
  max-width: 100vw;
}
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.pad {
  display: flex;
  gap: 10px;
  padding: 10px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.pad button {
  font-size: 26px;
  min-width: 76px;
  height: 64px;
}
.pad .bonk {
  min-width: 150px;
  background: var(--pink);
  color: #fff;
}
.clip-box {
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.clip-box video,
.clip-box img {
  /* Short enough that every result button stays on screen without scrolling. */
  height: max(220px, min(640px, calc(100dvh - 400px)));
  width: auto;
  max-width: 100%;
  border-radius: 16px;
  background: #000;
}
