.monx-registration {
  --monx-rf-bg: linear-gradient(132deg, #03206f 0%, #005bc8 68%, #1876df 100%);
  --monx-rf-card: rgba(255, 255, 255, 0.08);
  --monx-rf-text: #f5f8ff;
  --monx-rf-muted: rgba(241, 246, 255, 0.88);
  --monx-rf-input: #f1f1f3;
  --monx-rf-input-text: #2b3648;
  --monx-rf-focus: #72c4ff;
  --monx-rf-button: #c7e6ff;
  --monx-rf-button-text: #004c9e;
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: clamp(20px, 2.4vw, 34px);
  background: var(--monx-rf-bg);
  color: var(--monx-rf-text);
  box-shadow: 0 28px 52px rgba(3, 21, 73, 0.28);
}

.monx-registration::before,
.monx-registration::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0.5px);
  pointer-events: none;
}

.monx-registration::before {
  width: 420px;
  height: 420px;
  left: -180px;
  top: -180px;
  background: radial-gradient(circle, rgba(82, 173, 255, 0.28) 0%, rgba(82, 173, 255, 0) 70%);
}

.monx-registration::after {
  width: 280px;
  height: 280px;
  right: -120px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(195, 235, 255, 0.22) 0%, rgba(195, 235, 255, 0) 72%);
}

.monx-registration {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.55fr);
  gap: clamp(18px, 3vw, 42px);
}

.monx-registration__left,
.monx-registration__right {
  position: relative;
  z-index: 1;
}

