/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: #f0f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
}

/* ── Outer wrapper ─────────────────────────────────────── */
#game-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ── Arcade cabinet frame ──────────────────────────────── */
#arcade-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #0d1b2a;
  border-radius: 18px;
  padding: 10px 10px 12px;
  box-shadow:
    0 0 0 3px #1e4d8c,
    0 0 0 6px #0d1b2a,
    0 0 40px rgba(30, 77, 140, 0.6),
    0 0 80px rgba(30, 77, 140, 0.25),
    0 20px 60px rgba(0,0,0,0.5);
  gap: 8px;
  max-height: 100vh;
}

/* ── Marquee top bar ───────────────────────────────────── */
#arcade-top {
  width: 100%;
  background: #112240;
  border: 2px solid #1e4d8c;
  border-radius: 8px;
  padding: 6px 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-text {
  display: inline-block;
  color: #FFD700;
  font-size: 8px;
  letter-spacing: 0.05em;
  animation: marquee 14s linear infinite;
  padding-left: 100%;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-200%); }
}

/* ── Canvas container ──────────────────────────────────── */
#canvas-container {
  border: 3px solid #1e4d8c;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    inset 0 0 20px rgba(0,0,0,0.4),
    0 0 20px rgba(30, 77, 140, 0.4);
  line-height: 0;
}

#gameCanvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  /* Scale down on small screens */
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 120px);
}

/* ── Bottom controls hint ──────────────────────────────── */
#arcade-bottom {
  width: 100%;
  background: #112240;
  border: 2px solid #1e4d8c;
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
}

.ctrl-hint {
  color: #4a90d9;
  font-size: 7px;
  letter-spacing: 0.04em;
}

/* ── Responsive scaling ────────────────────────────────── */
@media (max-height: 780px) {
  #gameCanvas {
    max-height: calc(100vh - 100px);
  }
}

@media (max-width: 720px) {
  #arcade-frame {
    border-radius: 0;
    padding: 6px 6px 8px;
    box-shadow: none;
  }
  #arcade-top, #arcade-bottom {
    border-radius: 4px;
  }
}