/* Typography imports and root variables */
:root {
  /* Updated Color Scheme */
  --primary-color: #1b3c53; /* Deep blue-gray (primary) */
  --secondary-color: #456882; /* Medium blue-gray (secondary) */
  --accent-beige: #d2c1b6; /* Light beige (secondary) */
  --accent-cream: #f9f3ef; /* Off-white/cream (secondary) */
  --supporting-white: #ffffff; /* Pure white for contrast */
  --text-dark: #2d3748; /* Dark text color */
  --error-red: #d63031; /* Error red */
  --success-green: #00b894; /* Success green */

  /* Gradients with new colors */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-beige)
  );
  --gradient-card: linear-gradient(
    145deg,
    rgba(27, 60, 83, 0.1),
    rgba(69, 104, 130, 0.1)
  );
  --gradient-border: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-beige)
  );

  /* Shadows with new colors */
  --shadow-card: 0 20px 40px rgba(27, 60, 83, 0.3);
  --shadow-input: 0 4px 15px rgba(69, 104, 130, 0.2);
  --shadow-button: 0 8px 25px rgba(27, 60, 83, 0.4);

  /* Typography */
  --font-heading: "Audiowide", cursive;
  --font-body: "Raleway", sans-serif;
  --font-feature: "Montserrat", sans-serif;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--accent-cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Elegant body with sophisticated background */
.elegant-body {
  background: linear-gradient(
    135deg,
    var(--accent-cream) 0%,
    #f0ebe5 50%,
    var(--accent-beige) 100%
  );
  position: relative;
}

/* Animated background particles with new colors */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 50%;
  animation: floatParticles 6s infinite ease-in-out;
  opacity: 0.4;
}

.particle:nth-child(1) {
  top: 20%;
  left: 20%;
  animation-delay: -0.5s;
}

.particle:nth-child(2) {
  top: 60%;
  left: 80%;
  animation-delay: -1s;
}

.particle:nth-child(3) {
  top: 80%;
  left: 30%;
  animation-delay: -1.5s;
}

.particle:nth-child(4) {
  top: 30%;
  left: 70%;
  animation-delay: -2s;
}

.particle:nth-child(5) {
  top: 70%;
  left: 10%;
  animation-delay: -2.5s;
}

@keyframes floatParticles {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.8;
  }
}

/* Main signup wrapper */
.signup-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Floating signup card with elegant styling */
.signup-card {
  background: rgba(249, 243, 239, 0.95);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(210, 193, 182, 0.3);
  background-clip: padding-box;
  position: relative;
  backdrop-filter: blur(20px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 700px;
}

/* Gradient border effect with new colors */
.signup-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-border);
  border-radius: 24px;
  padding: 2px;
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

/* Brand section (left side) with elegant colors */
.brand-section {
  background: var(--gradient-card);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-color: var(--primary-color);
}

.brand-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(69, 104, 130, 0.2) 0%,
    transparent 70%
  );
  animation: rotateGradient 20s linear infinite;
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.brand-content {
  position: relative;
  z-index: 2;
}

/* Brand logo with elegant styling */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
}

.logo-img {
  height: 120px;
  width: auto;
  filter: drop-shadow(0 0 30px rgba(249, 243, 239, 0.6));
  transition: all 0.3s ease;
}

.logo-img:hover {
  filter: drop-shadow(0 0 40px rgba(210, 193, 182, 0.8));
  transform: scale(1.05);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  background: linear-gradient(135deg, var(--accent-cream), var(--accent-beige));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 50px rgba(249, 243, 239, 0.5);
  letter-spacing: 0.1em;
  position: relative;
}

.brand-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: var(--gradient-secondary);
  border-radius: 2px;
  opacity: 0.7;
}

/* Form section (right side) */
.form-section {
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-cream);
}

.form-container {
  width: 100%;
  max-width: 400px;
}

/* Form header */
.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--secondary-color);
  font-weight: 400;
}

/* Form styling - All inputs have consistent styling */
.signup-form {
  width: 100%;
}

.input-group-custom {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label-custom {
  font-family: var(--font-feature);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Consistent styling for ALL input fields with new color scheme */
.form-input-custom {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(210, 193, 182, 0.4);
  border-radius: 12px;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

/* For password fields that have toggle buttons, add padding to the right */
.input-wrapper .form-input-custom[type="password"],
.input-wrapper .form-input-custom[id="password"],
.input-wrapper .form-input-custom[id="confirmPassword"] {
  padding-right: 3rem;
}

.form-input-custom::placeholder {
  color: rgba(69, 104, 130, 0.6);
}

.form-input-custom:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: var(--shadow-input);
  background: rgba(255, 255, 255, 0.95);
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--secondary-color);
  font-size: 1.1rem;
  z-index: 2;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  padding: 0;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  z-index: 2;
  opacity: 0.7;
}

.password-toggle:hover {
  color: var(--primary-color);
  opacity: 1;
}

/* Error and success messages */
.error-message {
  font-family: var(--font-feature);
  font-size: 0.75rem;
  color: var(--error-red);
  margin-top: 0.5rem;
  display: block;
  min-height: 1rem;
}

.success-message {
  font-family: var(--font-feature);
  font-size: 0.75rem;
  color: var(--success-green);
  margin-top: 0.5rem;
  display: block;
  min-height: 1rem;
}

/* Primary signup button with new colors */
.btn-signup {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: var(--supporting-white);
  font-family: var(--font-feature);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.btn-signup::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-signup:hover::before {
  left: 100%;
}

.btn-signup:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button);
}

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

