.nxbc-wrap {
  max-width: 760px;
  margin: 40px auto;
  padding: 28px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 10, 14, 0.78);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.nxbc-title {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
  color: #ffffff !important;
}

.nxbc-subtitle {
  margin: 12px auto 24px;
  max-width: 640px;
  color: #d1d5db;
  font-size: 18px;
}

.nxbc-open {
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  background: #22c55e;
  color: #03130a;
  font-weight: 800;
  cursor: pointer;
}

.nxbc-open:hover {
  background: #16a34a;
}

.nxbc-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  padding: 24px 12px 48px;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nxbc-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.nxbc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.nxbc-dialog {
  position: relative;
  margin: 0 auto;
  width: min(760px, calc(100% - 24px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #111318;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px;
  color: #fff;
  text-align: left;
}

.nxbc-dialog h3 {
  margin: 0;
  font-size: 28px;
}

.nxbc-dialog p {
  margin: 8px 0 18px;
  color: #c4cad7;
}

.nxbc-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.nxbc-form label {
  display: block;
  margin-bottom: 12px;
}

.nxbc-form span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.nxbc-form input,
.nxbc-form select,
.nxbc-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  -webkit-text-fill-color: #fff;
  padding: 12px;
}

.nxbc-form input::placeholder,
.nxbc-form textarea::placeholder {
  color: #aeb7c7;
}

.nxbc-form select option {
  color: #111827;
  background: #ffffff;
}

.nxbc-form input:focus,
.nxbc-form select:focus,
.nxbc-form textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.nxbc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nxbc-submit {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: #22c55e;
  color: #04150c;
  font-weight: 800;
  cursor: pointer;
}

.nxbc-msg {
  margin-top: 12px;
  font-weight: 700;
  color: #d1d5db;
}

.nxbc-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

body.nxbc-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .nxbc-title {
    font-size: 30px;
  }

  .nxbc-subtitle {
    font-size: 16px;
  }

  .nxbc-grid {
    grid-template-columns: 1fr;
  }
}

/* --- FIX: modal always inside viewport --- */
.nxbc-wrap {
  overflow: visible !important;
}

.nxbc-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px 12px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.nxbc-modal.is-open {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.nxbc-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.65) !important;
}

.nxbc-dialog {
  position: relative !important;
  z-index: 2 !important;
  width: min(760px, calc(100% - 24px)) !important;
  margin: 0 !important;
  max-height: calc(100vh - 48px) !important;
  overflow-y: auto !important;
  border-radius: 14px !important;
}

@media (max-width: 768px) {
  .nxbc-modal {
    align-items: flex-start !important;
    padding-top: 14px !important;
  }

  .nxbc-dialog {
    margin: 0 0 14px !important;
    max-height: calc(100vh - 28px) !important;
  }
}
