/* Register Modal Styles - using same as deposit modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px; /* Reduced from 20px */
}

.modal-content {
  background: #0a0e27;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  max-width: 400px; /* Reduced from 500px */
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px; /* Reduced from 24px */
}

.modal-title {
  font-size: 20px; /* Reduced from 24px */
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #ffffff;
}

/* Checkbox field styling */
.checkbox-field {
  margin-top: 8px;
  margin-bottom: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  cursor: pointer;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.checkbox-text {
  flex: 1;
  user-select: none;
}

.terms-link {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.terms-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Sign in link at bottom of registration form */
.register-signin-link {
  margin-top: 12px; /* Reduced from 16px */
  text-align: center;
  font-size: 12px; /* Reduced from 14px */
  color: #94a3b8;
}

.signin-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.signin-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Minimized register modal styles */
#registerModal .modal-content {
  padding: 16px; /* Reduced from 20px */
}

#registerModal .field {
  margin-bottom: 14px; /* Reduced from 20px */
}

#registerModal .field label {
  font-size: 12px; /* Reduced from 14px */
  margin-bottom: 6px; /* Reduced from 8px */
}

#registerModal .input-with-icon input {
  padding: 10px 14px 10px 40px; /* Reduced padding */
  font-size: 13px; /* Reduced from 14px */
  border-radius: 10px; /* Reduced from 12px */
}

#registerModal .input-icon {
  left: 10px; /* Reduced from 12px */
  font-size: 16px; /* Reduced from 18px */
}

#registerModal .password-toggle {
  right: 10px; /* Reduced from 12px */
  font-size: 16px; /* Reduced from 18px */
}

#registerModal .checkbox-label {
  font-size: 12px; /* Reduced from 14px */
  gap: 8px; /* Reduced from 12px */
}

#registerModal .checkbox-label input[type="checkbox"] {
  width: 16px; /* Reduced from 18px */
  height: 16px; /* Reduced from 18px */
  min-width: 16px;
}

#registerModal .btn-primary {
  padding: 12px 20px; /* Reduced from 14px 24px */
  font-size: 14px; /* Reduced from 16px */
  margin-top: 8px;
}

/* Split create-account screen — Cryptonic green (scoped to #registerModal) */
#registerModal.modal-overlay,
#registerModal.cnh-auth-overlay {
  padding: 0 !important;
  margin: 0 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  background: #050806 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 4000 !important;
}

#registerModal .modal-content,
#registerModal .cnh-auth-shell {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr) !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: #050806 !important;
}

#registerModal .cnh-auth-promo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 7vw, 80px);
  color: #052e16;
  background:
    radial-gradient(ellipse 80% 70% at 20% 20%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(160deg, #115e59 0%, #14b8a6 48%, #5eead4 100%);
}

#registerModal .cnh-auth-promo__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 28px;
}

#registerModal .cnh-auth-promo__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#registerModal .cnh-auth-promo__mark svg {
  width: 22px;
  height: 22px;
}

#registerModal .cnh-auth-promo__title {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

#registerModal .cnh-auth-promo__lead {
  margin: 0 0 28px;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

#registerModal .cnh-auth-promo__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#registerModal .cnh-auth-promo__list li {
  position: relative;
  padding-left: 28px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

#registerModal .cnh-auth-promo__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

#registerModal .cnh-auth-pane {
  position: relative;
  background: #070b08;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

#registerModal .cnh-auth-close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  z-index: 2;
  width: 40px !important;
  height: 40px !important;
  font-size: 28px !important;
  color: #94a3b8 !important;
}

#registerModal .cnh-auth-pane__inner {
  width: 100%;
  max-width: 400px;
}

#registerModal .cnh-auth-pane__title {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

#registerModal .cnh-auth-pane__sub {
  margin: 0 0 28px;
  color: #94a3b8;
  font-size: 14px;
}

#registerModal .field {
  margin-bottom: 16px !important;
}

#registerModal .field label {
  display: block;
  font-size: 13px !important;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px !important;
}

#registerModal .input-with-icon input {
  width: 100%;
  box-sizing: border-box;
  background: #101814 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 13px 44px 13px 42px !important;
  font-size: 14px !important;
}

#registerModal .input-with-icon input::placeholder {
  color: #64748b;
}

#registerModal .input-with-icon input:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

#registerModal .checkbox-label {
  font-size: 13px !important;
  color: #94a3b8;
  align-items: flex-start;
}

#registerModal .checkbox-label input[type="checkbox"] {
  accent-color: #14b8a6 !important;
}

#registerModal .terms-link {
  color: #2dd4bf !important;
  font-weight: 700;
}

#registerModal .cnh-auth-submit,
#registerModal .btn-primary {
  width: 100%;
  margin-top: 8px !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 14px 22px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #052e16 !important;
  background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 100%) !important;
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.28);
}

#registerModal .register-signin-link {
  margin-top: 18px !important;
  font-size: 14px !important;
  color: #94a3b8;
}

#registerModal .signin-link {
  color: #2dd4bf !important;
  font-weight: 700;
}

@media (max-width: 860px) {
  #registerModal .modal-content,
  #registerModal .cnh-auth-shell {
    grid-template-columns: 1fr !important;
    overflow-y: auto !important;
  }

  #registerModal .cnh-auth-promo {
    display: none !important;
  }

  #registerModal .cnh-auth-pane {
    padding: 24px 20px 40px;
    align-items: flex-start;
    min-height: 100dvh;
  }
}
