/* ==========================================================================
   home-premium.css  (v2) — tông TikTok x Shopee x Lazada
   Nạp SAU file CSS chính.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root {
  --hp-ink:     #07070d;
  --hp-ink-2:   #16111f;
  --hp-cyan:    #25f4ee;   /* TikTok */
  --hp-pink:    #fe2c55;   /* TikTok */
  --hp-orange:  #ee4d2d;   /* Shopee */
  --hp-lz-pink: #ff3d7f;   /* Lazada */
  --hp-lz-vio:  #7b3fe4;   /* Lazada */
  --hp-gold:    #ffc94a;
  --hp-bg:      #f5f6fa;
  --hp-surface: #fff;
  --hp-text:    #1a1d2e;
  --hp-muted:   #6b7088;
  --hp-line:    #e6e8f0;
  --hp-ease:    cubic-bezier(.22, 1, .36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--hp-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- HERO -------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(56px, 9vw, 112px) 0 clamp(96px, 12vw, 150px);
  color: #fff;
  text-align: center;
  background:
    radial-gradient(48% 70% at 10% 12%, rgba(37, 244, 238, .34), transparent 62%),
    radial-gradient(52% 75% at 92% 8%,  rgba(254, 44, 85, .55),  transparent 62%),
    radial-gradient(70% 90% at 55% 118%, rgba(238, 77, 45, .80), transparent 62%),
    linear-gradient(165deg, var(--hp-ink), var(--hp-ink-2));
  background-size: 140% 140%, 140% 140%, 140% 140%, 100% 100%;
  animation: hp-mesh 16s ease-in-out infinite alternate;
}

.hero::before {                      /* lưới mờ */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}

.hero::after {                        /* đường cong nối xuống nội dung */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 56px;
  background: var(--hp-bg);
  clip-path: ellipse(60% 100% at 50% 100%);
}

.hero .container { position: relative; }

/* chữ: ghi đè màu tối của h1 */
body .hero h1 {
  margin: 0 auto 16px;
  max-width: 16ch;
  font-size: clamp(2.1rem, 6.4vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: #fff !important;
  text-wrap: balance;
  animation: hp-rise .9s .05s var(--hp-ease) both;
}
body .hero h1 .grad {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  background: linear-gradient(100deg, #ff9d3d, var(--hp-pink) 42%, var(--hp-cyan)) 0 0 / 200% 100% !important;
  -webkit-background-clip: text !important;
          background-clip: text !important;
  animation: hp-shine 6s linear infinite;
}
body .hero p {
  margin: 0 auto;
  max-width: 52ch;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, .82) !important;
  animation: hp-rise .9s .2s var(--hp-ease) both;
}

/* ---------- ICON NỔI: TikTok / Shopee / Lazada + 2 đồng xu ---------------- */
.hero-floaters { position: absolute; inset: 0; pointer-events: none; }

.fl {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--s, 64px);
  height: var(--s, 64px);
  border-radius: 30%;
  box-shadow: 0 20px 40px -8px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.18),
              0 0 44px -6px var(--glow, transparent);
  animation: var(--anim, hp-float-a) var(--dur, 7s) ease-in-out var(--delay, 0s) infinite;
  will-change: transform;
}
.fl svg { width: 62%; height: 62%; overflow: visible; }

