@seaverse/payment-sdk 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2198,24 +2198,19 @@ class PaymentModal {
2198
2198
  *
2199
2199
  * 设计风格:深色卡片 + 清晰信息层次 + 渐变 CTA 按钮
2200
2200
  */
2201
- /* ─── 设计 Token(深色主题) ─── */
2201
+ /* ─── 设计 Token(与 order-popups PendingPopup 一致) ─── */
2202
2202
  const D = {
2203
- // 背景
2204
- bgOverlay: 'rgba(0, 0, 0, 0.80)',
2205
- bgCard: 'linear-gradient(180deg, #1e293b 0%, #0f172a 100%)',
2206
- bgInnerCard: 'rgba(255, 255, 255, 0.04)',
2207
- bgInnerBorder: 'rgba(255, 255, 255, 0.08)',
2208
- // 文字
2209
- textWhite: '#fff',
2210
- textSecondary: 'rgba(255, 255, 255, 0.55)',
2211
- // 强调色
2212
- accentRed: '#f87171',
2213
- accentTeal: 'linear-gradient(135deg, #2dd4bf 0%, #22d3ee 100%)',
2214
- accentTealShadow: 'rgba(45, 212, 191, 0.35)',
2215
- // 分隔线
2216
- divider: 'rgba(255, 255, 255, 0.06)',
2217
- // 圆角
2218
- radiusCard: '20px',
2203
+ bgOverlay: 'rgba(0, 0, 0, 0.85)',
2204
+ bgCard: '#121212',
2205
+ bgCardBorder: 'rgba(44, 44, 46, 0.6)',
2206
+ bgSurface: '#1E1E1E',
2207
+ bgSurfaceHighlight: '#2A2A2E',
2208
+ borderSubtle: 'rgba(255, 255, 255, 0.05)',
2209
+ textWhite: '#FFFFFF',
2210
+ textMuted: '#A1A1AA',
2211
+ timerRed: '#EF4444',
2212
+ brandGreen: '#10B981',
2213
+ radiusCard: '24px',
2219
2214
  radiusInner: '12px',
2220
2215
  radiusBtn: '12px',
2221
2216
  };
@@ -2277,27 +2272,30 @@ class RetentionModal {
2277
2272
  */
2278
2273
  createModal() {
2279
2274
  const { language, productName, purchaseAmount, bonusAmount, discountPrice } = this.options;
2280
- const isZh = language === 'zh';
2275
+ const lang = language ?? 'en';
2276
+ const isZh = lang === 'zh' || lang === 'zh-TW';
2281
2277
  const t = isZh ? {
2282
2278
  title: '你有一笔订单待支付',
2283
- timePrefix: '请在',
2284
- timeSuffix: '内支付,超时订单将自动取消',
2285
- productLabel: 'Product:',
2286
- amountLabel: 'Amount:',
2287
- bonusLabel: 'Bonus:',
2279
+ timePrefix: '请在 ',
2280
+ timeSuffix: ' 内支付,超时自动取消',
2281
+ productLabel: '商品',
2282
+ quantityLabel: '数量',
2283
+ priceLabel: '优惠价',
2284
+ bonusLabel: '奖励',
2288
2285
  cancelBtn: '取消',
2289
2286
  continueBtn: '继续支付',
2290
2287
  } : {
2291
2288
  title: 'You have a pending order',
2292
- timePrefix: 'Please pay within',
2293
- timeSuffix: 'or the order will be automatically cancelled',
2289
+ timePrefix: 'Please pay within ',
2290
+ timeSuffix: ', auto-cancelled if timeout',
2294
2291
  productLabel: 'Product:',
2295
- amountLabel: 'Amount:',
2292
+ quantityLabel: 'Quantity:',
2293
+ priceLabel: 'Price:',
2296
2294
  bonusLabel: 'Bonus:',
2297
2295
  cancelBtn: 'Cancel',
2298
- continueBtn: 'Continue Payment',
2296
+ continueBtn: 'Pay Now',
2299
2297
  };
2300
- // ─── 遮罩 ───
2298
+ // ─── 遮罩(与 order-popups 一致) ───
2301
2299
  this.overlay = document.createElement('div');
2302
2300
  this.overlay.id = 'retention-modal-overlay';
2303
2301
  this.overlay.style.cssText = `
@@ -2305,137 +2303,130 @@ class RetentionModal {
2305
2303
  display: flex; align-items: center; justify-content: center;
2306
2304
  padding: 24px;
2307
2305
  background: ${D.bgOverlay};
2308
- backdrop-filter: blur(6px);
2306
+ backdrop-filter: blur(8px);
2309
2307
  animation: rm-fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
2310
2308
  `;
2311
- // ─── 卡片 ───
2309
+ // ─── 卡片(order-popups: bg-dark-card, rounded-[24px], border dark-border) ───
2312
2310
  this.modal = document.createElement('div');
2313
2311
  this.modal.style.cssText = `
2314
2312
  position: relative;
2315
- width: 90vw; max-width: 520px;
2313
+ width: 90vw; max-width: 500px; min-width: 420px;
2316
2314
  border-radius: ${D.radiusCard};
2317
2315
  background: ${D.bgCard};
2318
- box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
2316
+ border: 1px solid ${D.bgCardBorder};
2317
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
2318
+ padding: 24px;
2319
2319
  animation: rm-slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
2320
2320
  overflow: hidden;
2321
2321
  `;
2322
- // ─── 构建 HTML ───
2322
+ // ─── 构建 HTML(与 order-popups PendingPopup + 图片布局一致) ───
2323
2323
  this.modal.innerHTML = `
2324
- <!-- 关闭按钮 -->
2324
+ <!-- 关闭按钮(order-popups: top-5 right-5, rounded-full, text-dark-muted) -->
2325
2325
  <button type="button" id="retention-modal-close-btn" style="
2326
- position: absolute; top: 18px; right: 18px; z-index: 10;
2327
- display: flex; width: 34px; height: 34px;
2326
+ position: absolute; top: 20px; right: 20px; z-index: 10;
2327
+ display: flex; width: 40px; height: 40px;
2328
2328
  align-items: center; justify-content: center;
2329
2329
  border-radius: 50%;
2330
- background: rgba(255,255,255,0.08);
2331
- color: rgba(255,255,255,0.5);
2330
+ background: transparent;
2331
+ color: ${D.textMuted};
2332
2332
  border: none; cursor: pointer;
2333
- transition: all 0.2s;
2333
+ transition: color 0.2s, background 0.2s;
2334
2334
  ">
2335
- <svg width="18" height="18" viewBox="0 0 24 24" fill="none">
2336
- <path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
2335
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2336
+ <line x1="18" y1="6" x2="6" y2="18"></line>
2337
+ <line x1="6" y1="6" x2="18" y2="18"></line>
2337
2338
  </svg>
2338
2339
  </button>
2339
2340
 
2340
- <!-- 标题区域 -->
2341
- <div style="padding: 44px 36px 28px; text-align: center;">
2342
- <h2 style="
2343
- margin: 0 0 14px;
2344
- font-size: 22px;
2341
+ <!-- 标题区域(order-popups: text-2xl font-bold, timer in red font-mono) -->
2342
+ <div style="padding: 16px 0 32px; text-align: center;">
2343
+ <h1 style="
2344
+ margin: 0 0 8px;
2345
+ font-size: 24px;
2345
2346
  font-weight: 700;
2346
2347
  color: ${D.textWhite};
2347
- letter-spacing: -0.3px;
2348
- ">${t.title}</h2>
2348
+ letter-spacing: -0.02em;
2349
+ ">${t.title}</h1>
2349
2350
  <p style="
2350
2351
  margin: 0;
2351
2352
  font-size: 14px;
2352
- color: ${D.textSecondary};
2353
- line-height: 1.5;
2353
+ color: ${D.textMuted};
2354
+ display: flex;
2355
+ align-items: center;
2356
+ justify-content: center;
2357
+ flex-wrap: wrap;
2358
+ gap: 2px;
2354
2359
  ">
2355
- ${t.timePrefix}
2356
- <span id="countdown-display" style="
2357
- color: ${D.accentRed};
2360
+ ${t.timePrefix}<span id="countdown-display" style="
2361
+ color: ${D.timerRed};
2358
2362
  font-weight: 700;
2359
2363
  font-variant-numeric: tabular-nums;
2360
- ">00:15:00</span>
2361
- ${t.timeSuffix}
2364
+ font-family: ui-monospace, monospace;
2365
+ ">00:15:00</span>${t.timeSuffix}
2362
2366
  </p>
2363
2367
  </div>
2364
2368
 
2365
- <!-- 分隔线 -->
2366
- <div style="height: 1px; background: ${D.divider}; margin: 0 36px;"></div>
2367
-
2368
- <!-- 订单详情 -->
2369
- <div style="padding: 28px 36px;">
2370
- <div style="
2371
- border-radius: ${D.radiusInner};
2372
- border: 1px solid ${D.bgInnerBorder};
2373
- background: ${D.bgInnerCard};
2374
- overflow: hidden;
2375
- ">
2376
- <!-- Product -->
2377
- <div style="
2378
- display: flex; align-items: center; justify-content: space-between;
2379
- padding: 16px 20px;
2380
- border-bottom: 1px solid ${D.divider};
2381
- ">
2382
- <span style="font-size: 14px; color: ${D.textSecondary};">${t.productLabel}</span>
2383
- <span style="font-size: 14px; font-weight: 600; color: ${D.textWhite};">${this.escapeHtml(productName)}</span>
2369
+ <!-- 订单详情卡片(order-popups: rounded-xl border border-white/5,上 part surface,下 part surfaceHighlight) -->
2370
+ <div style="
2371
+ border-radius: ${D.radiusInner};
2372
+ overflow: hidden;
2373
+ border: 1px solid ${D.borderSubtle};
2374
+ margin-bottom: 32px;
2375
+ ">
2376
+ <!-- 上:Product + Quantity -->
2377
+ <div style="background: ${D.bgSurface}; padding: 20px; display: flex; flex-direction: column; gap: 16px;">
2378
+ <div style="display: flex; justify-content: space-between; align-items: center; font-size: 14px;">
2379
+ <span style="color: ${D.textMuted}; min-width: 64px;">${t.productLabel}</span>
2380
+ <span style="color: ${D.textWhite}; font-weight: 500; text-align: right; word-break: break-word;">${this.escapeHtml(productName)}</span>
2384
2381
  </div>
2385
-
2386
- <!-- Amount -->
2387
- <div style="
2388
- display: flex; align-items: center; justify-content: space-between;
2389
- padding: 16px 20px;
2390
- border-bottom: 1px solid ${D.divider};
2391
- ">
2392
- <span style="font-size: 14px; color: ${D.textSecondary};">${t.amountLabel}</span>
2393
- <span style="font-size: 14px; font-weight: 600; color: ${D.textWhite};">${discountPrice}</span>
2382
+ <div style="display: flex; justify-content: space-between; align-items: center; font-size: 14px;">
2383
+ <span style="color: ${D.textMuted}; min-width: 64px;">${t.quantityLabel}</span>
2384
+ <span style="color: ${D.textWhite}; font-weight: 500; text-align: right;">${purchaseAmount.toLocaleString()}</span>
2394
2385
  </div>
2395
-
2396
2386
  ${bonusAmount ? `
2397
- <!-- Bonus -->
2398
- <div style="
2399
- display: flex; align-items: center; justify-content: space-between;
2400
- padding: 16px 20px;
2401
- border-bottom: 1px solid ${D.divider};
2402
- ">
2403
- <span style="font-size: 14px; color: ${D.textSecondary};">${t.bonusLabel}</span>
2404
- <span style="font-size: 14px; font-weight: 600; color: ${D.textWhite};">${bonusAmount.toLocaleString()}</span>
2387
+ <div style="display: flex; justify-content: space-between; align-items: center; font-size: 14px;">
2388
+ <span style="color: ${D.textMuted}; min-width: 64px;">${t.bonusLabel}</span>
2389
+ <span style="color: ${D.textWhite}; font-weight: 500; text-align: right;">${bonusAmount.toLocaleString()}</span>
2405
2390
  </div>
2406
2391
  ` : ''}
2407
-
2408
-
2392
+ </div>
2393
+ <!-- 下:Price(图片:大号绿色金额) -->
2394
+ <div style="
2395
+ background: ${D.bgSurfaceHighlight};
2396
+ padding: 20px;
2397
+ display: flex;
2398
+ justify-content: space-between;
2399
+ align-items: center;
2400
+ border-top: 1px solid ${D.borderSubtle};
2401
+ ">
2402
+ <span style="font-size: 14px; color: ${D.textMuted}">${t.priceLabel}</span>
2403
+ <span style="font-size: 24px; font-weight: 700; color: ${D.brandGreen}; letter-spacing: 0.02em;">${this.escapeHtml(discountPrice)}</span>
2409
2404
  </div>
2410
2405
  </div>
2411
2406
 
2412
- <!-- 按钮组 -->
2413
- <div style="display: flex; gap: 12px; padding: 0 36px 36px;">
2407
+ <!-- 按钮组(order-popups: grid grid-cols-2 gap-4, Cancel=white/5 border, Pay=#10b981) -->
2408
+ <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 16px;">
2414
2409
  <button type="button" id="retention-cancel-btn" style="
2415
- flex: 1;
2416
2410
  padding: 14px 20px;
2417
2411
  border-radius: ${D.radiusBtn};
2418
- border: 1px solid rgba(255,255,255,0.15);
2419
- background: transparent;
2420
- color: ${D.textWhite};
2421
- font-size: 15px;
2422
- font-weight: 600;
2412
+ border: 1px solid rgba(255,255,255,0.1);
2413
+ background: rgba(255,255,255,0.05);
2414
+ color: ${D.textMuted};
2415
+ font-size: 14px;
2416
+ font-weight: 500;
2423
2417
  cursor: pointer;
2424
- transition: all 0.2s;
2418
+ transition: background 0.2s, color 0.2s, border-color 0.2s;
2425
2419
  ">${t.cancelBtn}</button>
2426
-
2427
2420
  <button type="button" id="retention-continue-btn" style="
2428
- flex: 1;
2429
2421
  padding: 14px 20px;
2430
2422
  border-radius: ${D.radiusBtn};
2431
2423
  border: none;
2432
- background: ${D.accentTeal};
2433
- color: #0f172a;
2434
- font-size: 15px;
2424
+ background: ${D.brandGreen};
2425
+ color: #000000;
2426
+ font-size: 14px;
2435
2427
  font-weight: 700;
2436
2428
  cursor: pointer;
2437
- transition: all 0.2s;
2438
- box-shadow: 0 4px 16px ${D.accentTealShadow};
2429
+ transition: box-shadow 0.2s, transform 0.1s;
2439
2430
  ">${t.continueBtn}</button>
2440
2431
  </div>
2441
2432
  `;
@@ -2470,20 +2461,20 @@ class RetentionModal {
2470
2461
  }
2471
2462
 
2472
2463
  #retention-modal-close-btn:hover {
2473
- background: rgba(255,255,255,0.15) !important;
2474
- color: #fff !important;
2475
- transform: rotate(90deg);
2464
+ background: rgba(255,255,255,0.05) !important;
2465
+ color: #FFFFFF !important;
2476
2466
  }
2477
2467
  #retention-cancel-btn:hover {
2478
- background: rgba(255,255,255,0.08) !important;
2479
- border-color: rgba(255,255,255,0.25) !important;
2468
+ background: rgba(255,255,255,0.1) !important;
2469
+ color: #FFFFFF !important;
2470
+ border-color: rgba(255,255,255,0.1) !important;
2480
2471
  }
2481
2472
  #retention-continue-btn:hover {
2482
- box-shadow: 0 6px 24px rgba(45, 212, 191, 0.50) !important;
2483
- transform: translateY(-1px);
2473
+ box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
2474
+ transform: scale(1.02);
2484
2475
  }
