/* ==========================================================================
   AUTHENTICATION PAGES STYLES (Login, Registration, Password Reset)
   ========================================================================== */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-card {
  max-width: 480px;
  width: 100%;
  padding: 0;
  position: relative;
  z-index: 10;
  animation: slideInUp 0.8s ease-out;
}

.auth-header {
  text-align: center;
  padding: 40px 40px 20px;
  background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-dark) 100%);
  color: white;
  border-top-left-radius: var(--radius-large);
  border-top-right-radius: var(--radius-large);
}

.logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.logo-text {
  font-size: var(--text-title);
  font-weight: 800;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-subtitle {
  font-size: var(--text-body);
  opacity: 0.9;
  margin: 0;
}

/* Pendulum Animation */
.pendulum-mini {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
  margin: 20px 0;
  gap: 2px;
}

.pendulum-ball-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  animation: pendulum 4s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ball-be-mini {
  animation-delay: 0s;
}

.pendulum-ball-mini:nth-child(2) {
  animation-delay: 0.2s;
}

.pendulum-ball-mini:nth-child(3) {
  animation-delay: 0.4s;
}

.pendulum-ball-mini:nth-child(4) {
  animation-delay: 0.6s;
}

.pendulum-ball-mini:nth-child(5) {
  animation-delay: 0.8s;
}

.pendulum-ball-mini:nth-child(6) {
  animation-delay: 1s;
}

.ball-n-mini {
  animation-delay: 1.2s;
}

@keyframes pendulum {
  0%,
  100% {
    transform: translateX(0px) rotate(0deg);
  }
  25% {
    transform: translateX(5px) rotate(2deg);
  }
  75% {
    transform: translateX(-5px) rotate(-2deg);
  }
}

.auth-form-container {
  padding: 40px;
}

.auth-title {
  font-size: var(--text-heading);
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.auth-subtitle {
  font-size: var(--text-body);
  color: var(--theme-text-secondary);
  margin-bottom: 32px;
  text-align: center;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.forgot-link {
  color: var(--theme-primary);
  text-decoration: none;
  font-size: var(--text-small);
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: var(--text-body);
  font-weight: 700;
  margin-top: 8px;
}

.auth-submit-btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
  color: var(--theme-text-muted);
  font-size: var(--text-small);
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.auth-divider span {
  background: white;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

.auth-alternatives {
  text-align: center;
}

.auth-alt-text {
  font-size: var(--text-body);
  color: var(--theme-text-secondary);
  margin: 0;
}

.auth-link {
  color: var(--theme-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.trust-indicators {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 24px 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-small);
  color: var(--theme-text-secondary);
}

.trust-icon {
  font-size: 16px;
}

.trust-text {
  font-weight: 500;
}

/* Password strength indicator */
.password-strength {
  height: 4px;
  margin-top: 8px;
  border-radius: 2px;
  transition: var(--transition-smooth);
}

.password-strength.strength-weak {
  background: #e74c3c;
}

.password-strength.strength-medium {
  background: #f39c12;
}

.password-strength.strength-strong {
  background: #27ae60;
}

.password-strength::after {
  content: attr(data-text);
  display: block;
  font-size: var(--text-tiny);
  margin-top: 4px;
  font-weight: 500;
}

/* Registration mode adjustments */
.registration-mode .auth-header {
  background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.registration-mode .logo-icon {
  font-size: 52px;
}

/* Reset mode adjustments */
.reset-mode .auth-header {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

/* Background floating elements */
.auth-background-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.floating-element {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float infinite ease-in-out;
}

.floating-element.element-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-duration: 6s;
  animation-delay: 0s;
}

.floating-element.element-2 {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 15%;
  animation-duration: 8s;
  animation-delay: 1s;
}

.floating-element.element-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 15%;
  animation-duration: 7s;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.1;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .auth-container {
    padding: 15px;
    align-items: stretch;
  }
  
  .auth-card {
    max-width: none;
    margin: auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
  }
  
  .auth-header,
  .auth-form-container,
  .trust-indicators {
    padding: 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .form-options {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .trust-indicators {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .floating-element {
    display: none;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: var(--text-heading);
  }
  
  .logo-icon {
    font-size: 40px;
  }
  
  .auth-title {
    font-size: var(--text-body-large);
  }
  
  .auth-subtitle {
    font-size: var(--text-body);
  }
}