diff --git a/add.html b/add.html
index f9cd26e..4992c30 100644
--- a/add.html
+++ b/add.html
@@ -175,6 +175,26 @@
padding: 3px 18px;
border-radius: 20px;
}
+ .pricing-badge-coupon {
+ display: none;
+ font-size: 12px;
+ font-weight: 700;
+ color: #f59e0b;
+ background: rgba(245, 158, 11, 0.1);
+ border: 1px solid rgba(245, 158, 11, 0.25);
+ border-radius: 6px;
+ padding: 3px 10px;
+ margin-top: 8px;
+ margin-bottom: 4px;
+ line-height: 1.4;
+ letter-spacing: 0.02em;
+ }
+ .pricing-badge-coupon.visible { display: inline-block; }
+ .pricing-badge-coupon.free {
+ color: #22c55e;
+ background: rgba(34, 197, 94, 0.1);
+ border-color: rgba(34, 197, 94, 0.25);
+ }
.pricing-plan-name {
font-size: 13px;
font-weight: 700;
@@ -364,6 +384,7 @@
$4.99
/ month
+ First Month —
✨ +$4.99 OpenRouter credits
For getting started with your first agent.
1GB RAM · 10GB HDD
@@ -404,6 +425,7 @@
$9.50
/ month
+ First Month —
✨ +$9.50 OpenRouter credits
The sweet spot for most users.
2GB RAM · 20GB HDD
@@ -455,6 +477,7 @@
$17.50
/ month
+ First Month —
✨ +$17.50 OpenRouter credits
For power users and teams.
4GB RAM · 40GB HDD
@@ -604,6 +627,29 @@
console.error('Order webhook failed:', err);
}
}
+
+ /* ── Coupon Badges ──────────────────────────────────────── */
+ const COUPONS = { friends499: 499, creator950: 950, friends1750: 1750 };
+ const PLAN_PRICES = { trainee: 499, junior: 950, senior: 1750 };
+ function centsToDollar(c) { return '$' + (c / 100).toFixed(2); }
+ function updateCouponBadges() {
+ var code = document.getElementById('pricing-coupon').value.trim().toLowerCase();
+ var discount = COUPONS[code];
+ ['trainee','junior','senior'].forEach(function(plan) {
+ var badge = document.getElementById('badge-' + plan);
+ if (discount !== undefined) {
+ var firstMonth = Math.max(0, PLAN_PRICES[plan] - discount);
+ badge.querySelector('.badge-price').textContent = centsToDollar(firstMonth);
+ badge.classList.add('visible');
+ if (firstMonth === 0) badge.classList.add('free');
+ else badge.classList.remove('free');
+ } else {
+ badge.classList.remove('visible', 'free');
+ badge.querySelector('.badge-price').textContent = '—';
+ }
+ });
+ }
+ document.getElementById('pricing-coupon').addEventListener('input', updateCouponBadges);