.fl-tiktok { --s: 68px; --glow: rgba(37,244,238,.55); --anim: hp-float-a; --dur: 7s;
             left: 7%; top: 24%; background: #010101; }
.fl-shopee { --s: 64px; --glow: rgba(238,77,45,.75);  --anim: hp-float-b; --dur: 8s; --delay: -2s;
             right: 8%; top: 20%; background: var(--hp-orange); }
.fl-lazada { --s: 58px; --glow: rgba(255,61,127,.6);  --anim: hp-float-c; --dur: 9s; --delay: -4s;
             left: 17%; bottom: 24%; background: #fff; }

.fl-tiktok .c { fill: var(--hp-cyan); transform: translate(-.7px, -.7px); }
.fl-tiktok .p { fill: var(--hp-pink); transform: translate(.7px, .7px); }
.fl-tiktok .w { fill: #fff; }

/* đồng xu ₫ và % */
.hero .container::before,
.hero .container::after {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  color: #7a4e00;
  background: radial-gradient(circle at 30% 28%, #fff4c2, var(--hp-gold) 55%, #e39a10);
  box-shadow: inset 0 -6px 12px rgba(160,90,0,.35), 0 18px 40px rgba(0,0,0,.4);
  pointer-events: none;
}

.hero .container::after  { content: "%"; width: 50px; height: 50px; font-size: 22px;
  right: 5%; bottom: -10px; animation: hp-float-a 9s ease-in-out -3s infinite; }

/* ---------- CARD CHÍNH -------------------------------------------------- */
.card {
  background: var(--hp-surface);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 24px;
  box-shadow: 0 2px 4px rgba(10,10,20,.04), 0 30px 70px -20px rgba(10,10,20,.35) !important;
  animation: hp-rise .9s .35s var(--hp-ease) both;
}
.card-body { padding: clamp(18px, 3.4vw, 34px); }

/* ---------- NỀN TẢNG (gọn, 1 hàng, không xuống dòng) --------------------- */
.platform-tabs {
  display: flex;
  flex-wrap: nowrap;              /* luôn 1 hàng */
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  min-width: 0;
  overflow-x: auto;               /* phòng khi màn hình cực hẹp: cuộn ngang thay vì rớt dòng */
  scrollbar-width: none;
}
.platform-tabs::-webkit-scrollbar { display: none; }

.platform-tabs .label {
  flex: none;
  margin-right: 2px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  color: var(--hp-muted);
}

.platform-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px 0 8px;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: var(--hp-text);
  background: #fff;
  border: 1px solid var(--hp-line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(10, 10, 20, .05);
  transition: transform .3s var(--hp-ease), box-shadow .3s var(--hp-ease),
              border-color .2s, background .2s;
}
.platform-pill:hover { transform: translateY(-1px); }

/* màu nhẹ theo từng sàn */
.platform-pill:has(.platform-logo-shopee) {
  background: linear-gradient(135deg, #fff7f4, #fff);
  border-color: rgba(238, 77, 45, .28);
}
.platform-pill:has(.platform-logo-shopee):hover {
  border-color: rgba(238, 77, 45, .55);
  box-shadow: 0 8px 16px -8px rgba(238, 77, 45, .6);
}
.platform-pill:has(.platform-logo-tiktok) {
  background: linear-gradient(135deg, #f2fefe, #fff 55%, #fff4f6);
  border-color: rgba(254, 44, 85, .22);
}
.platform-pill:has(.platform-logo-tiktok):hover {
  border-color: rgba(254, 44, 85, .5);
  box-shadow: 0 8px 16px -8px rgba(254, 44, 85, .5);
}

/* logo */
.platform-logo {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

/* chấm màu (sàn không có logo) */
.platform-dot { position: relative; flex: none; width: 8px; height: 8px; margin: 0 2px; border-radius: 50%; }
.platform-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: inherit; animation: hp-ping 2.2s ease-out infinite; }

/* nhãn rút gọn trên mobile */
.platform-label-short { display: none; }

@media (max-width: 480px) {
  .platform-tabs { gap: 6px; }
  .platform-tabs .label { font-size: .75rem; margin-right: 0; }
  .platform-label-full {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .platform-label-short { display: inline; }
  .platform-pill { gap: 5px; height: 30px; padding: 0 10px 0 7px; font-size: .76rem; }
  .platform-logo { width: 16px; height: 16px; flex-basis: 16px; }
}

/* màn hình rất hẹp: ẩn nhãn để 2 nút vẫn nằm gọn trên 1 hàng */
@media (max-width: 350px) {
  .platform-tabs .label { display: none; }
}

/* ---------- ALERT ------------------------------------------------------- */
.alert { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px;
  padding: 14px 16px; font-size: .92rem; line-height: 1.55; border-radius: 14px; }
.alert-info { color: #3a2230; background: linear-gradient(135deg, #fff3ef, #effcfc);
  border: 1px solid #ffdcd2; }
.alert a { color: var(--hp-orange); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Ô DÁN LINK -------------------------------------------------- */
@property --hp-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.link-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 2px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(#f7f8fb, #f7f8fb) padding-box,
    linear-gradient(var(--hp-line), var(--hp-line)) border-box;
  transition: box-shadow .4s var(--hp-ease);
}
/* viền gradient chạy quanh khi nhập (không dùng mask nên chạy ổn trên mọi trình duyệt) */
.link-box:focus-within {
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from var(--hp-angle), var(--hp-cyan), var(--hp-pink), var(--hp-orange), var(--hp-lz-vio), var(--hp-cyan)) border-box;
  box-shadow: 0 18px 40px -16px rgba(254, 44, 85, .45);
  animation: hp-spin 4s linear infinite;
}

/* gỡ viền / ring focus mặc định của theme (nguyên nhân viền xanh lệch) */
.link-box .input-wrap,
.link-box .input-wrap input,
.link-box .input-wrap input:focus {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.link-box .input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 6px 0 14px;
  color: var(--hp-muted);
}

/* FIX icon bị tụt xuống: ép icon nằm trong dòng, không dùng transform ghi đè */
.link-box .input-wrap > svg {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  flex: none;
  transition: color .3s, rotate .4s var(--hp-ease), scale .4s var(--hp-ease);
}
.link-box:focus-within .input-wrap > svg { color: var(--hp-pink); rotate: -12deg; scale: 1.12; }

.link-box .input-wrap input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 !important;
  font: inherit;
  font-size: 1rem;
  color: var(--hp-text);
}
.link-box .input-wrap input::placeholder { color: #9a9fb6; }

/* ---------- NÚT DÁN ------------------------------------------------------ */
/* Không dùng transform lên nút (theme hay ghi đè -> nút bị kéo lệch). Mọi hiệu ứng
   dùng màu, bóng, scale/translate riêng và các lớp bên trong. */
.link-box .btn-paste {
  position: relative !important;
  inset: auto !important;
  flex: none;
  align-self: center;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box;
  width: 84px;                       /* JS sẽ animate độ rộng khi đổi trạng thái */
  height: 40px;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  isolation: isolate;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: var(--hp-text);
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  transform: none !important;
  translate: none !important;
  transition: width .6s var(--hp-ease), color .3s, border-color .3s, background .3s,
              box-shadow .4s var(--hp-ease), transform .25s var(--hp-ease);
}

/* tầng nền xanh mint quét từ trái sang phải */
.btn-paste::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill, linear-gradient(120deg, #1fd9a0, #0aa877));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .6s var(--hp-ease);
}
/* thanh đếm ngược 5 giây */
.btn-paste::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .8);
  transform: scaleX(0);
  transform-origin: left center;
}

/* hai tầng nội dung xếp chồng trong cùng một ô */
.btn-paste .pb-idle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s, transform 0.5s var(--hp-ease);
}

.btn-paste .pb-msg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 12px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  color: #fff !important;
  white-space: nowrap;
  transition: opacity 0.3s, transform 0.5s var(--hp-ease);
}

.btn-paste svg { position: static !important; inset: auto !important; transform: none !important; flex: none; }

/* hover: chỉ đổi màu và bóng, không dịch chuyển */
.btn-paste:not(.is-done):not(.is-warn):hover {
  color: var(--hp-orange);
  border-color: rgba(238, 77, 45, .45);
  background: #fff6f3;
  box-shadow: 0 8px 18px -8px rgba(238, 77, 45, .55);
  transform: none !important;
}

.btn-paste:active { transform: scale(.95) !important; }

/* --- trạng thái: dán thành công / cảnh báo --- */
.btn-paste.is-done,
.btn-paste.is-warn { color: #fff; border-color: transparent; }
.btn-paste.is-done { box-shadow: 0 10px 22px -8px rgba(10, 168, 119, .7);
                     animation: hp-ripple 1.1s var(--hp-ease); }
.btn-paste.is-warn { --fill: linear-gradient(120deg, #ffb347, #ff7a3d);
                     box-shadow: 0 10px 22px -8px rgba(255, 122, 61, .7); }

.btn-paste.is-done::before,
.btn-paste.is-warn::before { transform: scaleX(1); }
.btn-paste.is-done::after,
.btn-paste.is-warn::after  { animation: hp-count var(--hold, 5s) linear forwards; }

.btn-paste.is-done .pb-idle,
.btn-paste.is-warn .pb-idle { opacity: 0; transform: translateY(-12px); }
.btn-paste.is-done .pb-msg,
.btn-paste.is-warn .pb-msg  { opacity: 1; transform: translate(-50%, -50%); transition-delay: .14s; }

/* dấu tích tự vẽ */
.pb-check { width: 20px; height: 20px; }
.pb-check circle { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2;
  stroke-dasharray: 63; stroke-dashoffset: 63; }
.pb-check .pb-tick { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 22; stroke-dashoffset: 22; }
.pb-check .pb-bang { display: none; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.btn-paste.is-done .pb-check circle,
.btn-paste.is-warn .pb-check circle { animation: hp-draw .6s .1s var(--hp-ease) forwards; }
.btn-paste.is-done .pb-check .pb-tick { animation: hp-draw .45s .4s var(--hp-ease) forwards; }
.btn-paste.is-warn .pb-check .pb-tick { display: none; }
.btn-paste.is-warn .pb-check .pb-bang { display: block; }

/* ô nhập sáng nhẹ màu mint khi vừa dán */
.link-box.is-pasted { animation: hp-glow 1.6s var(--hp-ease); }
.link-box.is-pasted:focus-within { animation: hp-spin 4s linear infinite, hp-glow 1.6s var(--hp-ease); }

@keyframes hp-draw   { to { stroke-dashoffset: 0; } }
@keyframes hp-count  { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes hp-ripple { 0%   { box-shadow: 0 0 0 0 rgba(31,217,160,.55), 0 10px 22px -8px rgba(10,168,119,.7); }
                       100% { box-shadow: 0 0 0 16px rgba(31,217,160,0), 0 10px 22px -8px rgba(10,168,119,.7); } }
@keyframes hp-glow   { 0%   { box-shadow: 0 0 0 0 rgba(31,217,160,.5); }
                       100% { box-shadow: 0 0 0 18px rgba(31,217,160,0); } }

/* ---------- NÚT CHÍNH ---------------------------------------------------- */
.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  overflow: hidden;
  padding: 0 28px; min-height: 52px;
  font: inherit; font-weight: 700; color: #fff; white-space: nowrap; cursor: pointer;
  background: linear-gradient(120deg, var(--hp-orange), var(--hp-pink) 55%, var(--hp-lz-vio));
  background-size: 180% 100%;
  border: 0; border-radius: 14px;
  box-shadow: 0 12px 26px -10px rgba(254, 44, 85, .8);
  transition: transform .35s var(--hp-ease), box-shadow .35s var(--hp-ease), background-position .6s var(--hp-ease);
}
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); }
.btn-primary:hover { background-position: 100% 0; transform: translateY(-2px);
  box-shadow: 0 18px 32px -10px rgba(238, 77, 45, .75); }
.btn-primary:hover::after { animation: hp-sweep .9s var(--hp-ease); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled, .btn-primary.is-loading { opacity: .75; cursor: progress; }
.btn-primary svg { transition: transform .35s var(--hp-ease); }
.btn-primary:hover svg { transform: scale(1.2) rotate(8deg); }

.card-body .text-muted { color: var(--hp-muted); }
.card-body .text-muted a { font-weight: 600; color: var(--hp-orange); text-decoration: none; }
.card-body .text-muted a svg { transition: transform .3s var(--hp-ease); vertical-align: -2px; }
.card-body .text-muted a:hover svg { transform: translateX(4px); }

/* ---------- KẾT QUẢ ------------------------------------------------------ */
#resultArea:not(.hidden) { animation: hp-pop .6s var(--hp-ease) both; }

/* ---------- 3 BƯỚC (NÂNG CẤP MOTION) ------------------------------------- */
section.container h2 { 
  font-size: clamp(1.5rem, 4vw, 2.2rem); 
  font-weight: 800;
  letter-spacing: -.02em; 
  text-wrap: balance; 
}

/* Highlight chữ "nhận" như trong ảnh */
.hl-text {
  color: var(--hp-orange);
  background: rgba(238, 77, 45, 0.12);
  padding: 2px 12px;
  border-radius: 8px;
  display: inline-block;
}

.steps { 
  position: relative; 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 22px; 
  z-index: 1; 
}

/* Đường nền đứt đoạn (mờ) */
.steps::before { 
  content: ""; 
  position: absolute; 
  top: 56px; 
  left: 16%; 
  right: 16%; 
  height: 2px;
  background: repeating-linear-gradient(90deg, #c9ccdb 0 6px, transparent 6px 12px); 
  z-index: -1; 
}

/* Hiệu ứng tia sáng (Shooting Star) chạy ngang cực xịn */
.steps::after {
  content: ""; 
  position: absolute; 
  top: 54px; 
  left: 16%; 
  width: 25%; /* Độ dài của vệt sáng */
  height: 6px; /* Làm viền sáng dày hơn chút */
  background: linear-gradient(90deg, transparent, var(--hp-cyan), var(--hp-pink), var(--hp-orange), transparent);
  border-radius: 6px;
  filter: drop-shadow(0 0 8px rgba(254, 44, 85, 0.8)); /* Đổ bóng phát sáng */
  z-index: -1;
  animation: hp-scan-glow 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite; /* Loop chuyển động */
}

.step { 
  position: relative; 
  padding: 30px 24px 26px; 
  text-align: center;
  background: rgba(255, 255, 255, 0.85); /* Nền hơi trong suốt */
  backdrop-filter: blur(10px); /* Hiệu ứng kính */
  border: 1px solid var(--hp-line); 
  border-radius: 22px;
  transition: transform .5s var(--hp-ease), box-shadow .5s var(--hp-ease), border-color .3s; 
}

/* Hover nâng cấp: Nổi bật lên mượt hơn và có viền viền màu nhẹ */
.step:hover { 
  transform: translateY(-8px) scale(1.02); 
  border-color: rgba(254, 44, 85, 0.2);
  box-shadow: 0 28px 50px -24px rgba(10,10,20,.15), 0 0 20px -5px rgba(254, 44, 85, .1); 
}

.step-num { 
  position: relative; 
  z-index: 1; 
  display: grid; 
  place-items: center;
  width: 52px; 
  height: 52px; 
  margin: 0 auto 16px;
  font-size: 1.25rem; 
  font-weight: 800; 
  color: #fff; 
  border-radius: 16px;
  background: linear-gradient(135deg, #0cc9c4, #0a8fb3);               /* TikTok */
  box-shadow: 0 12px 22px -10px rgba(10, 201, 196, .8);
  transition: transform .5s var(--hp-ease), border-radius .5s var(--hp-ease); 
}
.step:nth-child(2) .step-num { 
  background: linear-gradient(135deg, #ff7a3d, var(--hp-orange)); /* Shopee */
  box-shadow: 0 12px 22px -10px rgba(238, 77, 45, .8); 
}
.step:nth-child(3) .step-num { 
  background: linear-gradient(135deg, var(--hp-lz-pink), var(--hp-lz-vio)); /* Lazada */
  box-shadow: 0 12px 22px -10px rgba(255, 61, 127, .8); 
}
.step:hover .step-num { 
  transform: rotate(-8deg) scale(1.1); 
  border-radius: 50%; 
}

.step h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 700; }
.step p  { margin: 0; font-size: .95rem; line-height: 1.65; color: var(--hp-muted); }

.js-reveal .step { opacity: 0; transform: translateY(26px); }
.js-reveal .step.is-in { 
  opacity: 1; 
  transform: none;
  transition: opacity .8s var(--hp-ease), transform .8s var(--hp-ease), box-shadow .5s var(--hp-ease), border-color .3s; 
}
.js-reveal .step.is-in:nth-child(2) { transition-delay: .12s; }
.js-reveal .step.is-in:nth-child(3) { transition-delay: .24s; }

/* ---------- KEYFRAMES ---------------------------------------------------- */
@keyframes hp-spin   { to { --hp-angle: 360deg; } }
@keyframes hp-mesh   { from { background-position: 0 0, 100% 0, 50% 100%, 0 0; }
                       to   { background-position: 100% 60%, 0 40%, 40% 70%, 0 0; } }
@keyframes hp-float-a { 0%,100% { transform: translateY(0) rotate(-6deg); }
                        50%     { transform: translateY(-20px) rotate(8deg); } }
@keyframes hp-float-b { 0%,100% { transform: translateY(0) rotate(7deg); }
                        50%     { transform: translateY(-16px) rotate(-8deg); } }
@keyframes hp-float-c { 0%,100% { transform: translate(0,0) rotate(-4deg); }
                        33%     { transform: translate(8px,-14px) rotate(6deg); }
                        66%     { transform: translate(-6px,-6px) rotate(-8deg); } }
@keyframes hp-shine  { to { background-position: -200% 0; } }
@keyframes hp-rise   { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes hp-pop    { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes hp-sweep  { to { left: 130%; } }
@keyframes hp-ping   { 0% { transform: scale(1); opacity: .6; } 80%,100% { transform: scale(2.8); opacity: 0; } }
@keyframes hp-scan-glow {
  0%   { left: 16%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 59%; opacity: 0; } /* 16% ban đầu + (68% quãng đường) - 25% độ rộng vệt sáng */
}

@keyframes hp-scan-glow-vert {
  0%   { top: 30px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: calc(100% - 30px - 25%); opacity: 0; } 
}
/* ---------- TABLET ------------------------------------------------------- */
@media (max-width: 900px) {
  .steps { gap: 16px; }
  .step  { padding: 26px 18px 22px; }
  .fl-tiktok { left: 4%; } .fl-shopee { right: 4%; } .fl-lazada { left: 8%; }
}

/* ---------- ĐIỆN THOẠI --------------------------------------------------- */
@media (max-width: 720px) {
  .hero { padding: 116px 0 150px; }

  /* icon xếp vào dải trên và dải dưới để không đè chữ */
  .fl-tiktok { --s: 46px; left: 8%;  top: 28px; }
  .fl-shopee { --s: 44px; right: 8%; top: 36px; }
  .fl-lazada { --s: 42px; left: auto; right: 22%; bottom: 88px; }
  .hero .container::before { width: 40px; height: 40px; font-size: 18px; left: 4%; top: -76px; }
  .hero .container::after  { width: 36px; height: 36px; font-size: 16px; right: 4%; bottom: -66px; }

  .card { border-radius: 20px; }

  .link-box { flex-direction: column; align-items: stretch; padding: 6px; gap: 8px; }
  .link-box .input-wrap { padding: 0 6px 0 12px; }
  .link-box .input-wrap input { height: 50px; font-size: 16px; }  /* 16px: iOS không tự zoom */
  .link-box .btn-paste { width: 76px; height: 38px; font-size: .85rem; }
  .btn-primary { width: 100%; min-height: 52px; }

  .flex-between { flex-direction: column; align-items: flex-start; }

  .steps { grid-template-columns: 1fr; }
  
  .steps::before { 
    top: 30px; bottom: 30px; left: 50%; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, #c9ccdb 0 8px, transparent 8px 16px); 
  }
  
  /* Xoay tia sáng chạy từ trên xuống dưới cho giao diện điện thoại */
  .steps::after {
    top: 30px; 
    bottom: auto;
    left: calc(50% - 2px); 
    right: auto; 
    width: 6px; 
    height: 25%; /* Chiều dài vệt sáng trên mobile */
    background: linear-gradient(180deg, transparent, var(--hp-cyan), var(--hp-pink), var(--hp-orange), transparent);
    animation: hp-scan-glow-vert 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }
}

/* ---------- TRUY CẬP ----------------------------------------------------- */
.btn-primary:focus-visible, .btn-paste:focus-visible, .card-body a:focus-visible {
  outline: 3px solid rgba(254, 44, 85, .5); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; }
  .js-reveal .step { opacity: 1; transform: none; }
}

/* ---- dải thống kê + khung giờ vàng (Tông Dark Mesh Gradient giống Hero Banner) ---- */
.dl-section {
  --dl-ink:    #07070d;
  --dl-ink-2:  #16111f;
  --dl-cyan:   #25f4ee;
  --dl-pink:   #fe2c55;
  --dl-orange: #ee4d2d;
  --dl-gold1:  #ffe169;
  --dl-gold2:  #f5a800;
  --dl-ease:   cubic-bezier(.22, 1, .36, 1);
  display: grid;
  gap: 18px;
  margin-top: 8px;
  margin-bottom: 40px;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.dl-section *, .dl-section *::before, .dl-section *::after { box-sizing: border-box; }

/* 1. DẢI THỐNG KÊ: Nền Dark Mesh + Lưới mờ + 4 Icon phát sáng */
.dl-stats {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(45% 120% at 6% 15%, rgba(37, 244, 238, .28), transparent 65%),
    radial-gradient(45% 120% at 94% 15%, rgba(254, 44, 85, .40), transparent 65%),
    radial-gradient(60% 130% at 52% 120%, rgba(238, 77, 45, .48), transparent 65%),
    linear-gradient(165deg, var(--dl-ink), var(--dl-ink-2));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  box-shadow:
    0 28px 55px -28px rgba(7, 7, 13, .85),
    0 0 0 1px rgba(255, 255, 255, .05) inset;
}

/* Lưới kẻ ô mờ giống Hero */
.dl-stats::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 85%);
}

.dl-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 20px 24px;
  transition: background .3s var(--dl-ease);
}
.dl-stat:hover { background: rgba(255, 255, 255, .03); }

.dl-stat + .dl-stat::before {
  content: "";
  position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .14), transparent);
}

/* 4 hộp icon mang sắc thái Cyan - Cam - Hồng - Vàng của Hero */
.dl-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--dl-cyan);
  background: rgba(37, 244, 238, .1);
  border: 1px solid rgba(37, 244, 238, .28);
  border-radius: 14px;
  box-shadow: 0 0 24px -6px rgba(37, 244, 238, .45);
  transition: transform .35s var(--dl-ease);
}
.dl-stat:hover .dl-ic { transform: translateY(-2px) scale(1.06); }

.dl-stat:nth-child(2) .dl-ic {
  color: #ff7a45;
  background: rgba(238, 77, 45, .12);
  border-color: rgba(238, 77, 45, .32);
  box-shadow: 0 0 24px -6px rgba(238, 77, 45, .45);
}
.dl-stat:nth-child(3) .dl-ic {
  color: #ff4d79;
  background: rgba(254, 44, 85, .12);
  border-color: rgba(254, 44, 85, .32);
  box-shadow: 0 0 24px -6px rgba(254, 44, 85, .45);
}
.dl-stat:nth-child(4) .dl-ic {
  color: var(--dl-gold1);
  background: rgba(255, 201, 74, .12);
  border-color: rgba(255, 201, 74, .32);
  box-shadow: 0 0 24px -6px rgba(255, 201, 74, .45);
}

.dl-stat > div { min-width: 0; }
.dl-stat b {
  display: block;
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: #fff;
  overflow-wrap: anywhere;
}
.dl-stat span.l {
  display: block;
  margin-top: 3px;
  font-size: .82rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, .68);
}

/* 2. KHUNG GIỜ VÀNG: Phối màu giống hệt Hero Banner + Ngôi sao lấp lánh */
.dl-deal {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: clamp(24px, 3.5vw, 38px);
  color: #fff;
  background:
    radial-gradient(48% 95% at 8% 12%, rgba(37, 244, 238, .34), transparent 62%),
    radial-gradient(52% 95% at 92% 10%, rgba(254, 44, 85, .55), transparent 62%),
    radial-gradient(70% 110% at 55% 118%, rgba(238, 77, 45, .80), transparent 62%),
    linear-gradient(165deg, var(--dl-ink), var(--dl-ink-2));
  background-size: 140% 140%, 140% 140%, 140% 140%, 100% 100%;
  animation: dl-mesh 16s ease-in-out infinite alternate;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 24px;
  box-shadow:
    0 34px 65px -30px rgba(7, 7, 13, .9),
    0 0 0 1px rgba(255, 255, 255, .06) inset;
}

/* Lưới mờ nền phụ bên dưới ngôi sao giống Hero */
.dl-deal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 25%, transparent 80%);
          mask-image: radial-gradient(ellipse at 50% 45%, #000 25%, transparent 80%);
}

.dl-main { min-width: 0; }
.dl-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .05em;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
}
.dl-tag svg { width: 15px; height: 15px; color: var(--dl-gold1); filter: drop-shadow(0 0 5px rgba(255,225,105,.6)); }