2485
2476
  #retention-continue-btn:active {
2486
- transform: translateY(0);
2477
+ transform: scale(0.98);
2487
2478
  }
2488
2479
  `;
2489
2480
  document.head.appendChild(style);
@@ -3763,8 +3754,9 @@ class PurchaseSuccessModal {
3763
3754
  */
3764
3755
  createModal() {
3765
3756
  const { data, language } = this.options;
3766
- const isZh = language === 'zh';
3767
- // 创建遮罩层
3757
+ const lang = language ?? 'en';
3758
+ const isZh = lang === 'zh' || lang === 'zh-TW';
3759
+ // 创建遮罩层(与 order-popups 一致:纯黑底)
3768
3760
  this.overlay = document.createElement('div');
3769
3761
  this.overlay.id = 'purchase-success-modal-overlay';
3770
3762
  this.overlay.style.cssText = `
@@ -3775,21 +3767,24 @@ class PurchaseSuccessModal {
3775
3767
  align-items: center;
3776
3768
  justify-content: center;
3777
3769
  padding: 20px;
3778
- background: rgba(15, 23, 42, 0.75);
3770
+ background: rgba(0, 0, 0, 0.85);
3779
3771
  backdrop-filter: blur(8px);
3780
3772
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
3781
3773
  overflow: hidden;
3782
3774
  `;
3783
- // 创建弹窗卡片
3775
+ // 创建弹窗卡片(order-popups: dark-card #121212, rounded-[24px], border dark-border)
3784
3776
  this.modal = document.createElement('div');
3785
3777
  this.modal.style.cssText = `
3786
3778
  position: relative;
3787
3779
  width: 90vw;
3788
- max-width: 480px;
3789
- border-radius: 16px;
3790
- background: linear-gradient(to bottom, #0f172a, #1e293b);
3791
- box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
3780
+ max-width: 500px;
3781
+ min-width: 420px;
3782
+ border-radius: 24px;
3783
+ background: #121212;
3784
+ border: 1px solid rgba(44, 44, 46, 0.6);
3785
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
3792
3786
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
3787
+ overflow: hidden;
3793
3788
  `;
3794
3789
  this.modal.innerHTML = this.getModalHTML(data, isZh);
3795
3790
  this.overlay.appendChild(this.modal);
@@ -3808,211 +3803,121 @@ class PurchaseSuccessModal {
3808
3803
  message: '感谢您的购买。您的积分已成功添加到账户中。',
3809
3804
  packLabel: '套餐名称',
3810
3805
  creditsLabel: '积分数量',
3811
- amountLabel: '支付金额',
3812
- badge: '已支付',
3813
- } : {
3806
+ amountLabel: '支付金额'} : {
3814
3807
  title: 'Purchase Successful!',
3815
3808
  subtitle: 'Your credits have been added',
3816
3809
  greeting: 'Hi there,',
3817
3810
  message: 'Thank you for your purchase. Your credits have been successfully added to your account.',
3818
3811
  packLabel: 'Package',
3819
3812
  creditsLabel: 'Credits',
3820
- amountLabel: 'Amount',
3821
- badge: 'PAID',
3822
- };
3813
+ amountLabel: 'Amount'};
3823
3814
  const currency = getCurrencySymbol(data.currency || 'USD');
3815
+ const creditsText = isZh ? `${data.credits.toLocaleString()} 积分` : `${data.credits.toLocaleString()} Credits`;
3824
3816
  return `
3825
- <!-- 关闭按钮 -->
3817
+ <!-- 关闭按钮(order-popups: top-5 right-5, rounded-full, text-dark-muted, hover:bg-white/5) -->
3826
3818
  <button
3827
3819
  type="button"
3828
3820
  id="success-modal-close-btn"
3829
3821
  style="
3830
3822
  position: absolute;
3831
- top: 14px;
3832
- right: 14px;
3823
+ top: 20px;
3824
+ right: 20px;
3833
3825
  z-index: 10;
3834
3826
  display: flex;
3835
- width: 32px;
3836
- height: 32px;
3827
+ width: 40px;
3828
+ height: 40px;
3837
3829
  align-items: center;
3838
3830
  justify-content: center;
3839
3831
  border-radius: 50%;
3840
- background: rgba(255, 255, 255, 0.1);
3841
- color: rgba(255, 255, 255, 0.7);
3832
+ background: transparent;
3833
+ color: #A1A1AA;
3842
3834
  border: none;
3843
3835
  cursor: pointer;
3844
- transition: all 0.2s;
3836
+ transition: color 0.2s, background 0.2s;
3845
3837
  "
3846
3838
  >
3847
- <svg width="18" height="18" viewBox="0 0 24 24" fill="none">
3848
- <path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
3839
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3840
+ <line x1="18" y1="6" x2="6" y2="18"></line>
3841
+ <line x1="6" y1="6" x2="18" y2="18"></line>
3849
3842
  </svg>
3850
3843
  </button>
3851
3844
 
3852
- <!-- 头部 -->
3845
+ <!-- 成功状态与标题(与图片一致:大号绿色勾 + 紧凑布局) -->
3853
3846
  <div style="
3854
- border-radius: 16px 16px 0 0;
3855
- background: linear-gradient(to bottom, rgba(16, 185, 129, 0.1), transparent);
3856
- padding: 32px 24px;
3847
+ display: flex;
3848
+ flex-direction: column;
3849
+ align-items: center;
3857
3850
  text-align: center;
3851
+ padding: 32px 24px 24px;
3858
3852
  ">
3859
- <!-- Success Icon -->
3853
+ <!-- Success Icon:绿色实心圆 + 白色勾 -->
3860
3854
  <div style="
3861
- margin: 0 auto 12px;
3862
- width: 64px;
3863
- height: 64px;
3855
+ width: 72px;
3856
+ height: 72px;
3857
+ margin-bottom: 20px;
3864
3858
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
3865
3859
  ">
3866
- <svg width="64" height="64" viewBox="0 0 80 80" fill="none">
3867
- <circle cx="40" cy="40" r="36" fill="#10B981" fill-opacity="0.1" />
3868
- <circle cx="40" cy="40" r="28" fill="#10B981" fill-opacity="0.2" />
3869
- <path d="M28 40L36 48L52 32" stroke="#10B981" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
3860
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none">
3861
+ <circle cx="36" cy="36" r="36" fill="#52AD5F"/>
3862
+ <path d="M22 36 L32 46 L50 26" stroke="#FFFFFF" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
3870
3863
  </svg>
3871
3864
  </div>
3872
-
3873
- <!-- Title -->
3874
- <h2 style="
3875
- margin: 0 0 6px;
3876
- font-size: 24px;
3865
+ <h1 style="
3866
+ margin: 0 0 12px;
3867
+ font-size: 28px;
3877
3868
  font-weight: 700;
3878
- color: white;
3879
- animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
3880
- ">${texts.title}</h2>
3881
-
3882
- <!-- Subtitle -->
3869
+ color: #FFFFFF;
3870
+ letter-spacing: 0.02em;
3871
+ ">${texts.title}</h1>
3883
3872
  <p style="
3884
3873
  margin: 0;
3885
- font-size: 13px;
3886
- color: rgba(255, 255, 255, 0.6);
3887
- animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
3874
+ font-size: 16px;
3875
+ color: #A1A1AA;
3888
3876
  ">${texts.subtitle}</p>
3889
3877
  </div>
3890
3878
 
3891
- <!-- 内容区域 -->
3892
- <div style="padding: 0 24px 32px;">
3893
- <!-- 确认卡片 -->
3879
+ <!-- 详情卡片(order-popups: bg-dark-surface/50, rounded-xl, border border-white/5) -->
3880
+ <div style="
3881
+ margin: 0 24px 24px;
3882
+ padding: 20px;
3883
+ border-radius: 12px;
3884
+ background: rgba(30, 30, 30, 0.5);
3885
+ border: 1px solid rgba(255, 255, 255, 0.05);
3886
+ ">
3887
+ <!-- 问候语(border-b border-white/10) -->
3894
3888
  <div style="
3895
- overflow: hidden;
3896
- border-radius: 12px;
3897
- border: 1px solid rgba(255, 255, 255, 0.1);
3898
- background: #1e293b;
3899
- animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
3889
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
3890
+ padding-bottom: 16px;
3891
+ margin-bottom: 16px;
3900
3892
  ">
3901
- <!-- 卡片头部 -->
3902
- <div style="
3903
- display: flex;
3904
- align-items: center;
3905
- justify-content: space-between;
3906
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
3907
- background: #0f172a;
3908
- padding: 16px;
3909
- ">
3910
- <div style="
3911
- display: flex;
3912
- align-items: center;
3913
- gap: 8px;
3914
- color: #10B981;
3915
- ">
3916
- <svg width="20" height="20" viewBox="0 0 24 24" fill="none">
3917
- <path d="M12 2L2 7L12 12L22 7L12 2Z" fill="currentColor" opacity="0.3" />
3918
- <path d="M2 17L12 22L22 17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
3919
- <path d="M2 12L12 17L22 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
3920
- </svg>
3921
- <span style="
3922
- font-size: 15px;
3923
- font-weight: 600;
3924
- ">SeaVerse</span>
3925
- </div>
3926
- <div style="
3927
- border-radius: 9999px;
3928
- border: 1px solid rgba(168, 85, 247, 0.3);
3929
- background: rgba(168, 85, 247, 0.1);
3930
- padding: 4px 12px;
3931
- font-size: 11px;
3932
- font-weight: 500;
3933
- color: #a855f7;
3934
- ">${texts.badge}</div>
3935
- </div>
3893
+ <h2 style="
3894
+ margin: 0 0 8px;
3895
+ font-size: 18px;
3896
+ font-weight: 600;
3897
+ color: #FFFFFF;
3898
+ ">${texts.greeting}</h2>
3899
+ <p style="
3900
+ margin: 0;
3901
+ font-size: 14px;
3902
+ line-height: 1.6;
3903
+ color: #A1A1AA;
3904
+ ">${texts.message}</p>
3905
+ </div>
3936
3906
 
3937
- <!-- 问候语 -->
3938
- <div style="
3939
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
3940
- padding: 20px 16px;
3941
- ">
3942
- <p style="
3943
- margin: 0 0 8px;
3944
- font-size: 13px;
3945
- font-weight: 600;
3946
- color: rgba(255, 255, 255, 0.9);
3947
- ">${texts.greeting}</p>
3948
- <p style="
3949
- margin: 0;
3950
- font-size: 12px;
3951
- line-height: 1.6;
3952
- color: rgba(255, 255, 255, 0.7);
3953
- ">${texts.message}</p>
3907
+ <!-- 套餐/积分/金额行(order-popups: space-y-4, label muted, value white/right, amount 绿色) -->
3908
+ <div style="display: flex; flex-direction: column; gap: 16px;">
3909
+ <div style="display: flex; justify-content: space-between; align-items: center; font-size: 14px;">
3910
+ <span style="color: #A1A1AA;">${texts.packLabel}</span>
3911
+ <span style="color: #FFFFFF; font-weight: 500; text-align: right;">${this.escapeHtml(data.packName)}</span>
3954
3912
  </div>
3955
-
3956
- <!-- 详情列表 -->
3957
- <div style="
3958
- background: rgba(15, 23, 42, 0.5);
3959
- padding: 16px;
3960
- ">
3961
- <div style="
3962
- display: flex;
3963
- align-items: center;
3964
- justify-content: space-between;
3965
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
3966
- padding: 12px 0;
3967
- ">
3968
- <span style="
3969
- font-size: 12px;
3970
- font-weight: 500;
3971
- color: rgba(255, 255, 255, 0.6);
3972
- ">${texts.packLabel}</span>
3973
- <span style="
3974
- font-size: 13px;
3975
- font-weight: 600;
3976
- color: rgba(255, 255, 255, 0.95);
3977
- ">${this.escapeHtml(data.packName)}</span>
3978
- </div>
3979
- <div style="
3980
- display: flex;
3981
- align-items: center;
3982
- justify-content: space-between;
3983
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
3984
- padding: 12px 0;
3985
- ">
3986
- <span style="
3987
- font-size: 12px;
3988
- font-weight: 500;
3989
- color: rgba(255, 255, 255, 0.6);
3990
- ">${texts.creditsLabel}</span>
3991
- <span style="
3992
- font-size: 13px;
3993
- font-weight: 600;
3994
- color: rgba(255, 255, 255, 0.95);
3995
- ">${data.credits.toLocaleString()} Credits</span>
3996
- </div>
3997
- <div style="
3998
- display: flex;
3999
- align-items: center;
4000
- justify-content: space-between;
4001
- background: linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent);
4002
- margin: 0 -16px;
4003
- padding: 12px 16px;
4004
- ">
4005
- <span style="
4006
- font-size: 12px;
4007
- font-weight: 500;
4008
- color: rgba(255, 255, 255, 0.6);
4009
- ">${texts.amountLabel}</span>
4010
- <span style="
4011
- font-size: 16px;
4012
- font-weight: 600;
4013
- color: #10B981;
4014
- ">${currency}${this.escapeHtml(data.amount)}</span>
4015
- </div>
3913
+ <div style="display: flex; justify-content: space-between; align-items: center; font-size: 14px;">
3914
+ <span style="color: #A1A1AA;">${texts.creditsLabel}</span>
3915
+ <span style="color: #FFFFFF; font-weight: 500; text-align: right;">${creditsText}</span>
3916
+ </div>
3917
+ <div style="height: 1px; background: rgba(255, 255, 255, 0.1); margin: 4px 0;"></div>
3918
+ <div style="display: flex; justify-content: space-between; align-items: center; padding-top: 4px;">
3919
+ <span style="font-size: 14px; color: #A1A1AA;">${texts.amountLabel}</span>
3920
+ <span style="font-size: 20px; font-weight: 700; color: #10B981; letter-spacing: 0.02em;">${currency}${this.escapeHtml(data.amount)}</span>
4016
3921
  </div>
4017
3922
  </div>
4018
3923
  </div>
@@ -4091,9 +3996,8 @@ class PurchaseSuccessModal {
4091
3996
  }
4092
3997
 
4093
3998
  #success-modal-close-btn:hover {
4094
- background: rgba(255, 255, 255, 0.15) !important;
4095
- color: white !important;
4096
- transform: rotate(90deg);
3999
+ background: rgba(255, 255, 255, 0.05) !important;
4000
+ color: #FFFFFF !important;
4097
4001
  }
