/* ==========================================================================
   pong.css — Pong easter-egg game page
   ========================================================================== */

/* === Court — fills viewport between fixed nav and footer === */
.pong-page {
  position: fixed;
  top: var(--header-height, 64px);
  bottom: 48px; /* footer height */
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pong-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pong-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  aspect-ratio: 8 / 5;
}

/* === Touch controls — fixed above footer on touch devices === */
.pong-touch-controls {
  position: fixed;
  bottom: calc(48px + 8px); /* footer + gap */
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 12px;
  width: min(320px, 80vw);
  z-index: 150;
}

@media (hover: none) and (pointer: coarse) {
  /* Shrink court upward to leave clear room for controls */
  .pong-page {
    bottom: calc(48px + 68px + 8px + 8px); /* footer + controls + gaps */
  }

  .pong-touch-controls {
    display: flex;
  }
}

.pong-touch-btn {
  flex: 1;
  height: 68px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.375rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s var(--ease, cubic-bezier(0.4, 0, 0.2, 1)),
    border-color 0.15s var(--ease, cubic-bezier(0.4, 0, 0.2, 1));
}

.pong-touch-btn:active {
  background: rgba(242, 128, 170, 0.14);
  border-color: rgba(242, 128, 170, 0.38);
}
