:root {
  --primary-red: #f13a29;
  --primary-dark: #1a1a1a;
  --gray-light: #f8f9fa;
  --gray-text: #6c757d;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(5deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

body.bg-login {
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: "Outfit", sans-serif;
  position: relative;
  overflow: hidden;
}

/* Background elements */
body.bg-login::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(241, 58, 41, 0.1) 0%,
    transparent 70%
  );
  top: -200px;
  right: -100px;
  border-radius: 50%;
}

.bg-logo-placeholder {
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  opacity: 0.05;
  animation: float 15s ease-in-out infinite;
}

.auth-wrapper {
  display: flex;
  width: 100%;
  max-width: 1200px;
  min-height: 80vh;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
  margin: 20px;
  animation: fadeIn 0.8s ease-out;
}

.auth-sidebar {
  flex: 1;
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=1200");
  background-size: cover;
  background-position: center;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  position: relative;
}

.auth-sidebar-content {
  position: relative;
  z-index: 1;
  animation: slideInLeft 0.8s ease-out 0.2s both;
}

.auth-sidebar h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.auth-sidebar p {
  font-size: 1.1rem;
  opacity: 0.8;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.auth-social-sidebar {
  margin-top: auto;
  display: flex;
  gap: 20px;
  font-size: 1.5rem;
  animation: fadeIn 0.8s ease-out 0.6s both;
}

.auth-social-sidebar a {
  color: #fff;
  transition: all 0.3s;
  opacity: 0.7;
}

.auth-social-sidebar a:hover {
  transform: translateY(-5px);
  opacity: 1;
  color: var(--primary-red);
}

.auth-form-container {
  flex: 1;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #fff;
}

.auth-header {
  margin-bottom: 35px;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

.auth-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.auth-header p {
  color: rgba(255, 255, 255, 0.6);
}

.social-login-wrapper {
  display: flex;
  flex-direction: row;
  /* Changed from column to row */
  gap: 15px;
  margin-bottom: 25px;
}

.apple-btn,
.google-btn {
  flex: 1;
  /* Make buttons grow equally */
  width: auto;
  /* Allow flex to control width */
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  margin-bottom: 0;
  transition: all 0.3s;
  animation: fadeIn 0.8s ease-out 0.4s both;
  text-decoration: none;
  font-size: 0.95rem;
  /* Slight adjustments for side-by-side fit */
  white-space: nowrap;
  /* Prevent text wrap */
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  margin: 20px 0 30px;
  /* Balanced top and bottom margin */
  animation: fadeIn 0.8s ease-out 0.5s both;
  font-weight: 500;
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.divider span {
  padding: 0 15px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

form {
  animation: fadeIn 0.8s ease-out 0.6s both;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.form-control-new {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  font-size: 1rem;
  color: #fff;
  transition: all 0.3s;
}

.form-control-new::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-control-new:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-red);
  outline: none;
  box-shadow: 0 0 20px rgba(241, 58, 41, 0.2);
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: color 0.3s;
}

.input-icon-wrapper i:hover {
  color: #fff;
}

.forgot-link {
  display: block;
  text-align: right;
  color: var(--primary-red);
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 8px;
  transition: opacity 0.3s;
}

.forgot-link:hover {
  opacity: 0.8;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-red);
  color: #fff;
  border: none;
  border-radius: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 25px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(241, 58, 41, 0.4);
}

.login-btn:hover {
  transform: scale(1.02);
  background: #ff4d3d;
  box-shadow: 0 15px 40px rgba(241, 58, 41, 0.6);
}

.signup-text {
  text-align: center;
  margin-top: 25px;
  color: rgba(255, 255, 255, 0.6);
  animation: fadeIn 0.8s ease-out 0.7s both;
}

.signup-text a {
  color: var(--primary-red);
  font-weight: 600;
  text-decoration: none;
}

/* OTP Input specific */
.otp-input {
  width: 50px !important;
  height: 60px;
  font-size: 1.5rem !important;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 992px) {
  body.bg-login {
    background:
      linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=1200")
        no-repeat center center fixed !important;
    background-size: cover !important;
    display: block !important;
    overflow-y: auto !important;
  }

  .auth-wrapper {
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  .auth-sidebar {
    height: auto;
    min-height: 300px;
    padding: 60px 30px 80px;
    background: transparent !important;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-sidebar img {
    margin-bottom: 2rem !important;
  }

  .auth-sidebar p {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 10px;
  }

  .auth-sidebar h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  .auth-form-container {
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 40px 40px 0 0;
    margin-top: -40px;
    padding: 50px 30px;
    position: relative;
    z-index: 2;
    flex: 1;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.3);
  }

  .auth-header h2 {
    color: #111827 !important; /* Extremely dark for top contrast */
    font-size: 1.8rem;
    font-weight: 700;
  }

  .auth-header p {
    color: #4b5563 !important; /* Clear dark gray */
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .auth-header p strong {
    color: #111827 !important;
  }

  .forgot-link {
    color: #ef4444 !important; /* Bright but visible red */
    font-weight: 600;
  }

  .social-login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
  }

  .apple-btn,
  .google-btn {
    background: #1e3a5f !important;
    border: none !important;
    color: #fff !important;
    font-size: 0.8rem !important;
    padding: 12px 5px !important;
    border-radius: 12px !important;
    font-weight: 600;
    white-space: nowrap;
  }

  .divider {
    color: #cbd5e1;
    margin: 25px 0;
  }

  .divider::before,
  .divider::after {
    border-bottom: 1px solid #f1f5f9;
  }

  .form-group label {
    color: #334155;
    font-weight: 600;
    font-size: 0.95rem;
  }

  .input-icon-wrapper i:not(.toggle-password) {
    right: auto !important;
    left: 15px !important;
    color: #94a3b8 !important;
  }

  .input-icon-wrapper i.toggle-password {
    right: 15px !important;
    left: auto !important;
    color: #94a3b8 !important;
  }

  .form-control-new {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1a1a1a;
    border-radius: 12px;
    padding: 14px 15px 14px 45px !important;
    font-size: 1rem;
  }

  .form-control-new:focus {
    background: #fff;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(241, 58, 41, 0.1);
  }

  .login-btn {
    margin-top: 25px;
    padding: 18px;
    border-radius: 14px;
    font-size: 1.1rem;
    background: #f13a29 !important;
  }

  .signup-text {
    color: #475569 !important; /* Darker gray for better visibility */
    margin-top: 35px;
  }

  /* WhatsApp Falling Animation */
  @keyframes fall {
    0% {
      transform: translateY(-100vh) rotate(0deg);
      opacity: 0;
    }
    10% {
      opacity: 0.1;
    }
    90% {
      opacity: 0.1;
    }
    100% {
      transform: translateY(100vh) rotate(360deg);
      opacity: 0;
    }
  }

  .wa-floating-icon {
    position: fixed;
    top: -50px;
    color: rgba(255, 255, 255, 0.1);
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 0;
    animation: fall linear infinite;
  }

  .mobile-social-footer {
    position: relative;
    background: transparent !important;
    padding: 30px 0 50px;
    display: flex;
    justify-content: center;
    gap: 30px;
    z-index: 1;
  }

  .mobile-social-footer a {
    color: #fff;
    font-size: 1.6rem;
    opacity: 0.9;
  }

  .otp-input {
    width: 42px !important;
    height: 52px;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #1a1a1a !important;
    padding: 0 !important;
  }
}

@media (max-width: 480px) {
  .auth-sidebar h1 {
    font-size: 1.8rem;
  }

  .social-login-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-form-container {
    padding: 40px 20px;
  }

  .d-flex.justify-content-between.gap-2 {
    gap: 8px !important;
  }
}

@media (max-width: 380px) {
  .otp-input {
    width: 36px !important;
    height: 46px;
  }
}