4098
4002
  `;
4099
4003
  document.head.appendChild(style);
@@ -4516,7 +4420,7 @@ class BasePackageModal {
4516
4420
  * Cleanup resources
4517
4421
  */
4518
4422
  cleanup() {
4519
- console.log(`[${this.constructor.name}] Cleaning up...`);
4423
+ // console.log(`[${this.constructor.name}] Cleaning up...`);
4520
4424
  // Remove resize listener
4521
4425
  if (this.resizeHandler) {
4522
4426
  window.removeEventListener('resize', this.resizeHandler);
@@ -5143,8 +5047,9 @@ class PaymentVerificationModal {
5143
5047
  * 创建弹窗元素
5144
5048
  */
5145
5049
  createModal() {
5146
- const isZh = this.options.language === 'zh';
5147
- // 创建遮罩层
5050
+ const lang = this.options.language ?? 'en';
5051
+ const isZh = lang === 'zh' || lang === 'zh-TW';
5052
+ // 遮罩(与 PurchaseSuccessModal 一致)
5148
5053
  this.overlay = document.createElement('div');
5149
5054
  this.overlay.id = 'payment-verification-modal-overlay';
5150
5055
  this.overlay.style.cssText = `
@@ -5155,20 +5060,21 @@ class PaymentVerificationModal {
5155
5060
  align-items: center;
5156
5061
  justify-content: center;
5157
5062
  padding: 20px;
5158
- background: rgba(15, 23, 42, 0.85);
5159
- backdrop-filter: blur(4px);
5160
- animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
5063
+ background: rgba(0, 0, 0, 0.85);
5064
+ backdrop-filter: blur(8px);
5065
+ animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
5161
5066
  overflow: hidden;
5162
5067
  `;
5163
- // 创建弹窗卡片
5068
+ // 弹窗卡片(PurchaseSuccessModal 风格)
5164
5069
  this.modal = document.createElement('div');
5165
5070
  this.modal.style.cssText = `
5166
5071
  position: relative;
5167
5072
  width: 90vw;
5168
- max-width: 560px;
5169
- border-radius: 16px;
5170
- background: linear-gradient(145deg, #1e2d3d 0%, #162234 100%);
5171
- border: 1px solid rgba(255, 255, 255, 0.08);
5073
+ max-width: 500px;
5074
+ min-width: 420px;
5075
+ border-radius: 24px;
5076
+ background: #121212;
5077
+ border: 1px solid rgba(44, 44, 46, 0.6);
5172
5078
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
5173
5079
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
5174
5080
  overflow: hidden;
@@ -5186,52 +5092,50 @@ class PaymentVerificationModal {
5186
5092
  const texts = this.getTexts(isZh);
5187
5093
  const paymentType = this.options.paymentMethodName || 'Debit/Credit Card';
5188
5094
  return `
5189
- <!-- 关闭按钮 -->
5095
+ <!-- 关闭按钮(与 PurchaseSuccessModal 一致) -->
5190
5096
  <button
5191
5097
  type="button"
5192
5098
  id="verification-modal-close-btn"
5193
5099
  style="
5194
5100
  position: absolute;
5195
- top: 16px;
5196
- right: 16px;
5101
+ top: 20px;
5102
+ right: 20px;
5197
5103
  z-index: 10;
5198
5104
  display: flex;
5199
- width: 32px;
5200
- height: 32px;
5105
+ width: 40px;
5106
+ height: 40px;
5201
5107
  align-items: center;
5202
5108
  justify-content: center;
5203
5109
  border-radius: 50%;
5204
- background: rgba(255, 255, 255, 0.1);
5205
- color: rgba(255, 255, 255, 0.6);
5110
+ background: transparent;
5111
+ color: #A1A1AA;
5206
5112
  border: none;
5207
5113
  cursor: pointer;
5208
- transition: all 0.2s;
5114
+ transition: color 0.2s, background 0.2s;
5209
5115
  "
5210
5116
  >
5211
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none">
5212
- <path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
5117
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
5118
+ <line x1="18" y1="6" x2="6" y2="18"></line>
5119
+ <line x1="6" y1="6" x2="18" y2="18"></line>
5213
5120
  </svg>
5214
5121
  </button>
5215
5122
 
5216
5123
  <!-- 内容区域 -->
5217
- <div style="padding: 40px 32px 28px;">
5218
- <!-- 标题 -->
5219
- <h2 style="
5220
- margin: 0 0 12px;
5124
+ <div style="padding: 24px 24px 24px;">
5125
+ <h1 style="
5126
+ margin: 0 0 8px;
5221
5127
  font-size: 24px;
5222
5128
  font-weight: 700;
5223
- color: #ffffff;
5129
+ color: #FFFFFF;
5224
5130
  text-align: center;
5225
- line-height: 1.3;
5226
- letter-spacing: -0.3px;
5227
- ">${texts.title} ${paymentType}</h2>
5131
+ letter-spacing: -0.02em;
5132
+ ">${texts.title} ${paymentType}</h1>
5228
5133
 
5229
- <!-- 提示文本 -->
5230
5134
  <p style="
5231
5135
  margin: 0 0 20px;
5232
- font-size: 15px;
5136
+ font-size: 14px;
5233
5137
  line-height: 1.6;
5234
- color: rgba(255, 255, 255, 0.7);
5138
+ color: #A1A1AA;
5235
5139
  text-align: center;
5236
5140
  ">${texts.message}</p>
5237
5141
 
@@ -5240,16 +5144,19 @@ class PaymentVerificationModal {
5240
5144
  position: relative;
5241
5145
  margin: 0 0 24px;
5242
5146
  min-height: 56px;
5147
+ padding: 16px;
5148
+ border-radius: 12px;
5149
+ background: rgba(30, 30, 30, 0.5);
5150
+ border: 1px solid rgba(255, 255, 255, 0.05);
5243
5151
  ">
5244
5152
  <p style="
5245
5153
  margin: 0;
5246
5154
  font-size: 13px;
5247
5155
  line-height: 1.7;
5248
- color: rgba(255, 255, 255, 0.5);
5156
+ color: #A1A1AA;
5249
5157
  text-align: center;
5250
5158
  ">${texts.helpText}</p>
5251
5159
 
5252
- <!-- 加载状态遮罩(默认隐藏,Processing 时显示) -->
5253
5160
  <div id="verification-loading-overlay" style="
5254
5161
  display: none;
5255
5162
  position: absolute;
@@ -5257,71 +5164,47 @@ class PaymentVerificationModal {
5257
5164
  align-items: center;
5258
5165
  justify-content: center;
5259
5166
  gap: 12px;
5260
- background: rgba(22, 34, 52, 0.92);
5261
- backdrop-filter: blur(2px);
5262
- border-radius: 8px;
5167
+ background: rgba(18, 18, 18, 0.92);
5168
+ backdrop-filter: blur(4px);
5169
+ border-radius: 12px;
5263
5170
  ">
5264
5171
  <div id="verification-spinner" style="
5265
5172
  width: 24px;
5266
5173
  height: 24px;
5267
- border: 3px solid rgba(13, 148, 136, 0.25);
5268
- border-top-color: #14b8a6;
5174
+ border: 3px solid rgba(16, 185, 129, 0.25);
5175
+ border-top-color: #10B981;
5269
5176
  border-radius: 50%;
5270
5177
  animation: verificationSpin 0.8s linear infinite;
5271
5178
  flex-shrink: 0;
5272
5179
  "></div>
5273
- <span style="
5274
- font-size: 14px;
5275
- color: rgba(255, 255, 255, 0.8);
5276
- white-space: nowrap;
5277
- ">${texts.checkingStatus}</span>
5180
+ <span style="font-size: 14px; color: #A1A1AA; white-space: nowrap;">${texts.checkingStatus}</span>
5278
5181
  </div>
5279
5182
  </div>
5280
5183
 
5281
- <!-- 按钮组 -->
5282
- <div style="
5283
- display: flex;
5284
- gap: 16px;
5285
- justify-content: center;
5286
- ">
5287
- <!-- Cancel 按钮 -->
5288
- <button
5289
- type="button"
5290
- id="verification-cancel-btn"
5291
- style="
5292
- flex: 1;
5293
- max-width: 240px;
5294
- height: 48px;
5295
- border-radius: 10px;
5296
- border: 1px solid rgba(255, 255, 255, 0.15);
5297
- background: transparent;
5298
- color: rgba(255, 255, 255, 0.8);
5299
- font-size: 15px;
5300
- font-weight: 500;
5301
- cursor: pointer;
5302
- transition: all 0.2s;
5303
- "
5304
- >${texts.cancelButton}</button>
5305
-
5306
- <!-- Complete Payment / Processing 按钮 -->
5307
- <button
5308
- type="button"
5309
- id="verification-complete-btn"
5310
- style="
5311
- flex: 1;
5312
- max-width: 240px;
5313
- height: 48px;
5314
- border-radius: 10px;
5315
- border: none;
5316
- background: linear-gradient(135deg, #0d9488 0%, #3b82f6 100%);
5317
- color: white;
5318
- font-size: 15px;
5319
- font-weight: 600;
5320
- cursor: pointer;
5321
- transition: all 0.2s;
5322
- box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
5323
- "
5324
- >${texts.completeButton}</button>
5184
+ <!-- 按钮组(与 PurchaseSuccessModal 一致) -->
5185
+ <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 16px;">
5186
+ <button type="button" id="verification-cancel-btn" style="
5187
+ padding: 14px 20px;
5188
+ border-radius: 12px;
5189
+ border: 1px solid rgba(255,255,255,0.1);
5190
+ background: rgba(255,255,255,0.05);
5191
+ color: #A1A1AA;
5192
+ font-size: 14px;
5193
+ font-weight: 500;
5194
+ cursor: pointer;
5195
+ transition: background 0.2s, color 0.2s, border-color 0.2s;
5196
+ ">${texts.cancelButton}</button>
5197
+ <button type="button" id="verification-complete-btn" style="
5198
+ padding: 14px 20px;
5199
+ border-radius: 12px;
5200
+ border: none;
5201
+ background: #10B981;
5202
+ color: #000000;
5203
+ font-size: 14px;
5204
+ font-weight: 700;
5205
+ cursor: pointer;
5206
+ transition: box-shadow 0.2s, transform 0.1s;
5207
+ ">${texts.completeButton}</button>
5325
5208
  </div>
5326
5209
  </div>
5327
5210
  `;
@@ -5399,24 +5282,23 @@ class PaymentVerificationModal {
5399
5282
  }
5400
5283
 
5401
5284
  #verification-modal-close-btn:hover {
5402
- background: rgba(255, 255, 255, 0.2) !important;
5403
- color: white !important;
5404
- transform: rotate(90deg);
5285
+ background: rgba(255, 255, 255, 0.05) !important;
5286
+ color: #FFFFFF !important;
5405
5287
  }
5406
5288
 
5407
5289
  #verification-cancel-btn:hover {
5408
- background: rgba(255, 255, 255, 0.06) !important;
5409
- border-color: rgba(255, 255, 255, 0.25) !important;
5290
+ background: rgba(255, 255, 255, 0.1) !important;
5291
+ color: #FFFFFF !important;
5292
+ border-color: rgba(255, 255, 255, 0.1) !important;
5410
5293
  }
5411
5294
 
5412
5295
  #verification-complete-btn:hover {
5413
- background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%) !important;
5414
- box-shadow: 0 6px 16px rgba(13, 148, 136, 0.4) !important;
5415
- transform: translateY(-1px);
5296
+ box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
5297
+ transform: scale(1.02);
5416
5298
  }
