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

:root {
  --surface: #0e0e11;
  --surface-container-low: #131316;
  --surface-container: #19191d;
  --surface-container-high: #202025;
  --surface-container-highest: #25252a;
  
  --primary: #ff8b9f;
  --primary-dim: #ff728f;
  --on-primary: #0e0e11;
  
  --secondary: #a68cff;
  
  --text: #acaaae; /* on_surface_variant */
  --text-primary: #f5f5f5; /* closer to white for headings */
  --outline-variant: #48474b;
  --ghost-border: rgba(72, 71, 75, 0.15);
  --shadow-diffused: 0px 12px 32px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--surface);
  color: var(--text);
}

.bg {
  position: fixed; inset: 0;
  background: 
    radial-gradient(ellipse at top left, rgba(166, 140, 255, 0.1), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 139, 159, 0.05), transparent 50%);
  pointer-events: none;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px;
  position: relative;
}

.header {
  padding: 16px 2px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-container-highest);
  border: 1px solid var(--ghost-border);
  box-shadow: var(--shadow-diffused);
  object-fit: contain;
  padding: 4px;
}

.title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

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

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-label {
  font-size: 11px;
  color: var(--text);
}

.lang-select {
  appearance: none;
  font-family: "Manrope", sans-serif;
  border: 1px solid var(--ghost-border);
  background: var(--surface-container-highest);
  color: var(--text-primary);
  padding: 8px 28px 8px 12px;
  border-radius: 9999px; /* full */
  font-size: 13px;
  outline: none;
  box-shadow: var(--shadow-diffused);
  background-image: 
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position: 
    calc(100% - 16px) calc(1em + 1px),
    calc(100% - 11px) calc(1em + 1px),
    0 0;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
}

.card {
  background: rgba(25, 25, 29, 0.8); /* surface_container with opacity */
  border: 1px solid var(--ghost-border);
  border-radius: 1.5rem; /* xl */
  padding: 24px;
  box-shadow: var(--shadow-diffused);
  backdrop-filter: blur(24px); /* Glassmorphism */
  margin-bottom: 24px;
}

.status {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-container-high);
  border: 1px solid var(--ghost-border);
}

.status.info { color: var(--secondary); background: rgba(166,140,255,0.1); }
.status.ok { color: #81c784; background: rgba(129,199,132,0.1); }
.status.err { color: var(--primary); background: rgba(255,139,159,0.1); }

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

.info-item {
  padding: 16px;
  border: 1px solid var(--ghost-border);
  border-radius: 1rem; /* lg */
  background: var(--surface-container-high);
}

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

.value {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
  line-height: 1.3;
}

.divider {
  height: 1px;
  background: var(--surface-container-highest);
  margin: 24px 0;
}

.supported { margin-top: 16px; }

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

.supported-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

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

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

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9999px;
  border: 1px solid var(--ghost-border);
  background: var(--surface-container-high);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

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

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

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

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

.payment-label {
  color: var(--text);
  font-size: 12px;
  margin: 0 0 8px 4px;
}

.payment-item {
  padding: 14px 16px;
  border-radius: 12px; /* md */
  border: none;
  background: var(--surface-container-high);
  min-height: 54px;
  box-shadow: none;
}

.card-element {
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  background: var(--surface-container-high);
  margin-bottom: 20px;
  min-height: 54px;
}

/* 支付进度 */
.pay-progress {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(166, 140, 255, 0.1);
  border: 1px solid rgba(166, 140, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.pay-progress-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  color: var(--secondary);
  font-size: 14px;
}

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

.spinner {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  border: 3px solid rgba(166, 140, 255, 0.2);
  border-top-color: var(--secondary);
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 支付成功 */
.pay-success {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 139, 159, 0.1);
  border: 1px solid rgba(255, 139, 159, 0.2);
  display: flex;
  align-items: center;
  gap: 16px;
}

.pay-success-icon {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 139, 159, 0.2);
  color: var(--primary);
  flex: 0 0 auto;
}

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

.pay-success-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  color: var(--primary);
  font-size: 16px;
}

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

.btn {
  width: 100%;
  border: none;
  background: var(--surface-container-high);
  color: var(--text-primary);
  padding: 16px;
  border-radius: 9999px; /* full */
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  margin-top: 24px;
  transition: opacity 0.2s ease, transform 0.1s ease;
  font-family: "Manrope", sans-serif;
}

.btn:active { transform: scale(0.98); }

.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
  color: var(--on-primary);
  box-shadow: 0 4px 16px rgba(255, 139, 159, 0.2);
}

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

.hint {
  margin-top: 24px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.6;
}

.hint-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

.footer {
  padding: 16px 2px 24px;
}

.fineprint {
  font-size: 11px;
  color: #666;
  line-height: 1.5;
  text-align: center;
}

.debug {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--ghost-border);
  background: var(--surface-container-lowest);
  font-size: 11px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-all;
}

@media (max-width: 380px) {
  .field-row { grid-template-columns: 1fr; }
  .title { font-size: 20px; }
}
