*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #f0f4f8;
  color: #1a1a1a;
}

body {
  padding-bottom: 100px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.header {
  background: linear-gradient(160deg, #1e4d9c 0%, #2b6cb0 55%, #3b82f6 100%);
  padding: 28px 20px 36px;
  text-align: center;
  color: #fff;
}

.header .brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 16px;
}

.header .label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.header .amount {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header .amount .currency {
  font-size: 28px;
  margin-right: 2px;
  vertical-align: 2px;
}

.main {
  max-width: 480px;
  margin: -20px auto 0;
  padding: 0 16px;
  position: relative;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(30, 77, 156, 0.08);
  padding: 20px 16px;
}

.card .title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.card .subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

.pay-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.pay-list li:active {
  transform: scale(0.99);
}

.pay-list li.selected {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #3b82f6;
}

.pay-list li img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.pay-list li .name {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.pay-list li .radio {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s;
}

.pay-list li.selected .radio {
  border-color: #3b82f6;
  background: #3b82f6;
}

.pay-list li.selected .radio::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: #fff;
  border-radius: 50%;
}

.pay-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  z-index: 100;
}

.pay-btn {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.pay-btn:active {
  background: #1d4ed8;
}

.pay-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.secure-note {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 16px;
  padding-bottom: 8px;
}
