/* ============================================================
   官网账号页（注册 / 登录 / 账户中心）
   依赖 style.css 的 CSS 变量与 .btn / .site-header / .site-footer
   ============================================================ */

.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 54px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 84px;
}

.auth-wrap--single {
  display: block;
  width: min(416px, calc(100% - 32px));
  margin: 56px auto 84px;
  padding: 0;
}

.auth-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(9, 9, 11, .04);
  padding: 30px 28px 26px;
}

.auth-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #71717a;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: #09090b;
}

.auth-sub {
  margin: 6px 0 20px;
  color: #52525b;
  font-size: 13.5px;
  line-height: 1.55;
}

.auth-steps {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
  font-size: 11.5px;
  font-weight: 600;
  color: #71717a;
}

.auth-steps span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  background: #fafafa;
}

.auth-steps span.on {
  color: #ffffff;
  background: #09090b;
  border-color: #09090b;
}

.auth-steps span.done {
  color: #059669;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.field {
  display: block;
  margin-top: 14px;
}

.field > span {
  display: block;
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #27272a;
}

.auth-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 6px;
}
.auth-inline-row > span {
  font-size: 12.5px;
  font-weight: 600;
  color: #27272a;
}
.auth-inline-row > a {
  font-size: 12.5px;
  font-weight: 500;
  color: #52525b;
  text-decoration: none;
}
.auth-inline-row > a:hover { color: #09090b; text-decoration: underline; }

.field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fafafa;
  color: #09090b;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}

.field input:focus {
  background: #ffffff;
  border-color: #09090b;
  box-shadow: 0 0 0 3px rgba(9, 9, 11, .08);
}

.field input::placeholder { color: #a1a1aa; }

.field .field-hint {
  margin: 6px 0 0 2px;
  font-size: 12px;
  color: var(--muted);
}

.auth-btn {
  width: 100%;
  height: 44px;
  margin-top: 18px;
  border: 0;
  border-radius: 10px;
  background: #09090b;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: background .15s var(--ease);
}

.auth-btn:hover { background: #27272a; transform: none; filter: none; }
.auth-btn:active { background: #09090b; }
.auth-btn:disabled { opacity: .55; cursor: not-allowed; }

.auth-btn.secondary {
  margin-top: 10px;
  background: #ffffff;
  color: #09090b;
  border: 1px solid #e4e4e7;
  box-shadow: none;
}

.auth-btn.secondary:hover { background: #fafafa; }

.auth-msg {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #52525b;
}
.auth-msg:empty { display: none; }

.auth-msg.error { color: #dc2626; }
.auth-msg.ok { color: #059669; }

.auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f4f4f5;
  font-size: 13px;
  color: #71717a;
}

.auth-links a { color: #09090b; font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.auth-inline-btn {
  padding: 0;
  border: 0;
  background: none;
  color: #09090b;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.auth-inline-btn:hover { text-decoration: underline; }
.auth-inline-btn:disabled { color: #a1a1aa; cursor: not-allowed; text-decoration: none; }

.auth-note {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fafafa;
  color: #52525b;
  font-size: 12.5px;
  line-height: 1.55;
}

.auth-success {
  text-align: center;
  padding: 18px 0 6px;
}

.auth-success .tick {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 28px;
  font-weight: 800;
}

.auth-success h2 {
  margin: 0 0 8px;
  font-size: 23px;
  letter-spacing: -.02em;
  color: var(--ink);
}

.auth-success p { color: var(--muted); font-size: 14px; }

.auth-aside {
  position: sticky;
  top: 96px;
  padding: 30px 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(37, 99, 235, .08), transparent 55%),
    var(--surface);
}

.auth-aside h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -.025em;
  color: var(--ink);
}

.auth-aside p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.auth-aside ul {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.auth-aside li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}

.auth-aside li::before {
  content: "✓";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 11px;
  font-weight: 800;
}

/* ── 账户中心 ─────────────────────────────────────────────── */

.account-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.account-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.account-head h1 {
  margin: 6px 0 0;
  font-size: 32px;
  letter-spacing: -.035em;
  color: var(--ink);
}

.account-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-box {
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.stat-box .k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}

.stat-box .v {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.1;
}

.stat-box .v small { font-size: 14px; font-weight: 650; color: var(--muted); }

.account-card {
  margin-top: 16px;
  padding: 24px 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.account-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -.02em;
  color: var(--ink);
}

.account-card .muted { color: var(--muted); font-size: 13px; }

.account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.account-row:first-of-type { border-top: 0; }

.account-row .label { font-size: 13px; color: var(--muted); }
.account-row .value { font-size: 14px; font-weight: 650; color: var(--ink); word-break: break-all; }

.device-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.device-item:first-of-type { border-top: 0; }
.device-item .name { font-size: 14px; font-weight: 650; color: var(--ink); }
.device-item .meta { margin-top: 2px; font-size: 12px; color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--subtle);
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #bbf7d0; }
.badge.brand { background: #f4f4f5; color: #09090b; border-color: #d4d4d8; }

.link-btn {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.link-btn:hover { background: var(--subtle); }
.link-btn.danger { color: #dc2626; border-color: #fecaca; }
.link-btn.danger:hover { background: #fef2f2; }

/* ── 账户中心 · 网页充值 ─────────────────────────────────── */

#recharge [hidden] { display: none !important; }

#recharge { scroll-margin-top: 84px; }

.recharge-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recharge-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.field select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fafafa;
  color: #09090b;
  font: inherit;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}

.field select:focus {
  background: #ffffff;
  border-color: #09090b;
  box-shadow: 0 0 0 3px rgba(9, 9, 11, .08);
}

.recharge-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.recharge-quick button {
  min-width: 58px;
  padding: 5px 10px;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  background: #ffffff;
  color: #27272a;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.recharge-quick button:hover {
  background: #09090b;
  border-color: #09090b;
  color: #ffffff;
}

.recharge-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.recharge-note a { font-weight: 650; }

.recharge-pay {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 16px;
}

.recharge-qr {
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-1);
  overflow: hidden;
}

.recharge-qr svg,
.recharge-qr img {
  display: block;
  width: 100%;
  height: 100%;
}

.recharge-label {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}

.recharge-label + .recharge-amount { margin-top: 4px; }
.recharge-amount + .recharge-label { margin-top: 14px; }

.recharge-amount {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--ink);
  word-break: break-word;
}

.recharge-address {
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--subtle);
  color: var(--ink-2);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-all;
}

.recharge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.recharge-hint,
.recharge-expire {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.recharge-expire { margin-top: 4px; color: var(--dim); font-size: 12px; }

.recharge-done {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid #bbf7d0;
  border-radius: var(--r-md);
  background: var(--ok-soft);
}

.recharge-done .tick {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ok);
  font-size: 24px;
  font-weight: 800;
  box-shadow: var(--sh-1);
}

.recharge-done strong { display: block; font-size: 16px; color: var(--ink); }
.recharge-done p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

#rcDone .link-btn { margin-top: 12px; }

@media (max-width: 700px) {
  .recharge-form-grid { grid-template-columns: 1fr; }
  .recharge-pay { grid-template-columns: 1fr; gap: 14px; }
  .recharge-qr { width: 190px; height: 190px; margin: 0 auto; }
}

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 40px; }
  .auth-aside { position: static; min-width: 0; }
  .auth-card { min-width: 0; }
  .auth-aside p, .auth-aside li { overflow-wrap: anywhere; }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .auth-card { padding: 26px 20px 22px; }
  .auth-title { font-size: 26px; }
  .account-wrap { padding-top: 40px; }
  .account-head h1 { font-size: 27px; }
}


/* ── 账户中心 · 充值悬浮窗 ────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none !important; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 18px);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22), 0 2px 8px rgba(15, 23, 42, .08);
}

.modal-card .account-card.recharge-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--subtle);
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--line); color: var(--ink); }

body.modal-open { overflow: hidden; }

.stat-box .v { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.topup-btn {
  height: 28px;
  width: auto;
  margin-left: 3px;
  padding: 0 10px 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  background: #09090b;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: middle;
  transition: background .15s;
}
.topup-btn svg { width: 13px; height: 13px; display: block; flex: 0 0 auto; }
.topup-btn span { display: block; }
.topup-btn:hover { background: #27272a; }
.topup-btn:active { background: #09090b; }
.topup-btn:focus-visible { outline: 2px solid #09090b; outline-offset: 2px; }

@media (max-width: 560px) {
  .modal { padding: 10px; }
  .modal-card { max-height: calc(100vh - 20px); padding: 22px 16px 18px; }
}

.auth-google { margin: 0 0 14px; }
.auth-google-slot { display: flex; justify-content: center; min-height: 42px; max-width: 100%; overflow: hidden; }
@media (max-width: 520px) {
  .auth-wrap--single { margin: 28px auto 56px; }
  .auth-card { padding: 24px 18px 20px; }
}
.auth-google-btn {
  width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid #e4e4e7; border-radius: 10px; background: #ffffff; color: #09090b;
  font: 600 13.5px inherit; cursor: pointer; transition: background .15s;
}
.auth-google-btn:hover { background: #fafafa; }
.auth-google-btn[hidden] { display: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 14px 0 2px; color: #a1a1aa; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #e4e4e7; }
.auth-btn.ghost {
  margin-top: 10px; background: #ffffff; color: #09090b;
  border: 1px solid #e4e4e7; box-shadow: none;
}
.auth-btn.ghost:hover { background: #fafafa; }
#resetForm[hidden], #loginForm[hidden] { display: none; }
