/* Auth pages styles */
.auth-section {
  padding: 80px 0;
  background-color: var(--color-bg-primary);
  background-image: linear-gradient(
    135deg,
    rgba(var(--color-primary-rgb), 0.1) 0%,
    rgba(var(--color-primary-rgb), 0.02) 100%
  );
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.auth-container {
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--color-bg-card);
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.auth-tabs {
  display: flex;
  width: 100%;
  border-bottom: 1px solid var(--color-border);
  background-color: rgba(var(--color-primary-rgb), 0.03);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 22px 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.auth-tab:hover {
  color: var(--color-primary);
  background-color: rgba(var(--color-primary-rgb), 0.05);
}

.auth-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  animation: tabSlideIn 0.3s ease-out forwards;
}

@keyframes tabSlideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.auth-content {
  padding: 35px;
  position: relative;
  z-index: 1;
}

.auth-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle at top right,
    rgba(var(--color-primary-rgb), 0.05) 0%,
    transparent 70%
  );
  z-index: -1;
}

.auth-form-container {
  display: none;
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form-container.active {
  display: block;
}

.auth-form-container h2 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--color-text-primary);
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 35px;
  font-size: 0.95rem;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.auth-notification {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 25px;
  display: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  transform: translateY(0);
  opacity: 0;
}

.auth-notification.animated {
  display: flex;
  align-items: center;
  animation: slideDown 0.5s forwards;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-15px);
  }
  50% {
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading spinner */
.auth-notification.loading {
  background-color: rgba(var(--color-primary-rgb), 0.08);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  color: var(--color-primary);
}

.auth-notification .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(var(--color-primary-rgb), 0.3);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  margin-right: 10px;
  animation: spin 0.8s linear infinite;
}

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

.auth-notification.error {
  display: flex;
  align-items: center;
  background-color: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.auth-notification.error::before {
  content: "\f071";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 10px;
  font-size: 1rem;
}

.auth-notification.success {
  display: flex;
  align-items: center;
  background-color: rgba(40, 167, 69, 0.08);
  border: 1px solid rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.auth-notification.success::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 10px;
  font-size: 1rem;
}

.auth-form .form-group {
  margin-bottom: 24px;
}

.auth-form label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  transform: translateY(0);
  transition: all 0.2s ease;
  min-height: 20px;
  line-height: 1.4;
}

.input-with-icon {
  position: relative;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(
    145deg,
    var(--color-bg-elevated),
    var(--color-bg-secondary)
  );
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-with-icon:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--color-primary-rgb), 0.2);
  background: linear-gradient(
    145deg,
    var(--color-bg-secondary),
    var(--color-bg-elevated)
  );
}

.input-with-icon i {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
  z-index: 2;
  background: rgba(var(--color-primary-rgb), 0.1);
  padding: 8px;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-with-icon input {
  width: 100%;
  padding: 18px 20px 18px 70px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.input-with-icon input:focus {
  outline: none;
  background: rgba(var(--color-primary-rgb), 0.03);
}

.input-with-icon input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.input-with-icon:focus-within input::placeholder {
  opacity: 0.5;
  transform: translateX(5px);
}

.input-with-icon:focus-within i {
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.2);
  transform: translateY(-50%) scale(1.1);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  background: rgba(var(--color-text-muted), 0.1);
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
  z-index: 2;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  opacity: 1;
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
  transform: translateY(-50%) scale(1.1);
}

.toggle-password:focus {
  outline: none;
}

.password-strength {
  margin-top: 12px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
}

input:focus ~ .password-strength,
.password-strength.active {
  opacity: 1;
  transform: translateY(0);
}

.strength-meter {
  height: 6px;
  background-color: var(--color-border);
  border-radius: 4px;
  margin-bottom: 6px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  transform-origin: left;
}

.strength-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

.strength-text::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background-color: var(--color-border);
  transition: background-color 0.3s ease;
}

.strength-bar.weak ~ .strength-text::before {
  background-color: #dc3545;
}

.strength-bar.medium ~ .strength-text::before {
  background-color: #ffc107;
}

.strength-bar.strong ~ .strength-text::before,
.strength-bar.very-strong ~ .strength-text::before {
  background-color: #28a745;
}

.form-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 26px;
}

.remember-me,
.terms-agreement,
.forgot-password-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-label {
  font-size: 0.85rem;
  color: var(--color-text-primary);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0;
}

