:root {
  --ink: #211936;
  --muted: #776f88;
  --blue: #6d4cf5;
  --cyan: #ff765f;
  --line: #e5deef;
  --paper: rgba(255, 253, 255, .95);
  --shadow: 0 26px 72px rgba(74, 50, 112, .15);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #f7f3fb;
  font: 15px/1.55 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; background: radial-gradient(circle at 12% 8%, #eee5ff 0, transparent 34%), radial-gradient(circle at 88% 17%, #ffe9df 0, transparent 31%), linear-gradient(145deg, #faf8fd 0%, #f6f1fb 52%, #fff8f3 100%); }
.backdrop::before { content: ""; position: absolute; width: 560px; height: 560px; left: -80px; bottom: -170px; opacity: .35; background-image: radial-gradient(circle, #9a83d8 1.2px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(130deg, #000, transparent 72%); }
.backdrop::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: 22%; border: 1px solid rgba(255,130,98,.24); border-radius: 46% 54% 61% 39%; transform: rotate(24deg); }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.backdrop i:nth-child(1) { width: 260px; height: 260px; right: 8%; top: -120px; background: rgba(255,177,123,.23); }
.backdrop i:nth-child(2) { width: 190px; height: 190px; left: 11%; top: 38%; border: 36px solid rgba(115,81,236,.07); }
.backdrop i:nth-child(3) { width: 320px; height: 320px; right: 19%; bottom: -220px; background: rgba(129,92,235,.1); }

.page-shell { width: min(960px, calc(100% - 34px)); margin: 0 auto; padding: 34px 0 24px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 16px; color: white; background: linear-gradient(145deg, #7656ed, #ff7a62); box-shadow: 0 12px 28px rgba(103,72,203,.22); }
.brand-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; line-height: 1.15; }
.brand small { color: #708095; font-size: 11px; margin-top: 3px; }
.header-actions { display: flex; gap: 11px; }
.header-actions a, .header-actions button { min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 17px; color: #53436f; background: rgba(255,255,255,.74); border: 1px solid #e1d8ec; border-radius: 999px; font-weight: 700; box-shadow: 0 7px 18px rgba(72,51,103,.07); }
.header-actions a:hover, .header-actions button:hover { border-color: #a891e8; background: white; transform: translateY(-1px); }
.header-actions b { color: #7252de; }

.hero { text-align: center; padding: 55px 10px 27px; }
.system-tag { display: inline-block; padding: 7px 18px; color: #9a4d36; background: rgba(255,244,232,.9); border: 1px solid #f2d2be; border-radius: 999px; font-size: 14px; font-weight: 800; box-shadow: 0 6px 18px rgba(140,79,50,.07); }
.hero h1 { margin: 18px 0 6px; font-size: clamp(38px, 5.1vw, 58px); line-height: 1.15; letter-spacing: -.045em; }
.hero h1 em { color: #6948e8; font-style: normal; }
.hero p { margin: 0; color: var(--muted); font-size: 16px; }

.stepper { width: min(520px, 80%); margin: 0 auto 27px; display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: start; }
.stepper > i { height: 2px; margin-top: 17px; background: #ded5e8; }
.step { min-width: 82px; text-align: center; color: #9aa7b7; }
.step span { width: 36px; height: 36px; display: grid; place-items: center; margin: 0 auto 8px; border-radius: 13px; color: #91879e; background: white; border: 1px solid #e2dbe9; font-weight: 800; box-shadow: 0 5px 14px rgba(73,48,102,.08); transform: rotate(4deg); }
.step strong { font-size: 13px; }
.step.active { color: var(--ink); }
.step.active span { color: white; border-color: transparent; background: linear-gradient(145deg, #6b4bec, #8f65e9); }
.step.done span { color: white; border-color: transparent; background: #e77b5e; }

.recharge-card { position: relative; width: min(810px, 100%); min-height: 225px; margin: 0 auto; padding: 31px 24px 22px; background: var(--paper); border: 1px solid #e1d8eb; border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: blur(14px); overflow: hidden; }
.accent-line { position: absolute; left: 28px; right: 28px; top: 0; height: 5px; background: linear-gradient(90deg, #704de9, #a45ee0, #ff8063); border-radius: 0 0 8px 8px; }
.step-panel { animation: enter .24s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.heading-icon { flex: 0 0 auto; width: 39px; height: 39px; display: grid; place-items: center; color: #714fe1; background: #f2ecff; border-radius: 13px; font-weight: 900; font-size: 18px; }
.panel-heading h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
label { display: block; margin: 0 0 7px; font-weight: 700; font-size: 13px; }
.label-row { display: flex; justify-content: space-between; gap: 14px; }
.label-row a { color: #6b4bd8; font-size: 12px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #dfd7e8; border-radius: 12px; outline: none; color: var(--ink); background: rgba(251,249,253,.94); padding: 13px 15px; transition: border-color .2s, box-shadow .2s, background .2s; }
textarea { resize: vertical; min-height: 122px; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
input:focus, textarea:focus { border-color: #8a6be0; box-shadow: 0 0 0 4px rgba(111,77,228,.09); background: white; }
.primary-button, .back-button { min-height: 43px; border: 0; border-radius: 12px; font-weight: 800; }
.primary-button { width: 100%; margin-top: 14px; color: white; background: linear-gradient(105deg, #6545df, #8d5de2 58%, #f47a61); box-shadow: 0 11px 25px rgba(104,71,204,.2); }
.primary-button:hover { filter: brightness(1.03); }
.primary-button:disabled { opacity: .58; cursor: wait; }
.back-button { min-width: 105px; padding: 0 18px; color: #625775; background: #f0ebf5; }
.button-row { display: grid; grid-template-columns: 110px 1fr; gap: 11px; margin-top: 15px; }
.button-row .primary-button { margin-top: 0; }
.privacy-note, .warning-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #607289; font-size: 12px; }
.privacy-note span, .warning-note span { width: 19px; height: 19px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: white; background: #7c60d8; font-weight: 800; }
.warning-note { padding: 10px 12px; color: #92513f; background: #fff5ef; border: 1px solid #f0d2c6; border-radius: 12px; }
.warning-note span { background: #e47a5c; }
.review-list, .result-list { margin: 0; border: 1px solid #dbe6ee; border-radius: 8px; overflow: hidden; }
.review-list div, .result-list div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 10px 13px; border-bottom: 1px solid #e4ebf1; }
.review-list div:last-child, .result-list div:last-child { border-bottom: 0; }
.review-list dt, .result-list dt { color: var(--muted); }
.review-list dd, .result-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

.result-panel { text-align: center; padding: 15px 8%; }
.result-icon { width: 57px; height: 57px; display: grid; place-items: center; margin: 0 auto 9px; border-radius: 18px; color: white; background: #7d5dde; font-size: 27px; box-shadow: 0 9px 24px rgba(101,72,197,.22); transform: rotate(3deg); }
.result-icon.processing { background: #e4775d; animation: pulse 1.5s infinite; }
.result-icon.failed { background: #d95a63; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(50,132,213,.08); } }
.result-status { display: inline-block; padding: 3px 10px; color: #238063; background: #e7f7f1; border-radius: 999px; font-size: 11px; font-weight: 800; }
.result-status.processing { color: #276dae; background: #e8f2fb; }
.result-status.failed { color: #aa3e48; background: #fbeaec; }
.result-panel h2 { margin: 9px 0 4px; font-size: 24px; }
.result-panel > p { margin: 0 0 17px; color: var(--muted); }
.result-list { text-align: left; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 15px; }
.result-actions .primary-button { width: auto; min-width: 160px; margin: 0; padding: 0 20px; }

.page-status { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 21px auto 0; color: #6e55b3; font-size: 12px; }
.page-status span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; color: white; background: #7b60ca; font-size: 11px; }
footer { text-align: center; margin-top: 20px; color: #93a1b1; font-size: 12px; }

dialog { width: min(480px, calc(100% - 28px)); border: 0; border-radius: 13px; padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(18,52,82,.3); }
dialog::backdrop { background: rgba(16,43,69,.42); backdrop-filter: blur(5px); }
dialog form { padding: 24px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.dialog-head h2 { margin: 0; font-size: 21px; }
.dialog-head button { border: 0; background: none; color: #8290a1; font-size: 26px; }
dialog > form > p { color: var(--muted); font-size: 13px; }
.guide-list { list-style: none; margin: 5px 0 20px; padding: 0; }
.guide-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e4ebf1; }
.guide-list li > span { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: white; background: linear-gradient(145deg, var(--blue), var(--cyan)); font-weight: 800; }
.guide-list p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
#toast { position: fixed; right: 22px; bottom: 22px; max-width: 360px; padding: 12px 16px; color: white; background: #173655; border-radius: 8px; box-shadow: 0 15px 35px rgba(15,42,68,.25); opacity: 0; transform: translateY(9px); pointer-events: none; transition: .2s; z-index: 50; }
#toast.show { opacity: 1; transform: none; }

@media (max-width: 680px) {
  .page-shell { width: min(100% - 22px, 960px); padding-top: 16px; }
  .brand small { display: none; }
  .brand-icon { width: 39px; height: 39px; }
  .header-actions { gap: 6px; }
  .header-actions a, .header-actions button { min-width: 39px; min-height: 39px; justify-content: center; padding: 0 10px; }
  .header-actions span { display: none; }
  .hero { padding: 42px 0 22px; }
  .hero h1 { font-size: 35px; }
  .hero p { font-size: 13px; }
  .stepper { width: 100%; }
  .step { min-width: 74px; }
  .recharge-card { padding: 25px 15px 16px; }
  .button-row { grid-template-columns: 88px 1fr; }
  .review-list div, .result-list div { grid-template-columns: 95px 1fr; gap: 10px; }
  .result-panel { padding-inline: 0; }
}
