body {
  background: #f4f8fb;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(49, 37, 37, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.modal[style*="flex"],
.modal[style*="block"] {
  display: flex !important;
}

/* Modal Card */
.modal-content.modal-card {
  max-width: 450px;
  width: 95%;
  margin: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 2rem 0 2.5rem 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

/* Logo */
.modal-card-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 1.2rem auto;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 0.5rem;
}

/* Title and Subtitle */
.modal-card-title {
  margin: 0.5rem 0 0 0;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.modal-card-subtitle {
  margin: 0.8rem 0 1.5rem 0;
  color: #666;
  font-size: 1rem;
  text-align: center;
  font-weight: 400;
  line-height: 1.5;
  padding: 0 2rem;
}

/* OTP Input Container */
.otp-input-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 0 2rem;
}

/* OTP Inputs */
.otp-input {
  width: 45px;
  height: 52px;
  text-align: center;
  font-size: 1.5rem;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  background: #f8f9fa;
  color: #1a1a1a;
  transition: all 0.2s ease;
  font-weight: 500;
}

.otp-input:focus {
  outline: none;
  border-color: #0a57ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 87, 255, 0.1);
}

/* Button */
.submit-button,
.modal-green-btn {
  width: 85%;
  margin: 0 auto;
  display: block;
  padding: 0.85rem 0;
  border: none;
  border-radius: 10px;
  background: #7338A0;
  color: #fff;
  font-weight: 500;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(10, 87, 255, 0.2);
}

.submit-button:hover,
.modal-green-btn:hover {
  background: #581845;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 87, 255, 0.25);
}

/* Switch Prompt */
.switch-prompt {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  text-align: center;
  color: #666;
  font-weight: 400;
}

.switch-prompt a {
  text-decoration: none;
  font-weight: 500;
  margin-left: 0.3rem;
  transition: color 0.2s;
}

.switch-prompt a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Close Button */
.close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  color: #666;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.close-button:hover {
  color: #1a1a1a;
  background: #f0f0f0;
}

/* Notification */
#otpMsg.notification {
  display: none;
  margin: 1rem auto 0 auto;
  width: 85%;
  background: #eaf6ea;
  color: #008321;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
}

#otpMsg.notification.active {
  display: block;
}

/* Responsive */
@media (max-width: 480px) {
  .modal-content.modal-card {
    padding: 1.5rem 0 2rem 0;
  }

  .modal-card-title {
    font-size: 1.6rem;
  }

  .modal-card-subtitle {
    font-size: 0.95rem;
    padding: 0 1.5rem;
  }

  .otp-input-container {
    gap: 8px;
    padding: 0 1.5rem;
  }

  .otp-input {
    width: 40px;
    height: 48px;
    font-size: 1.4rem;
  }

  .submit-button,
  .modal-green-btn {
    width: 90%;
    padding: 0.8rem 0;
    font-size: 1.05rem;
  }
}

/* OTP Verification Modal Specific */
#otpVerificationModal.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

#otpVerificationModal.modal[style*="flex"],
#otpVerificationModal.modal[style*="block"] {
  display: flex !important;
}

#otpVerificationModal .modal-content {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(12, 77, 162, 0.13);
  padding: 2rem;
  width: 95%;
  max-width: 420px;
  position: relative;
  margin: 1.5rem auto;
  animation: modalFade 0.3s ease-out;
}

#otpVerificationModal .modal-card-image {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: block;
  border-radius: 50%;
  background: #f4f8fb;
  object-fit: contain;
}

#otpVerificationModal .modal-card-title {
  text-align: center;
  color: #333;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

#otpVerificationModal .modal-card-subtitle {
  text-align: center;
  color: #666;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

#otpVerificationModal .otp-input-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
}

#otpVerificationModal .otp-input {
  width: 45px;
  height: 45px;
  border: 2px solid #ddd;
  border-radius: 8px;
  text-align: center;
  font-size: 1.25rem;
  color: #333;
  background: #fff;
  transition: all 0.2s ease;
}

#otpVerificationModal .otp-input:focus {
  border-color: #7338A0;
  outline: none;
  box-shadow: 0 0 0 2px rgba(115, 56, 160, 0.25);
}

#otpVerificationModal .submit-button {
  background: #7338A0;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 200px;
}

#otpVerificationModal .submit-button:hover {
  background: #581845;
  transform: translateY(-1px);
}

#otpVerificationModal .switch-prompt {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
  font-size: 0.875rem;
}

#otpVerificationModal .switch-prompt a {
  color: #7338A0;
  text-decoration: none;
  font-weight: 500;
  margin-left: 0.25rem;
}

#otpVerificationModal .switch-prompt a:hover {
  color: #581845;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 480px) {
  #otpVerificationModal .modal-content {
    padding: 1.5rem;
  }

  #otpVerificationModal .otp-input {
    width: 40px;
    height: 40px;
    font-size: 1.125rem;
  }

  #otpVerificationModal .modal-card-title {
    font-size: 1.25rem;
  }

  #otpVerificationModal .modal-card-subtitle {
    font-size: 0.8125rem;
  }
}