5417
5299
 
5418
5300
  #verification-complete-btn:active {
5419
- transform: translateY(0);
5301
+ transform: scale(0.98);
5420
5302
  }
5421
5303
  `;
5422
5304
  document.head.appendChild(style);
@@ -5495,7 +5377,8 @@ class PaymentVerificationModal {
5495
5377
  // 更新按钮文本为 Processing...
5496
5378
  const completeBtn = document.getElementById('verification-complete-btn');
5497
5379
  if (completeBtn) {
5498
- const isZh = this.options.language === 'zh';
5380
+ const lang = this.options.language ?? 'en';
5381
+ const isZh = lang === 'zh' || lang === 'zh-TW';
5499
5382
  completeBtn.textContent = isZh ? '处理中...' : 'Processing...';
5500
5383
  completeBtn.style.pointerEvents = 'none';
5501
5384
  completeBtn.style.opacity = '0.85';
@@ -5513,7 +5396,8 @@ class PaymentVerificationModal {
5513
5396
  // 恢复按钮文本
5514
5397
  const completeBtn = document.getElementById('verification-complete-btn');
5515
5398
  if (completeBtn) {
5516
- const isZh = this.options.language === 'zh';
5399
+ const lang = this.options.language ?? 'en';
5400
+ const isZh = lang === 'zh' || lang === 'zh-TW';
5517
5401
  completeBtn.textContent = isZh ? '我已完成支付' : 'I\'ve Completed Payment';
5518
5402
  completeBtn.style.pointerEvents = '';
5519
5403
  completeBtn.style.opacity = '';
@@ -5637,8 +5521,9 @@ class PaymentFailedModal {
5637
5521
  */
5638
5522
  createModal() {
5639
5523
  const { language } = this.options;
5640
- const isZh = language === 'zh';
5641
- // 创建遮罩层(与验证弹框一致)
5524
+ const lang = language ?? 'en';
5525
+ const isZh = lang === 'zh' || lang === 'zh-TW';
5526
+ // 遮罩(与 PurchaseSuccessModal 一致)
5642
5527
  this.overlay = document.createElement('div');
5643
5528
  this.overlay.id = 'payment-failed-modal-overlay';
5644
5529
  this.overlay.style.cssText = `
