/* Auth Pages - Login & Register Styles */

/* Auth page body */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  flex-direction: column;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Auth container */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
}

/* Floating shapes background */
.auth-container::before,
.auth-container::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.auth-container::before {
  width: 300px;
  height: 300px;
  background: #fff;
  top: 10%;
  left: 5%;
}

.auth-container::after {
  width: 200px;
  height: 200px;
  background: #fff;
  bottom: 15%;
  right: 10%;
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* Auth card */
.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Auth header */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  color: #64748b;
  font-size: 15px;
  margin: 0;
}

/* Auth form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Input groups with icons */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group i:first-child {
  position: absolute;
  left: 16px;
  color: #9ca3af;
  font-size: 16px;
  transition: color 0.3s ease;
  pointer-events: none;
}

.input-group input {
  width: 100%;
  padding: 14px 50px 14px 48px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  color: #1f2937;
  background: #f9fafb;
  transition: all 0.3s ease;
  outline: none;
}

/* Password input with toggle needs more right padding */
.input-group input[type="password"],
.input-group input.password-visible {
  padding-right: 50px;
}

.input-group input::placeholder {
  color: #9ca3af;
}

.input-group input:focus {
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-group input:focus + i,
.input-group:focus-within i:first-child {
  color: #667eea;
}

/* Password toggle button - inside the input box */
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-size: 16px;
  width: 32px;
  height: 32px;
}

.toggle-password:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.15);
}

.toggle-password:focus {
  outline: none;
  color: #667eea;
}

/* Password strength indicator */
.password-strength {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.password-strength::after {
  content: '';
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
  transition: width 0.3s ease;
}

.password-strength.weak::after { width: 33%; background: #ef4444; }
.password-strength.medium::after { width: 66%; background: #f59e0b; }
.password-strength.strong::after { width: 100%; background: #22c55e; }

/* Form options (remember me, forgot password) */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #4b5563;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.forgot-password {
  font-size: 14px;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Auth button */
.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-button::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 ease;
}

.auth-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

.auth-button:hover::before {
  left: 100%;
}

.auth-button:active {
  transform: translateY(0);
}

.auth-button i {
  transition: transform 0.3s ease;
}

.auth-button:hover i {
  transform: translateX(4px);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.auth-divider span {
  font-size: 13px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Social auth buttons */
.social-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-button:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-2px);
}

.social-button.google:hover {
  border-color: #ea4335;
  color: #ea4335;
}

.social-button.linkedin:hover {
  border-color: #0077b5;
  color: #0077b5;
}

.social-button i {
  font-size: 18px;
}

.social-button.google i { color: #ea4335; }
.social-button.linkedin i { color: #0077b5; }

/* Auth footer */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.auth-footer p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-footer a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Auth page navbar */
.auth-page .topnav {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  position: sticky;
  top: 0;
}

.auth-page .brand {
  color: #fff;
}

.auth-page .navlinks a {
  color: rgba(255, 255, 255, 0.9);
}

.auth-page .navlinks a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.auth-page .nav-toggle {
  color: #fff;
}

/* Error & success messages */
.auth-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shake 0.5s ease;
}

.auth-message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.auth-message.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Loading state */
.auth-button.loading {
  pointer-events: none;
  opacity: 0.8;
}

.auth-button.loading span {
  visibility: hidden;
}

.auth-button.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 480px) {
  .auth-card {
    padding: 32px 24px;
    margin: 0 16px;
    border-radius: 20px;
  }

  .auth-header h1 {
    font-size: 24px;
  }

  .social-auth {
    grid-template-columns: 1fr;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mobile nav adjustments for auth page */
@media (max-width: 900px) {
  .auth-page .topnav {
    padding: 12px 16px;
  }

  .auth-page .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 24px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
  }

  .auth-page .nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .auth-page .navlinks {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 60, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  }

  .auth-page .navlinks.open {
    display: flex;
  }

  .auth-page .navlinks a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    color: #fff;
    text-align: left;
    font-size: 15px;
  }

  .auth-page .navlinks a:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .auth-page .navlinks a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
  }

  .auth-page .nav-lang-container {
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}
