.global-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(10, 22, 40, 0.56);
  backdrop-filter: blur(8px);
  scrollbar-width: none;
}

.global-modal-layer::-webkit-scrollbar {
  display: none;
}

.register-modal,
.feedback-modal {
  position: relative;
  width: min(900px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(246, 249, 255, 0.96) 0%, #fff 34%),
    #fff;
  box-shadow: 0 24px 80px rgba(10, 22, 40, 0.26);
}

.register-modal {
  max-height: calc(100vh - 48px);
  overflow: hidden;
  padding: 38px 48px 26px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F1F4F9;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(30, 91, 255, 0.1);
  transform: rotate(90deg);
}

.modal-close span {
  position: absolute;
  top: 17px;
  left: 10px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text-muted);
}

.modal-close span:first-child {
  transform: rotate(45deg);
}

.modal-close span:last-child {
  transform: rotate(-45deg);
}

.register-modal-header {
  margin-bottom: 22px;
  text-align: center;
}

.modal-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(30, 91, 255, 0.08);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
}

.register-modal-header h2,
.feedback-modal h2 {
  color: var(--color-text-primary);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
}

.register-modal-header p,
.feedback-modal p {
  margin-top: 10px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.register-modal-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.modal-field {
  display: grid;
  gap: 6px;
}

.modal-field span {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.modal-field input,
.modal-field textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  background: #fff;
  color: var(--color-text-primary);
  font: inherit;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.modal-field input {
  height: 46px;
  padding: 0 15px;
}

.modal-field textarea {
  min-height: 108px;
  padding: 13px 15px;
  resize: vertical;
}

.sms-code-control {
  display: flex;
  gap: 10px;
}

.sms-code-control input {
  min-width: 0;
  flex: 1;
}

.sms-code-button {
  flex: 0 0 auto;
  min-width: 108px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sms-code-button:hover {
  background: rgba(30, 91, 255, 0.08);
}

.sms-code-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.sms-code-message.is-error {
  color: var(--color-error);
}

.modal-field input::placeholder,
.modal-field textarea::placeholder {
  color: #9AA6B8;
}

.modal-field input:focus,
.modal-field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 91, 255, 0.08);
}

.modal-field.has-error input,
.modal-field.has-error textarea {
  border-color: var(--color-error);
}

.modal-field em {
  min-height: 16px;
  color: var(--color-error);
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
}

.modal-submit,
.feedback-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: all var(--transition-normal);
}

.modal-submit:hover,
.feedback-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(30, 91, 255, 0.28);
}

.feedback-layer {
  z-index: 2010;
}

.feedback-modal {
  width: min(420px, 100%);
  padding: 44px 36px 36px;
  overflow: hidden;
  text-align: center;
}

.success-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(0, 200, 83, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-mark svg {
  width: 58px;
  height: 58px;
}

.success-mark circle,
.success-mark path {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-mark circle {
  stroke-dasharray: 184;
  animation: draw-circle 0.6s ease-out both 0.14s;
}

.success-mark path {
  stroke-dasharray: 42;
  animation: draw-check 0.42s ease-out both 0.5s;
}

.feedback-confirm {
  width: 100%;
  margin-top: 26px;
}

@keyframes draw-circle {
  from {
    stroke-dashoffset: 184;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-check {
  from {
    stroke-dashoffset: 42;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 768px) {
  .global-modal-layer {
    align-items: flex-start;
    padding: 76px 16px 24px;
  }

  .register-modal {
    padding: 36px 22px 28px;
  }

  .register-modal-header h2,
  .feedback-modal h2 {
    font-size: 23px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .register-modal-header {
    text-align: left;
  }

  .modal-kicker {
    margin-right: 42px;
  }

  .feedback-modal {
    padding: 40px 24px 28px;
  }
}
