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

html, body {
  height: 100%;
  overflow: hidden;
  background: #0d0d12;
  color: #f5f0e6;
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

#video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#video.mirror { transform: scaleX(-1); }

#overlay-live {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  text-align: center;
  padding: 2rem;
  background: rgba(13, 13, 18, 0.45);
  z-index: 10;
}

.hidden { display: none !important; }

#start h1 {
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  color: #f0c75e;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.hint {
  font-size: clamp(1.3rem, 4vw, 2rem);
  animation: pulse 1.8s ease-in-out infinite;
}

.sub {
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  opacity: 0.85;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

#switch-cam {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  font-size: 1.5rem;
  padding: 0.5rem 0.7rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
}

#countdown { background: transparent; }

#count-num {
  font-size: clamp(8rem, 35vw, 20rem);
  font-weight: 800;
  color: #f0c75e;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
  animation: count-pop 1s ease-out;
}

@keyframes count-pop {
  0% { transform: scale(1.6); opacity: 0; }
  25% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.92); opacity: 0.9; }
}

#flash {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 30;
  animation: flash-out 0.45s ease-out forwards;
}

@keyframes flash-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

#shot-info {
  position: fixed;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  font-size: 1.4rem;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.4rem 1.2rem;
  border-radius: 2rem;
}

#preview { background: rgba(13, 13, 18, 0.92); }

#strip-img {
  max-height: 70vh;
  max-width: 90vw;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}

.buttons { display: flex; gap: 1.5rem; }

.btn {
  font-size: 1.4rem;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 3rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary { background: #f0c75e; color: #1a1408; }
.btn-secondary { background: rgba(255, 255, 255, 0.15); color: #fff; }

#chooser { background: rgba(13, 13, 18, 0.85); }

#chooser h2 { font-size: clamp(1.6rem, 5vw, 2.6rem); color: #f0c75e; }

.deco-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 220px));
  gap: 1.2rem;
}

.deco {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f0e6;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.deco:active { border-color: #f0c75e; background: rgba(240, 199, 94, 0.15); }

.deco-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 8px;
  background: #2a2a35;
}

.deco-none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

#result { background: rgba(13, 13, 18, 0.92); }

#result h2 { font-size: clamp(1.8rem, 5vw, 3rem); color: #f0c75e; }

#email-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

#email-input {
  font-size: 1.2rem;
  padding: 0.8rem 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 3rem;
  background: rgba(255, 255, 255, 0.1);
  color: #f5f0e6;
  min-width: min(70vw, 320px);
}

#email-input::placeholder { color: rgba(245, 240, 230, 0.5); }

#email-status { min-height: 1.4em; font-size: 1.1rem; }

#qr-img {
  width: min(45vw, 300px);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}
