:root {
  --bg: #0a0a0f;
  --bg-elevated: #181822;
  --bg-card: #1e1e2a;
  --bg-card-hover: #282836;
  --bg-input: #131319;

  --text: #e4e4ed;
  --text-muted: #8888a0;
  --text-dim: #55556a;

  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --accent-strong: rgba(245, 158, 11, 0.25);

  --gradient-1: #f59e0b;
  --gradient-2: #ef4444;
  --gradient-3: #8b5cf6;

  --success: #4ade80;
  --error: #ef4444;
  --warning: #f59e0b;

  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-accent: rgba(245, 158, 11, 0.3);

  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 4px 20px rgba(245, 158, 11, 0.15);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ----------------------------------------------------------------
   Background
   ---------------------------------------------------------------- */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-bg .glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.page-bg .glow-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: rgba(245, 158, 11, 0.08);
}

.page-bg .glow-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  background: rgba(139, 92, 246, 0.06);
}

.page-bg .glow-3 {
  width: 400px;
  height: 400px;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(239, 68, 68, 0.04);
}

/* ----------------------------------------------------------------
   Layout
   ---------------------------------------------------------------- */

.shell {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----------------------------------------------------------------
   Navigation
   ---------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--text);
}

/* ----------------------------------------------------------------
   Hero
   ---------------------------------------------------------------- */

.hero {
  padding: 80px 0 48px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent-glow);
  border: 1px solid rgba(245, 158, 11, 0.15);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .lede {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ----------------------------------------------------------------
   Sections
   ---------------------------------------------------------------- */

.section {
  padding: 40px 0;
}

.section-tight {
  padding-top: 0;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.info-card h2 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.info-card p {
  color: var(--text-muted);
  max-width: 620px;
}

/* ----------------------------------------------------------------
   Product Cards
   ---------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  color: var(--text);
  font: inherit;
  appearance: none;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.product-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.product-card.selected {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 1px var(--border-accent), var(--shadow-accent);
  background: var(--bg-card-hover);
}

.product-card.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  border-radius: var(--radius) var(--radius) 0 0;
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.product-card .product-version {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: -4px;
  margin-bottom: 4px;
}

.product-card .product-price {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.product-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.product-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ----------------------------------------------------------------
   Badges
   ---------------------------------------------------------------- */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------
   Form
   ---------------------------------------------------------------- */

.checkout-form {
  display: grid;
  gap: 20px;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.recovery-step {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  background: rgba(9, 9, 16, 0.24);
}

.recovery-step.is-disabled {
  border-color: rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
}

.step-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.step-number {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  min-width: 1.5rem;
}

.step-title {
  margin: 0;
  font-size: 1.05rem;
}

.step-copy {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.verify-fieldset {
  display: grid;
  gap: 20px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.recovery-step.is-disabled .verify-fieldset {
  opacity: 0.46;
}

.recovery-step.is-disabled .primary[disabled] {
  cursor: not-allowed;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
}

input[readonly],
textarea[readonly] {
  color: var(--text-dim);
  cursor: default;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

textarea {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
}

.meta-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* ----------------------------------------------------------------
   Buttons & Actions
   ---------------------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

button,
a.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}

.primary {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.primary:hover {
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.primary[disabled] {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.secondary,
a.secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.secondary:hover,
a.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: var(--text);
}

/* ----------------------------------------------------------------
   Status Messages
   ---------------------------------------------------------------- */

.status-message {
  min-height: 1.5em;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
}

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

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

.status-copy {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.status-copy strong {
  color: var(--text);
}

.stack {
  display: grid;
  gap: 16px;
}

.stack[hidden] {
  display: none;
}

.lookup-results {
  display: grid;
  gap: 14px;
}

@media (max-width: 640px) {
  .recovery-step {
    padding: 20px;
  }

  .step-header {
    gap: 10px;
  }
}

.license-result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.license-result header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.license-result h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.license-result p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.license-result code,
.mono-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-light);
  word-break: break-all;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-field {
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.result-field .field-label {
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.result-field .field-value {
  color: var(--text);
  font-size: 0.92rem;
}

.license-link {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  transition: color var(--transition), border-color var(--transition);
}

.license-link:hover {
  color: var(--gradient-1);
  border-color: rgba(245, 158, 11, 0.7);
}

.result-actions {
  margin-top: 16px;
}

.result-action {
  min-width: 180px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pill.success {
  color: var(--success);
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.24);
}

.pill.warning {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.24);
}

/* ----------------------------------------------------------------
   Empty State
   ---------------------------------------------------------------- */

.empty-state {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-hover);
  color: var(--text-dim);
  text-align: center;
  font-size: 0.9rem;
}

/* ----------------------------------------------------------------
   Inline Checkout Layout (paddle_checkout)
   ---------------------------------------------------------------- */

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.checkout-frame-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 450px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.checkout-frame-wrapper:has(iframe) {
  border-color: var(--border-accent);
}

.checkout-frame-wrapper.checkout-success {
  border-color: var(--success);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(74, 222, 128, 0.1);
}

.paddle-checkout-container {
  width: 100%;
  min-height: 420px;
}

.checkout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------------
   Checkout Status Card
   ---------------------------------------------------------------- */

.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.status-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.status-field {
  display: grid;
  gap: 4px;
}

.status-field .field-label {
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-field .field-value {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  word-break: break-all;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.status-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ----------------------------------------------------------------
   Trust Bar
   ---------------------------------------------------------------- */

.trust-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 24px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-item svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.6;
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 32px 0;
  text-align: center;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  height: 24px;
  opacity: 0.4;
}

.footer p {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer a:hover {
  color: var(--accent);
}

/* ----------------------------------------------------------------
   Secure Checkout Indicator
   ---------------------------------------------------------------- */

.secure-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.secure-indicator svg {
  width: 14px;
  height: 14px;
  fill: var(--success);
  opacity: 0.7;
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */

@media (max-width: 720px) {
  .hero {
    padding: 48px 0 32px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .trust-bar {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .form-card {
    padding: 20px;
  }

  .info-card {
    flex-direction: column;
    align-items: start;
  }

  .nav-badge {
    display: none;
  }
}

@media (max-width: 480px) {
  .shell {
    padding: 0 16px;
  }

  .actions {
    flex-direction: column;
  }

  .hero-actions {
    flex-direction: column;
  }

  .actions button,
  .actions a,
  .hero-actions a {
    width: 100%;
  }

  .product-card {
    padding: 20px;
  }

  .nav-actions {
    gap: 12px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .license-result header {
    flex-direction: column;
  }
}
