/* 9♥ Heart Pong — 1970s cocktail cabinet + CRT */

:root {
  --wood-dark: #3a2418;
  --wood: #6b3e24;
  --wood-light: #8a5330;
  --brass: #c9a227;
  --crt-bg: #07140c;
  --phosphor: #7dff9a;
  --phosphor-dim: #2f8a48;
  --heart: #ff4d6d;
  --amber: #ffbf66;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
.hidden,
#lock-screen.hidden { display: none !important; }
body.pong-page {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(201, 162, 39, 0.12), transparent 50%),
    #1a1210;
  color: #f4ead8;
  font-family: "Courier New", ui-monospace, monospace;
}

.pong-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 14px 40px;
}

.pong-cabinet {
  background:
    linear-gradient(90deg, rgba(0,0,0,.28), transparent 8%, transparent 92%, rgba(0,0,0,.28)),
    repeating-linear-gradient(
      90deg,
      #5c321c 0px,
      #7a4326 8px,
      #4e2a16 16px,
      #6b3e24 24px
    );
  border: 10px solid #2a1810;
  border-radius: 28px 28px 18px 18px;
  box-shadow:
    0 30px 60px rgba(0,0,0,.55),
    inset 0 2px 0 rgba(255,255,255,.12),
    inset 0 -8px 18px rgba(0,0,0,.35);
  padding: 14px 16px 18px;
  position: relative;
}

.pong-cabinet-feet {
  display: flex;
  justify-content: space-between;
  margin: 10px 28px 0;
}
.pong-cabinet-feet span {
  width: 72px;
  height: 14px;
  background: linear-gradient(#2a1810, #1a0e08);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 0 #0a0604;
}
.pong-coin {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.pong-coin-slot {
  width: 86px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(#1a0e08, #3a2418);
  border: 2px solid #c9a227;
  box-shadow: inset 0 6px 8px rgba(0,0,0,.7);
  color: #c9a227;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pong-cabinet::before,
.pong-cabinet::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3e0a8, #b8860b 55%, #6a4a12);
  box-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.pong-cabinet::before { top: 14px; left: 16px; }
.pong-cabinet::after { top: 14px; right: 16px; }

.pong-marquee {
  text-align: center;
  padding: 8px 40px 14px;
}
.pong-marquee h1 {
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: 0.12em;
  color: #ffd86b;
  text-shadow:
    0 0 8px #ff4d6d,
    0 0 22px rgba(255, 77, 109, 0.55),
    2px 3px 0 #3a1008;
  animation: pong-neon 4.8s step-end infinite;
}
@keyframes pong-neon {
  0%, 92%, 100% { opacity: 1; filter: brightness(1); }
  93% { opacity: 0.55; filter: brightness(0.7); }
  94% { opacity: 1; filter: brightness(1.25); }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
}
.pong-marquee h1 .heart { color: #ff4d6d; }
.pong-marquee p {
  margin: 6px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e8c9a0;
}

.pong-bezel {
  background: #0b0d0c;
  border: 8px solid #1c1612;
  border-radius: 18px;
  padding: 10px;
  box-shadow: inset 0 0 0 2px #c9a227, inset 0 0 40px rgba(0,0,0,.8);
}

.pong-crt {
  position: relative;
  background: var(--crt-bg);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 8 / 5;
}

.pong-crt canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.pong-scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,.18) 0px,
      rgba(0,0,0,.18) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: multiply;
}
.pong-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 80px rgba(125, 255, 154, 0.12), inset 0 0 140px rgba(0,0,0,.55);
  border-radius: 12px;
  animation: pong-crt 5.5s linear infinite;
}
@keyframes pong-crt {
  0%, 100% { opacity: 1; }
  48% { opacity: 1; }
  50% { opacity: 0.82; }
  52% { opacity: 1; }
}

.pong-hud {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 0 8px 4px;
  font-size: 0.78rem;
  color: #f0d7b4;
}
.pong-hud kbd {
  background: #2a1810;
  border: 1px solid #c9a227;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.75em;
}

.pong-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}
.pong-controls button,
.pong-controls select {
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #c9a227;
  background: #2a1810;
  color: #ffd86b;
  cursor: pointer;
}
.pong-controls button.primary {
  background: linear-gradient(#ff6b81, #c41e3a);
  color: #fff8ee;
  border-color: #ffd86b;
}
.pong-controls button:hover,
.pong-controls button:focus-visible,
.pong-controls select:focus-visible {
  outline: 2px solid #ffd86b;
  outline-offset: 2px;
}

.pong-touch {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.pong-touch button {
  min-height: 64px;
  font-size: 1.4rem;
}
@media (pointer: coarse) {
  .pong-touch { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  .pong-scan { display: none; }
  .pong-marquee h1,
  .pong-glow { animation: none; }
}