.dl-section .dl-deal h2 {
  margin: 14px 0 10px;
  font-family: inherit;
  font-size: clamp(1.45rem, 3.4vw, 2.15rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: #fff;
  text-wrap: balance;
  text-align: left;
}
.dl-section .dl-deal p {
  margin: 0;
  max-width: 58ch;
  font-size: .98rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
}

/* Cột đồng hồ đếm ngược & Nút vàng Gold (đồng bộ với đồng xu % ở Hero) */
.dl-side { display: grid; justify-items: end; gap: 12px; }
.dl-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .9);
}
.dl-label svg { width: 16px; height: 16px; color: var(--dl-cyan); }

.dl-tiles { display: flex; align-items: center; gap: 8px; }
.dl-tile {
  min-width: 58px;
  padding: 8px 6px 7px;
  text-align: center;
  color: #2a1a00;
  background: radial-gradient(circle at 30% 25%, #fff4c2, var(--dl-gold1) 50%, var(--dl-gold2));
  border-radius: 13px;
  box-shadow:
    inset 0 -3px 8px rgba(160, 90, 0, .28),
    0 12px 24px -10px rgba(245, 168, 0, .65),
    0 0 0 1px rgba(255, 255, 255, .35) inset;
}
.dl-tile b {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.dl-tile i {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  opacity: .78;
}
.dl-sep { font-size: 1.4rem; font-weight: 800; color: #fff; opacity: .85; }
.dl-deal.is-ended .dl-tiles { opacity: .5; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  font-size: .95rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(120deg, var(--dl-orange), var(--dl-pink) 60%, #a855f7);
  background-size: 180% 100%;
  border-radius: 12px;
  box-shadow:
    0 14px 28px -10px rgba(254, 44, 85, .75),
    0 0 0 1px rgba(255, 255, 255, .25) inset;
  transition: translate .3s var(--dl-ease), box-shadow .3s var(--dl-ease), background-position .5s var(--dl-ease);
}
.dl-btn:focus-visible { outline: 3px solid rgba(37, 244, 238, .7); outline-offset: 3px; }
.dl-btn svg { transition: translate .3s var(--dl-ease); }
@media (hover: hover) and (pointer: fine) {
  .dl-btn:hover {
    color: #fff;
    background-position: 100% 0;
    translate: 0 -2px;
    box-shadow:
      0 18px 32px -10px rgba(238, 77, 45, .85),
      0 0 0 1px rgba(255, 255, 255, .35) inset;
  }
  .dl-btn:hover svg { translate: 4px 0; }
}

@keyframes dl-mesh {
  from { background-position: 0 0, 100% 0, 50% 100%, 0 0; }
  to   { background-position: 100% 60%, 0 40%, 40% 70%, 0 0; }
}
@keyframes dl-twinkle {
  0%   { opacity: .65; transform: scale(.99); }
  100% { opacity: 1;   transform: scale(1.01); }
}

/* Responsive */
@media (max-width: 900px) {
  .dl-stat { padding: 18px 16px; gap: 12px; }
  .dl-ic { width: 42px; height: 42px; border-radius: 12px; }
  .dl-stat b { font-size: 1.15rem; }
}
@media (max-width: 760px) {
  .dl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-stat + .dl-stat::before { display: none; }
  .dl-stat:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, .1); }
  .dl-stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
  .dl-deal { grid-template-columns: minmax(0, 1fr); gap: 22px; border-radius: 22px; }
  .dl-side { justify-items: start; width: 100%; }
  .dl-tile { min-width: 56px; }
  .dl-btn { width: 100%; }
}
@media (max-width: 380px) {
  .dl-stat { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dl-tile { min-width: 50px; }
  .dl-tile b { font-size: 1.5rem; }
}
