* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #008a2e;
  --green-dark: #007026;
  --text: #1c1c1c;
  --muted: #5b6570;
  --border: #cfd4da;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #16202a;
}

/* ------------------------------------------------------------------ */
/* Background: dark base + blue curved shape on the left               */
/* ------------------------------------------------------------------ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, #2b3a47 0%, #1b2733 55%, #101820 100%);
}

.bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -48%;
  width: 108%;
  height: 185%;
  transform: translateY(-50%);
  background: linear-gradient(150deg, #2f95e6 0%, #1f74c9 55%, #1a5fb0 100%);
  border-radius: 50%;
}

/* ------------------------------------------------------------------ */
/* Logo                                                                */
/* ------------------------------------------------------------------ */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12vh;
  margin-bottom: 34px;
  user-select: none;
}

.logo-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.logo-divider {
  width: 2px;
  height: 40px;
  background: #1c1c1c;
  opacity: 0.85;
}

.logo-text {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #141414;
}

.logo-text sup {
  font-size: 12px;
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Card                                                                */
/* ------------------------------------------------------------------ */
.card {
  width: calc(100% - 40px);
  max-width: 400px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  padding: 28px 26px 30px;
}

.card h1 {
  font-size: 27px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 22px;
}

.error {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #e02b2b;
  text-align: center;
  margin-bottom: 18px;
}

.success {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  text-align: center;
  padding: 20px 0;
}

/* Wire Payment page (pay.html) body text */
.pay-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* Verify Payment page (verify.html): Yes / No buttons */
.pay-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* ------------------------------------------------------------------ */
/* Form fields                                                         */
/* ------------------------------------------------------------------ */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 14px 14px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder {
  color: #9aa3ad;
}

.field input:focus {
  border-color: #2f95e6;
  box-shadow: 0 0 0 3px rgba(47, 149, 230, 0.15);
}

/* ------------------------------------------------------------------ */
/* Button                                                              */
/* ------------------------------------------------------------------ */
.btn {
  width: 100%;
  padding: 16px;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--green-dark);
}

/* Red "No" button (Verify Payment page) — must come after .btn to win */
.btn-danger {
  background: #d0342c;
}

.btn-danger:hover {
  background: #b52b23;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/* Spinner view                                                        */
/* ------------------------------------------------------------------ */
.spinner-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 40vh;
}

.spinner-wrap.active {
  display: flex;
}

.spinner {
  width: 66px;
  height: 66px;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-top-color: #37b24d;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hide the form view when spinner is active */
body.waiting .card {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Verify pages: validation error + processing spinner                 */
/* (elements are injected by js/verify.js inside .verify-form)         */
/* ------------------------------------------------------------------ */
.verify-error {
  display: none;
  background: #fdecea;
  border: 1px solid #f5c6c1;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: #c81e1e;
  margin-bottom: 16px;
}

.verify-spinner {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 22px 0 10px;
}

.verify-spinner-circle {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.verify-spinner-text {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

/* While processing: hide the inputs, show the spinner */
.verify-form.processing .field,
.verify-form.processing .btn {
  display: none;
}

.verify-form.processing .verify-spinner {
  display: flex;
}

@media (max-width: 480px) {
  .logo {
    margin-top: 8vh;
  }
  .card {
    padding: 24px 22px 28px;
  }
}
