:root {
  --bg: #0a0a0f;
  --surface: #14141f;
  --surface-hover: #1c1c2a;
  --accent: #ff3d2e;
  --accent-glow: rgba(255, 61, 46, 0.45);
  --gold: #ffc14d;
  --text: #f4f4f8;
  --muted: #9a9ab0;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% -10%, var(--accent-glow), transparent),
    radial-gradient(ellipse 40% 30% at 80% 100%, rgba(255, 193, 77, 0.12), transparent);
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page--center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

.subtitle {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.banner {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.banner code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.85em;
}

.banner--warn {
  background: rgba(255, 193, 77, 0.12);
  border: 1px solid rgba(255, 193, 77, 0.35);
  color: var(--gold);
}

.banner--error {
  background: rgba(255, 61, 46, 0.12);
  border: 1px solid rgba(255, 61, 46, 0.4);
  color: #ff8a80;
}

.hidden {
  display: none !important;
}

.plans {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plan-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem 1rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
}

.plan-card:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: rgba(255, 61, 46, 0.5);
  transform: translateY(-1px);
}

.plan-card:disabled {
  opacity: 0.6;
  cursor: wait;
}

.plan-card--popular {
  border-color: rgba(255, 193, 77, 0.45);
}

.plan-badge {
  position: absolute;
  top: -0.55rem;
  right: 1rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold);
  color: #1a1200;
  border-radius: 999px;
}

.plan-label {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.plan-desc {
  grid-column: 1;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.plan-price {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.footer-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(6px);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.status-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  max-width: 400px;
  width: 100%;
}

.status-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin: 1rem 0 0.5rem;
}

.status-card p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.status-card--success .spinner {
  display: none;
}

.status-card--success::before {
  content: '🥊';
  font-size: 3rem;
  display: block;
}

.status-card--error .spinner {
  border-top-color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-hover);
}
