/* ── Body/nav theming for dark arcade page ────────────────── */
body.games {
  background: #04000d;
}

body.games nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

/* ── Cityscape background canvas ─────────────────────────── */
#arcade-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Arcade Hall ─────────────────────────────────────────── */
.arcade-hall {
  position: relative;
  min-height: 100vh;
  background: transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 4rem;
  font-family: 'Press Start 2P', monospace;
}

/* ── Perspective floor grid is drawn on #arcade-bg canvas ──── */
.arcade-hall::before {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45vh;
  pointer-events: none;
  z-index: 1;
}

/* ── Scanlines overlay ────────────────────────────────────── */
.arcade-hall::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.14) 3px,
    rgba(0, 0, 0, 0.14) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* ── Header ──────────────────────────────────────────────── */
.arcade-header {
  position: relative;
  z-index: 3;
  text-align: center;
  margin-bottom: 3rem;
}

.arcade-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(2rem, 6vw, 4.5rem);
  color: #00f5ff;
  text-shadow:
    0 0 10px #00f5ff,
    0 0 30px #00b8d4,
    0 0 60px #007fa3;
  letter-spacing: 0.15em;
  margin: 0;
}

.insert-coin {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.55rem, 1.5vw, 0.85rem);
  color: #00b8d4;
  letter-spacing: 0.2em;
  margin-top: 1rem;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Cabinet row ─────────────────────────────────────────── */
.cabinet-row {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 3rem;
  overflow-x: auto;
  padding: 1rem 4rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: #00f5ff transparent;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  flex-wrap: wrap;
}

.cabinet-row::-webkit-scrollbar { height: 4px; }
.cabinet-row::-webkit-scrollbar-track { background: transparent; }
.cabinet-row::-webkit-scrollbar-thumb { background: #00f5ff; border-radius: 2px; }

/* ── Individual cabinet card ──────────────────────────────── */
.cabinet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cabinet-card:not(.cabinet-soon):hover {
  transform: scale(1.04) translateY(-6px);
  filter: drop-shadow(0 0 18px rgba(0, 245, 255, 0.6));
}

.cabinet-card:not(.cabinet-soon):hover .cabinet-svg {
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.8));
}

.cabinet-soon {
  cursor: default;
  opacity: 0.35;
}

.cabinet-wrap {
  position: relative;
  width: 250px;
}

.cabinet-svg {
  width: 250px;
  height: 425px;
  display: block;
  transition: filter 0.2s ease;
}

/* ── Screen overlay (positioned to match SVG screen rect) ── */
.cabinet-screen {
  position: absolute;
  top: 130px;    /* SVG rect y="104" × 1.25 */
  left: 42px;    /* SVG rect x="34" × 1.25 */
  width: 165px;
  height: 135px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  border-radius: 2px;
}

.cabinet-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cabinet-screen-title {
  position: relative;
  z-index: 1;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: #00f5ff;
  text-shadow: 0 0 6px #00f5ff;
  text-align: center;
  line-height: 1.8;
  padding: 0.25rem;
}

/* ── Marquee text overlay ─────────────────────────────────── */
.cabinet-marquee {
  position: absolute;
  top: 79px;     /* SVG marquee centre y≈63 × 1.25 */
  left: 44px;
  width: 162px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.72rem;
  color: #00f5ff;
  text-shadow: 0 0 4px #00f5ff;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.cabinet-screen-soon {
  background: #04040e;
}

.soon-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: #334466;
  text-align: center;
  line-height: 2;
  letter-spacing: 0.05em;
}

/* ── Cabinet label ────────────────────────────────────────── */
.cabinet-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: #00b8d4;
  letter-spacing: 0.15em;
  text-align: center;
}

.cabinet-label-dim {
  color: #223344;
}

/* ── Music toggle button ──────────────────────────────────── */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: #00f5ff;
  background: rgba(5, 0, 20, 0.85);
  border: 1px solid #00a8cc;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: background 0.15s, box-shadow 0.15s;
}

.music-toggle:hover {
  background: rgba(0, 20, 50, 0.95);
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.4);
}

.music-toggle.muted {
  color: #334455;
  border-color: #223344;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .cabinet-row {
    gap: 2rem;
    padding: 1rem 1.5rem 2rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .cabinet-wrap {
    width: 175px;
  }

  .cabinet-svg {
    width: 175px;
    height: 298px;
  }

  .cabinet-screen {
    top: 91px;
    left: 30px;
    width: 116px;
    height: 95px;
  }

  .cabinet-marquee {
    top: 55px;
    left: 31px;
    width: 114px;
    font-size: 0.54rem;
  }

  .arcade-title {
    font-size: clamp(1.4rem, 8vw, 2.4rem);
  }
}
