body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #dbeafe, #f3f4f6);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem; /* padding for small screens */
}

.container {
  width: 100%;
  max-width: 400px;
}

.form-box {
  background: #fff;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #1f2937;
  font-size: 1.5rem;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #374151;
  font-weight: 500;
  font-size: 0.9rem;
}

form input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  outline: none;
  font-size: 0.95rem;
}

form input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

button {
  width: 100%;
  padding: 0.85rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #1e40af;
}

p {
  text-align: center;
  font-size: 0.875rem;
  margin-top: 1rem;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Error message style */
.error-message {
  color: #d9534f;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;
}

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

/* Password field with toggle */
.password-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.password-container input {
  width: 100%;
  max-width:400px;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem; /* extra right padding for icon */
  font-size: 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  outline: none;
}

.password-container input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.toggle-icon {
  position: absolute;
  right: 12px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
}

.toggle-icon:hover {
  color: #2563eb;
}

/* 📱 Responsive Design */
@media (max-width: 768px) {
  .form-box {
    padding: 1.5rem;
  }
  h2 {
    font-size: 1.3rem;
  }
  button {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .form-box {
    padding: 1rem;
  }
  h2 {
    font-size: 1.2rem;
  }
  form input {
    font-size: 0.85rem;
    padding: 0.65rem;
  }
  button {
    padding: 0.7rem;
    font-size: 0.9rem;
  }
}