@@ -5649,20 +5534,21 @@ class PaymentFailedModal {
5649
5534
  align-items: center;
5650
5535
  justify-content: center;
5651
5536
  padding: 20px;
5652
- background: rgba(15, 23, 42, 0.85);
5653
- backdrop-filter: blur(4px);
5654
- animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
5537
+ background: rgba(0, 0, 0, 0.85);
5538
+ backdrop-filter: blur(8px);
5539
+ animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
5655
5540
  overflow: hidden;
5656
5541
  `;
5657
- // 创建弹窗卡片(与验证弹框一致)
5542
+ // 弹窗卡片(PurchaseSuccessModal 风格:dark-card #121212, rounded 24px)
5658
5543
  this.modal = document.createElement('div');
5659
5544
  this.modal.style.cssText = `
5660
5545
  position: relative;
5661
5546
  width: 90vw;
5662
- max-width: 560px;
5663
- border-radius: 16px;
5664
- background: linear-gradient(145deg, #1e2d3d 0%, #162234 100%);
5665
- border: 1px solid rgba(255, 255, 255, 0.08);
5547
+ max-width: 500px;
5548
+ min-width: 420px;
5549
+ border-radius: 24px;
5550
+ background: #121212;
5551
+ border: 1px solid rgba(44, 44, 46, 0.6);
5666
5552
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
5667
5553
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
5668
5554
  overflow: hidden;
@@ -5685,58 +5571,62 @@ class PaymentFailedModal {
5685
5571
  const hasDetails = !!this.options.details;
5686
5572
  const hasRetry = !!this.options.onRetry;
5687
5573
  return `
5688
- <!-- 关闭按钮 -->
5574
+ <!-- 关闭按钮(与 PurchaseSuccessModal 一致) -->
5689
5575
  <button
5690
5576
  type="button"
5691
5577
  id="failed-modal-close-btn"
5692
5578
  style="
5693
5579
  position: absolute;
5694
- top: 16px;
5695
- right: 16px;
5580
+ top: 20px;
5581
+ right: 20px;
5696
5582
  z-index: 10;
5697
5583
  display: flex;
5698
- width: 32px;
5699
- height: 32px;
5584
+ width: 40px;
5585
+ height: 40px;
5700
5586
  align-items: center;
5701
5587
  justify-content: center;
5702
5588
  border-radius: 50%;
5703
- background: rgba(255, 255, 255, 0.1);
5704
- color: rgba(255, 255, 255, 0.6);
5589
+ background: transparent;
5590
+ color: #A1A1AA;
5705
5591
  border: none;
5706
5592
  cursor: pointer;
5707
- transition: all 0.2s;
5593
+ transition: color 0.2s, background 0.2s;
5708
5594
  "
5709
5595
  >
5710
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none">
5711
- <path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
5596
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
5597
+ <line x1="18" y1="6" x2="6" y2="18"></line>
5598
+ <line x1="6" y1="6" x2="18" y2="18"></line>
5712
5599
  </svg>
5713
5600
  </button>
5714
5601
 
5715
- <!-- 内容区域 -->
5716
- <div style="padding: 40px 32px 28px;">
5717
- <!-- 标题 -->
5718
- <h2 style="
5719
- margin: 0 0 12px;
5602
+ <!-- 标题与消息 -->
5603
+ <div style="padding: 24px 24px 0;">
5604
+ <h1 style="
5605
+ margin: 0 0 8px;
5720
5606
  font-size: 24px;
5721
5607
  font-weight: 700;
5722
- color: #ffffff;
5608
+ color: #FFFFFF;
5723
5609
  text-align: center;
5724
- line-height: 1.3;
5725
- letter-spacing: -0.3px;
5726
- ">${this.escapeHtml(title)}</h2>
5727
-
5728
- <!-- 消息 -->
5610
+ letter-spacing: -0.02em;
5611
+ ">${this.escapeHtml(title)}</h1>
5729
5612
  <p style="
5730
- margin: 0 0 ${hasDetails ? '24px' : '28px'};
5731
- font-size: 15px;
5613
+ margin: 0 0 24px;
5614
+ font-size: 14px;
5732
5615
  line-height: 1.6;
5733
- color: rgba(255, 255, 255, 0.7);
5616
+ color: #A1A1AA;
5734
5617
  text-align: center;
5735
5618
  ">${this.escapeHtml(this.options.message)}</p>
5619
+ </div>
5736
5620
 
5737
- <!-- 详情展开/折叠 -->
5738
- ${hasDetails ? `
5739
- <div style="margin-bottom: 24px;">
5621
+ <!-- 详情展开/折叠(放入内卡片风格) -->
5622
+ ${hasDetails ? `
5623
+ <div style="margin: 0 24px 24px;">
5624
+ <div style="
5625
+ padding: 20px;
5626
+ border-radius: 12px;
5627
+ background: rgba(30, 30, 30, 0.5);
5628
+ border: 1px solid rgba(255, 255, 255, 0.05);
5629
+ ">
5740
5630
  <button
5741
5631
  type="button"
5742
5632
  id="failed-modal-details-toggle"
@@ -5746,15 +5636,15 @@ class PaymentFailedModal {
5746
5636
  align-items: center;
5747
5637
  justify-content: center;
5748
5638
  gap: 8px;
5749
- padding: 10px;
5639
+ padding: 10px 12px;
5750
5640
  border: 1px solid rgba(255, 255, 255, 0.1);
5751
- border-radius: 10px;
5641
+ border-radius: 8px;
5752
5642
  background: rgba(255, 255, 255, 0.03);
5753
- color: rgba(255, 255, 255, 0.5);
5643
+ color: #A1A1AA;
5754
5644
  font-size: 13px;
5755
5645
  font-weight: 500;
5756
5646
  cursor: pointer;
5757
- transition: all 0.2s;
5647
+ transition: background 0.2s, color 0.2s, border-color 0.2s;
5758
5648
  "
5759
5649
  >
5760
5650
  <span id="failed-modal-details-toggle-text">${detailsToggleText}</span>
@@ -5773,91 +5663,69 @@ class PaymentFailedModal {
5773
5663
  <div style="
5774
5664
  margin-top: 12px;
5775
5665
  padding: 16px;
5776
- border-radius: 10px;
5777
- background: rgba(239, 68, 68, 0.05);
5778
- border: 1px solid rgba(239, 68, 68, 0.1);
5666
+ border-radius: 8px;
5667
+ background: rgba(239, 68, 68, 0.06);
5668
+ border: 1px solid rgba(239, 68, 68, 0.12);
5779
5669
  ">
5780
5670
  <pre style="
5781
5671
  margin: 0;
5782
- font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
5672
+ font-family: ui-monospace, monospace;
5783
5673
  font-size: 12px;
5784
5674
  line-height: 1.6;
5785
- color: rgba(255, 255, 255, 0.5);
5675
+ color: #A1A1AA;
5786
5676
  white-space: pre-wrap;
5787
5677
  word-break: break-word;
5788
5678
  ">${this.escapeHtml(this.options.details || '')}</pre>
5789
5679
  </div>
5790
5680
  </div>
5791
5681
  </div>
5792
- ` : ''}
5793
-
5794
- <!-- 按钮组 -->
5795
- <div style="
5796
- display: flex;
5797
- gap: 16px;
5798
- justify-content: center;
5799
- ">
5800
- ${hasRetry ? `
5801
- <!-- 关闭按钮(有重试时) -->
5802
- <button
5803
- type="button"
5804
- id="failed-modal-close-bottom-btn"
5805
- style="
5806
- flex: 1;
5807
- max-width: 240px;
5808
- height: 48px;
5809
- border-radius: 10px;
5810
- border: 1px solid rgba(255, 255, 255, 0.15);
5811
- background: transparent;
5812
- color: rgba(255, 255, 255, 0.8);
5813
- font-size: 15px;
5814
- font-weight: 500;
5815
- cursor: pointer;
5816
- transition: all 0.2s;
5817
- "
5818
- >${closeText}</button>
5819
-
5820
- <!-- 重试按钮 -->
5821
- <button
5822
- type="button"
5823
- id="failed-modal-retry-btn"
5824
- style="
5825
- flex: 1;
5826
- max-width: 240px;
5827
- height: 48px;
5828
- border-radius: 10px;
5829
- border: none;
5830
- background: linear-gradient(135deg, #0d9488 0%, #3b82f6 100%);
5831
- color: white;
5832
- font-size: 15px;
5833
- font-weight: 600;
5834
- cursor: pointer;
5835
- transition: all 0.2s;
5836
- box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
5837
- "
5838
- >${retryText}</button>
5839
- ` : `
5840
- <!-- 关闭按钮(无重试时,居中显示) -->
5841
- <button
5842
- type="button"
5843
- id="failed-modal-close-bottom-btn"
5844
- style="
5845
- flex: 0;
5846
- min-width: 160px;
5847
- max-width: 240px;
5848
- height: 48px;
5849
- border-radius: 10px;
5850
- border: 1px solid rgba(255, 255, 255, 0.15);
5851
- background: transparent;
5852
- color: rgba(255, 255, 255, 0.8);
5853
- font-size: 15px;
5854
- font-weight: 500;
5855
- cursor: pointer;
5856
- transition: all 0.2s;
5857
- "
5858
- >${closeText}</button>
5859
- `}
5860
5682
  </div>
5683
+ ` : '<div style="margin-bottom: 24px;"></div>'}
5684
+
5685
+ <!-- 按钮组(与 PurchaseSuccessModal / RetentionModal 一致) -->
5686
+ <div style="display: grid; grid-template-columns: ${hasRetry ? '1fr 1fr' : '1fr'}; gap: 16px; padding: 0 24px 24px; justify-items: center;">
5687
+ ${hasRetry ? `
5688
+ <button type="button" id="failed-modal-close-bottom-btn" style="
5689
+ width: 100%;
5690
+ max-width: 240px;
5691
+ padding: 14px 20px;
5692
+ border-radius: 12px;
5693
+ border: 1px solid rgba(255,255,255,0.1);
5694
+ background: rgba(255,255,255,0.05);
5695
+ color: #A1A1AA;
5696
+ font-size: 14px;
5697
+ font-weight: 500;
5698
+ cursor: pointer;
5699
+ transition: background 0.2s, color 0.2s, border-color 0.2s;
5700
+ ">${closeText}</button>
5701
+ <button type="button" id="failed-modal-retry-btn" style="
5702
+ width: 100%;
5703
+ max-width: 240px;
5704
+ padding: 14px 20px;
5705
+ border-radius: 12px;
5706
+ border: none;
5707
+ background: #10B981;
5708
+ color: #000000;
5709
+ font-size: 14px;
5710
+ font-weight: 700;
5711
+ cursor: pointer;
5712
+ transition: box-shadow 0.2s, transform 0.1s;
5713
+ ">${retryText}</button>
5714
+ ` : `
5715
+ <button type="button" id="failed-modal-close-bottom-btn" style="
5716
+ min-width: 160px;
5717
+ max-width: 240px;
5718
+ padding: 14px 20px;
5719
+ border-radius: 12px;
5720
+ border: 1px solid rgba(255,255,255,0.1);
5721
+ background: rgba(255,255,255,0.05);
5722
+ color: #A1A1AA;
5723
+ font-size: 14px;
5724
+ font-weight: 500;
5725
+ cursor: pointer;
5726
+ transition: background 0.2s, color 0.2s, border-color 0.2s;
5727
+ ">${closeText}</button>
5728
+ `}
5861
5729
  </div>
5862
5730
  `;
5863
5731
  }
@@ -5904,30 +5772,29 @@ class PaymentFailedModal {
5904
5772
  }
5905
5773
 
5906
5774
  #failed-modal-close-btn:hover {
5907
- background: rgba(255, 255, 255, 0.2) !important;
5908
- color: white !important;
5909
- transform: rotate(90deg);
5775
+ background: rgba(255, 255, 255, 0.05) !important;
5776
+ color: #FFFFFF !important;
5910
5777
  }
5911
5778
 
5912
5779
  #failed-modal-details-toggle:hover {
5913
5780
  background: rgba(255, 255, 255, 0.06) !important;
5914
- border-color: rgba(255, 255, 255, 0.2) !important;
5915
- color: rgba(255, 255, 255, 0.7) !important;
5781
+ border-color: rgba(255, 255, 255, 0.15) !important;
5782
+ color: #FFFFFF !important;
5916
5783
  }
