:root {
  color-scheme: dark;
  --bg: #07111c;
  --panel: rgba(14, 23, 38, 0.96);
  --line: rgba(87, 202, 255, 0.28);
  --text: #f6f8ff;
  --muted: #a9b6ca;
  --accent: #1677ff;
  --accent2: #5ee7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(22, 119, 255, 0.22), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(94, 231, 255, 0.16), transparent 30%),
    linear-gradient(160deg, #050a13, var(--bg) 58%, #071725);
  color: var(--text);
}

.alipay-page {
  display: grid;
  place-items: start center;
  padding: 28px 14px;
}

.pay-shell {
  width: min(100%, 480px);
}

.pay-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.brand-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-size: 30px;
  font-weight: 900;
}

h1 {
  margin: 0 0 6px;
  font-size: 32px;
  letter-spacing: 0;
}

p {
  margin: 0;
}

.brand-row p,
.status-line {
  color: var(--muted);
}

.pay-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 750;
}

input,
button {
  width: 100%;
  min-height: 56px;
  border-radius: 8px;
  font: inherit;
}

input {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.amount-input {
  min-height: 68px;
  font-size: 30px;
  font-weight: 800;
}

input::placeholder {
  color: rgba(246, 248, 255, 0.45);
}

.pay-submit {
  margin-top: 6px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #00b8ff);
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(22, 119, 255, 0.28);
}

.pay-submit:disabled {
  opacity: 0.72;
}

.status-line {
  min-height: 22px;
  line-height: 1.45;
}

.wait-page {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #fff;
  color: #172033;
  text-align: center;
}

.wait-page[hidden] {
  display: none;
}

.spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 5px solid #dfe8f7;
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.wait-page h2 {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

.wait-page p {
  color: #6b7280;
  font-size: 18px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 420px) {
  .alipay-page {
    padding-top: 18px;
  }

  .pay-card {
    padding: 22px;
  }

  h1 {
    font-size: 30px;
  }
}
