/* Global box-sizing reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base layout */
body {
  font-family: Arial, sans-serif;
  background: #f0f2f5;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-size: clamp(14px, 2vw, 16px);
}

/* Responsive container */
.login-container {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 320px;
  margin: 1rem;
  box-sizing: border-box;
  transition: max-width 0.3s ease;
}

/* Medium screens (e.g., tablets) */
@media (min-width: 600px) {
  .login-container {
    max-width: 400px;
  }
}

/* Large screens (e.g., desktops) */
@media (min-width: 900px) {
  .login-container {
    max-width: 480px;
  }
}

/* Form elements */
form h2 {
  margin-bottom: 1rem;
  text-align: center;
}

label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Error messages */
.error {
  color: red;
  font-size: 0.8rem;
  height: 1rem;
  margin-top: 0.2rem;
}

/* Submit button */
button[type="submit"] {
  width: 100%;
  padding: 0.7rem;
  margin-top: 1.5rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  min-height: 44px;
}

/* Loading spinner */
.loading {
  display: none;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #007bff;
  text-align: center;
}

/* Auth links */
.auth-links {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-links a {
  color: #007bff;
  text-decoration: none;
}

/* OAuth section */
.oauth-section {
  margin-top: 1.5rem;
  text-align: center;
}

.oauth-section p {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.oauth-btn {
  margin: 0.3rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  width: 100%;
  max-width: 250px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Provider colors */
.oauth-btn.google {
  background-color: #db4437;
}

.oauth-btn.microsoft {
  background-color: #2F2F2F;
}

.oauth-btn.facebook {
  background-color: #3b5998;
}

/* Responsive tweaks for small screens */
@media (max-width: 480px) {
  .login-container {
    padding: 1rem;
  }

  form h2 {
    font-size: 1.2rem;
  }

  .oauth-btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  label {
    font-size: 0.9rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"] {
    font-size: 0.9rem;
  }

  button[type="submit"] {
    font-size: 0.95rem;
  }
}