/* General body and main container styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: Arial, sans-serif;
    background: linear-gradient(120deg, #2980b9, #8e44ad);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    position: relative;
    padding: 20px;
  }
  
  /* Back button styling */
  .back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #fff;
    color: #555;
    padding: 12px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .back-button:hover {
    background-color: #f5f5f5;
    color: #007bff;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  /* Auth container for centering the card */
  .auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 60px 20px 40px;
  }
  
  /* The main white card/form container */
  .auth-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    text-align: center;
    margin: 0 auto;
  }
  
  /* Title styling */
  h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
  }
  
  /* Form group (label + input) */
  .form-group {
    margin-bottom: 25px;
    text-align: left;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 15px;
  }
  
  /* Input fields */
  .form-group input {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    background-color: #fafafa;
  }
  
  .form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    background-color: #fff;
    transform: translateY(-1px);
  }
  
  .form-group input::placeholder {
    color: #999;
    font-size: 15px;
  }
  
  /* Submit button styling */
  .btn-primary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  }
  
  .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
  }
  
  .btn-primary:active {
    transform: translateY(0);
  }
  
  .btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
  
  /* "Don't have an account?" link container */
  .auth-footer {
    margin-top: 25px;
    font-size: 15px;
    color: #666;
    line-height: 1.5;
  }
  
  .auth-footer a {
    color: #6a0dad;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .auth-footer a:hover {
    color: #5a0ca8;
    text-decoration: underline;
  }
  
  /* Forgot password link */
  .forgot-password {
    margin-top: 15px;
    font-size: 14px;
  }
  
  .forgot-password a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  
  .forgot-password a:hover {
    color: #007bff;
    text-decoration: underline;
  }
  
  /* Loading animation */
  .loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* Error message styling */
  .error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
    text-align: left;
  }
  
  /* Success message styling */
  .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    font-size: 14px;
    text-align: left;
  }
  
  /* ===== RESPONSIVE DESIGN ===== */
  
  /* Tablets and Small Laptops */
  @media (max-width: 1024px) {
    .auth-card {
      max-width: 380px;
      padding: 35px 30px;
    }
    
    h2 {
      font-size: 26px;
    }
  }
  
  /* Tablets */
  @media (max-width: 768px) {
    body {
      padding: 15px;
      min-height: 100vh;
      align-items: flex-start;
    }
    
    .back-button {
      top: 15px;
      left: 15px;
      padding: 10px 15px;
      font-size: 15px;
    }
    
    .auth-container {
      padding: 50px 15px 30px;
      align-items: flex-start;
      min-height: calc(100vh - 80px);
    }
    
    .auth-card {
      padding: 30px 25px;
      margin-top: 20px;
      max-width: 400px;
    }
    
    h2 {
      font-size: 24px;
      margin-bottom: 25px;
    }
    
    .form-group input {
      padding: 14px 16px;
      font-size: 16px;
    }
    
    .btn-primary {
      padding: 15px;
      font-size: 17px;
    }
  }
  
  /* Mobile Phones */
  @media (max-width: 480px) {
    body {
      padding: 10px;
      background: linear-gradient(135deg, #2980b9, #8e44ad);
    }
    
    .back-button {
      top: 10px;
      left: 10px;
      padding: 8px 12px;
      font-size: 14px;
      background-color: rgba(255, 255, 255, 0.95);
    }
    
    .auth-container {
      padding: 40px 10px 20px;
    }
    
    .auth-card {
      padding: 25px 20px;
      border-radius: 12px;
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
      margin-top: 10px;
      max-width: 100%;
    }
    
    h2 {
      font-size: 22px;
      margin-bottom: 20px;
    }
    
    .form-group {
      margin-bottom: 20px;
    }
    
    .form-group label {
      font-size: 14px;
    }
    
    .form-group input {
      padding: 12px 14px;
      font-size: 16px; /* Prevent zoom on iOS */
      border-radius: 8px;
    }
    
    .btn-primary {
      padding: 14px;
      font-size: 16px;
      border-radius: 8px;
    }
    
    .auth-footer {
      font-size: 14px;
      margin-top: 20px;
    }
    
    .forgot-password {
      font-size: 13px;
    }
  }
  
  /* Small Mobile Phones */
  @media (max-width: 360px) {
    .auth-card {
      padding: 20px 15px;
    }
    
    h2 {
      font-size: 20px;
    }
    
    .form-group input {
      padding: 11px 13px;
    }
    
    .btn-primary {
      padding: 13px;
    }
    
    .back-button {
      font-size: 13px;
      padding: 7px 10px;
    }
  }
  
  /* Large Desktop Screens */
  @media (min-width: 1440px) {
    .auth-card {
      max-width: 450px;
      padding: 50px 45px;
    }
    
    h2 {
      font-size: 32px;
    }
    
    .form-group input {
      padding: 17px 20px;
      font-size: 17px;
    }
    
    .btn-primary {
      padding: 18px;
      font-size: 19px;
    }
  }
  
  /* Landscape mode for mobile */
  @media (max-height: 600px) and (orientation: landscape) {
    body {
      align-items: flex-start;
      padding: 10px;
    }
    
    .auth-container {
      padding: 50px 20px 20px;
    }
    
    .auth-card {
      margin-top: 10px;
      padding: 20px 25px;
    }
    
    .form-group {
      margin-bottom: 15px;
    }
  }
  
  /* High contrast mode support */
  @media (prefers-contrast: high) {
    .auth-card {
      border: 2px solid #000;
    }
    
    .form-group input {
      border: 2px solid #000;
    }
    
    .btn-primary {
      border: 2px solid #000;
    }
  }
  
  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {
    * {
      transition: none !important;
      animation: none !important;
    }
    
    .btn-primary:hover {
      transform: none;
    }
    
    .form-group input:focus {
      transform: none;
    }
  }