:root {
  color-scheme: light;
  --paper: #f4f6fa;
  --ink: #142039;
  --muted: #536179;
  --line: #e0e6ef;
  --accent: #214bd9;
  --primary-hover: #173cb7;
  --focus: #426aff;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.header {
  height: 72px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid #e7ebf3;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 680; letter-spacing: -.07em; color: inherit; text-decoration: none; }
.brand-icon {
  display: grid; align-content: center; justify-items: center; gap: 3px; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); box-shadow: 0 3px 6px #214bd92c;
}
.brand-icon::before, .brand-icon::after { content: ""; width: 14px; height: 5px; border-radius: 1.5px; background: white; transform: skewX(-30deg); }
.brand-icon::before { margin-left: 4px; }
.brand-icon::after { margin-right: 4px; }
.nav { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 13px; }
.nav button { padding: 7px 12px; border: 1px solid var(--line); background: white; border-radius: 8px; color: var(--ink); font-size: 13px; }
.auth-page {
  min-height: calc(100svh - 72px); padding: 46px 24px 58px; display: grid; place-items: center;
  background: radial-gradient(ellipse at 48% 10%, #e9efff 0%, transparent 65%), var(--paper);
}
.auth-card {
  width: min(100%, 426px); background: white; border: 1px solid #dfe6f2; border-radius: 22px;
  box-shadow: 0 15px 48px #26395a0b, 0 2px 5px #2754a006; padding: 38px;
}
.auth-card h1 { margin: 0; font-size: 31px; font-weight: 710; letter-spacing: -.06em; line-height: 1.35; }
.auth-intro { margin: 9px 0 30px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.field { display: grid; gap: 9px; margin: 0 0 19px; }
.field label, .pay-label { font-weight: 640; font-size: 13px; color: #2a3954; }
.field input {
  height: 47px; width: 100%; padding: 0 13px; border: 1px solid var(--line);
  background: #fff; border-radius: 9px; color: var(--ink); font-size: 14px;
}
.field input::placeholder { color: #69768b; }
.password { position: relative; }
.password input { padding-right: 60px; }
.password button {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: #fff; color: var(--muted); font-size: 12px; padding: 5px;
}
.primary {
  border: 0; border-radius: 9px; min-height: 45px; color: white; background: var(--accent);
  font-size: 14px; font-weight: 650; padding: 0 18px; transition: background .18s;
}
.primary:hover { background: var(--primary-hover); }
.primary:disabled { opacity: .55; cursor: default; }
.auth-card .primary { width: 100%; margin-top: 6px; }
.auth-bottom { margin: 23px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.link-button { border: 0; color: var(--accent); background: none; padding: 5px 2px; font-weight: 620; }
.recharge-page { max-width: 632px; margin: 0 auto; padding: 29px 28px 34px; }
.recharge-page h1 { margin: 0 0 15px; font-size: 26px; line-height: 1.4; font-weight: 700; letter-spacing: -.045em; }
.balance {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: center; min-height: 116px;
  padding: 19px 24px; color: white; border-radius: 14px; background: linear-gradient(113deg,#192a62,#254baf);
}
.balance::after {
  content: ""; width: 260px; height: 260px; border: 1px solid #a2b7ff36; position: absolute;
  top: -85px; right: 18px; border-radius: 48px; transform: rotate(-29deg); z-index: -1;
  box-shadow: 0 0 0 28px #a9bdf51b, 0 0 0 60px #a9bdf511, 0 0 0 95px #a9bdf508;
}
.balance span { color: #dce5ff; font-size: 13px; font-weight: 540; }
.balance strong { margin-top: 4px; font-size: 38px; font-weight: 620; letter-spacing: -.047em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.balance strong small { font-size: 23px; margin-right: 4px; }
.recharge-card { border: 1px solid var(--line); background: #fff; border-radius: 15px; margin-top: 18px; padding: 20px 23px 22px; }
.recharge-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.recharge-card legend { padding: 0; font-weight: 670; font-size: 14px; margin-bottom: 12px; }
.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.amounts button {
  height: 43px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 620; font-variant-numeric: tabular-nums;
}
.amounts button[aria-pressed="true"] { color: #1e46c8; border-color: #4167ed; background: #f0f4ff; box-shadow: inset 0 0 0 .5px #4167ed; }
.custom { margin: 13px 0 18px; }
.custom input { height: 39px; font-size: 13px; }
.custom label { font-weight: 520; }
.pay-label { display: block; margin: 0 0 9px; }
.pay-method {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px; border-radius: 8px;
  border: 1px solid #dfe6f0; padding: 0 12px; background: #f9faff;
}
.pay-method strong { font-weight: 620; font-size: 13px; }
.pay-method span { color: var(--muted); font-size: 12px; }
.pay-submit { margin-top: 15px; width: 100%; }
dialog { border: 1px solid var(--line); border-radius: 15px; padding: 24px; max-width: 330px; color: var(--ink); }
dialog::backdrop { background: #0c183479; }
dialog h2 { margin: 0; font-size: 20px; }
dialog p { margin: 12px 0 20px; font-size: 14px; line-height: 1.55; color: var(--muted); }
@media(max-width: 520px) {
  .header { height: 62px; padding: 0 18px; }
  .auth-page { min-height: calc(100svh - 62px); padding: 28px 17px; }
  .auth-card { padding: 27px 22px; }
  .recharge-page { padding: 23px 17px 30px; }
  .recharge-card { padding: 18px 16px; }
}
.code-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.code-input button, .plain-button {
  border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; color: var(--accent);
  background: #f7f9ff; font-weight: 620; font-size: 13px; white-space: nowrap;
}
.code-input button:disabled { color: var(--muted); cursor: default; }
.feedback { margin: 13px 0; padding: 10px 12px; background: #fef1ef; border-radius: 8px; color: #8a3326; font-size: 13px; line-height: 1.55; }
.feedback.ok { background: #eff5ff; color: #21418c; }
.mode-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.dialog-actions { display: flex; gap: 8px; }
.dialog-actions .plain-button { min-height: 45px; }
