:root {
  --bg: #08080a;
  --surface: #101013;
  --surface-raised: #16161a;
  --border: #26262c;
  --border-strong: #3a3a44;
  --text: #f4f4f5;
  --text-muted: #9a9aa6;
  --accent: #ff3b5c;
  --accent-soft: rgba(255, 59, 92, 0.14);
  --danger: #ff6b6b;
  --radius: 14px;
  --ring: 0 0 0 3px rgba(255, 59, 92, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  overflow-x: hidden;
}

/* Ambient glow behind the card */
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 50% -10%, rgba(255, 59, 92, 0.16), transparent 70%),
    radial-gradient(900px 600px at 50% 115%, rgba(90, 60, 255, 0.12), transparent 75%);
}

.shell {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.card {
  background: linear-gradient(180deg, var(--surface-raised), var(--surface) 40%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 70px -30px rgba(0, 0, 0, 0.9);
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 17px;
}

.brand__mark {
  width: 22px;
  height: 22px;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(255, 59, 92, 0.45));
}

.brand__tld {
  color: var(--text-muted);
  font-weight: 500;
}

.card__header {
  margin: 26px 0 24px;
}

.card__header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.card__header p {
  margin: 0;
  color: var(--text-muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  color: #c9c9d4;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: #d4d4dd;
}

.field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.link-muted {
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
}

.link-muted:hover,
.link-muted:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #0c0c0f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input::placeholder {
  color: #5b5b68;
}

input:hover {
  border-color: var(--border-strong);
}

input:focus {
  outline: none;
  border-color: var(--accent);
  background: #0e0e12;
  box-shadow: var(--ring);
}

.field__input-wrap {
  position: relative;
}

.field__input-wrap input {
  padding-right: 46px;
}

.reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7e7e8c;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.reveal svg {
  width: 18px;
  height: 18px;
}

.reveal__slash {
  display: none;
}

.reveal[aria-pressed="true"] {
  color: var(--text);
}

.reveal[aria-pressed="true"] .reveal__slash {
  display: block;
}

.reveal:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.reveal:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field__error {
  margin: 0;
  min-height: 0;
  font-size: 12.5px;
  color: var(--danger);
}

.field__error:empty {
  display: none;
}

.field--invalid input {
  border-color: var(--danger);
}

.field--invalid input:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  width: fit-content;
}

.checkbox input {
  appearance: none;
  margin: 0;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #0c0c0f;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.checkbox input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox input:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.checkbox input:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.form__status {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
}

.form__status:empty {
  display: none;
}

.form__status--success {
  color: #4ade80;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  margin-top: 2px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #ff4a68, #ef2c4e);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 12px 28px -14px rgba(255, 59, 92, 0.9);
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring), 0 12px 28px -14px rgba(255, 59, 92, 0.9);
}

.btn[disabled] {
  cursor: progress;
  filter: saturate(0.6) brightness(0.9);
}

.btn__spinner {
  display: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.btn[aria-busy="true"] .btn__spinner {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.card__footer {
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.card__footer a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 59, 92, 0.55);
  padding-bottom: 1px;
}

.card__footer a:hover {
  color: var(--accent);
}

@media (max-width: 460px) {
  .card {
    padding: 26px 22px;
    border-radius: 16px;
  }

  body {
    padding: 20px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
