/* ---- Viewport (scales to fit via JS transform) ---- */
#game-viewport {
  /* Logical size: 1400 x 2400 — JS applies scale + translate */
  width: 1400px;
  height: 2400px;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  transform-origin: 0 0;
  background: #87ceeb; /* sky fallback — hides any sub-pixel gaps */
  /* No inner box-shadow — it caused a dark right-edge strip */
}

/* ---- Swipe Container ---- */
#swipe-container {
  display: flex;
  flex-direction: row;
  position: relative;   /* Crucial: anchor the absolute parallax stage inside */
  width: 200%;          /* Holds two 1400px panels = 2800px */
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

#swipe-container.show-left {
  transform: translateX(0);
}
#swipe-container.show-right {
  transform: translateX(-50%);
}

/* ---- Panels ---- */
.panel {
  width: 1400px;
  height: 100%;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

/* ---- Left Panel ---- */
#panel-left {
  /* Background removed so the parallax stage underneath is visible */
}

.panel-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 10;
}

.panel-label {
  font-family: 'RetroMario', sans-serif;
  font-size: 80px;
  color: rgba(120, 255, 120, 0.6);
  text-shadow: 0 4px 24px rgba(0,200,60,0.4);
  letter-spacing: 2px;
}

.panel-hint {
  font-family: 'RetroMario', sans-serif;
  font-size: 42px;
  color: rgba(200, 255, 200, 0.35);
}

/* ---- Tap Zone (transparent overlay over full right panel) ---- */
#tap-zone {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: auto;
  cursor: crosshair;
}

/* ---- Parallax Stage ---- */
#parallax-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  transform: scale(1.02);
  transform-origin: center center;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;       /* img never bleeds outside its layer */
  will-change: transform;
}

/* Each image is 2800px wide. We display 1400px centered on the RIGHT HALF
   (pixels 1400–2800). Centering means start at pixel 1400 + (1400-1400)/2 = 1400.
   Base shift: -50% of img width (2800px) = -1400px shows exactly the right half start.
   JS adds parallax offset ON TOP, clamped so we never go outside pixels 1400-2800.
   The images carry 1400px of right-half content so parallax must stay within that range. */
.parallax-layer img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;   /* 100% of 2800px stage = full source image width */
  height: 100%;
  object-fit: fill;
  image-rendering: crisp-edges;
  display: block;
  pointer-events: none;
  /* Base position is now just 0. 
     The swipe-container itself handles translating left (-50%) or right (0)
     which perfectly displays the right or left half of this 2800px image. */
  transform: translateX(0) translateY(0);
}

