.replica-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(14px);
  animation: replica-fade-in 160ms ease-out;
}

.replica-modal {
  width: min(460px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 80px -30px rgba(15, 23, 42, 0.45);
  color: #111827;
  overflow: hidden;
  animation: replica-pop-in 180ms ease-out;
}

.dark .replica-modal {
  border-color: rgba(55, 65, 81, 0.72);
  background: rgba(31, 41, 55, 0.9);
  color: #f9fafb;
}

.replica-modal__header,
.replica-modal__body,
.replica-modal__footer {
  padding: 20px;
}

.replica-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
}

.dark .replica-modal__header {
  border-bottom-color: rgba(75, 85, 99, 0.72);
}

.replica-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.replica-modal__close,
.replica-button {
  border: 0;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.replica-modal__close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(243, 244, 246, 0.9);
  color: inherit;
  font-size: 22px;
  line-height: 1;
}

.dark .replica-modal__close {
  background: rgba(55, 65, 81, 0.9);
}

.replica-modal__close:hover,
.replica-button:hover {
  opacity: 0.82;
}

.replica-modal__close:active,
.replica-button:active {
  transform: scale(0.97);
}

.replica-empty {
  display: grid;
  place-items: center;
  min-height: 170px;
  text-align: center;
  color: #6b7280;
}

.dark .replica-empty {
  color: #9ca3af;
}

.replica-empty strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-size: 16px;
}

.dark .replica-empty strong {
  color: #f9fafb;
}

.replica-button {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 14px;
}

.dark .replica-button {
  background: #f9fafb;
  color: #111827;
}

.replica-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 60px -30px rgba(15, 23, 42, 0.55);
  color: #111827;
  padding: 12px 14px;
  font-size: 13px;
  animation: replica-pop-in 180ms ease-out;
}

.dark .replica-toast {
  border-color: rgba(75, 85, 99, 0.72);
  background: rgba(31, 41, 55, 0.92);
  color: #f9fafb;
}

@keyframes replica-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes replica-pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .replica-modal-backdrop {
    align-items: flex-end;
    padding: 12px;
  }

  .replica-modal {
    border-radius: 24px;
  }
}
