/* ============================================================
   Selfie Wall – shared stylesheet
   Layers (LED screen):
     1 – #led-root         white body background
     2 – #logo-layer       vivid colored logo (initially masked)
     3 – #mask-canvas      white canvas cover (punched out per cell)
     4 – #grid             transparent reference grid
     5 – .selfie           animated selfie tiles
   ============================================================ */

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

html, body {
  width: 100%; height: 100%;
  background: #fff;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
}

/* ── LED page ─────────────────────────────────────────────── */
#led-root {
  position: relative;
  width: 100vw; height: 100vh;
  overflow: hidden;
  background: #ffffff;
}

/* Layer 2 – Logo (fills full screen; hidden initially by mask canvas) */
#logo-layer {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}
#main-logo{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#logo-text {
  font-size: clamp(60px, 9vw, 144px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ff7a00;
  text-transform: uppercase;
  line-height: 1;
}
#logo-sub {
  font-size: clamp(18px, 2.4vw, 38px);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #ff9d3a;
  margin-top: 12px;
  text-transform: uppercase;
}

/* Layer 3 – Mask canvas (covers logo; holes punched when selfies arrive) */
#mask-canvas {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
  display: block;
}

/* Layer 4 – Grid (transparent; purely for measuring cell rects) */
#grid {
  position: absolute; inset: 0;
  z-index: 4;
  display: grid;
  gap: 3px;
  padding: 8px;
  pointer-events: none;
}
.cell {
  border-radius: 6px;
}

/* Layer 5 – Selfie tiles */
.selfie {
  position: absolute;
  z-index: 5;
  left: 0; top: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  will-change: transform, opacity;
  transform-origin: center center;
}
.selfie img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* No colour overlay – selfies are shown at low opacity to let the logo show through */
.selfie::after {
  content: '';
  position: absolute; inset: 0;
  /* background: rgba(255, 122, 0, 0.52); */
  /* background: #3b4bdfa8; */
  pointer-events: none;
}

/* ── Booth page ───────────────────────────────────────────── */
#booth-root {
  width: 100vw; height: 100vh;
  background: #0f0f0f;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  color: #fff;
}

#booth-root h1 {
  font-size: 2rem; font-weight: 700;
  letter-spacing: 0.04em;
}
#booth-root p { color: #aaa; font-size: 0.95rem; }

#video-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 3px #ff7a00, 0 12px 40px rgba(0,0,0,0.6);
}
#video {
  display: block;
  width: min(640px, 92vw);
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #111;
  transform: scaleX(-1); /* mirror */
}

#countdown-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 96px; font-weight: 900; color: #ff7a00;
  text-shadow: 0 4px 20px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#countdown-overlay.show { opacity: 1; }

.btn-row { display: flex; gap: 12px; }
button {
  padding: 12px 28px;
  border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
button:active { transform: scale(0.96); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

#btn-capture {
  background: #ff7a00; color: #fff;
  box-shadow: 0 4px 14px rgba(255,122,0,0.5);
}
#btn-flip {
  background: #2a2a2a; color: #fff;
}

#status {
  min-height: 24px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
#status.ok   { color: #4ade80; }
#status.err  { color: #f87171; }
#status.info { color: #facc15; }

/* Hidden capture canvas */
#snap-canvas { display: none; }