5917
5784
 
5918
5785
  #failed-modal-close-bottom-btn:hover {
5919
- background: rgba(255, 255, 255, 0.06) !important;
5920
- border-color: rgba(255, 255, 255, 0.25) !important;
5786
+ background: rgba(255, 255, 255, 0.1) !important;
5787
+ color: #FFFFFF !important;
5788
+ border-color: rgba(255, 255, 255, 0.1) !important;
5921
5789
  }
5922
5790
 
5923
5791
  #failed-modal-retry-btn:hover {
5924
- background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%) !important;
5925
- box-shadow: 0 6px 16px rgba(13, 148, 136, 0.4) !important;
5926
- transform: translateY(-1px);
5792
+ box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
5793
+ transform: scale(1.02);
5927
5794
  }
5928
5795
 
5929
5796
  #failed-modal-retry-btn:active {
5930
- transform: translateY(0);
5797
+ transform: scale(0.98);
5931
5798
  }
5932
5799
  `;
5933
5800
  document.head.appendChild(style);
@@ -5980,7 +5847,8 @@ class PaymentFailedModal {
5980
5847
  * 切换详情展开/折叠
5981
5848
  */
5982
5849
  toggleDetails() {
5983
- const isZh = this.options.language === 'zh';
5850
+ const lang = this.options.language ?? 'en';
5851
+ const isZh = lang === 'zh' || lang === 'zh-TW';
5984
5852
  const detailsToggleText = isZh ? '查看详情' : 'View Details';
5985
5853
  const detailsHideText = isZh ? '隐藏详情' : 'Hide Details';
5986
5854
  this.detailsExpanded = !this.detailsExpanded;
@@ -8722,7 +8590,7 @@ class CreditPackageModal extends BasePackageModal {
8722
8590
  color: ${this.COLORS.text.secondary};
8723
8591
  line-height: 1.6;
8724
8592
  ">
8725
- ${isZh ? '随时购买永久积分包' : 'Purchase unlimited credit packages anytime'}
8593
+ ${isZh ? '随时购买永久积分包' : 'Get credits (Valid for all platform products)'}
8726
8594
  </p>
8727
8595
  </div>
8728
8596
 
@@ -8912,6 +8780,7 @@ class GenericPackageModal extends BasePackageModal {
8912
8780
  if (container) {
8913
8781
  container.addEventListener('close-modal', () => {
8914
8782
  this.close();
8783
+ this.options.onClose?.();
8915
8784
  });
8916
8785
  }
8917
8786
  }
@@ -8923,8 +8792,8 @@ class GenericPackageModal extends BasePackageModal {
8923
8792
  if (!container) {
8924
8793
  throw new Error('Modal content container not found');
8925
8794
  }
8926
- // Directly render card content without any outer wrapper
8927
- container.innerHTML = this.options.packages.map((pkg, index) => this.renderPackageCard(pkg, index)).join('');
8795
+ const cardsHtml = this.options.packages.map((pkg, index) => this.renderPackageCard(pkg, index)).join('');
8796
+ container.innerHTML = `<div style="display:flex;flex-wrap:wrap;justify-content:center;gap:24px;padding:0;">${cardsHtml}</div>`;
8928
8797
  // Attach event listeners
8929
8798
  this.attachEventListeners(container);
8930
8799
  }
@@ -9019,199 +8888,229 @@ class GenericPackageModal extends BasePackageModal {
9019
8888
  };
9020
8889
  }
9021
8890
  /**
9022
- * Render package card
8891
+ * Render package card (Credits.html / 参考图一比一风格)
9023
8892
  */
9024
8893
  renderPackageCard(pkg, index) {
9025
8894
  const hasBonus = pkg.bonus_credits && parseInt(pkg.bonus_credits) > 0;
9026
- const hasBonusPercentage = pkg.bonus_percentage && pkg.bonus_percentage > 0;
9027
- // Determine title based on package type
9028
- let packageTitle = '';
9029
- if (pkg.package_type === 'iceBreaker' || pkg.package_type === 'firstCharge') {
9030
- packageTitle = 'One-time Only';
9031
- }
8895
+ const hasBonusPercentage = pkg.bonus_percentage != null && pkg.bonus_percentage > 0;
8896
+ const baseNum = this.formatNumber(pkg.base_credits || pkg.credits);
8897
+ const bonusNum = hasBonus ? this.formatNumber(pkg.bonus_credits) : '';
8898
+ const originalPrice = pkg.original_price;
8899
+ const svgClose = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>';
8900
+ const svgZap = '<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>';
8901
+ const svgCheck = '<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>';
8902
+ const svgSparkles = '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"></path></svg>';
9032
8903
  return `
