/* ═══════════════════════════════════════════════════════════
   Buy Page — Styles
   ═══════════════════════════════════════════════════════════ */

.buy-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 140px 24px 80px;
  position: relative;
  z-index: 1;
}

.buy-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--primary-glow-strong) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.buy-header {
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  animation: fadeSlideUp 0.6s ease-out;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.buy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--primary-glow);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 28px;
}

.buy-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.buy-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Pricing Card ───────────────────────────────────────── */
.pricing-card {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  animation: fadeSlideUp 0.6s ease-out 0.15s both;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.pricing-top {
  text-align: center;
  margin-bottom: 32px;
}

.pricing-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pricing-price {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 8px 0;
}

.pricing-price .currency {
  font-size: inherit;
  vertical-align: baseline;
  color: var(--text-muted);
  font-weight: 600;
}

.pricing-period {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Step 1: Email ──────────────────────────────────────── */
.email-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.sepay-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.sepay-input:focus {
  border-color: var(--primary);
}

.sepay-input::placeholder {
  color: var(--text-muted);
}

.sepay-error {
  color: #EF4444;
  font-size: 0.8rem;
}

.payment-error-msg {
  color: #EF4444;
  font-size: 0.82rem;
  text-align: center;
  margin-top: 12px;
  display: none;
}

.payment-btn {
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

/* ─── Step 2: Choose Payment ─────────────────────────────── */
.step-email-display {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
}

.step-email-display strong {
  color: var(--text-primary);
  font-size: 0.95rem;
  word-break: break-all;
}

.change-link {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.change-link:hover {
  text-decoration: underline;
}

.payment-choose-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  width: 100%;
}

.payment-option:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.payment-option-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.payment-option-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-option-info strong {
  font-size: 0.9rem;
  font-weight: 700;
}

.payment-option-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.payment-option-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

/* ─── Step 3: Bank Transfer ──────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
}

.bank-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.bank-row:last-child {
  border-bottom: none;
}

.bank-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bank-value {
  font-size: 0.9rem;
  font-weight: 600;
}

.bank-value.highlight {
  color: var(--primary);
}

.code-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Courier New', monospace;
  color: var(--primary);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: var(--primary-glow);
}

/* QR */
.qr-container {
  text-align: center;
  margin-bottom: 20px;
}

.qr-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.qr-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 12px;
  min-width: 200px;
  min-height: 200px;
}

.qr-loading {
  font-size: 0.85rem;
  color: #666;
}

.qr-wrapper img {
  max-width: 180px;
  border-radius: 4px;
}

/* Notes */
.sepay-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ─── Polar Wait ─────────────────────────────────────────── */
.polar-wait-box {
  text-align: center;
  padding: 32px 16px;
}

.polar-wait-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.polar-wait-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.polar-wait-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.reopen-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.reopen-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Polling */
.polling-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.polling-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

/* ─── Step 4: Success ────────────────────────────────────── */
.success-box {
  text-align: center;
  padding: 24px;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.success-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #22C55E;
}

.success-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.license-key-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.license-key-box code {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.success-email {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .buy-section {
    padding: 120px 20px 50px;
  }

  .pricing-price {
    font-size: 3rem;
  }

  .pricing-card {
    padding: 28px 24px;
  }
}

@media (max-width: 480px) {

  .payment-option {
    padding: 14px 16px;
  }

  .bank-info-grid {
    font-size: 0.82rem;
  }

  .qr-image {
    max-width: 220px;
  }

  .license-key-box {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    width: 100%;
  }

  .license-key-box code {
    font-size: 0.95rem;
    word-break: break-all;
  }

  .pricing-card {
    padding: 24px 18px;
  }

  .pricing-price {
    font-size: 2.5rem;
  }
}