* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 0;
}

.login-container,
.auth-container {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card,
.auth-card {
  background: white;
  padding: 40px 32px;
  width: 100%;
}

.login-header,
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-title,
.auth-title,
h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
  line-height: 1.2;
}

.login-subtitle,
.auth-subtitle,
p {
  font-size: 16px;
  color: #6b7280;
  font-weight: 400;
  margin-bottom: 0;
}

.login-form,
.auth-form,
form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group,
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label,
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="username"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  background-color: #ffffff;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="username"]:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="username"]:hover {
  border-color: #d1d5db;
}

.login-button,
.auth-button,
button[type="submit"],
input[type="submit"] {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  margin-top: 8px;
}

.login-button:hover,
.auth-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.login-button:active,
.auth-button:active,
button[type="submit"]:active,
input[type="submit"]:active {
  transform: translateY(0);
}

.error-message,
.alert,
.error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.success-message,
.success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive Design */
@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .login-container,
  .auth-container {
    margin: 0;
    border-radius: 12px;
    max-width: 100%;
  }

  .login-card,
  .auth-card {
    padding: 32px 24px;
  }

  .login-title,
  .auth-title,
  h1 {
    font-size: 24px;
  }

  .login-subtitle,
  .auth-subtitle,
  p {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .login-card,
  .auth-card {
    padding: 24px 20px;
  }

  .login-title,
  .auth-title,
  h1 {
    font-size: 22px;
  }
}

/* Loading state */
.login-button:disabled,
.auth-button:disabled,
button[type="submit"]:disabled,
input[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-button:disabled:hover,
.auth-button:disabled:hover,
button[type="submit"]:disabled:hover,
input[type="submit"]:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Focus styles for accessibility */
.login-button:focus,
.auth-button:focus,
button[type="submit"]:focus,
input[type="submit"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* Additional fallback styles for any missed elements */
.container {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 40px 32px;
  margin: 0 auto;
}

.title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 16px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 32px;
}

.btn,
.button {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}
