/* Auth Page Styles */
.auth-page {
  background: linear-gradient(
    135deg,
    #023e8a 0%,
    #0077b6 15%,
    #0096c7 30%,
    #48cae4 50%,
    #90e0ef 70%,
    #ade8f4 85%,
    #caf0f8 100%
  );
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 1rem 0;
}

.auth-page.dark-mode {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.auth-container {
  width: 100%;
  padding: 1rem;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 100%;
  margin: 0 auto;
}

.dark-mode .auth-card {
  background: rgba(30, 30, 30, 0.95);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header {
  margin-bottom: 2rem;
}

.auth-logo {
  width: 80px;
  height: 80px;
  background: #007bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.dark-mode .auth-logo {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  box-shadow: 0 10px 30px rgba(44, 62, 80, 0.3);
}

.auth-header h2 {
  color: #333;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.dark-mode .auth-header h2 {
  color: #e0e0e0;
}

.auth-header p {
  color: #666;
  margin-bottom: 0;
  font-size: 1rem;
}

.dark-mode .auth-header p {
  color: #b0b0b0;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.95rem;
}

.dark-mode .form-label {
  color: #e0e0e0;
}

.form-control {
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fff;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  background: #fff;
}

.dark-mode .form-control {
  background: #2a2a2a;
  border-color: #444;
  color: #e0e0e0;
}

.dark-mode .form-control:focus {
  border-color: #667eea;
  background: #2a2a2a;
  color: #e0e0e0;
}

.password-input {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 32px; /* Increased from 12px to create space for validation icons */
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.dark-mode .password-toggle {
  color: #b0b0b0;
}

.password-requirements {
  margin-top: 0.5rem;
}

.auth-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 50px;
}

.btn-primary.auth-btn {
  background: #007bff;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
  background: linear-gradient(135deg, #0062cc, #0069d9);
}

.btn-google.auth-btn {
  background: #fff;
  color: #333;
  border: 2px solid #e1e5e9;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-google.auth-btn:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  color: #333;
  text-decoration: none;
}

.dark-mode .btn-google.auth-btn {
  background: #2a2a2a;
  color: #e0e0e0;
  border-color: #444;
}

.dark-mode .btn-google.auth-btn:hover {
  background: #333;
  color: #e0e0e0;
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e1e5e9;
}

.dark-mode .auth-divider::before {
  background: #444;
}

.auth-divider span {
  background: rgba(255, 255, 255, 0.95);
  padding: 0 1rem;
  color: #666;
  font-size: 0.9rem;
  position: relative;
}

.dark-mode .auth-divider span {
  background: rgba(30, 30, 30, 0.95);
  color: #b0b0b0;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-footer p {
  margin-bottom: 0.5rem;
  color: #666;
  font-size: 0.9rem;
}

.dark-mode .auth-footer p {
  color: #b0b0b0;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-footer a:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

/* Alert Styles */
.alert {
  border-radius: 12px;
  border: none;
  margin-bottom: 1.5rem;
  padding: 1rem;
  padding-right: 3rem; /* Added extra padding on the right for the close button */
  font-size: 0.9rem;
  position: relative;
}

.alert .btn-close {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
  box-shadow: none;
  font-size: 1.25rem;
  padding: 0.5rem;
  background: transparent;
}

.alert-danger .btn-close:hover {
  opacity: 1;
  color: #dc3545;
}

.alert-success .btn-close:hover {
  opacity: 1;
  color: #28a745;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border-left: 4px solid #dc3545;
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border-left: 4px solid #28a745;
}

.dark-mode .alert-danger {
  background: rgba(220, 53, 69, 0.2);
  color: #ff6b7a;
}

.dark-mode .alert-success {
  background: rgba(40, 167, 69, 0.2);
  color: #51cf66;
}

/* Mobile Responsive Styles */
@media (max-width: 576px) {
  .auth-container {
    padding: 0.5rem;
  }

  .auth-card {
    padding: 1.5rem;
    border-radius: 15px;
    margin: 0.5rem;
  }

  .auth-logo {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .auth-header h2 {
    font-size: 1.5rem;
  }

  .auth-header p {
    font-size: 0.9rem;
  }

  .form-control {
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
  }

  .auth-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    min-height: 48px;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .password-requirements small {
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  .auth-card {
    padding: 1rem;
    margin: 0.25rem;
  }

  .auth-logo {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .auth-header h2 {
    font-size: 1.3rem;
  }

  .form-control {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .auth-btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    min-height: 44px;
  }
}

/* Landscape mobile orientation */
@media (max-height: 600px) and (orientation: landscape) {
  .auth-page {
    padding: 0.5rem 0;
  }

  .auth-card {
    padding: 1rem;
  }

  .auth-logo {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .auth-header {
    margin-bottom: 1rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }
}

/* Touch-friendly improvements */
@media (hover: none) {
  .auth-btn:active {
    transform: scale(0.98);
  }

  .password-toggle:active {
    color: #4964dc;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .auth-logo {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  }

  .auth-card {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  }
}
