/* Big animated banner shown on start / lap completion. */
#lap-banner {
  position: fixed;
  top: 28%;
  left: 50%;
  z-index: 30;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  padding: 14px 42px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(79, 140, 255, 0.9),
    rgba(230, 40, 40, 0.9)
  );
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

#lap-banner-text {
  font-size: 40px;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  white-space: nowrap;
}

#lap-banner.show {
  animation: lap-banner-pop 1.8s ease forwards;
}

@keyframes lap-banner-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(-3deg);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(1deg);
  }
  25% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) rotate(0deg);
  }
}

/* Confetti burst. */
#confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 29;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  animation-name: confetti-fall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
  opacity: 0.95;
}

@keyframes confetti-fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--drift), 100vh) rotate(540deg);
    opacity: 0.4;
  }
}
