/* ── ✨ Animations ────────────────────────────────────────────────────────── */

/* Screen transition — blue card-sweep between screens */
.screen-transition {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; will-change: transform;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(100,120,255,0.6) 0%, transparent 60%),
    linear-gradient(135deg, #1a2fd6 0%, #3448ff 55%, #5568ff 100%);
  /* card suit watermarks */
  display: flex; align-items: center; justify-content: center;
}
.screen-transition::before {
  content: '♠ ♥ ♦ ♣';
  font-size: 48px; letter-spacing: 24px;
  color: rgba(255,255,255,0.08); pointer-events: none;
}
@keyframes sweepIn  { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes sweepOut { from { transform: translateX(0); }     to { transform: translateX(100%); } }
.screen-transition.sweep-in  { animation: sweepIn  0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.screen-transition.sweep-out { animation: sweepOut 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* Ambient floating cards — JS physics controls position & rotation */
.ambient-card {
  position: absolute; pointer-events: none; z-index: 0;
  width: 44px; height: 62px; border-radius: 8px;
  background: rgba(52,72,255,0.06);
  border: 1px solid rgba(52,72,255,0.14);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: rgba(52,72,255,0.18);
  top: 0; left: 0; /* JS drives position via transform only */
  user-select: none; will-change: transform;
}

/* Voted ring — expands from player card on vote cast */
.vote-ring {
  position: absolute; inset: -4px; border-radius: 10px;
  border: 2px solid #3448ff;
  pointer-events: none;
  animation: voteRing 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes voteRing {
  0%   { opacity: 1; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(2.4); }
}

/* Player card wrap — pop in for new players */
@keyframes cardWrapIn {
  from { opacity: 0; transform: scale(0) rotate(-15deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
.card-wrap-in { animation: cardWrapIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* Table ripple — shockwave on card reveal */
.table-ripple {
  position: absolute; inset: 0; border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.7);
  pointer-events: none; z-index: 5;
  animation: tableRipple 1s ease-out forwards;
}
.table-ripple.r2 { animation-delay: 0.2s;  border-color: rgba(255,255,255,0.35); border-width: 2px; }
.table-ripple.r3 { animation-delay: 0.4s;  border-color: rgba(255,255,255,0.18); border-width: 1.5px; }
@keyframes tableRipple {
  from { transform: scale(0.4); opacity: 1; }
  to   { transform: scale(1.7); opacity: 0; }
}

/* Results stat entrance */
.results-team { animation: fadeSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; }
.results-team:last-child { animation-delay: 0.08s; }

/* Consensus sparkle */
.results-consensus { animation: consensusPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes consensusPop {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* Landing form stagger */
.landing-box > * { animation: fadeSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; }
.landing-box > *:nth-child(1) { animation-delay: 0.05s; }
.landing-box > *:nth-child(2) { animation-delay: 0.10s; }
.landing-box > *:nth-child(3) { animation-delay: 0.15s; }
.landing-box > *:nth-child(4) { animation-delay: 0.20s; }
.landing-box > *:nth-child(5) { animation-delay: 0.25s; }
.landing-box > *:nth-child(6) { animation-delay: 0.30s; }

.landing-privacy-link { margin: 4px 0 0; text-align: center; font-size: 0.75rem; }
.landing-privacy-link a { color: var(--text-muted); text-decoration: none; opacity: 0.7; }
.landing-privacy-link a:hover { opacity: 1; text-decoration: underline; }

/* Pick card glow on selected */
.pick-card.selected::after {
  content: '';
  position: absolute; inset: -6px; border-radius: 14px;
  background: radial-gradient(ellipse, rgba(52,72,255,0.35) 0%, transparent 70%);
  animation: selectedGlow 1.8s ease-in-out infinite;
  pointer-events: none; z-index: -1;
}
@keyframes selectedGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.1); }
}

/* New round button pulse */
.btn-new-round {
  animation: btnPulse 2s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(52,72,255,0.25); }
  50%       { box-shadow: 0 4px 28px rgba(52,72,255,0.55); }
}
