@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:ROND,wght@60,500..700&family=Noto+Sans+TC:wght@500..700&display=swap');

:root {
  color-scheme: dark;
  --background: #0c0f11;
  --surface: #1c1f21;
  --border: #444b50;
  --input-border: #69737a;
  --rule: #303639;
  --text: #f1f3f3;
  --muted: #acb5ba;
  --accent: #83ccec;
  --danger: #ffabb3;
  --success: #98d6b4;
  font-family: 'Google Sans Flex', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  font-size: 16px;
  font-weight: 500;
  font-optical-sizing: auto;
}

* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-height: 100svh; background: var(--background); color: var(--text); line-height: 1.5; }
::selection { color: var(--background); background: var(--accent); }
a, button, input { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a, input { transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, box-shadow 200ms ease-out; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hidden { display: none !important; }
#accountSky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.account-shell { position: relative; width: min(100%, 1040px); margin: 0 auto; padding: 0 32px 64px; }
.account-header { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rule); }
.wordmark { display: flex; align-items: baseline; gap: 10px; font-size: 28px; font-weight: 650; line-height: 1; }
.wordmark span { color: var(--accent); font-size: 12px; }
.home-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 13px; }
.home-link:hover { color: var(--text); }
img { display: block; width: 18px; height: 18px; flex: none; }
.home-link img, .btn-icon img { filter: brightness(0) invert(0.8); }
.home-link img, .btn-primary img { transition: transform 200ms ease-out; }
.home-link:focus-visible img, .home-link:active img { transform: translateX(-3px); }
.btn-primary:not(:disabled):focus-visible img, .btn-primary:not(:disabled):active img { transform: translateX(4px); }
.auth-workspace { width: min(100%, 384px); margin: 80px auto 0; }
.auth-title { margin: 0 0 32px; font-size: 28px; font-weight: 700; line-height: 1.3; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .auth-title { width: fit-content; max-width: 100%; color: transparent; background: linear-gradient(110deg, #dce6e9 42%, #ffffff 49%, #dce6e9 56%); background-size: 260% 100%; background-position: 100% 0; background-clip: text; -webkit-background-clip: text; animation: letter-flow 18s ease-in-out infinite; animation-play-state: paused; }
  .auth-workspace[data-motion-visible='true'] .auth-title { animation-play-state: running; }
  [data-sky-visibility='hidden'] .auth-title { animation-play-state: paused; }
}
@keyframes letter-flow { 0%, 15% { background-position: 100% 0; } 45%, 100% { background-position: 0 0; } }
@media (forced-colors: active) { .auth-title { color: CanvasText; background: none; animation: none; } }
.form-stack, .registration-fields { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { color: var(--text); font-size: 14px; font-weight: 600; }
input { width: 100%; min-width: 0; height: 48px; padding: 11px 14px; border: 1px solid var(--input-border); border-radius: 4px; color: var(--text); background: var(--surface); caret-color: var(--accent); }
input::placeholder { color: var(--muted); opacity: 1; }
input:hover { border-color: #89939a; }
input:focus { outline: none; background: #21272a; box-shadow: 0 0 18px rgb(164 201 217 / 20%), 0 0 38px rgb(164 201 217 / 9%); transition-duration: 320ms; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
input:focus-visible { border-color: #89939a; }
input[aria-invalid='true'] { border-color: var(--danger); }
.input-group { position: relative; }
.input-group input { padding-right: 52px; }
button { cursor: pointer; }
.btn-icon { position: absolute; right: 3px; top: 2px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); }
.btn-icon:hover { background: #303639; }
.btn-icon:focus-visible { outline-offset: -3px; }
.btn-primary, .btn-secondary { width: 100%; min-height: 48px; padding: 12px 16px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 4px; border: 1px solid transparent; font-size: 15px; font-weight: 600; }
.btn-primary { position: relative; background: #e3edf1; color: #182126; }
.btn-primary img { position: absolute; right: 16px; filter: brightness(0); }
.btn-primary:hover { background: #ffffff; }
.btn-primary:active { background: #b9d2de; }
.btn-secondary { color: var(--text); background: transparent; border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); border-color: #69737a; }
.btn-secondary:active { background: #303639; }
button:disabled { cursor: default; opacity: 0.55; }
.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--rule); }
.switch-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; column-gap: 12px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.link-text { min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--accent); font-size: 14px; }
.link-text:hover { color: #b7e6fa; text-decoration: underline; text-underline-offset: 4px; }
.field-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.registration-steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-size: 13px; color: var(--muted); }
.registration-steps li { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.registration-steps [aria-current='step'] { border-color: var(--accent); color: var(--text); }
.step-number { font-variant-numeric: tabular-nums; color: var(--muted); }
.registration-steps [aria-current='step'] .step-number { color: var(--accent); }
.registration-steps .complete .step-number { color: var(--success); }
.verified-identity { display: flex; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.verified-mark { margin-top: 3px; filter: brightness(0) saturate(100%) invert(85%) sepia(14%) saturate(700%) hue-rotate(93deg); }
.verified-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.identity-label, .identity-name { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.verified-copy strong { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.auth-message { margin: -12px 0 24px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14px; overflow-wrap: anywhere; }
.auth-message.error { color: var(--danger); }
.auth-message.success { color: var(--success); }

@media (max-width: 600px) {
  .account-shell { padding: 0 24px 40px; }
  .account-header { min-height: 80px; }
  .wordmark { font-size: 26px; gap: 8px; }
  .home-link { font-size: 12px; gap: 6px; }
  .auth-workspace { margin: 48px auto 0; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .auth-workspace { margin: 64px auto 0; }
}
@media (max-width: 360px) {
  .account-shell { padding-inline: 20px; }
  .home-link { font-size: 0; gap: 0; width: 44px; justify-content: center; }
  .auth-workspace { margin-top: 36px; }
}
@media (hover: hover) and (pointer: fine) {
  .home-link:hover img { transform: translateX(-3px); }
  .btn-primary:not(:disabled):hover img { transform: translateX(4px); }
}
