* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
@media (min-width: 769px) {
  .body {
    position: relative;
  }
  .logo {
    position: absolute;
    top: 40px;
    left: 20px;
  }
}

body {
  background-color: #000000;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  width: 100%;
  text-align: left;
}

.logo {
  height: 54px;
  text-align: left;
}

h1 {
  font-family: 'Georgia', serif;
  font-size: 2.8rem;
  color: #ffffff;
  margin-bottom: 16px;
  text-align: center;
}

.subtitle {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 32px;
  text-align: center;
  max-width: 900px;
}

.form-container {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 1080px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.section-number {
  background-color: #2d3142;
  color: white;
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-right: 12px;
}

.section-title {
  font-size: 0.8rem;
  color: #6b6b83;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  padding-right: 10px;
}

.line {
  width: 100%;
  height: 1px;
  border-bottom: 1px solid #e0e0e0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group input.error,
select.error,
input.error {
  border-color: #e74c3c;
  /* 一个醒目的红色 */
}

label {
  display: block;
  font-size: 1rem;
  color: #4a4a68;
  margin-bottom: 8px;
}

label .required {
  color: #d9534f;
}

input,
select {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid #d0d0d0;
  border-radius: 10px;
  font-size: 1.1rem;
  color: #2d2d2d;
  background-color: white;
}

input:focus,
select:focus {
  outline: none;
  border-color: #c9a84c;
  border-width: 2px;
}

input::placeholder,
select {
  /* color: #9a9a9a; */
}

.phone-input-group {
  display: flex;
  gap: 8px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.captcha-row #code {
  width: 180px;
  flex: 0 0 180px;
}

.captcha-img-wrapper {
  position: relative;
  width: 160px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
}

.captcha-img-wrapper.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.captcha-row #captchaImage {
  width: 160px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.captcha-row #refreshCaptchaBtn {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 10px;
  border: 2px solid #d0d0d0;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4a4a68;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.captcha-row #refreshCaptchaBtn:hover,
.captcha-row #refreshCaptchaBtn:focus {
  border-color: #c9a84c;
  color: #c9a84c;
  outline: none;
}

.captcha-row #refreshCaptchaBtn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.captcha-row #refreshCaptchaBtn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s;
}

.captcha-row #refreshCaptchaBtn.spinning svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.phone-input-group select {
  width: auto;
  min-width: 200px;
}

.select2-container--default .select2-selection--single {
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--default .select2-selection--single {
  border-radius: 10px !important;
  border: 1px solid #d0d0d0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 12px !important;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background-color: #2d3142;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: #1f2230;
}

.footer-text {
  margin-top: 24px;
  font-size: 0.9rem;
  color: #6b6b83;
  text-align: center;
  line-height: 1.6;
}

.footer-text a {
  color: #222222;
  text-decoration: underline;
}

@media (max-width: 768px) {
  body {
    padding: 30px 15px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .form-container {
    padding: 30px;
  }

  .form-group.row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    padding: 20px 10px;
  }

  h1 {
    font-size: 1.9rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .form-container {
    padding: 20px;
  }

  .phone-input-group {
    flex-direction: column;
  }

  .captcha-row {
    align-items: stretch;
  }

  .captcha-row #code,
  .captcha-row #captchaImage,
  .captcha-row #refreshCaptchaBtn {
    width: 100%;
    flex: 1 1 100%;
  }

  .phone-input-group select {
    width: 100%;
  }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.loader div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 4px solid #2d3142;
  border-radius: 50%;
  animation: loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #2d3142 transparent transparent transparent;
}

.loader div:nth-child(1) {
  animation-delay: -0.45s;
}

.loader div:nth-child(2) {
  animation-delay: -0.3s;
}

.loader div:nth-child(3) {
  animation-delay: -0.15s;
}

/* Custom Select Styles */
.select-wrapper {
  position: relative;
  width: 100%;
  /* Adapt to form container */
}

#countrySearchInput {
  width: 100%;
  height: 48px;
  padding: 0 10px;
  border: 2px solid #d0d0d0;
  border-radius: 10px;
  box-sizing: border-box;
  outline: none;
  font-size: 1.1rem;
}

#countrySearchInput.error {
  border-color: #e74c3c;
}

#countrySearchInput:focus {
  border-color: #c9a84c;
}

.options-list {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  background: #fff;
  display: none;
  /* Hidden by default */
  z-index: 999;
}

.option-item {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
}

.option-item:hover {
  background-color: #f5f7fa;
  color: #222222;
  font-weight: 600;
}

.highlight {
  color: #222222;
  font-weight: bold;
}

.area-code-wrapper {
  width: 150px;
  margin-right: 8px;
  flex-shrink: 0;
}

.area-code-wrapper .options-list {
  width: 280px;
  /* Wider dropdown for code and city */
}

@keyframes loader {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

