/* style.css — the paint for the whole booth.
   Colors: dark purple/black background, glowing pink + cyan neon. */

:root {
  --bg: #0a0014;
  --bg2: #150426;
  --pink: #ff2ea6;
  --cyan: #00f0ff;
  --yellow: #ffe95c;
  --text: #e8dcff;
  --dim: #8f7fb8;
  --font: 'Segoe UI', 'Arial', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

/* The moving neon grid in the background ------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 46, 166, 0.09) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: gridmove 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes gridmove {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 44px, 44px 0; }
}

/* Faint purple glow at the top */
body::after {
  content: "";
  position: fixed;
  top: -30vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 70vh;
  background: radial-gradient(ellipse at center, rgba(255, 46, 166, 0.20), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 0 auto;
  padding: 26px 18px 60px;
  text-align: center;
}

/* Title with glitch flicker ------------------------------------------- */
h1.title {
  font-size: clamp(30px, 7vw, 58px);
  letter-spacing: 6px;
  margin: 10px 0 4px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow:
    0 0 8px var(--cyan),
    0 0 26px rgba(0, 240, 255, 0.7),
    3px 0 0 rgba(255, 46, 166, 0.85),
    -3px 0 0 rgba(0, 255, 200, 0.6);
  animation: glitch 3.4s infinite;
}
@keyframes glitch {
  0%, 92%, 100% { transform: translate(0, 0); }
  93% { transform: translate(-3px, 1px) skewX(-4deg); }
  95% { transform: translate(3px, -1px) skewX(3deg); }
  97% { transform: translate(-2px, 0); }
}

.subtitle {
  color: var(--pink);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 22px;
  text-shadow: 0 0 10px rgba(255, 46, 166, 0.9);
}

/* The camera window ---------------------------------------------------- */
.stage {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 720px;
  border: 2px solid var(--cyan);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 18px rgba(0, 240, 255, 0.55),
    inset 0 0 40px rgba(0, 240, 255, 0.12);
}
.stage video,
.stage img {
  display: block;
  width: 100%;
  height: auto;
  transform: scaleX(-1);   /* mirror, like a real photo booth */
}
.stage img { transform: none; }

/* Corner brackets on the camera frame */
.stage .corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid var(--pink);
  filter: drop-shadow(0 0 6px var(--pink));
}
.stage .c-tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.stage .c-tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.stage .c-bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.stage .c-br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* Big neon button ------------------------------------------------------ */
.btn {
  display: inline-block;
  margin-top: 26px;
  padding: 16px 46px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 22px rgba(255, 46, 166, 0.75);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(0, 240, 255, 0.95);
}
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent;
  color: var(--cyan);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}
.btn.small { padding: 10px 24px; font-size: 15px; margin-top: 14px; }

/* Flash when the photo is taken ---------------------------------------- */
.flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}
.flash.go { animation: flashgo .5s ease-out; }
@keyframes flashgo {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Working / loading overlay -------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 0, 20, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 40;
  text-align: center;
  padding: 20px;
}
.overlay.show { display: flex; }
.overlay .big {
  font-size: 26px;
  letter-spacing: 5px;
  color: var(--cyan);
  text-shadow: 0 0 16px var(--cyan);
  animation: pulse 1.1s ease-in-out infinite;
}
.overlay .small { margin-top: 14px; color: var(--dim); font-size: 14px; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Progress bar (fake but pretty) */
.bar {
  margin-top: 22px;
  width: min(340px, 80vw);
  height: 8px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* Friendly error box ---------------------------------------------------- */
.errorbox {
  display: none;
  margin: 24px auto 0;
  max-width: 560px;
  padding: 18px 20px;
  border: 2px solid var(--pink);
  border-radius: 8px;
  background: rgba(255, 46, 166, 0.08);
  box-shadow: 0 0 18px rgba(255, 46, 166, 0.45);
}
.errorbox.show { display: block; }
.errorbox .code {
  color: var(--pink);
  font-weight: 900;
  letter-spacing: 3px;
  font-size: 17px;
  text-shadow: 0 0 10px var(--pink);
  text-transform: uppercase;
}
.errorbox .why { margin-top: 8px; color: var(--dim); font-size: 14px; line-height: 1.5; }

/* Links row ------------------------------------------------------------- */
.links { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.links a {
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 2px;
  font-size: 13px;
  border-bottom: 1px dashed var(--cyan);
  padding-bottom: 2px;
}
.links a:hover { color: var(--pink); border-color: var(--pink); }

/* Result page ----------------------------------------------------------- */
.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: start;
  margin-top: 10px;
}
@media (min-width: 780px) {
  .result-grid { grid-template-columns: 1.4fr 1fr; text-align: left; }
  .result-grid .qr-side { text-align: center; }
}

.qr-box {
  display: inline-block;
  padding: 16px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.6);
}
.qr-box img, .qr-box canvas { display: block; }
.qr-hint { color: var(--yellow); margin-top: 14px; font-size: 14px; letter-spacing: 1px; text-shadow: 0 0 8px rgba(255,233,92,.6); }
.qr-link {
  margin-top: 12px;
  color: var(--dim);
  font-size: 12px;
  word-break: break-all;
  letter-spacing: 0.5px;
}

.badge {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Gallery --------------------------------------------------------------- */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.wall .cell {
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
  transition: transform .15s, box-shadow .15s;
}
.wall .cell:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 22px rgba(255, 46, 166, 0.6);
}
.wall .cell img { display: block; width: 100%; height: auto; }
.wall .cell .when {
  font-size: 11px;
  color: var(--dim);
  padding: 6px 8px;
  letter-spacing: 1px;
}

.empty {
  margin-top: 40px;
  color: var(--dim);
  letter-spacing: 2px;
}
