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

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes micro-shake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-2px); }
  75%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

@keyframes team-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(0,0,0,0); }
  50%      { box-shadow: 0 0 20px var(--pulse-color, var(--olive)); }
}

.is-team-changing {
  animation: team-ring-pulse .8s ease-in-out 3;
}

@keyframes splatter-grow {
  from { transform: scale(0) rotate(0deg); opacity: 0; }
  40%  { opacity: 1; }
  to   { transform: scale(1.4) rotate(18deg); opacity: 0; }
}

.splatter-burst {
  position: absolute;
  pointer-events: none;
  inset: 0;
  display: grid;
  place-items: center;
}
.splatter-burst svg {
  width: 140%;
  height: 140%;
  animation: splatter-grow 600ms ease-out forwards;
}

@keyframes toast-in {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.toast-container {
  position: fixed;
  top: 72px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  z-index: 100;
}
.toast {
  background: var(--bg-1);
  border: 1px solid var(--olive);
  border-left-width: 4px;
  padding: .75rem 1rem;
  font-size: .9rem;
  min-width: 220px;
  max-width: 360px;
  animation: toast-in 200ms ease-out;
}
.toast-danger { border-color: var(--pink); }
.toast-info { border-color: var(--blue); }

/* Ready/Alarm-Animation */
@keyframes alarm-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0, 230, 118, .7), 0 0 18px 2px rgba(0, 230, 118, .45); }
  70%  { box-shadow: 0 0 0 22px rgba(0, 230, 118, 0), 0 0 30px 6px rgba(0, 230, 118, .7); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0), 0 0 18px 2px rgba(0, 230, 118, .45); }
}
@keyframes alarm-flash {
  0%, 100% { background: var(--toxic); filter: brightness(1); }
  50%      { background: #3CFF95; filter: brightness(1.3) saturate(1.2); }
}
.btn-start-round { transition: all 200ms ease; }
.btn-start-round.is-alarm {
  background: var(--toxic);
  border-color: #3CFF95;
  color: var(--bg-0);
  animation: alarm-ring 1.2s ease-out infinite, alarm-flash 1.2s ease-in-out infinite;
  letter-spacing: .15em;
  transform: scale(1.05);
}

/* Avatar-Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: grid;
  place-items: center;
  z-index: 1000;
  animation: fade-in 200ms ease-out;
  cursor: zoom-out;
  padding: 2rem;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border: 4px solid var(--olive);
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0,0,0,.8);
}
.lightbox-overlay .lb-fallback {
  width: min(80vw, 80vh);
  height: min(80vw, 80vh);
  border: 4px solid var(--olive);
  border-radius: 50%;
  background: var(--bg-1);
  display: grid;
  place-items: center;
  font-family: var(--font-stencil);
  font-size: clamp(6rem, 30vw, 18rem);
  color: var(--olive-light);
}
