/* Authentication Pages Styles - BEM Methodology */

/* Custom Properties for Authentication Theme */
:root {
  --auth-primary: #3b82f6;
  --auth-primary-hover: #2563eb;
  --auth-primary-light: #dbeafe;
  --auth-secondary: #6b7280;
  --auth-secondary-hover: #4b5563;
  --auth-success: #10b981;
  --auth-success-bg: #dcfce7;
  --auth-error: #ef4444;
  --auth-error-bg: #fef2f2;
  --auth-error-border: #fecaca;
  --auth-warning: #f59e0b;
  --auth-warning-bg: #fef3c7;
  --auth-border: #e5e7eb;
  --auth-border-focus: #3b82f6;
  --auth-bg: #f8fafc;
  --auth-card-bg: white;
  --auth-text: #1f2937;
  --auth-text-muted: #6b7280;
  --auth-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --auth-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
  --auth-radius: 12px;
  --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Auth Container */
.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.auth::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: auth-glow 20s linear infinite;
}

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

/* Auth Card */
.auth__card {
  background: var(--auth-card-bg);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow-hover);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  position: relative;
  z-index: 1;
  animation: auth-slide-up 0.5s ease-out;
}

@keyframes auth-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Auth Header */
.auth__header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth__logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: var(--auth-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--auth-primary);
  font-weight: bold;
}

.auth__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.025em;
}

.auth__subtitle {
  color: var(--auth-text-muted);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

/* Auth Form */
.auth__form {
  margin-bottom: 1.5rem;
}

.auth__field {
  margin-bottom: 1.25rem;
  position: relative;
}

.auth__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--auth-text);
}

.auth__input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--auth-border);
  border-radius: 8px;
  background: white;
  transition: var(--auth-transition);
  outline: none;
}

.auth__input:focus {
  border-color: var(--auth-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth__input:hover:not(:focus) {
  border-color: #cbd5e1;
}

.auth__input::placeholder {
  color: #9ca3af;
}

.auth__input--error {
  border-color: var(--auth-error);
}

.auth__input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Auth Button */
.auth__button {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-hover) 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--auth-transition);
  position: relative;
  overflow: hidden;
}

.auth__button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.auth__button:hover::before {
  width: 300px;
  height: 300px;
}

.auth__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

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

.auth__button--secondary {
  background: white;
  color: var(--auth-text);
  border: 2px solid var(--auth-border);
}

.auth__button--secondary:hover {
  background: var(--auth-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Small inline helper next to inputs */
.auth__inline-note {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--auth-text-muted);
}

/* Auth Divider */
.auth__divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.auth__divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--auth-border);
}

.auth__divider-text {
  background: var(--auth-card-bg);
  padding: 0 1rem;
  color: var(--auth-text-muted);
  font-size: 0.875rem;
  position: relative;
  font-weight: 500;
}

/* Auth Social */
.auth__social {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth__social-button {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: white;
  border: 2px solid var(--auth-border);
  border-radius: 8px;
  color: var(--auth-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--auth-transition);
}

.auth__social-button:hover {
  background: var(--auth-bg);
  border-color: var(--auth-primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.auth__social-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}

/* Google Icon removed */

/* GitHub Icon */
.auth__social-button--github .auth__social-icon::before {
  content: '⚡';
  font-size: 18px;
}

.auth__social-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--auth-text-muted);
  margin-top: 0.5rem;
}

/* Auth Links */
.auth__links {
  text-align: center;
  margin-top: 1.5rem;
}

.auth__link {
  color: var(--auth-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--auth-transition);
  display: inline-block;
  position: relative;
}

.auth__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--auth-primary);
  transition: width 0.3s ease;
}

.auth__link:hover::after {
  width: 100%;
}

.auth__link:hover {
  color: var(--auth-primary-hover);
  text-decoration: none;
}

.auth__links-divider {
  color: var(--auth-border);
  margin: 0 0.75rem;
}

/* Auth Messages */
.auth__message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  animation: auth-fade-in 0.3s ease-out;
}

@keyframes auth-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth__message--error {
  background: var(--auth-error-bg);
  color: var(--auth-error);
  border: 1px solid var(--auth-error-border);
}

.auth__message--success {
  background: var(--auth-success-bg);
  color: var(--auth-success);
  border: 1px solid #a7f3d0;
}

.auth__message--warning {
  background: var(--auth-warning-bg);
  color: var(--auth-warning);
  border: 1px solid #fde68a;
}

/* Auth Footer */
.auth__footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--auth-border);
  margin-top: 2rem;
}

.auth__footer-text {
  color: var(--auth-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* Password Strength Indicator */
.auth__password-strength {
  margin-top: 0.5rem;
  height: 4px;
  border-radius: 2px;
  background: var(--auth-border);
  overflow: hidden;
}

.auth__password-strength-bar {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 2px;
}

.auth__password-strength-bar--weak {
  width: 33%;
  background: var(--auth-error);
}

.auth__password-strength-bar--medium {
  width: 66%;
  background: var(--auth-warning);
}

.auth__password-strength-bar--strong {
  width: 100%;
  background: var(--auth-success);
}

/* Loading State */
.auth__button--loading {
  color: transparent;
  pointer-events: none;
}

.auth__button--loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: auth-spinner 0.8s linear infinite;
}

@keyframes auth-spinner {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
  .auth__card {
    padding: 2rem 1.5rem;
  }

  .auth__title {
    font-size: 1.5rem;
  }

  .auth__social {
    flex-direction: column;
  }

  .auth__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .auth__links-divider {
    display: none;
  }
}

/* Focus Visible for Accessibility */
.auth__input:focus-visible,
.auth__button:focus-visible,
.auth__link:focus-visible,
.auth__social-button:focus-visible {
  outline: 2px solid var(--auth-primary);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .auth__card,
  .auth__button::before,
  .auth__message,
  .auth__link::after,
  .auth__password-strength-bar {
    animation: none;
    transition: none;
  }
}