@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --page: #fff8c9;
  --panel: #ffffff;
  --panel-soft: #fffbea;
  --ink: #111633;
  --muted: #667085;
  --line: #182044;
  --yellow: #ffd51d;
  --yellow-strong: #ff9f00;
  --blue: #2f80ed;
  --blue-soft: #eaf3ff;
  --green: #12b76a;
  --green-soft: #ecfdf3;
  --red: #f04438;
  --red-soft: #fff1f0;
  --shadow: 0 16px 36px rgba(17, 22, 51, 0.16);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 213, 29, 0.55) 0 8%, transparent 9%),
    radial-gradient(circle at 82% 8%, rgba(47, 128, 237, 0.13) 0 12%, transparent 13%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.86), rgba(255, 244, 142, 0.46)),
    var(--page);
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.38;
  background:
    repeating-radial-gradient(circle at 92% 16%, rgba(17, 22, 51, 0.12) 0 2px, transparent 3px 18px),
    repeating-linear-gradient(105deg, transparent 0 28px, rgba(255, 159, 0, 0.2) 29px 31px);
}

.page {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 20px 16px 28px;
  position: relative;
}

.header {
  padding: 10px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--yellow);
  box-shadow: 4px 4px 0 rgba(17, 22, 51, 0.18);
  object-fit: cover;
  flex: 0 0 auto;
}

.title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: 0;
}

.sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow), 6px 6px 0 rgba(17, 22, 51, 0.12);
  margin-bottom: 18px;
}

.status {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--line);
  background: var(--blue-soft);
}

.status.info { color: #175cd3; background: var(--blue-soft); }
.status.ok { color: #067647; background: var(--green-soft); }
.status.err { color: #b42318; background: var(--red-soft); }

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0;
}

.info-item {
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.value {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  word-break: break-all;
  line-height: 1.35;
}

.divider {
  height: 2px;
  background: var(--line);
  margin: 22px 0;
  opacity: 0.12;
}

.supported { margin-top: 16px; }

.supported-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.supported-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.supported-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.supported-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(17, 22, 51, 0.18);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(17, 22, 51, 0.08);
}

.brand-icon {
  width: 34px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand-icon img {
  width: 34px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.awx-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.payment-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 8px 2px;
}

.payment-item,
.card-element {
  padding: 14px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: #ffffff;
  min-height: 54px;
  box-shadow: inset 0 0 0 1px rgba(255, 213, 29, 0.18);
}

.card-element {
  margin-bottom: 20px;
}

.pay-progress,
.pay-success {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}

.pay-progress {
  background: var(--blue-soft);
}

.pay-success {
  background: var(--green-soft);
}

.pay-progress-text,
.pay-success-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pay-progress-title,
.pay-success-title {
  font-weight: 800;
  color: var(--ink);
  font-size: 14px;
}

.pay-success-title {
  font-size: 16px;
}

.pay-progress-desc,
.pay-success-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid rgba(47, 128, 237, 0.2);
  border-top-color: var(--blue);
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}

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

.pay-success-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: white;
  flex: 0 0 auto;
}

.btn {
  width: 100%;
  border: 2px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 15px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s ease;
  font-family: inherit;
  box-shadow: 4px 4px 0 rgba(17, 22, 51, 0.12);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(17, 22, 51, 0.12);
}

.btn.primary {
  background: linear-gradient(180deg, var(--yellow), var(--yellow-strong));
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hint {
  margin-top: 22px;
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  background: var(--panel-soft);
  border: 1px solid rgba(17, 22, 51, 0.15);
  border-radius: 8px;
}

.hint-title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 7px;
}

.hint ul {
  margin: 0;
  padding-left: 16px;
}

.footer {
  padding: 10px 2px 18px;
}

.fineprint {
  font-size: 11px;
  color: rgba(17, 22, 51, 0.62);
  line-height: 1.5;
  text-align: center;
}

.debug {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(17, 22, 51, 0.18);
  background: #ffffff;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-all;
}

@media (max-width: 420px) {
  .page { padding: 16px 12px 24px; }
  .header { align-items: center; }
  .brand { gap: 10px; }
  .logo { width: 44px; height: 44px; }
  .title { font-size: 21px; }
  .card { padding: 16px; }
}

@media (max-width: 380px) {
  .field-row { grid-template-columns: 1fr; }
  .sub { white-space: normal; }
}
