.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 10001;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(105vh) rotate(900deg) scale(0.5);
    opacity: 0;
  }
}

.wrap-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: wrap-appear 0.35s ease-out;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wrap-overlay.wrap-fade-out {
  animation: wrap-disappear 0.5s ease-in forwards;
}

@keyframes wrap-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes wrap-disappear {
  to {
    opacity: 0;
    transform: scale(1.05);
  }
}

.wrap-flash {
  position: absolute;
  inset: 0;
  background: white;
  animation: flash-pop 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes flash-pop {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
  }
}

.wrap-clapperboard {
  position: relative;
  width: 220px;
  margin-bottom: 24px;
  animation: clapper-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes clapper-enter {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.clapper-top {
  width: 100%;
  height: 32px;
  background: #1a1a1a;
  border-radius: 6px 6px 0 0;
  position: relative;
  overflow: hidden;
  transform-origin: bottom left;
  animation: clapper-snap 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s both;
  border: 2px solid #FF6B00;
  border-bottom: none;
}

@keyframes clapper-snap {
  0% {
    transform: rotate(35deg);
  }
  60% {
    transform: rotate(-3deg);
  }
  80% {
    transform: rotate(1deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.clapper-stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    #FF6B00 0px,
    #FF6B00 14px,
    #1a1a1a 14px,
    #1a1a1a 28px
  );
}

.clapper-bottom {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border-radius: 0 0 6px 6px;
  border: 2px solid #FF6B00;
  border-top: 2px solid #FF6B00;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clapper-slate {
  text-align: center;
}

.slate-label {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #FF6B00;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.slate-scene {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: #888;
  letter-spacing: 0.15em;
  margin-top: 2px;
}

.wrap-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: #FF6B00;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 0 4px 30px rgba(255, 107, 0, 0.4);
}

.wrap-overlay.show-title .wrap-title {
  opacity: 1;
  transform: scale(1);
}

.wrap-subtitle {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.05rem;
  color: #cacaca;
  margin: 12px 0 0;
  opacity: 0;
  transition: opacity 0.4s ease 0.2s;
}

.wrap-overlay.show-title .wrap-subtitle {
  opacity: 1;
}

.wrap-tap-hint {
  position: absolute;
  bottom: 40px;
  font-size: 0.8rem;
  color: #666;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: hint-fade 0.5s ease 2.5s forwards;
}

@keyframes hint-fade {
  to {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .wrap-clapperboard {
    width: 160px;
  }

  .clapper-top {
    height: 24px;
  }

  .clapper-bottom {
    height: 60px;
  }

  .slate-label {
    font-size: 0.9rem;
  }
}
