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

:root {
  --gold:   #e8b84b;
  --goldg:  rgba(232,184,75,.35);
  --glass:  rgba(13,5,36,.86);
  --glassb: rgba(232,184,75,.2);
}

/* ------------------------------------
   MOBILE DEFAULT — scroll-snap + letterbox
   ------------------------------------ */
html, body { height: 100dvh; overflow: hidden; background: #0d0524; }

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: #0d0524;
  -webkit-font-smoothing: antialiased;
}

#scroller {
  height: 100dvh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #0d0524;
}
#scroller::-webkit-scrollbar { display: none; }

/* Section = one viewport slot */
.section {
  height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #ffffff;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  flex-shrink: 0;
}

.canvas-wrap {
  width: 100vw;
  aspect-ratio: 968 / 1800;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* ----------------------- LAYERS ----------------------- */
/* All assets 968×1800 ? stack at top:0; left:0; width:100% */
.layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: auto;
  will-change: opacity, transform;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.layer.in { opacity: 1; transform: translate3d(0,0,0); }

.fl { transform: translateX(-18px); }
.fr { transform: translateX(18px);  }
.fd { transform: none; opacity: 0;  }

.d0 { transition-delay: .00s; }
.d1 { transition-delay: .10s; }
.d2 { transition-delay: .20s; }
.d3 { transition-delay: .30s; }
.d4 { transition-delay: .42s; }
.d5 { transition-delay: .55s; }

/* ----------------------- FLOAT / PULSE ANIMATIONS ----------------------- */
@keyframes floatA {
  0%,100% { transform: translateY(0)   rotate(0deg);    }
  50%     { transform: translateY(-11px) rotate(1.8deg); }
}
@keyframes floatB {
  0%,100% { transform: translateY(-5px) rotate(0deg);    }
  50%     { transform: translateY(8px)  rotate(-1.8deg); }
}
@keyframes floatC {
  0%,100% { transform: translateY(3px)  rotate(-1deg);   }
  50%     { transform: translateY(-9px)  rotate(1deg);   }
}
@keyframes iconPulse {
  0%,100% { transform: scale(1);     }
  50%     { transform: scale(1.032); }
}

/* Paused until section gets .active */
.fa { animation: floatA    3.2s 1.2s ease-in-out infinite paused; }
.fb { animation: floatB    2.8s 1.5s ease-in-out infinite paused; }
.fc { animation: floatC    3.7s 1.0s ease-in-out infinite paused; }
.ip { animation: iconPulse 2.5s 1.2s ease-in-out infinite paused; }

.section.active .fa,
.section.active .fb,
.section.active .fc,
.section.active .ip { animation-play-state: running; }

/* ----------------------- S5 ICON BUMP + BLING ----------------------- */
@keyframes iconBump {
  0%, 100% { transform: scale(1); }
  12%      { transform: scale(1.062); }
  22%      { transform: scale(1); }
}
@keyframes s5Bling {
  0%, 100% { filter: drop-shadow(0 2px 4px rgba(180,140,20,.2)); }
  18%      { filter: drop-shadow(0 0 20px rgba(255,235,90,1))
                     drop-shadow(0 0 9px rgba(247,200,60,.85))
                     brightness(1.22); }
  32%      { filter: drop-shadow(0 2px 4px rgba(180,140,20,.2)); }
}
/* all 4 icons — bling only, staggered left?right top?bottom */
.s5ic { animation: s5Bling 3.6s ease-in-out infinite paused; }
#s4 .canvas-wrap img:nth-child(5) { animation-delay: 0.0s;  }
#s4 .canvas-wrap img:nth-child(6) { animation-delay: 0.65s; }
#s4 .canvas-wrap img:nth-child(7) { animation-delay: 1.3s;  }
#s4 .canvas-wrap img:nth-child(8) { animation-delay: 1.95s; }
.section.active .s5ic { animation-play-state: running; }

/* -- Red alarm blink for S3 icons -- */
@keyframes redAlarm {
  0%,100% { filter: drop-shadow(0 0 0px rgba(220,30,30,0)); }
  45%,55% { filter: drop-shadow(0 0 24px rgba(220,30,30,.95))
                    drop-shadow(0 0  8px rgba(255,80,80,.6)); }
}
.ra  { animation: redAlarm 1.0s 0.00s ease-in-out infinite paused; }
.ra1 { animation: redAlarm 1.0s 0.22s ease-in-out infinite paused; }
.ra2 { animation: redAlarm 1.0s 0.44s ease-in-out infinite paused; }
.section.active .ra,
.section.active .ra1,
.section.active .ra2 { animation-play-state: running; }

/* ----------------------- SCROLL HINT ----------------------- */
#hint {
  position: absolute; bottom: 6%; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  opacity: 0;
  animation: hintIn .6s .8s ease forwards, bounce 1.8s 1.4s ease-in-out infinite;
  pointer-events: none;
}
#hint span { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.arrow { width: 14px; height: 14px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); }
@keyframes hintIn { to { opacity: .6; } }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0);   }
  50%      { transform: translateX(-50%) translateY(5px); }
}

