/* ── Discover blank slate: "Start matching" ──────────────────────────────── */

.ms {
  --ms-mint: #7bf0b4;
  --ms-teal: #4aadc8;
  --ms-blue: #1969dd;
  position: relative;
  margin-top: 8px;
  padding: 28px 20px 24px;
  text-align: center;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(123, 240, 180, 0.16), transparent 60%),
    radial-gradient(90% 60% at 50% 100%, rgba(25, 105, 221, 0.12), transparent 70%),
    var(--color-surface);
  border: 1px solid var(--row-border);
  animation: ms-rise 520ms cubic-bezier(.2, .8, .3, 1) both;
}

.ms [hidden] { display: none !important; }

.ms-stage { display: flex; justify-content: center; margin-bottom: 18px; }

.ms-radar {
  position: relative;
  width: min(72vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  isolation: isolate;
}

.ms-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(74, 173, 200, 0.28);
  inset: 0;
}
.ms-ring.r2 { inset: 17%; border-color: rgba(74, 173, 200, 0.22); }
.ms-ring.r3 { inset: 34%; border-color: rgba(123, 240, 180, 0.3); }

.ms-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(123, 240, 180, 0) 0deg, rgba(123, 240, 180, 0) 280deg, rgba(123, 240, 180, 0.38) 355deg, rgba(123, 240, 180, 0.6) 360deg);
  -webkit-mask: radial-gradient(circle, #000 69%, transparent 70%);
          mask: radial-gradient(circle, #000 69%, transparent 70%);
  animation: ms-spin 6s linear infinite;
  opacity: 0.55;
  transition: opacity 400ms ease;
}

.ms-pulse {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  border: 2px solid rgba(123, 240, 180, 0.55);
  opacity: 0;
}

.ms-core {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ms-mint), var(--ms-teal) 50%, var(--ms-blue));
  box-shadow: 0 0 0 6px rgba(123, 240, 180, 0.14), 0 12px 40px rgba(25, 105, 221, 0.35);
  animation: ms-breathe 3.2s ease-in-out infinite;
  z-index: 3;
}
.ms-core img { width: 46%; height: auto; }

.ms-orbit {
  position: absolute;
  inset: 0;
  animation: ms-spin 38s linear infinite;
  z-index: 2;
}
.ms-orbiter {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transform: rotate(calc(var(--i) * 360deg / var(--n))) translateY(calc(min(72vw, 280px) * -0.41)) rotate(calc(var(--i) * -360deg / var(--n)));
  transition: transform 900ms cubic-bezier(.5, 0, .2, 1), filter 600ms ease;
  filter: blur(1.5px) saturate(0.9);
}
.ms-orbiter img, .ms-orbiter-initials { width: 100%; height: 100%; object-fit: cover; animation: ms-counter-spin 38s linear infinite; }
.ms-orbiter-initials { display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; }

.ms-blips { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ms-blip {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--ms-mint);
  box-shadow: 0 0 0 0 rgba(123, 240, 180, 0.7);
  animation: ms-blip 1.4s cubic-bezier(.2, .8, .3, 1) both;
}
.ms-blip.is-match { background: #ffd166; width: 12px; height: 12px; margin: -6px 0 0 -6px; }

.ms-title {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 auto 8px;
  max-width: 320px;
}
.ms-title .ms-grad {
  background: linear-gradient(90deg, #10b981, var(--ms-teal), var(--ms-blue), #10b981);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: ms-shimmer-text 4s linear infinite;
}
.ms-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-tertiary);
  max-width: 300px;
  margin: 0 auto 18px;
}

.ms-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 auto 14px;
  max-width: 340px;
}
.ms-stats > div {
  padding: 10px 6px;
  border-radius: 16px;
  background: var(--row-hover);
  border: 1px solid var(--row-border);
}
.ms-stats b {
  display: block;
  font-size: 22px;
  font-weight: 850;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ms-stats span { font-size: 11px; color: var(--text-tertiary); }
.ms-stats .is-bump { animation: ms-bump 380ms ease-out; }

.ms-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--row-hover);
  overflow: hidden;
  max-width: 340px;
  margin: 0 auto 10px;
}
.ms-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ms-mint), var(--ms-teal), var(--ms-blue));
  transition: width 400ms ease;
}
.ms-status { font-size: 13px; color: var(--text-tertiary); min-height: 18px; margin-bottom: 14px; }

