.reg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 16px;
}

.reg-backdrop--open {
  opacity: 1;
  visibility: visible;
}

.reg-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(20, 27, 45, 0.92);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 24px;
  padding: 40px 32px 32px;
  box-shadow:
    0 0 60px rgba(0, 212, 255, 0.12),
    0 24px 64px rgba(0, 0, 0, 0.5);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.reg-backdrop--open .reg-modal {
  transform: translateY(0) scale(1);
}

.reg-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8B9AAF;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.reg-close:hover {
  background: rgba(255, 77, 106, 0.15);
  border-color: rgba(255, 77, 106, 0.3);
  color: #FF4D6A;
}

.reg-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #fff;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.2;
}

.reg-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #8B9AAF;
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

.reg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reg-row {
  display: flex;
  gap: 12px;
}

.reg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.reg-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #8B9AAF;
  letter-spacing: 0.3px;
}

.reg-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.reg-input::placeholder {
  color: #4A5568;
}

.reg-input:focus {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.reg-input--error {
  border-color: rgba(255, 77, 106, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 77, 106, 0.1);
}

.reg-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.reg-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #00D4FF;
  flex-shrink: 0;
  cursor: pointer;
}

.reg-consent-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #8B9AAF;
  line-height: 1.5;
}

.reg-error {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #FF4D6A;
  text-align: center;
  padding: 10px 16px;
  background: rgba(255, 77, 106, 0.08);
  border: 1px solid rgba(255, 77, 106, 0.15);
  border-radius: 10px;
}

.reg-error a {
  color: #00D4FF;
  text-decoration: underline;
}

.reg-submit {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #00D4FF, #B347FF);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.reg-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
  filter: brightness(1.1);
}

.reg-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* Success state */
.reg-success {
  text-align: center;
  padding: 16px 0;
}

.reg-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(0, 255, 148, 0.1);
  border: 2px solid rgba(0, 255, 148, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  animation: reg-scale-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reg-success-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  margin-bottom: 8px;
}

.reg-success-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #8B9AAF;
  line-height: 1.6;
  margin-bottom: 24px;
}

.reg-success-text strong {
  color: #00D4FF;
  font-weight: 600;
}

.reg-success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reg-btn-cabinet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #00D4FF, #B347FF);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.reg-btn-cabinet:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.25);
}

.reg-btn-close {
  padding: 12px 24px;
  background: transparent;
  color: #8B9AAF;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reg-btn-close:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@keyframes reg-scale-in {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Scrollbar inside modal */
.reg-modal::-webkit-scrollbar {
  width: 4px;
}

.reg-modal::-webkit-scrollbar-track {
  background: transparent;
}

.reg-modal::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.2);
  border-radius: 2px;
}

@media (max-width: 480px) {
  .reg-modal {
    padding: 32px 20px 24px;
    border-radius: 20px;
  }

  .reg-title {
    font-size: 24px;
  }

  .reg-row {
    flex-direction: column;
    gap: 16px;
  }
}