/* ----------------------- LOADER ----------------------- */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at 50% 38%, #2d1070, #0d0524);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  transition: opacity .5s, visibility .5s;
}
#loader.out { opacity: 0; visibility: hidden; }
.ld-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.ld-ring { width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgba(232,184,75,.2); border-top-color: var(--gold); animation: spin 1s linear infinite; }
.ld-logo { position: absolute; width: 32px; height: 32px; object-fit: contain; }
.ld-bar  { width: 140px; height: 2px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.ld-fill { height: 100%; background: linear-gradient(90deg, #3b1f8c, var(--gold)); animation: fill 1.6s ease forwards; }
.ld-txt  { font-size: 10px; letter-spacing: 3px; color: rgba(255,255,255,.4); text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fill { from { width:0 } to { width:100% } }

/* ----------------------- PROGRESS BAR ----------------------- */
#prog {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 1000;
  background: linear-gradient(90deg, #3b1f8c, var(--gold), #f5d98a);
  width: 0; transition: width .15s linear;
  box-shadow: 0 0 8px var(--goldg); pointer-events: none;
}

/* ----------------------- DOTS ----------------------- */
#dots {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 900; display: flex; flex-direction: column; gap: 9px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.45); cursor: pointer;
  transition: background .3s, transform .3s, box-shadow .3s;
}
.dot.active { background: var(--gold); transform: scale(1.6); box-shadow: 0 0 7px var(--goldg); }

/* ----------------------- CTA BAR ----------------------- */
#cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #4a28b8;
  display: flex; gap: 8px; align-items: stretch;
  box-shadow: 0 -4px 28px rgba(0,0,0,.7);
  transition: transform .32s ease;
}
#cta.hide { transform: translateY(110%); }

.cbtn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; padding: 10px 4px;
  border: 2px solid #e8b84b; outline: none; border-radius: 15px;
  cursor: pointer; font-family: inherit;
  font-weight: 800; font-size: 9px; letter-spacing: .7px;
  text-decoration: none; color: #fff;
  background: #2d1070;
  transition: opacity .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.cbtn:active { transform: scale(.93); opacity: .85; }
.ci { display: flex; align-items: center; justify-content: center; line-height: 1; }

.buy {
  background: linear-gradient(160deg, #f7d862 0%, #e8b84b 50%, #c8920a 100%);
  color: #1a0a3c; flex: 1.9;
  font-size: 16px; font-weight: 900; letter-spacing: 1.5px;
  border-color: rgba(255,220,100,.45);
  box-shadow: 0 4px 20px rgba(232,184,75,.55), inset 0 1px 0 rgba(255,255,255,.25);
  animation: pgold 2.2s ease-in-out infinite;
  position: relative; overflow: hidden; gap: 0;
}
.buy::after {
  content: ''; position: absolute; inset: 0; left: -100%; width: 55%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: shine 2.8s ease-in-out infinite;
}
@keyframes shine { 0%{left:-100%} 60%,100%{left:160%} }
@keyframes pgold {
  0%,100% { box-shadow: 0 4px 18px rgba(232,184,75,.42); }
  50%      { box-shadow: 0 4px 28px rgba(232,184,75,.68); }
}

/* ------------------------------------
   DESKTOP =968px
   Canvas hi?n th? dúng 968×1800 t? nhiên
   ------------------------------------ */
@media (min-width: 968px) {
  html { height: auto; overflow: auto; }
  body { height: auto; overflow: visible; }

  #scroller { height: auto; overflow: visible; scroll-snap-type: none; }

  .section {
    height: auto;
    display: block;
    scroll-snap-align: none;
    scroll-snap-stop: unset;
  }

  /* Canvas = exact 968×1800, centered on page */
  .canvas-wrap {
    width: 968px;
    height: 1800px;
    aspect-ratio: unset;
    margin: 0 auto;
  }

  /* Layers: fix width to canvas */
  .layer { width: 968px; }

  /* Dots on left */
  #dots { right: auto; left: 24px; }

  /* CTA centered — all buttons equal on desktop */
  #cta { max-width: 640px; left: 50%; right: auto; transform: translateX(-50%); }
  #cta.hide { transform: translateX(-50%) translateY(110%); }
  .buy  { flex: 1; font-size: 13px; letter-spacing: 1px; }
  .cbtn { font-size: 10px; padding: 12px 6px; gap: 6px; }

  /* Popup centered on desktop */
  #order-modal {
    border-radius: 22px;
    max-width: 480px;
    margin-bottom: 0;
    transform: translateY(60px) scale(.96);
    opacity: 0;
    transition: transform .35s cubic-bezier(.32,.72,0,1), opacity .3s ease;
  }
  #order-overlay { align-items: center; }
  #order-overlay.show #order-modal { transform: translateY(0) scale(1); opacity: 1; }
  .modal-handle { display: none; }
}

/* ----------------------- ORDER POPUP ----------------------- */
#order-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(5,2,20,.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
#order-overlay.show { opacity: 1; visibility: visible; }

#order-modal {
  position: relative;
  width: 100%; max-width: 520px;
  background: linear-gradient(170deg, #1e0f4a 0%, #0d0524 100%);
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(232,184,75,.22); border-bottom: none;
  box-shadow: 0 -10px 48px rgba(0,0,0,.8);
  padding-bottom: env(safe-area-inset-bottom);
  max-height: 94svh; overflow-y: auto; scrollbar-width: none;
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.32,.72,0,1);
}
#order-modal::-webkit-scrollbar { display: none; }
#order-overlay.show #order-modal { transform: translateY(0); }

.modal-handle {
  width: 36px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.18); margin: 12px auto 0;
}
.modal-body { padding: 14px 16px 28px; }

.modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.7); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.modal-close:hover { background: rgba(255,255,255,.18); }

.modal-title {
  font-size: 16px; font-weight: 900; color: #fff;
  letter-spacing: .6px; margin-bottom: 3px; text-align: center;
}
.modal-sub {
  font-size: 11px; color: rgba(255,255,255,.45);
  text-align: center; margin-bottom: 18px;
}

/* -- Package cards -- */
.pkg-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }

.pkg-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.pkg-card.active {
  border-color: #e8b84b;
  background: rgba(232,184,75,.08);
  box-shadow: 0 0 0 3px rgba(232,184,75,.15);
}
.pkg-badge {
  position: absolute; top: -9px; right: 12px;
  background: linear-gradient(135deg, #e8b84b, #c8920a);
  color: #1a0a3c; font-size: 8.5px; font-weight: 900;
  padding: 2px 9px; border-radius: 99px; letter-spacing: .6px;
}
.pkg-radio {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .18s, background .18s;
}
.pkg-card.active .pkg-radio { border-color: #e8b84b; background: #e8b84b; }
.pkg-radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: #1a0a3c; opacity: 0; transition: opacity .15s;
}
.pkg-card.active .pkg-radio::after { opacity: 1; }

.pkg-info { flex: 1; }
.pkg-name  { font-size: 12px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.pkg-prices { display: flex; align-items: baseline; gap: 8px; }
.pkg-old   { font-size: 10px; color: rgba(255,255,255,.35); text-decoration: line-through; }
.pkg-new   { font-size: 15px; font-weight: 900; color: #e8b84b; }
.pkg-save  { font-size: 10px; color: #5ef7a0; margin-top: 3px; font-weight: 700; }

/* -- Best Value card — bling -- */
@keyframes blingGlow {
  0%,100% { box-shadow: 0 0 0 2px rgba(232,184,75,.35), 0 0 18px rgba(232,184,75,.2); }
  50%      { box-shadow: 0 0 0 2px rgba(245,217,138,.8), 0 0 32px rgba(232,184,75,.55); }
}
@keyframes badgePulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .85; transform: scale(1.06); }
}
@keyframes shineSlide {
  0%    { left: -80%; }
  60%,100% { left: 130%; }
}
.pkg-best {
  border-color: #e8b84b;
  background: linear-gradient(145deg, rgba(232,184,75,.13) 0%, rgba(45,16,112,.4) 100%);
  animation: blingGlow 2s ease-in-out infinite;
}
.pkg-best::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255,225,120,.18) 50%,
    transparent 80%
  );
  animation: shineSlide 2.4s ease-in-out infinite;
  pointer-events: none;
  clip-path: inset(0 round 12px);
}
.pkg-best .pkg-badge {
  animation: badgePulse 2s ease-in-out infinite;
}
.pkg-best .pkg-name { font-size: 13px; }
.pkg-best .pkg-new  { font-size: 17px; color: #f7d862; }
.pkg-best .pkg-save { color: #ffe97a; font-size: 11px; }
.pkg-best.active {
  box-shadow: 0 0 0 3px rgba(232,184,75,.5), 0 0 36px rgba(232,184,75,.45);
}

/* -- Form -- */
.form-group { margin-bottom: 12px; }
.form-label {
  display: block; font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.45); letter-spacing: .8px;
  text-transform: uppercase; margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 13px 14px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 12px; color: #fff;
  font-family: inherit; font-size: 13px; outline: none;
  transition: border-color .18s, background .18s;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus {
  border-color: rgba(232,184,75,.55);
  background: rgba(232,184,75,.04);
}
.form-input.err { border-color: #ff5c5c; }
.form-input::placeholder { color: rgba(255,255,255,.25); }

.freeship-row {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 14px 0 16px; padding: 10px 14px;
  background: rgba(0,200,90,.1);
  border: 1px solid rgba(0,220,100,.2);
  border-radius: 11px;
  font-size: 11px; font-weight: 800; color: #4dffaa; letter-spacing: .3px;
}

.order-submit {
  width: 100%; padding: 16px;
  background: linear-gradient(160deg, #f7d862 0%, #e8b84b 50%, #c8920a 100%);
  border: none; border-radius: 16px;
  color: #1a0a3c; font-family: inherit;
  font-size: 15px; font-weight: 900; letter-spacing: 1.2px;
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 4px 22px rgba(232,184,75,.5);
  transition: opacity .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.order-submit:active { transform: scale(.97); opacity: .9; }
.order-submit::after {
  content: ''; position: absolute; inset: 0; left: -100%; width: 55%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: shine 2.8s ease-in-out infinite;
}

/* ----------------------- S6 SLIDER ----------------------- */
.sl-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: auto;
  transform: translateX(102%);
  will-change: transform;
}

/* ----------------------- S7 GOLD BLING ----------------------- */
@keyframes goldBling {
  0%,100% { filter: drop-shadow(0 0 0px rgba(232,184,75,0)); }
  50%     { filter: drop-shadow(0 0 22px rgba(232,184,75,.9))
                    drop-shadow(0 0  8px rgba(255,220,80,.55)); }
}
.gb  { animation: goldBling 2.0s 0.0s ease-in-out infinite paused; }
.gb1 { animation: goldBling 2.0s 0.4s ease-in-out infinite paused; }
.gb2 { animation: goldBling 2.0s 0.8s ease-in-out infinite paused; }
.section.active .gb,
.section.active .gb1,
.section.active .gb2 { animation-play-state: running; }

/* ----------------------- S8 COIN GLOW ----------------------- */
@keyframes coinGlow {
  0%,100% { filter: drop-shadow(0 0 4px rgba(232,184,75,.2)); }
  40%,60% { filter: drop-shadow(0 0 28px rgba(255,200,50,.95))
                    drop-shadow(0 0 10px rgba(200,150,10,.6)); }
}
.gc  { animation: coinGlow 2.4s 0.0s ease-in-out infinite paused; }
.gc1 { animation: coinGlow 2.4s 0.5s ease-in-out infinite paused; }
.gc2 { animation: coinGlow 2.4s 1.0s ease-in-out infinite paused; }
.section.active .gc,
.section.active .gc1,
.section.active .gc2 { animation-play-state: running; }

/* ----------------------- S9 PILL FLOAT ----------------------- */
@keyframes pillFloat {
  0%,100% { transform: translateY(0px);
            filter: drop-shadow(0 10px 28px rgba(200,146,10,.4)); }
  50%     { transform: translateY(-18px);
            filter: drop-shadow(0 28px 40px rgba(232,184,75,.7)); }
}
.pf { animation: pillFloat 4.5s 0.6s ease-in-out infinite paused; }
.section.active .pf { animation-play-state: running; }

/* ----------------------- S6 HAND FLOAT ----------------------- */
@keyframes handFloat {
  0%,100% { transform: translateY(0px) rotate(-1deg); }
  50%     { transform: translateY(-14px) rotate(1deg); }
}
.hf { animation: handFloat 3.5s 1.0s ease-in-out infinite paused; }
.section.active .hf { animation-play-state: running; }

/* ----------------------- S6 31K SPARKLE ----------------------- */
@keyframes price31k {
  0%,100% { filter: drop-shadow(0 2px 5px rgba(200,150,10,.35)); }
  14%     { filter: drop-shadow(0 0 28px rgba(255,252,210,1))
                    drop-shadow(0 0 14px rgba(247,216,98,.98))
                    brightness(1.25); }
  20%     { filter: drop-shadow(0 2px 5px rgba(200,150,10,.35)); }
  58%     { filter: drop-shadow(0 0 20px rgba(255,230,110,.88))
                    drop-shadow(0 0  8px rgba(232,184,75,.75))
                    brightness(1.14); }
  66%     { filter: drop-shadow(0 2px 5px rgba(200,150,10,.35)); }
}
.pk { animation: price31k 2.8s 1.5s ease-in-out infinite paused; }
.section.active .pk { animation-play-state: running; }

.order-note {
  text-align: center; font-size: 10px;
  color: rgba(255,255,255,.28); margin-top: 10px;
}
.order-success {
  text-align: center; padding: 32px 16px 8px;
}
.order-success .ok-icon { font-size: 52px; margin-bottom: 12px; }
.order-success .ok-title {
  font-size: 17px; font-weight: 900; color: #fff; margin-bottom: 8px;
}
.order-success .ok-sub { font-size: 12px; color: rgba(255,255,255,.45); line-height: 1.6; }
