:root {
  --ff-blue-deep: #0c1470;
  --ff-cyan: #7df0ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: Verdana, sans-serif;
}

#stage {
  position: fixed;
  inset: 0;
  background: #000;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 48%, transparent 62%, rgba(0,0,10,.34) 100%);
  mix-blend-mode: multiply;
}

#touch { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.tb {
  pointer-events: auto;
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.55);
  background: linear-gradient(160deg, rgba(90,140,232,.55), rgba(12,20,112,.6));
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  touch-action: none;
}
.tb:active { background: linear-gradient(160deg, rgba(140,190,255,.8), rgba(40,70,180,.8)); }
#dpad .tb:nth-child(1) { left: 74px; bottom: 128px; }
#dpad .tb:nth-child(2) { left: 14px; bottom: 68px; }
#dpad .tb:nth-child(3) { left: 134px; bottom: 68px; }
#dpad .tb:nth-child(4) { left: 74px; bottom: 8px; }
#abtns .round { border-radius: 50%; }
#abtns .tb:nth-child(1) { right: 88px; bottom: 40px; }
#abtns .tb:nth-child(2) { right: 20px; bottom: 96px; }

#boot {
  position: absolute; inset: 0; z-index: 40;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-inner { text-align: center; color: #cfe0ff; }
.boot-logo {
  font-size: 54px; font-weight: 900; letter-spacing: 4px;
  color: #dfe9ff;
  text-shadow: 0 0 18px rgba(90,150,255,.8), 0 2px 0 #23407f;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
}
.boot-logo span { color: var(--ff-cyan); }
.boot-bar {
  width: 220px; height: 4px; margin: 18px auto 10px;
  background: #101a3a; border-radius: 2px; overflow: hidden;
}
.boot-bar i {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, #2c50b8, var(--ff-cyan));
  animation: bootSlide 1.1s linear infinite;
}
@keyframes bootSlide { from { transform: translateX(-110%);} to { transform: translateX(280%);} }
.boot-hint { font-size: 10px; letter-spacing: 3px; color: #6f86c8; }

@media (pointer: coarse) {
  #touch:not([hidden]) { display: block; }
}
