:root {
  --bg: #050508;
  --card: #0a0b0f;
  --edge: rgba(255, 190, 45, 0.32);
  --txt: #f2efe9;
  --mut: #9e9689;
  --gold: #ffbe2e;
  --gold-bright: #ffe885;
  --red: #ff3322;
  --green: #1eff38;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--txt);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}
header, footer {
  display: none;
}
.card {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #040507;
  overflow: hidden;
}
.wrap {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
}
.stage {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
}
canvas#game {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  cursor: crosshair;
}
/* Top HUD bar */
.topbar {
  position: absolute;
  top: 10px;
  left: 132px;
  right: 112px;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 5px 16px;
  background: linear-gradient(180deg, rgba(12, 13, 18, 0.78), rgba(6, 7, 10, 0.68));
  border: 1px solid rgba(235, 170, 35, 0.28);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.glogo {
  font-family: 'VT323', monospace;
  font-size: 23px;
  color: var(--gold);
  letter-spacing: 2.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 10px rgba(255, 180, 30, 0.55);
}
.glogo i {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--red), 0 0 4px #ff9980;
  animation: bl 1.6s steps(2) infinite;
}
@keyframes bl {
  50% { opacity: 0.25; }
}
.stats {
  display: flex;
  gap: 20px;
}
.stat {
  text-align: center;
  min-width: 48px;
}
.stat b {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 22px;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(255, 190, 45, 0.4);
}
.stat span {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--mut);
  text-transform: uppercase;
}
.fsbtn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 30;
  background: rgba(14, 16, 22, 0.85);
  border: 1px solid var(--edge);
  color: var(--txt);
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
}
body.in-iframe .fsbtn {
  display: none;
}
.fsbtn:hover {
  border-color: var(--gold);
}
/* HUD */
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  line-height: 1;
  z-index: 10;
}
/* Exact neon-green cross (+) from cover image */
.cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
}
.cross::before,
.cross::after {
  content: "";
  position: absolute;
  background: #1eff38;
  box-shadow: 0 0 8px rgba(30, 255, 56, 0.9), 0 0 2px #b0ffba;
}
.cross::before {
  left: 17px;
  top: 0;
  width: 3px;
  height: 38px;
}
.cross::after {
  left: 0;
  top: 17px;
  width: 38px;
  height: 3px;
}
.hit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  opacity: 0;
  transition: opacity 0.06s;
}
.hit::before,
.hit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 2px;
  background: #ffdd66;
  box-shadow: 0 0 8px #ff8800;
  margin: -1px 0 0 -16px;
}
.hit::before { transform: rotate(45deg); }
.hit::after { transform: rotate(-45deg); }
.hit.on { opacity: 1; }
.vig {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(255, 25, 10, 0.6));
  opacity: 0;
  transition: opacity 0.22s;
}
#mm {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 110px;
  height: 110px;
  opacity: 0.9;
  border: 1px solid rgba(235, 170, 35, 0.38);
  border-radius: 7px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75);
}
.hpbox {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(8, 9, 13, 0.76);
  border: 1px solid rgba(255, 188, 42, 0.28);
  border-radius: 7px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65);
}
.hpbar {
  width: 136px;
  height: 11px;
  border: 1px solid rgba(255, 200, 70, 0.35);
  background: rgba(0, 0, 0, 0.75);
  border-radius: 3px;
  overflow: hidden;
}
.hpbar i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #b81408, #ff3b1f 55%, #ff9d1a);
  box-shadow: 0 0 10px rgba(255, 70, 20, 0.6);
  transition: width 0.14s;
}
.hpbox b {
  font-family: 'VT323', monospace;
  font-size: 25px;
  color: #fff2d6;
  text-shadow: 0 0 8px rgba(255, 100, 40, 0.5);
}
.spdbox {
  position: absolute;
  right: 14px;
  bottom: 12px;
  text-align: right;
  padding: 6px 14px 8px;
  background: rgba(8, 9, 13, 0.76);
  border: 1px solid rgba(255, 188, 42, 0.3);
  border-radius: 7px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65);
}
.spdbox b {
  font-family: 'VT323', monospace;
  font-size: 40px;
  line-height: 0.92;
  color: var(--gold-bright);
  text-shadow: 0 0 16px rgba(255, 185, 30, 0.75), 0 0 4px #ff9900;
}
.spdbox span {
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 2px;
}
.banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 17%;
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 46px;
  letter-spacing: 4px;
  color: var(--gold-bright);
  text-shadow: 0 0 22px rgba(255, 175, 20, 0.85), 0 2px 0 #4a2400;
  opacity: 0;
  transition: opacity 0.28s;
}
.banner.on { opacity: 1; }
.tip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 58px;
  text-align: center;
  font-size: 11px;
  color: #ffe8a3;
  background: rgba(10, 11, 15, 0.72);
  border: 1px solid rgba(255, 188, 42, 0.25);
  padding: 4px 13px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.45s;
  white-space: nowrap;
}
.tip.on { opacity: 0.9; }
/* Overlays */
.ov {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(8, 9, 13, 0.35) 0%, rgba(4, 5, 8, 0.72) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.ov-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  line-height: 1.4;
  padding: 22px 32px;
  background: linear-gradient(180deg, rgba(14, 16, 22, 0.86), rgba(8, 9, 13, 0.92));
  border: 1px solid rgba(255, 190, 45, 0.48);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 36px rgba(255, 165, 20, 0.16);
  backdrop-filter: blur(5px);
}
.ov h2 {
  font-family: 'VT323', monospace;
  font-size: 56px;
  line-height: 0.95;
  color: var(--gold-bright);
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(255, 175, 20, 0.75), 0 3px 0 #4a2400;
}
.ov h2.red {
  color: #ff442b;
  text-shadow: 0 0 22px rgba(255, 45, 20, 0.8), 0 3px 0 #3d0600;
}
.ov p {
  font-size: 13px;
  color: #dad4c8;
  max-width: 410px;
}
.ov .desktop-note {
  font-size: 11px;
  color: #8f8779;
}
.ov .keys {
  font-size: 12px;
  color: #b5ae9f;
  display: grid;
  gap: 5px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 190, 45, 0.18);
  border-radius: 8px;
}
.ov .keys b {
  color: var(--gold);
  font-family: 'VT323', monospace;
  font-size: 17px;
  letter-spacing: 1px;
}
.pill {
  background: rgba(12, 14, 19, 0.82);
  border: 1px solid rgba(255, 190, 45, 0.3);
  color: #e8e2d5;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.06s;
}
.pill-gold {
  background: linear-gradient(180deg, #ffca3a, #d9820b);
  border: 1px solid #ffe88a;
  color: #140b00;
  font-family: 'VT323', monospace;
  font-size: 26px;
  letter-spacing: 2px;
  padding: 8px 36px;
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(255, 175, 20, 0.55);
}
.pill:hover {
  border-color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(255, 185, 35, 0.4);
}
.pill-gold:hover {
  background: linear-gradient(180deg, #ffe066, #ee9612);
  box-shadow: 0 0 28px rgba(255, 195, 45, 0.85);
}
.pill:active {
  transform: scale(0.97);
}
.gg-note {
  position: absolute;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  z-index: 25;
  font-family: 'VT323', monospace;
  font-size: 19px;
  color: var(--gold-bright);
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}
.bottom {
  position: absolute;
  left: 222px;
  bottom: 14px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hint {
  display: none;
}
.hide {
  display: none !important;
}
@media (max-width: 680px) {
  .topbar {
    left: 102px;
    right: 10px;
    padding: 4px 10px;
  }
  #mm {
    width: 84px;
    height: 84px;
  }
  .glogo, .bottom {
    display: none;
  }
}
