:root {
  --bg: #010104; --ink: #f3f5f9; --text: #cfd4dd; --muted: #969daa; --faint: #8a91a0;
  --line: #ffffff16; --line-strong: #ffffff2a; --field: #ffffff07; --accent: #a9b8ff;
  --focus: #b9c6ffa6; --danger: #ff9d94; --ok: #5fe0a8;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  font: 14px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink); -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(1px 1px at 12% 18%, #ffffff8c 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, #ffffff73 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 72%, #a9b8ffa6 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 84%, #ffffff66 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 58%, #ffffff80 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 6%, #ffffff59 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 62%, #ffffff73 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 40%, #ffffff4d 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 88%, #a9b8ff8c 50%, transparent 51%);
  background-size: 420px 420px, 380px 380px, 520px 520px, 460px 460px, 400px 400px, 500px 500px, 440px 440px, 360px 360px, 480px 480px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: .02em; }
.brand img { border-radius: 7px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang button { border: 0; border-radius: 999px; padding: 5px 10px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: #ffffff1a; color: var(--ink); }
.outline-link { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 500; }

main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px 80px; }
.view, .alert { width: min(340px, 100%); }
.view { display: flex; flex-direction: column; gap: 12px; }
h1 { margin: 0 0 20px; text-align: center; font-size: 30px; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.who { margin: -12px 0 16px; text-align: center; color: var(--text); display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 8px; overflow-wrap: anywhere; }
label { font-size: 13px; color: var(--text); font-weight: 500; margin-bottom: -6px; }
input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--field); color: var(--ink); font: inherit; outline: none;
}
input::placeholder { color: var(--faint); }
input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px #8fa2ff21; }
input[aria-invalid="true"] { border-color: var(--danger); }
.primary, .secondary {
  height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, opacity .15s;
}
.primary { border: 0; background: var(--ink); color: var(--bg); }
.primary:hover { background: #fff; }
.secondary { border: 1px solid var(--line-strong); background: #ffffff08; color: var(--ink); font-weight: 500; padding: 0 14px; }
.secondary:hover { background: #ffffff14; color: var(--ink); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
hr { width: 100%; border: 0; height: 1px; background: var(--line); margin: 12px 0; }
.providers { display: flex; flex-direction: column; gap: 12px; }
.provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.or { display: flex; align-items: center; gap: 12px; margin: 6px 0; font-size: 12px; color: var(--faint); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.foot { margin: 20px 0 0; text-align: center; color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 24px; }
.legal-links a { text-decoration: underline; text-underline-offset: .2em; }
.row-end { display: flex; justify-content: flex-end; margin-top: -2px; }
.row-end a { color: var(--muted); font-size: 13px; }
.password-field { position: relative; }
.password-field input { padding-right: 46px; }
.reveal { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; letter-spacing: .08em; }
.code-row .secondary { flex: none; font-size: 13px; white-space: nowrap; }
.hint { margin: -4px 0 0; font-size: 12px; color: var(--faint); }
.alert { margin: 0 0 16px; padding: 10px 12px; border: 1px solid #ff9d9452; border-radius: 8px; background: #ff9d941f; color: var(--danger); font-size: 13px; }
.alert.ok { border-color: #5fe0a84d; background: #5fe0a81f; color: var(--ok); }
@media (max-width: 480px) { .top { padding: 16px; } h1 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
