/* Login Page Container */
.login-page {
  margin: 0;
  padding: 40px 20px;
  min-height: 80vh;
  width: 100%; /* Ensure full width */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f4f7f6; /* Soft neutral background */
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.login-page-container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

/* Auth Views */
.auth-view {
  display: none;
}

.auth-view.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

/* Auth Card */
.auth-card {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Typography */
.auth-card h2 {
  font-size: 28px;
  margin: 0 0 10px 0;
  text-align: center;
  color: #1a202c;
  font-weight: 600;
}

.auth-subtitle {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 25px;
  text-align: center;
}

.auth-subtitle a {
  color: #667eea;
  text-decoration: none;
}

.auth-subtitle a:hover {
  text-decoration: underline;
}

/* Form Elements */
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus,
.auth-card input[type="text"]:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-card button[type="submit"],
.login-option {
  width: 100%;
  padding: 14px;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-sizing: border-box;
}

.auth-card button[type="submit"]:hover {
  background-color: #5568d3;
}

.auth-card button[type="submit"]:active {
  transform: scale(0.98);
}

/* Disabled state for buttons */
.auth-card button[type="submit"]:disabled,
.login-option:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Google Login Button */
.login-option {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #3c4043;
  font-weight: 500;
}

.login-option:hover {
  background-color: #f7fafc;
  border-color: #cbd5e0;
}

.google-icon {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

/* Divider */
.divider {
  text-align: center;
  margin: 25px 0;
  color: #6b7280;
  position: relative;
  font-size: 13px;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background-color: #e2e8f0;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

/* Links */
.auth-card a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-card a:hover {
  color: #5568d3;
}

.forgot-password {
  display: block;
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: #6b7280;
  font-size: 14px;
}

/* Error and Success Messages */
.error-message {
  color: #e53e3e;
  background-color: #fff5f5;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
  text-align: center;
  border-left: 4px solid #e53e3e;
}

.success-message {
  color: #2f855a;
  background-color: #f0fff4;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
  text-align: center;
  font-weight: 600;
  border-left: 4px solid #2f855a;
}

/* Button Loading States */
button:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
  opacity: 0.8;
}

.loading-btn {
  position: relative;
  color: #ffffff !important;
}

.loading-btn::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: button-loading-spinner 1s linear infinite;
  vertical-align: middle;
}

@keyframes button-loading-spinner {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}

/* Custom Alert */
.custom-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 15px 25px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  text-align: center;
  opacity: 1;
  transition: opacity 0.5s;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 480px) {
  .auth-card {
    padding: 30px 25px;
  }

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

  .login-page-container {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding: 25px 20px;
  }
}