9033
8904
  <div
9034
8905
  data-package-id="${pkg.id}"
8906
+ class="generic-package-card"
9035
8907
  style="
9036
8908
  position: relative;
9037
8909
  display: flex;
9038
8910
  flex-direction: column;
9039
- justify-content: center;
9040
8911
  align-items: center;
9041
- gap: 48px;
9042
- border-radius: 16px;
9043
- border: 1px solid rgba(255, 255, 255, 0.1);
9044
- background: #000000;
9045
- padding: 80px 60px;
9046
8912
  text-align: center;
9047
- cursor: pointer;
9048
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
9049
8913
  width: 100%;
9050
- height: 100%;
8914
+ max-width: 384px;
8915
+ min-width: 340px;
8916
+ margin: 0 auto;
9051
8917
  box-sizing: border-box;
8918
+ border-radius: 24px;
8919
+ border: 1px solid rgba(255, 255, 255, 0.1);
8920
+ background: #171717;
8921
+ padding: 40px 32px 32px;
8922
+ overflow: hidden;
9052
8923
  "
9053
- onmouseover="this.style.borderColor='rgba(255, 255, 255, 0.2)';"
9054
- onmouseout="this.style.borderColor='rgba(255, 255, 255, 0.1)';"
9055
8924
  >
9056
- <!-- Package title - top center of card -->
9057
- ${packageTitle ? `
9058
- <div style="
9059
- position: absolute;
9060
- top: 32px;
9061
- left: 50%;
9062
- transform: translateX(-50%);
9063
- font-size: 44px;
9064
- line-height: 1;
9065
- font-weight: 400;
9066
- color: white;
9067
- letter-spacing: -0.02em;
9068
- white-space: nowrap;
9069
- ">
9070
- ${packageTitle}
9071
- </div>
9072
- ` : ''}
8925
+ <!-- Background Ambient Glow (参考图中部绿色光晕) -->
8926
+ <div style="
8927
+ position: absolute;
8928
+ bottom: 25%;
8929
+ right: 25%;
8930
+ width: 240px;
8931
+ height: 240px;
8932
+ background: rgba(6, 182, 212, 0.1);
8933
+ border-radius: 50%;
8934
+ filter: blur(100px);
8935
+ pointer-events: none;
8936
+ z-index: 0;
8937
+ "></div>
9073
8938
 
9074
- <!-- Close button - top right -->
8939
+ <!-- Close button (右上角圆形按钮) -->
9075
8940
  <button
8941
+ type="button"
9076
8942
  onclick="this.closest('[data-package-id]').dispatchEvent(new CustomEvent('close-modal', { bubbles: true }));"
9077
8943
  style="
9078
8944
  position: absolute;
9079
- top: 24px;
9080
- right: 24px;
9081
- width: 32px;
9082
- height: 32px;
8945
+ top: 16px;
8946
+ right: 16px;
8947
+ width: 34px;
8948
+ height: 34px;
9083
8949
  border-radius: 50%;
9084
8950
  border: none;
9085
- background: rgba(255, 255, 255, 0.1);
9086
- color: rgba(255, 255, 255, 0.7);
8951
+ background: rgba(255, 255, 255, 0.05);
8952
+ color: rgba(255, 255, 255, 0.4);
9087
8953
  cursor: pointer;
9088
8954
  display: flex;
9089
8955
  align-items: center;
9090
8956
  justify-content: center;
9091
- font-size: 20px;
9092
- line-height: 1;
9093
8957
  transition: all 0.2s;
9094
- z-index: 100;
8958
+ z-index: 10;
9095
8959
  "
9096
- onmouseover="this.style.background='rgba(255, 255, 255, 0.2)'; this.style.color='white';"
9097
- onmouseout="this.style.background='rgba(255, 255, 255, 0.1)'; this.style.color='rgba(255, 255, 255, 0.7)';"
9098
- >
9099
- ×
9100
- </button>
8960
+ onmouseover="this.style.background='rgba(255,255,255,0.1)'; this.style.color='#FFFFFF';"
8961
+ onmouseout="this.style.background='rgba(255,255,255,0.05)'; this.style.color='rgba(255,255,255,0.4)';"
8962
+ >${svgClose}</button>
9101
8963
 
9102
- <!-- Discount tag - below close button -->
9103
- ${hasBonusPercentage ? `
9104
- <div style="
9105
- position: absolute;
9106
- top: 92px;
9107
- right: 30px;
9108
- background: linear-gradient(135deg, #fa8c42 0%, #ff5a00 100%);
9109
- color: white;
9110
- padding: 8px 16px;
9111
- border-radius: 8px;
9112
- font-size: 20px;
9113
- font-weight: 800;
9114
- box-shadow: 0 4px 16px rgba(255, 90, 0, 0.5);
9115
- white-space: nowrap;
9116
- z-index: 10;
9117
- ">
9118
- +${pkg.bonus_percentage}%
8964
+ <div style="position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: center;">
8965
+ <!-- Value badge: +N% EXTRA VALUE (深色底, 金色边框) -->
8966
+ ${hasBonusPercentage ? `
8967
+ <div style="
8968
+ display: inline-flex;
8969
+ align-items: center;
8970
+ gap: 6px;
8971
+ margin-bottom: 24px;
8972
+ padding: 4px 12px;
8973
+ border-radius: 9999px;
8974
+ background: rgba(249, 176, 22, 0.1);
8975
+ border: 1px solid rgba(249, 176, 22, 0.2);
8976
+ color: #F9B016;
8977
+ font-size: 12px;
8978
+ font-weight: 700;
8979
+ box-shadow: 0 0 15px rgba(249, 176, 22, 0.1);
8980
+ ">
8981
+ <span style="display:inline-flex;">${svgZap}</span>
8982
+ <span>+${pkg.bonus_percentage}% EXTRA VALUE</span>
8983
+ </div>
8984
+ ` : '<div style="height:16px;"></div>'}
8985
+
8986
+ <!-- Main credits: 巨大白字 + CREDITS -->
8987
+ <div style="margin-bottom: 0;">
8988
+ <span style="
8989
+ display: block;
8990
+ font-size: 60px;
8991
+ line-height: 1;
8992
+ font-weight: 800;
8993
+ color: #FFFFFF;
8994
+ letter-spacing: -0.05em;
8995
+ filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
8996
+ ">${baseNum}</span>
8997
+ <span style="
8998
+ display: block;
8999
+ margin-top: 4px;
9000
+ font-size: 14px;
9001
+ font-weight: 500;
9002
+ color: #A3A3A3;
9003
+ letter-spacing: 0.1em;
9004
+ text-transform: uppercase;
9005
+ ">CREDITS</span>
9119
9006
  </div>
9120
- ` : ''}
9121
9007
 
