/* Space Invaders – Remake by NIKOMEDIA 2026 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wrap { line-height: 0; }
.hidden { display: none !important; }

canvas { display: block; }

/* the C64 picture is already enlarged in whole pixels, so the last bit of scaling may be smooth */
#c64 {
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(112, 109, 235, 0.18);
}

#fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

#toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border: 2px solid #706deb;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
#toast.show { opacity: 1; }

/* on-screen controls, only shown on touch devices */
#touch button {
  position: fixed;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-weight: bold;
  touch-action: none;
}
#touch button.down { background: rgba(255, 255, 255, 0.3); }

.tbtn {
  bottom: 22px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  font-size: 28px;
}
.tbtn.fire {
  width: 104px;
  height: 104px;
  font-size: 20px;
  border-color: rgba(255, 90, 110, 0.8);
  color: #ff8a9a;
}
.tsmall {
  top: 12px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}
