/* Modal de invitación: fondo del servidor + tarjeta con la info real (se abre al tocar un enlace de invitación) */
.ivm-overlay {
  position: fixed; inset: 0; z-index: 5200; display: flex; align-items: center; justify-content: center;
  padding: 14px; box-sizing: border-box; background: rgba(0, 0, 0, .68);
  opacity: 0; transition: opacity .16s ease; -webkit-tap-highlight-color: transparent;
}
.ivm-overlay.open { opacity: 1; }
.ivm-panel {
  position: relative; width: min(1000px, 100%); height: min(940px, 100%); max-height: 100%;
  box-sizing: border-box; border-radius: 22px; overflow: hidden; padding: 28px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1100px 560px at 18% 8%, rgba(65, 60, 221, .38), transparent 62%), linear-gradient(160deg, #1b1d2b, #0d0e13);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  transform: scale(.96); transition: transform .18s ease;
}
.ivm-overlay.open .ivm-panel { transform: scale(1); }
.ivm-panel.has-splash { background-color: #fff; }
.ivm-panel.al-left  { justify-content: flex-start; }
.ivm-panel.al-right { justify-content: flex-end; }
.ivm-close {
  position: absolute; top: 14px; right: 14px; width: 50px; height: 50px; border-radius: 50%; border: 0;
  background: rgba(28, 28, 30, .86); color: #fff; cursor: pointer; padding: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; transition: background .15s, transform .1s;
}
.ivm-close:hover { background: rgba(48, 48, 52, .95); }
.ivm-close:active { transform: scale(.94); }
.ivm-close svg { width: 24px; height: 24px; }
.ivm-card {
  width: min(700px, 100%); box-sizing: border-box; padding: 38px 34px 34px; border-radius: 28px;
  background: rgba(35, 35, 36, .97); color: #fff; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .38);
}
.ivm-icon {
  width: 100px; height: 100px; border-radius: 50%; overflow: hidden; background: #17181b; color: #c9cbd3;
  display: flex; align-items: center; justify-content: center; font-size: 2.7rem; font-weight: 500; flex-shrink: 0;
}
.ivm-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ivm-icon.bad { background: #3a2428; color: #f23f43; font-size: 3rem; }
.ivm-sub { margin-top: 22px; font-size: 1.05rem; font-weight: 500; color: #eceef2; }
.ivm-name { margin-top: 18px; max-width: 100%; font-size: 1.7rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.ivm-stats { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 22px; color: #a9adb8; font-size: 1.02rem; }
.ivm-stats span { display: inline-flex; align-items: center; gap: 8px; }
.ivm-dot { width: 12px; height: 12px; border-radius: 50%; background: #8b8d99; display: inline-block; }
.ivm-dot.on { background: #23a559; }
.ivm-msg { margin-top: 10px; color: #a9adb8; font-size: 1rem; line-height: 1.4; }
.ivm-btn {
  margin-top: 26px; min-height: 50px; padding: 0 30px; border: 0; border-radius: 10px; cursor: pointer;
  background: #413cdd; color: #fff; font-family: inherit; font-size: 1.02rem; font-weight: 700;
  transition: background .15s, transform .1s;
}
.ivm-btn:hover:not(:disabled) { background: #4c47e6; }
.ivm-btn:active:not(:disabled) { transform: scale(.98); }
.ivm-btn:disabled { opacity: .6; cursor: default; }
.ivm-btn.ghost { background: #3a3d44; }
.ivm-btn.ghost:hover:not(:disabled) { background: #464a52; }
.ivm-tag { position: absolute; left: 16px; bottom: 14px; padding: 5px 10px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .78rem; font-weight: 600; }
.ivm-sk { background: linear-gradient(90deg, #2a2d35, #353942, #2a2d35); background-size: 200% 100%; animation: ivmShimmer 1.2s infinite linear; border-radius: 10px; }
.ivm-sk.c { width: 100px; height: 100px; border-radius: 50%; }
.ivm-sk.l { width: 180px; height: 18px; margin-top: 22px; }
.ivm-sk.t { width: 240px; height: 28px; margin-top: 18px; }
@keyframes ivmShimmer { to { background-position: -200% 0; } }
@media (max-width: 640px) {
  .ivm-overlay { padding: 22px 14px; }
  .ivm-panel { height: min(86dvh, 100%); padding: 20px 14px; border-radius: 20px; }
  .ivm-panel.al-left, .ivm-panel.al-right { justify-content: center; }
  .ivm-card { padding: 30px 20px 26px; border-radius: 24px; }
  .ivm-icon { width: 92px; height: 92px; font-size: 2.4rem; }
  .ivm-name { font-size: 1.5rem; }
  .ivm-close { width: 46px; height: 46px; top: 12px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .ivm-overlay, .ivm-panel { transition: none; } }
