:root {
  --bg: #000000;
  --surface: #0c0c0e;
  --surface-raised: #131316;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-secondary: #a4a4ab;
  --text-tertiary: #7a7a80;
  --success: #34d399;
  --error: #f87171;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --pill-bg: #eeeeee;
  --pill-text: #0a0a0a;
  --shadow-card: 0 24px 70px -20px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.45);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* Brand bar */
.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 20px 0;
}

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

.brand-mark__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.brand-mark__name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-bar__secure {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0;
}

.brand-bar__secure svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* Layout */
.checkout-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.checkout-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  animation: card-in 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-card {
    animation: none;
  }
}

.checkout-header {
  text-align: center;
  margin-bottom: 24px;
}

.checkout-header h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
  color: var(--text);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 34ch;
  margin: 0 auto;
}

/* Device indicator, shown as a quiet tag rather than an emoji */
.device-indicator {
  display: inline-flex;
  align-items: center;
  margin: 0 auto 20px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.device-indicator:empty {
  display: none;
}
.device-indicator-wrap {
  text-align: center;
}

/* Pricing panel (desktop) */
.pricing-info {
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

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

.trust-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.trust-checklist svg {
  flex-shrink: 0;
  color: var(--success);
}

/* Pricing panel (mobile-compact variant, CSS toggles which one shows) */
.pricing-info-mobile {
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  text-align: center;
}

.mobile-note {
  color: var(--text-tertiary);
  font-size: 12px;
}

/* Whop embed container */
#whop-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 420px;
  background: var(--surface-raised);
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 100px 20px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--text-secondary);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

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

/* Status area */
#status-area {
  margin-top: 18px;
}
#status-area:empty {
  display: none;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.status-success {
  color: var(--success);
}

.status-error {
  color: var(--error);
}

/* Fallback */
.fallback-section {
  text-align: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.fallback-section p {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.fallback-section a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
}

/* Pill button, matches Unbound's own light CTA */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-text);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: none;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), filter 160ms ease;
}

.pill-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.pill-btn:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

/* Confirm page specifics */
.confirm-card {
  text-align: center;
}

.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 20px;
}

.status-icon--success {
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
}

.status-icon--error {
  background: rgba(248, 113, 113, 0.12);
  color: var(--error);
}

.confirm-card h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.confirm-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  max-width: 36ch;
  margin: 0 auto 24px;
}

/* Desktop-specific: hide mobile pricing */
@media (min-width: 561px) {
  .pricing-info-mobile {
    display: none !important;
  }
  .pricing-info {
    display: block !important;
  }
}

/* Mobile-specific: hide desktop pricing */
@media (max-width: 560px) {
  .pricing-info {
    display: none !important;
  }
  .pricing-info-mobile {
    display: block !important;
  }
  .checkout-card {
    padding: 26px 20px;
  }
  .brand-bar {
    padding: 16px 16px 0;
  }
}
