/* The card centres with margin: auto, so a card taller than the screen scrolls with room above and below
   instead of running into the edges as flex centring does */
body {
  margin: 0;
  line-height: 1.6;
  padding: 24px 20px;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
}

.auth-container {
  margin: auto;
  background: var(--surface);
  border-radius: 10px;
  padding: 2rem;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--surface-border);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.auth-form h1 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 0.25rem;
  line-height: 1.25;
  color: var(--text-soft);
  font-weight: 800;
  font-size: 1.8rem;
}

.auth-form .auth-sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 15px;
}

.auth-form form > label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.auth-form input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.auth-form input::placeholder {
  color: var(--muted);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.auth-form button {
  width: 100%;
  font-family: inherit;
  padding: 12px;
  background: var(--gradient-brand);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-form button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.auth-form p {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--text-bright);
}

.auth-form a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.auth-form a:hover {
  color: #0891b2;
}

.auth-form .legal-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.auth-form .legal-note a {
  color: inherit;
  text-decoration: underline;
}

.auth-form .signup-note {
  margin: 0 0 1.25rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.08);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.error-message {
  color: #f87171;
  text-align: center;
  margin-top: 1rem;
  font-size: 14px;
  padding: 0.75rem;
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  display: none;
}

.error-message:not(:empty) {
  display: block;
}

.verification-form {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.verification-form h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-weight: 700;
}

.verification-text {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 14px;
}

.forgot-password {
  text-align: center;
  margin: 1rem 0;
}

/* Under the password field, at its right */
.auth-form .forgot-password {
  margin: -0.5rem 0 1rem;
  text-align: right;
}

.forgot-password a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.forgot-password a:hover {
  color: var(--cyan);
}

.reset-form {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reset-form h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-weight: 700;
}

.reset-text {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 14px;
}

.back-btn {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: var(--muted) !important;
  margin-top: 0.5rem;
}

.back-btn:hover {
  border-color: var(--cyan) !important;
  color: var(--cyan) !important;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

/* The login and sign-up logo is the 30px symbol size, scaled 1.5x */
.auth-brand .brand-logo {
  height: 45px;
}

/* Password hints sit just under their field: the input's margin collapses with the negative one here */
.password-requirements,
.password-match {
  margin: -0.5rem 0 1rem;
  padding: 0 0.25rem;
}

.password-requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.75rem;
}

.requirement {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12px;
}

.requirement .check {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.2);
  border: 1px solid var(--muted);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.requirement .text {
  color: var(--muted);
  transition: color 0.2s ease;
}

.requirement.valid .check {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #22c55e;
}

.requirement.valid .text {
  color: var(--text-soft);
}

/* Google's dark button: its colour G, "Continue with Google" */
.auth-form .google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #131314;
  color: #e3e3e3;
  border: 1px solid #8e918f;
  font-weight: 600;
}

.auth-form .google-btn svg {
  width: 18px;
  height: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.password-field {
  position: relative;
  margin-bottom: 1rem;
}

.auth-form .password-field input {
  margin-bottom: 0;
  padding-right: 44px;
}

.auth-form .show-password,
.auth-form .show-password:hover {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: flex;
  width: auto;
  padding: 6px;
  background: transparent;
  color: var(--muted);
  opacity: 1;
}

.auth-form .show-password svg {
  width: 20px;
  height: 20px;
}

.auth-form .switch-link {
  color: var(--muted);
}

.auth-form .show-password:hover {
  color: var(--cyan);
}

@media (max-width: 480px) {
  .auth-container {
    padding: 1.5rem;
  }
}
