* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  background: #000;
  overflow: hidden;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: #fff;
  user-select: none;
  touch-action: none;
}
#stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
#game {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  cursor: crosshair;
}
#toast {
  position: absolute;
  left: 50%; top: 58%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 16px #ff00ea, 0 0 28px #00e5ff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
#toast.show { opacity: 1; }
#popup {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
}
#popup.hidden { display: none; }
.popup-card {
  width: 420px;
  padding: 28px 32px 32px;
  background: linear-gradient(180deg, #0b1230, #050814);
  border: 2px solid #00e5ff;
  box-shadow: 0 0 40px #00e5ff88, inset 0 0 30px #ff00ea22;
  text-align: center;
  border-radius: 8px;
}
.popup-card img { width: 160px; height: auto; margin-bottom: 8px; }
.popup-card h2 {
  font-size: 28px; color: #7ef6ff; letter-spacing: 2px; margin: 6px 0;
}
.popup-card p {
  font-size: 48px; color: #fff; font-weight: 900; margin: 8px 0 18px;
  text-shadow: 0 0 18px #00e5ff;
}
.popup-card button {
  cursor: pointer;
  border: 0;
  padding: 12px 28px;
  font-size: 18px; font-weight: 800; letter-spacing: 2px;
  color: #001018;
  background: linear-gradient(90deg, #00e5ff, #ff4cf0);
  border-radius: 4px;
}
#splash {
  position: fixed; inset: 0;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 20;
  transition: opacity 0.9s ease;
}
#splash.fade { opacity: 0; pointer-events: none; }
#splash.gone { display: none; }
#splash-logo {
  max-width: min(900px, 86vw);
  max-height: 62vh;
  height: auto;
  filter: drop-shadow(0 0 24px #00e5ff88);
}
#splash-hint {
  margin-top: 28px;
  font-size: 18px;
  letter-spacing: 4px;
  color: #7ef6ff;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