.monx-registration__title {
  margin: 0;
  max-width: 9ch;
  line-height: 1.03;
  font-size: clamp(36px, 4vw, 66px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.monx-registration__description {
  margin: 22px 0 0;
  max-width: 35ch;
  line-height: 1.5;
  color: var(--monx-rf-muted);
  font-size: clamp(16px, 1.25vw, 28px);
}

.monx-registration__bot {
  margin-top: clamp(24px, 3.8vw, 70px);
  width: min(320px, 88%);
  height: auto;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.monx-registration__bot-image {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  transform-origin: 50% 78%;
  transform: translate3d(0, 22px, 0) rotate(-5deg) scale(0.92);
  opacity: 0;
  filter: drop-shadow(0 12px 26px rgba(2, 19, 70, 0.38));
  transition: opacity 0.45s ease;
}

.monx-registration.is-visible .monx-registration__bot-image {
  opacity: 1;
  animation: monx-rf-bot-enter 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.monx-registration.is-awake .monx-registration__bot-image {
  animation:
    monx-rf-bot-enter 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    monx-rf-bot-sway 2.9s ease-in-out 1.05s infinite;
}

.monx-registration:hover .monx-registration__bot-image {
  animation-duration: 0.95s, 2.3s;
}

@keyframes monx-rf-bot-enter {
  0% {
    transform: translate3d(-18px, 26px, 0) rotate(-9deg) scale(0.88);
  }
  60% {
    transform: translate3d(7px, -4px, 0) rotate(3.5deg) scale(1.01);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

@keyframes monx-rf-bot-sway {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-4deg);
  }
  50% {
    transform: translate3d(4px, -2px, 0) rotate(4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .monx-registration__bot-image,
  .monx-registration.is-visible .monx-registration__bot-image,
  .monx-registration.is-awake .monx-registration__bot-image,
  .monx-registration:hover .monx-registration__bot-image {
    animation: none !important;
    transform: none;
    opacity: 1;
  }
}

.monx-registration__form-title {
  margin: 0 0 10px;
  font-size: clamp(20px, 1.6vw, 30px);
  font-weight: 700;
  color: var(--monx-rf-text);
}

.monx-registration__form {
  display: grid;
  gap: 12px;
}

.monx-registration__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.monx-registration__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--monx-rf-text);
}

.monx-registration__field {
  position: relative;
}

.monx-registration__field input,
.monx-registration__field select,
.monx-registration__field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--monx-rf-input-text);
  background: var(--monx-rf-input);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.monx-registration__field input::placeholder,
.monx-registration__field textarea::placeholder {
  color: rgba(53, 63, 82, 0.62);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.monx-registration__field input:focus::placeholder,
.monx-registration__field textarea:focus::placeholder,
.monx-registration__field input:not(:placeholder-shown)::placeholder,
.monx-registration__field textarea:not(:placeholder-shown)::placeholder {
  opacity: 0;
  transform: translateX(4px);
}

.monx-registration__field textarea {
  min-height: 104px;
  resize: vertical;
}

.monx-registration__field input:focus,
.monx-registration__field select:focus,
.monx-registration__field textarea:focus {
  outline: none;
  border-color: #9dd8ff;
  background: #fbfdff;
  box-shadow:
    0 0 0 3px rgba(114, 196, 255, 0.38),
    0 0 22px rgba(96, 206, 255, 0.44);
}

.monx-registration__field:focus-within label {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(129, 213, 255, 0.56);
}

.monx-registration__field.is-invalid input,
.monx-registration__field.is-invalid select,
.monx-registration__field.is-invalid textarea {
  border-color: #ff7d7d;
  box-shadow:
    0 0 0 3px rgba(255, 125, 125, 0.22),
    0 0 18px rgba(255, 80, 80, 0.24);
}

.monx-registration__phone-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.monx-registration__country {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.monx-registration__privacy {
  margin: 2px 0 0;
  color: rgba(236, 243, 255, 0.94);
  font-size: 13px;
  line-height: 1.5;
}

.monx-registration__actions {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

.monx-registration__submit {
  border: none;
  border-radius: 999px;
  min-width: 148px;
  padding: 12px 20px;
  font-size: 17px;
  font-weight: 700;
  color: var(--monx-rf-button-text);
  background: var(--monx-rf-button);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.monx-registration__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(0, 34, 83, 0.28);
}

.monx-registration__submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.monx-registration__feedback {
  margin: 0;
  font-size: 14px;
  min-height: 20px;
  color: #d8f7e8;
}

.monx-registration__feedback.is-error {
  color: #ffd7d7;
}

.monx-registration-success-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  background: rgba(5, 13, 41, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: opacity 0.25s ease;
}

.monx-registration-success-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.monx-registration-success-popup__panel {
  width: min(560px, 100%);
  position: relative;
  border-radius: 18px;
  padding: 22px 20px 18px;
  background: linear-gradient(140deg, #f7fbff 0%, #e7f4ff 100%);
  border: 1px solid rgba(105, 197, 255, 0.45);
  box-shadow: 0 20px 44px rgba(7, 26, 75, 0.36);
  color: #0e2f5e;
  transform: translateY(14px) scale(0.98);
  animation: monx-rf-popup-in 0.28s ease forwards;
}

.monx-registration-success-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #4d607f;
  cursor: pointer;
}

.monx-registration-success-popup__icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(130deg, #13b05f 0%, #18c56f 100%);
  box-shadow: 0 10px 18px rgba(19, 176, 95, 0.35);
}

.monx-registration-success-popup__title {
  margin: 12px 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.monx-registration-success-popup__message {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

@keyframes monx-rf-popup-in {
  from {
    transform: translateY(14px) scale(0.98);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1024px) {
  .monx-registration {
    grid-template-columns: 1fr;
  }

  .monx-registration__title {
    max-width: 100%;
  }

  .monx-registration__bot {
    margin-top: 18px;
    width: min(280px, 80%);
    min-height: 140px;
  }
}

@media (max-width: 640px) {
  .monx-registration {
    border-radius: 20px;
    padding: 18px;
  }

  .monx-registration__title {
    font-size: clamp(28px, 10vw, 42px);
  }

  .monx-registration__row {
    grid-template-columns: 1fr;
  }

  .monx-registration__actions {
    justify-content: stretch;
  }

  .monx-registration__submit {
    width: 100%;
  }

  .monx-registration-success-popup__panel {
    padding: 20px 16px 16px;
  }

  .monx-registration-success-popup__title {
    font-size: 20px;
  }

  .monx-registration-success-popup__message {
    font-size: 15px;
  }
}
