:root {
  --primary: #1f2a37;
  --primary-2: #111827;
  --accent: #1677d8;
  --accent-soft: #e9f3ff;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #18212f;
  --muted: #667085;
  --border: #d9e1ea;
  --success: #16a34a;
  --danger: #e11d48;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #f6f8fb 0%, #eef2f6 100%);
  color: var(--text);
  line-height: 1.5;
  padding: 24px;
}

.payment-shell {
  max-width: 720px;
  margin: 0 auto;
}

.payment-container {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 34px;
  border: 1px solid rgba(217, 225, 234, 0.7);
}

.header {
  text-align: center;
  margin-bottom: 24px;
}
.header h1 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  line-height: 1.08;
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.header p {
  font-size: 1.1rem;
  color: var(--muted);
}

.product-info {
  background: #f6f8fb;
  border: 1px solid #edf1f5;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 28px;
}
.product-price {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--accent);
}

.section-label {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.method-btn {
  appearance: none;
  border: 1px solid #cfd8e3;
  background: #fff;
  color: var(--text);
  min-height: 54px;
  border-radius: 14px;
  padding: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
}
.method-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.method-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 10px 18px rgba(22, 119, 216, 0.2);
}

.payment-details {
  text-align: center;
  padding: 6px 0 4px;
}
.qr-container {
  background: #fbfcfe;
  border: 1px dashed #cfd8e3;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
}
.qr-container img {
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}
.method-caption {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 8px;
}
.method-strong {
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 8px;
}
.hidden { display: none !important; }

.btn-submit,
.pay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #30383f, #1f2a37);
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
}
.btn-submit:hover,
.pay-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.verification-form {
  display: none;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #e6ebf1;
}
.form-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 18px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.form-group input {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid #d5dee8;
  background: #fff;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s ease;
}
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(22, 119, 216, 0.1);
}
.helper-note {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: -2px;
  margin-bottom: 18px;
}

.loading-spinner,
#success-msg,
#error-msg {
  text-align: center;
  padding: 18px 10px;
}
.loading-spinner { color: var(--muted); }
#success-msg {
  display: none;
  color: var(--success);
}
#error-msg {
  display: none;
  color: var(--danger);
}

@media (max-width: 720px) {
  body { padding: 14px; }
  .payment-container { padding: 22px 18px; border-radius: 20px; }
  .payment-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
