/* Reconnecting overlay + "player is reconnecting" list (public/js/connection.js) */
#connOverlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(ellipse at center, rgba(20, 8, 40, 0.55), rgba(4, 2, 10, 0.82));
  backdrop-filter: blur(3px) grayscale(0.6);
  animation: conn-fade 0.25s ease-out;
}
#connOverlay.hidden {
  display: none;
}
.conn-card {
  background: var(--card, rgba(24, 14, 38, 0.9));
  border: 1px solid var(--card-border, rgba(190, 160, 255, 0.22));
  border-radius: var(--radius, 16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 26px 30px 22px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.conn-ghost {
  font-size: 54px;
  line-height: 1;
  animation: conn-float 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(157, 123, 255, 0.7));
}
.conn-error .conn-ghost,
.conn-superseded .conn-ghost {
  animation: conn-shiver 0.5s ease-in-out infinite;
  filter: grayscale(0.4) drop-shadow(0 0 12px rgba(255, 107, 129, 0.6));
}
.conn-title {
  margin: 10px 0 4px;
  font-size: 24px;
}
.conn-sub {
  margin: 0 0 12px;
  color: var(--muted, #b3a6cc);
  min-height: 1.3em;
}
.conn-sub b {
  color: var(--accent-2, #ffb347);
}
.conn-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-bottom: 14px;
}
.conn-dots.hidden,
.conn-actions.hidden,
.conn-actions .hidden {
  display: none;
}
.conn-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent, #9d7bff);
  animation: conn-dot 1.1s ease-in-out infinite;
}
.conn-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.conn-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
.conn-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

#presenceBox {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.presence-item {
  background: var(--card, rgba(24, 14, 38, 0.86));
  border: 1px solid rgba(255, 179, 71, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  animation: conn-fade 0.3s ease-out;
}
.presence-wifi {
  display: inline-block;
  margin-right: 6px;
  animation: conn-blink 1s steps(2) infinite;
}

@keyframes conn-fade {
  from {
    opacity: 0;
  }
}
@keyframes conn-float {
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}
@keyframes conn-shiver {
  25% {
    transform: translateX(-2px) rotate(-3deg);
  }
  75% {
    transform: translateX(2px) rotate(3deg);
  }
}
@keyframes conn-dot {
  50% {
    transform: translateY(-6px);
    opacity: 0.4;
  }
}
@keyframes conn-blink {
  50% {
    opacity: 0.3;
  }
}