9122
- <!-- Credits display area - ensure no line break -->
9123
- <div style="
9124
- display: flex;
9125
- flex-direction: column;
9126
- align-items: center;
9127
- justify-content: center;
9128
- gap: 0;
9129
- width: 100%;
9130
- margin-top: 60px;
9131
- ">
9008
+ <!-- Separator: 渐变线 + 加号 (缩短线条长度) -->
9132
9009
  <div style="
9133
9010
  display: flex;
9134
- align-items: baseline;
9011
+ align-items: center;
9135
9012
  justify-content: center;
9136
9013
  gap: 12px;
9137
- flex-wrap: nowrap;
9014
+ width: 100%;
9015
+ margin: 12px 0;
9016
+ opacity: 0.4;
9138
9017
  ">
9139
- <!-- Base credits -->
9140
- <span style="
9141
- font-size: 80px;
9142
- line-height: 1;
9143
- font-weight: 400;
9144
- color: white;
9145
- letter-spacing: -0.04em;
9146
- white-space: nowrap;
9147
- ">
9148
- ${this.formatNumber(pkg.base_credits || pkg.credits)}
9149
- </span>
9150
-
9151
- <!-- credits text -->
9152
- <span style="
9153
- font-size: 52px;
9154
- line-height: 1;
9155
- font-weight: 400;
9156
- color: white;
9157
- letter-spacing: -0.04em;
9158
- white-space: nowrap;
9159
- ">
9160
- credits
9161
- </span>
9018
+ <span style="width: 40px; height: 1px; background: linear-gradient(to right, transparent, #FFFFFF);"></span>
9019
+ <span style="color: #FFFFFF; font-size: 18px; font-weight: 300; line-height: 1;">+</span>
9020
+ <span style="width: 40px; height: 1px; background: linear-gradient(to left, transparent, #FFFFFF);"></span>
9021
+ </div>
9162
9022
 
9163
- <!-- Bonus credits -->
9164
- ${hasBonus ? `
9023
+ <!-- Bonus credits: 绿色数字 + BONUS CREDITS -->
9024
+ ${hasBonus ? `
9025
+ <div style="margin-bottom: 32px; position: relative;">
9026
+ <div style="position: absolute; inset: -16px; background: rgba(34, 197, 94, 0.1); filter: blur(20px); border-radius: 50%;"></div>
9165
9027
  <span style="
9166
- font-size: 52px;
9028
+ display: block;
9029
+ position: relative;
9030
+ font-size: 36px;
9167
9031
  line-height: 1;
9168
- font-weight: 400;
9169
- color: #00ff88;
9170
- letter-spacing: -0.04em;
9171
- white-space: nowrap;
9172
- ">
9173
- +${this.formatNumber(pkg.bonus_credits)} bonus
9174
- </span>
9175
- ` : ''}
9032
+ font-weight: 700;
9033
+ color: transparent;
9034
+ background: linear-gradient(to bottom, #86EFAC, #22C55E);
9035
+ -webkit-background-clip: text;
9036
+ background-clip: text;
9037
+ ">${bonusNum}</span>
9038
+ <div style="display:inline-flex;position: relative;align-items:center;gap:6px;margin-top:4px;">
9039
+ <span style="display:inline-flex;color:#4ADE80;">${svgSparkles}</span>
9040
+ <span style="font-size:14px;font-weight:600;color:#4ADE80;letter-spacing:0.05em;text-transform:uppercase;">Bonus Credits</span>
9041
+ </div>
9042
+ </div>
9043
+ ` : '<div style="height:32px;"></div>'}
9044
+
9045
+ <!-- Validity badge (深色小胶囊) -->
9046
+ <div style="
9047
+ display: inline-flex;
9048
+ align-items: center;
9049
+ gap: 6px;
9050
+ margin-bottom: 32px;
9051
+ padding: 6px 12px;
9052
+ border-radius: 8px;
9053
+ background: rgba(255, 255, 255, 0.05);
9054
+ color: #737373;
9055
+ font-size: 12px;
9056
+ ">
9057
+ <span style="display:inline-flex;">${svgCheck}</span>
9058
+ <span>Valid for all platform products</span>
9176
9059
  </div>
9177
- </div>
9178
9060
 
9179
- <!-- Subtitle - Valid for all platform products -->
9180
- <div style="
9181
- font-size: 22px;
9182
- line-height: 1.4;
9183
- font-weight: 300;
9184
- color: rgba(255, 255, 255, 0.75);
9185
- letter-spacing: -0.015em;
9186
- ">
9187
- Valid for all platform products
9188
- </div>
9061
+ <!-- CTA Button (渐变大按钮, 右侧带价格深色块) -->
9062
+ <button
9063
+ data-package-button="${pkg.id}"
9064
+ type="button"
9065
+ style="
9066
+ width: 100%;
9067
+ border: none;
9068
+ border-radius: 16px;
9069
+ padding: 4px 4px 4px 24px;
9070
+ background: linear-gradient(to right, #34D399, #06B6D4);
9071
+ color: #171717;
9072
+ font-size: 18px;
9073
+ font-weight: 700;
9074
+ cursor: pointer;
9075
+ display: flex;
9076
+ align-items: center;
9077
+ justify-content: space-between;
9078
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
9079
+ box-sizing: border-box;
9080
+ position: relative;
9081
+ overflow: hidden;
9082
+ "
9083
+ onmouseover="this.style.transform='scale(1.02)';"
9084
+ onmouseout="this.style.transform='scale(1)';"
9085
+ onmousedown="this.style.transform='scale(0.98)';"
9086
+ >
9087
+ <!-- Hover Shine Effect -->
9088
+ <div style="
9089
+ position: absolute;
9090
+ top: 0;
9091
+ left: -100%;
9092
+ height: 100%;
9093
+ width: 100%;
9094
+ background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
9095
+ transform: skewX(-20deg);
9096
+ transition: left 0.5s;
9097
+ " onmouseover="this.style.left='100%'" onmouseout="this.style.left='-100%'"></div>
9189
9098
 
9190
- <!-- Buy button -->
9191
- <button
9192
- data-package-button="${pkg.id}"
9193
- style="
9194
- margin-top: 0;
9195
- width: auto;
9196
- min-width: 280px;
9197
- max-width: 400px;
9198
- border-radius: 50px;
9199
- border: none;
9200
- background: linear-gradient(135deg, #00ff88 0%, #00f2fe 100%);
9201
- padding: 16px 48px;
9202
- font-size: 20px;
9203
- font-weight: 600;
9204
- color: #000000;
9205
- cursor: pointer;
9206
- transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
9207
- box-shadow: 0 4px 20px rgba(0, 255, 136, 0.35);
9208
- letter-spacing: 0.01em;
9209
- "
9210
- onmouseover="this.style.background='linear-gradient(135deg, #00ff88 0%, #00f2fe 100%)'; this.style.boxShadow='0 6px 28px rgba(0, 255, 136, 0.5)'; this.style.transform='translateY(-2px) scale(1.02)';"
9211
- onmouseout="this.style.background='linear-gradient(135deg, #00ff88 0%, #00f2fe 100%)'; this.style.boxShadow='0 4px 20px rgba(0, 255, 136, 0.35)'; this.style.transform='translateY(0) scale(1)';"
9212
- >
9213
- Buy $ ${pkg.price}
9214
- </button>
9099
+ <span>Unlock Now</span>
9100
+ <div style="
9101
+ display: flex;
9102
+ align-items: center;
9103
+ gap: 8px;
9104
+ background: rgba(0, 0, 0, 0.2);
9105
+ padding: 10px 10px;
9106
+ border-radius: 8px;
9107
+ backdrop-filter: blur(4px);
9108
+ ">
9109
+ ${originalPrice ? `<span style="font-size:14px;font-weight:700;color:rgba(255, 255, 255, 0.6);text-decoration:line-through;">$${originalPrice}</span>` : ''}
9110
+ <span style="font-size:16px;font-weight:600;color:#FFFFFF;">$${pkg.price}</span>
9111
+ </div>
9112
+ </button>
9113
+ </div>
9215
9114
  </div>
9216
9115
  `;
9217
9116
  }
@@ -9269,7 +9168,7 @@ class GenericPackageModal extends BasePackageModal {
9269
9168
  /**
9270
9169
  * SDK version
9271
9170
  */
9272
- const VERSION$2 = '0.9.1';
9171
+ const VERSION$2 = '0.9.2';
9273
9172
 
9274
9173
  var __defProp = Object.defineProperty;
9275
9174
  var __defProps = Object.defineProperties;