.option-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-me input,
.terms-agreement input {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.remember-me label,
.terms-agreement label {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: var(--color-text-secondary);
  cursor: pointer;
  line-height: 1.4;
  flex: 1;
}

.forgot-password {
  color: var(--color-primary);
  font-size: 0.9rem;
  text-decoration: none;
  position: relative;
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.terms-agreement a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.terms-agreement a:hover {
  border-bottom-color: var(--color-primary);
}

.forgot-password {
  color: var(--color-primary);
  font-size: 0.9rem;
  text-decoration: none;
  position: relative;
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.forgot-password::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

.forgot-password:hover {
  color: var(--color-primary-dark);
}

.forgot-password:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.btn.full-width {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
  background: var(--gradient-primary);
  border: none;
  transition: all 0.3s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn.full-width:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(var(--color-primary-rgb), 0.3);
}

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

.btn.full-width::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.btn.full-width:hover::before {
  opacity: 1;
  transform: scale(1);
}

.social-login {
  margin-top: 35px;
  text-align: center;
}

.social-login p {
  position: relative;
  margin-bottom: 24px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.social-login p::before,
.social-login p::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border),
    transparent
  );
}

.social-login p::before {
  left: 0;
}

.social-login p::after {
  right: 0;
}

.social-buttons {
  display: flex;
  gap: 15px;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-elevated);
  color: var(--color-text-primary);
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.btn-social i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.btn-social:hover i {
  transform: scale(1.2);
}

.btn-social.google:hover {
  background-color: #db4437;
  border-color: #db4437;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(219, 68, 55, 0.2);
}

.btn-social.facebook:hover {
  background-color: #4267b2;
  border-color: #4267b2;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(66, 103, 178, 0.2);
}

/* Password strength indicators */
.strength-bar.weak {
  width: 25%;
  background-color: #dc3545;
}

.strength-bar.medium {
  width: 50%;
  background-color: #ffc107;
}

.strength-bar.strong {
  width: 75%;
  background-color: #28a745;
}

.strength-bar.very-strong {
  width: 100%;
  background-color: #28a745;
}

/* Additional enhancements */
.auth-container {
  animation: shadowPulse 3s infinite alternate;
}

@keyframes shadowPulse {
  0% {
    box-shadow: var(--shadow-lg);
  }
  100% {
    box-shadow: 0 15px 35px rgba(var(--color-primary-rgb), 0.2);
  }
}

.input-with-icon input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.input-with-icon input:focus::placeholder {
  opacity: 0.5;
}

/* Focus styles for better accessibility */
.auth-tab:focus,
.btn:focus,
.toggle-password:focus,
.forgot-password:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.3);
}

/* Improve form field feedback */
.auth-form .form-group.success input {
  border-color: #28a745;
}

.auth-form .form-group.error input {
  border-color: #dc3545;
}

.form-feedback {
  margin-top: 6px;
  font-size: 0.8rem;
  display: none;
}

.auth-form .form-group.success .form-feedback.success {
  display: block;
  color: #28a745;
}

.auth-form .form-group.error .form-feedback.error {
  display: block;
  color: #dc3545;
}

/* Loading state for buttons */
.btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading span {
  visibility: hidden;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: calc(50% - 10px);
  left: calc(50% - 10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

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

/* Hover effect for auth container */
.auth-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 80% 10%,
    rgba(var(--color-primary-rgb), 0.15) 0%,
    transparent 60%
  );
  opacity: 0;
  z-index: -1;
  transition: opacity 0.5s ease;
}

.auth-container:hover::before {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .auth-section {
    padding: 40px 0;
  }

  .auth-container {
    margin: 0 15px;
    border-radius: 12px;
  }

  .auth-content {
    padding: 25px 20px;
  }

  .auth-form-container h2 {
    font-size: 24px;
  }

  .auth-subtitle {
    font-size: 0.9rem;
    margin-bottom: 30px;
  }

  .auth-form .form-group {
    margin-bottom: 20px;
  }
  .input-with-icon input {
    padding: 12px 15px 12px 40px;
    font-size: 0.95rem;
  }

  /* Move password strength under password field on mobile */
  .password-strength {
    order: 1;
    margin-top: 8px;
  }

  .auth-form .form-group {
    display: flex;
    flex-direction: column;
  }

  .input-with-icon {
    order: 0;
  }
  .form-options {
    gap: 16px;
    margin-bottom: 20px;
  }

  .remember-me,
  .terms-agreement,
  .forgot-password-section {
    gap: 6px;
  }

  .social-buttons {
    flex-direction: column;
  }

  .btn.full-width {
    padding: 12px;
    font-size: 0.95rem;
  }

  .auth-tabs {
    flex-direction: row;
  }

  .auth-tab {
    padding: 18px 0;
    font-size: 1rem;
  }
}