.btn-signup:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-text {
  position: relative;
  z-index: 2;
}

.btn-icon {
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.btn-signup:hover .btn-icon {
  transform: translateX(4px);
}

.rotating {
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Divider with new colors */
.divider-custom {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  text-align: center;
}

.divider-custom::before,
.divider-custom::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(210, 193, 182, 0.5),
    transparent
  );
}

.divider-custom span {
  padding: 0 1rem;
  font-family: var(--font-feature);
  font-size: 0.8rem;
  color: var(--secondary-color);
  white-space: nowrap;
}

/* Google button with new styling */
.btn-google {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(210, 193, 182, 0.4);
  border-radius: 12px;
  color: var(--text-dark);
  font-family: var(--font-feature);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.btn-google:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(69, 104, 130, 0.2);
  color: var(--text-dark);
  text-decoration: none;
}

.btn-google i {
  font-size: 1.2rem;
}

/* Form footer */
.form-footer {
  text-align: center;
}

.login-link,
.referral-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
}

.link-primary {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.link-primary:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.link-secondary {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.link-secondary:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Footer */
.footer-text {
  text-align: center;
  margin-top: 2rem;
}

.footer-text p {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--secondary-color);
  font-weight: 400;
  opacity: 0.8;
}

/* Modal styling with new colors */
.modal-custom {
  background: rgba(249, 243, 239, 0.98);
  border-radius: 16px;
  border: 1px solid rgba(210, 193, 182, 0.4);
  backdrop-filter: blur(20px);
}

.modal-header-custom {
  border-bottom: 1px solid rgba(210, 193, 182, 0.3);
  padding: 1.5rem;
}

.modal-header-custom .modal-title {
  font-family: var(--font-feature);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}

.modal-close-custom {
  background: none;
  border: none;
  color: var(--secondary-color);
  font-size: 1.2rem;
}

.modal-close-custom:hover {
  color: var(--primary-color);
}

.modal-body-custom {
  padding: 1.5rem;
}

.referral-info {
  text-align: center;
  margin-bottom: 1.5rem;
}

.referral-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.referral-icon i {
  font-size: 1.5rem;
  color: var(--supporting-white);
}

.referral-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--secondary-color);
  line-height: 1.5;
}

.modal-footer-custom {
  border-top: 1px solid rgba(210, 193, 182, 0.3);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
}

.btn-secondary-modal {
  flex: 1;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(210, 193, 182, 0.4);
  border-radius: 8px;
  color: var(--secondary-color);
  font-family: var(--font-feature);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary-modal:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--secondary-color);
}

.btn-primary-modal {
  flex: 1;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: 8px;
  color: var(--supporting-white);
  font-family: var(--font-feature);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary-modal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 60, 83, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
  .signup-card {
    grid-template-columns: 1fr;
    margin: 1rem;
  }

  .brand-section {
    padding: 2rem;
    min-height: 250px;
  }

  .brand-title {
    font-size: 2.5rem;
  }

  .logo-img {
    height: 80px;
  }

  .form-section {
    padding: 2rem;
  }

  .form-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .signup-wrapper {
    padding: 1rem 0.5rem;
  }

  .brand-section,
  .form-section {
    padding: 1.5rem;
  }

  .brand-title {
    font-size: 2rem;
  }

  .logo-img {
    height: 60px;
  }

  .form-input-custom {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
  }

  .input-wrapper .form-input-custom[type="password"],
  .input-wrapper .form-input-custom[id="password"],
  .input-wrapper .form-input-custom[id="confirmPassword"] {
    padding-right: 2.75rem;
  }

  .btn-signup {
    padding: 0.875rem 1.5rem;
  }

  .modal-dialog {
    margin: 1rem;
  }
}

/* Additional animations for enhanced UX */
.form-input-custom:focus + .input-icon {
  color: var(--primary-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Loading states and micro-interactions */
.btn-signup:hover {
  animation: buttonGlow 2s ease-in-out infinite alternate;
}

@keyframes buttonGlow {
  from {
    box-shadow: 0 8px 25px rgba(69, 104, 130, 0.3);
  }
  to {
    box-shadow: 0 8px 25px rgba(27, 60, 83, 0.5);
  }
}