.ms-cta {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 340px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  background: linear-gradient(135deg, var(--ms-mint) 0%, var(--ms-teal) 50%, var(--ms-blue) 100%);
  box-shadow: 0 10px 32px rgba(25, 105, 221, 0.35);
  animation: ms-glow 2.4s ease-in-out infinite;
  transition: transform 160ms ease, opacity 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.ms-cta:active { transform: scale(0.96); }
.ms-cta:disabled { cursor: default; opacity: 0.9; animation: none; }
.ms-cta-shine {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: ms-shine 2.8s ease-in-out infinite;
}
.ms-cta-label { position: relative; }

.ms-alt { margin-top: 12px; font-size: 13px; }
.ms-alt a { color: var(--text-tertiary); text-decoration: underline; text-underline-offset: 3px; }

.ms-suggestions { margin-top: 22px; text-align: left; }
.ms-suggestions-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 4px 10px;
}
.ms-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 18px;
  background: var(--row-hover);
  border: 1px solid var(--row-border);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
}
.ms-suggestion.is-in { animation: ms-pop-in 520ms cubic-bezier(.2, .9, .3, 1.2) forwards; }
.ms-suggestion-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; }
.ms-suggestion-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}
.ms-suggestion-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ms-suggestion-text { display: flex; flex-direction: column; min-width: 0; }
.ms-suggestion-name { font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-suggestion-handle { font-weight: 500; color: var(--text-tertiary); font-size: 12px; }
.ms-suggestion-reason { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-suggestion-empty { font-size: 13px; color: var(--text-tertiary); text-align: center; padding: 12px; opacity: 0; }
.ms-suggestion-empty.is-in { animation: ms-pop-in 400ms ease forwards; }
.ms-connect {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ms-mint), var(--ms-teal) 50%, var(--ms-blue));
  box-shadow: 0 2px 10px rgba(25, 105, 221, 0.3);
  transition: transform 140ms ease, background 250ms ease;
}
.ms-connect:active { transform: scale(0.92); }
.ms-connect.is-done { background: rgba(16, 185, 129, 0.14); color: #10b981; box-shadow: none; }

/* Scanning: everything speeds up and reaches outward. */
.ms.is-scanning .ms-sweep { animation-duration: 1.6s; opacity: 1; }
.ms.is-scanning .ms-pulse { animation: ms-pulse 1.8s cubic-bezier(.2, .6, .3, 1) infinite; }
.ms.is-scanning .ms-orbit { animation-duration: 9s; }
.ms.is-scanning .ms-orbiter img, .ms.is-scanning .ms-orbiter-initials { animation-duration: 9s; }
.ms.is-scanning .ms-orbiter { filter: blur(0) saturate(1); }
.ms.is-scanning .ms-core { animation-duration: 1.1s; }

/* Matched: the orbit collapses in, the core bursts. */
.ms.is-matched .ms-sweep { opacity: 0; }
.ms.is-matched .ms-core { animation: ms-burst 900ms cubic-bezier(.2, .9, .3, 1.3) both; background: linear-gradient(135deg, #ffd166, #f78ca0 50%, #7bf0b4); }
.ms.is-matched .ms-orbiter { transform: rotate(calc(var(--i) * 360deg / var(--n))) translateY(calc(min(72vw, 280px) * -0.27)) rotate(calc(var(--i) * -360deg / var(--n))); filter: none; }
.ms.is-matched .ms-pulse { animation: ms-pulse 900ms ease-out 3; border-color: rgba(255, 209, 102, 0.8); }

@keyframes ms-rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ms-spin { to { transform: rotate(360deg); } }
@keyframes ms-counter-spin { to { transform: rotate(-360deg); } }
@keyframes ms-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes ms-pulse { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2.9); opacity: 0; } }
@keyframes ms-blip {
  0% { transform: scale(0); box-shadow: 0 0 0 0 rgba(123, 240, 180, 0.8); }
  30% { transform: scale(1.6); }
  60% { transform: scale(1); box-shadow: 0 0 0 12px rgba(123, 240, 180, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(123, 240, 180, 0); }
}
@keyframes ms-glow { 0%, 100% { box-shadow: 0 10px 32px rgba(25, 105, 221, 0.35); } 50% { box-shadow: 0 10px 44px rgba(16, 185, 129, 0.55); } }
@keyframes ms-shine { 0% { left: -50%; } 60%, 100% { left: 130%; } }
@keyframes ms-shimmer-text { to { background-position: -200% 0; } }
@keyframes ms-bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); color: #10b981; } 100% { transform: scale(1); } }
@keyframes ms-pop-in { to { opacity: 1; transform: none; } }
@keyframes ms-burst { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1.15); } }

/* ── App-wide micro-interactions ─────────────────────────────────────────── */

.action-btn:active, .btn-primary:active, .btn-secondary:active, .btn-ghost:active { transform: scale(0.94); }

@media (prefers-reduced-motion: reduce) {
  .ms, .ms * { animation: none !important; transition: none !important; }
  .ms-suggestion, .ms-suggestion-empty { opacity: 1; transform: none; }
}
