/* Google Fonts Import for consistent site-wide typography */
@import url('https://fonts.googleapis.com/css2?family=Philosopher:ital,wght@0,400;0,700;1,400;1,700&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #16213e 100%);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 40px 20px;
}

/* Twinkling and slowly rotating celestial stars matching the Home Page style */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #eee, transparent),
    radial-gradient(2px 2px at 40px 70px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 100px 150px, #ddd, transparent),
    radial-gradient(2.5px 2.5px at 180px 250px, #fff, transparent);
  background-size: 200px 200px, 350px 350px, 450px 450px, 600px 600px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
  transform-origin: center center;
  animation-name: twinkle, rotateStars;
  animation-duration: 6s, 150s;
  animation-timing-function: ease-in-out, linear;
  animation-iteration-count: infinite, infinite;
}

.iti__country-list .iti__flag,
.iti__country-name,
.iti .iti__selected-dial-code {
  color: #4a3e3d;
}

.iti {
  width: 100%;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 0.75;
  }
}

@keyframes rotateStars {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Container shared styles (Login & Signup Cards) - Styled for #F9F5EA theme */
.login-container,
.signup-container {
  background: #F9F5EA;
  border: 1px solid rgba(186, 121, 46, 0.25);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(15px);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 50px 40px;
}

.signup-container {
  width: 100%;
  max-width: 680px;
  padding: 50px 45px;
}

.login-container:hover,
.signup-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  border-color: #FD562D;
}

/* Double gold border tarot styling */
.login-container::before,
.signup-container::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(186, 121, 46, 0.15);
  border-radius: 18px;
  pointer-events: none;
}

/* Logo styling */
.logo {
  text-align: center;
  margin-bottom: 25px;
}

.logo img {
  width: 190px;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(186, 121, 46, 0.08));
}

.logo img:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 6px 12px rgba(186, 121, 46, 0.12));
}

/* Headings - Styled in elegant bronze gold */
.login-container h2,
.signup-container h2 {
  font-family: 'Philosopher', sans-serif;
  color: #b25106;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 30px 0;
  letter-spacing: 0.5px;
}

/* Form layouts */
.form-group {
  margin-bottom: 22px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #4a3e3d;
  margin-bottom: 8px;
}

/* Form Inputs and Selects - Styled in readable cream/dark */
input,
select,
.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(186, 121, 46, 0.3);
  background-color: #fffcf7;
  font-family: "Poppins", sans-serif;
  font-size: 14.5px;
  color: #4a3e3d;
  box-sizing: border-box;
  transition: all 0.3s ease;
  outline: none;
}

.iti__country-list {
  z-index: 99;
}

#verifyOtpForm input {
  text-align: center;
}

/* Specific placeholder text color */
input::placeholder {
  color: rgba(74, 62, 61, 0.5);
}

input:focus,
select:focus,
.form-control:focus {
  border-color: #FD562D !important;
  box-shadow: 0 0 0 4px rgba(253, 86, 45, 0.15);
  background-color: #ffffff;
}

/* Custom styling for select dropdown options */
select option {
  background-color: #ffffff;
  color: #4a3e3d;
}

/* Two-column rows in Signup */
.row {
  display: flex;
  gap: 20px;
  margin-bottom: 0px;
}

.row .form-group {
  flex: 1;
  min-width: 0;
}

/* Submission Button */
.btn {
  width: 100%;
  display: block;
  padding: 14px;
  background: linear-gradient(90deg, #FD562D 0%, #F0951A 100%);
  border: none;
  color: white;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(253, 86, 45, 0.2);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  box-sizing: border-box;
  margin: 10px 0 0 0;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(253, 86, 45, 0.35);
}

.btn:active {
  transform: translateY(0);
}

/* Extra links - Styled in readable gold/charcoal */
.extra-links {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #705e5c;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.extra-links p {
  margin: 0;
}

.extra-links a {
  color: #FD562D;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.extra-links a:hover {
  color: #F0951A;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .row {
    flex-direction: column;
    gap: 0;
  }

  .row .form-group {
    margin-bottom: 22px;
  }

  .signup-container {
    padding: 40px 25px;
  }

  .login-container {
    padding: 40px 25px;
  }
}

.is-invalid {
  border: 1px solid #dc3545 !important;
}

.invalid-feedback {
  display: block;
  color: #dc3545 !important;
  margin-top: 4px;
  font-size: 13px;
}

.text-danger {
  color: #dc3545 !important;
}

/* Password Toggle styles */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 46px;
  /* Space for the toggle button */
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease, transform 0.2s ease;
  z-index: 10;
  outline: none;
}

.password-toggle-btn:hover {
  background-color: rgba(186, 121, 46, 0.1);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.password-toggle-btn svg {
  stroke: rgba(74, 62, 61, 0.6);
  transition: stroke 0.2s ease;
}

.password-toggle-btn:hover svg {
  stroke: #FD562D;
}