/* LiveArcade — khuyến mãi, nhãn và chia sẻ dùng chung mọi trang công khai.
   Thanh ưu đãi · nhãn game (MỚI/HOT/FREE/PRO) · ruy-băng thẻ giá · thanh chia sẻ · nút liên hệ nổi · thanh CTA dính đáy.
   Chỉ animate transform/opacity; mọi chuyển động tắt ở cuối tệp khi prefers-reduced-motion. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ===== Thanh ưu đãi trên cùng ===== */
.promo-bar {
  position: relative; z-index: 55; overflow: hidden; color: var(--ink); font-size: 0.86rem; font-weight: 800; line-height: 1.2;
  background: linear-gradient(90deg, #ffb627, #ff5fa2 52%, #a78bfa);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 18px -10px rgba(255, 61, 139, 0.8);
}
.promo-bar::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.42) 50%, transparent 62%);
  transform: translateX(-120%); animation: promo-sheen 7s ease-in-out 1.5s infinite;
}
html.promo-off .promo-bar { display: none; }
.promo-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; max-width: var(--wrap); margin-inline: auto; padding: 7px var(--gutter); }
.promo-marquee { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.promo-track { display: flex; width: max-content; animation: promo-run 52s linear infinite; }
.promo-bar:hover .promo-track { animation-play-state: paused; }
.promo-line { display: inline-block; white-space: nowrap; padding-right: 0.4em; }
.promo-line i { margin: 0 0.75em; font-style: normal; opacity: 0.55; }
.promo-line b { font-weight: 900; }
.promo-hot { letter-spacing: 0.02em; }
.promo-save { display: inline-block; margin-left: 0.4em; padding: 2px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 900; color: var(--amber); background: var(--ink); }
.promo-btn {
  flex: none; padding: 7px 14px; border-radius: 99px; font-size: 0.82rem; font-weight: 900; white-space: nowrap; text-decoration: none; color: #fff; background: var(--ink);
  transition: transform 0.15s var(--ease), background 0.15s;
}
.promo-btn:hover { transform: translateY(-1px); background: #1a2260; }
.promo-close, .cta-bar-close {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  font: 400 1.4rem/1 var(--font); color: var(--ink); background: rgba(6, 9, 25, 0.16); transition: background 0.15s;
}
.promo-close:hover, .cta-bar-close:hover { background: rgba(6, 9, 25, 0.34); }
html:not(.js) .promo-close, html:not(.js) .cta-bar-close { display: none; }
@keyframes promo-run { to { transform: translateX(-50%); } }
@keyframes promo-sheen { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* ===== Nhãn trên thẻ game: ruy-băng góc MỚI + thẻ HOT/FREE/PRO (cỡ chữ theo bề rộng khung điện thoại) ===== */
.gb { position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: 11cqw; }
.gb-corner { position: absolute; top: 0; left: 0; width: 46cqw; height: 46cqw; overflow: hidden; border-top-left-radius: 11cqw; }
.gb-corner b {
  position: absolute; left: 15cqw; top: 15cqw; display: grid; place-items: center; width: 90cqw; height: 11cqw;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 8px; font-size: clamp(8px, 6.4cqw, 13px); font-weight: 900; letter-spacing: 0.08em; line-height: 1; color: #fff;
  background: linear-gradient(90deg, #e11d74, #a21caf); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.gb-pills { position: absolute; top: 5.5cqw; right: 5cqw; display: grid; justify-items: end; gap: 2.4cqw; }
.gb-pill {
  display: inline-block; padding: 0.24em 0.62em; border-radius: 99px; white-space: nowrap;
  font-size: 8px; font-size: clamp(8px, 6.2cqw, 13px); font-weight: 900; letter-spacing: 0.05em; line-height: 1.15;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.gb-hot { color: var(--ink); background: linear-gradient(135deg, #ff5a1f, #ffb627); }
.gb-free { color: #032812; background: #39ff88; box-shadow: 0 0 0 1.5px rgba(3, 40, 18, 0.55), 0 0 14px rgba(57, 255, 136, 0.75), 0 2px 6px rgba(0, 0, 0, 0.5); }
.gb-pro { color: var(--amber); background: rgba(6, 9, 25, 0.9); box-shadow: inset 0 0 0 1.5px var(--amber), 0 2px 6px rgba(0, 0, 0, 0.5); }
.gb-new { color: #fff; background: linear-gradient(90deg, #e11d74, #a21caf); }

/* Nhãn cỡ lớn ở trang chi tiết game */
.gb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.gb-chip { padding: 5px 14px; border-radius: 99px; font-size: 0.86rem; font-weight: 900; letter-spacing: 0.04em; line-height: 1.3; }
.gb-chip.gb-free { box-shadow: 0 0 16px rgba(57, 255, 136, 0.55); }
.sale-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 18px 0 0; padding: 12px 16px; border-radius: 14px; font-size: 0.92rem; font-weight: 700; border: 1px dashed var(--line); background: rgba(255, 255, 255, 0.04); }
.sale-note.is-free { border-color: rgba(57, 255, 136, 0.55); background: rgba(57, 255, 136, 0.08); }
.sale-note.is-pro { border-color: rgba(255, 182, 39, 0.55); background: rgba(255, 182, 39, 0.08); }
.sale-note a { color: var(--amber); font-weight: 900; }

/* ===== Ruy-băng và nhãn nổi trên thẻ bảng giá ===== */
.price-card, .tease { --rib-r: 24px; }
.rib { position: absolute; top: 0; right: 0; z-index: 2; width: 132px; height: 132px; overflow: hidden; pointer-events: none; border-top-right-radius: var(--rib-r, 22px); }
.rib b {
  position: absolute; left: 88px; top: 44px; display: grid; place-items: center; width: 220px; height: 27px;
  transform: translate(-50%, -50%) rotate(45deg);
  font-size: 0.7rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; color: #fff;
  background: linear-gradient(90deg, #e11d74, #ff5a1f); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.rib-left { left: 0; right: auto; border-top-right-radius: 0; border-top-left-radius: var(--rib-r, 22px); }
.rib-left b { left: 44px; transform: translate(-50%, -50%) rotate(-45deg); background: linear-gradient(90deg, #ffb627, #ff5a1f); color: var(--ink); font-size: 0.74rem; }
.flag-top {
  position: absolute; top: -17px; left: 50%; z-index: 3; overflow: hidden; padding: 6px 18px; border-radius: 99px;
  transform: translateX(-50%); white-space: nowrap;
  font-size: 0.82rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  background: linear-gradient(100deg, #ffb627, #ff8a5c 55%, #ff5fa2); box-shadow: 0 4px 0 var(--amber-deep), 0 10px 24px -6px rgba(255, 95, 162, 0.7);
}
.flag-top::after, .btn-shine::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.6) 50%, transparent 65%); transform: translateX(-130%);
}
.flag-top::after { animation: promo-sheen 5s ease-in-out infinite; }
.btn-shine { position: relative; overflow: hidden; }
.price-card:hover .btn-shine::after, .tease:hover .btn-shine::after { animation: promo-sheen 0.9s ease 1; }

/* Lấp lánh khi rê chuột vào thẻ nổi bật (nhẹ: chỉ transform/opacity) */
.price-card.is-featured::before, .price-card.is-featured::after, .tease.is-featured::before, .tease.is-featured::after {
  content: ''; position: absolute; z-index: 1; pointer-events: none; opacity: 0; width: 22px; height: 22px; background: #fff3c4;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 6px rgba(255, 182, 39, 0.9));
}
.price-card.is-featured::before, .tease.is-featured::before { left: 16px; bottom: 96px; }
.price-card.is-featured::after, .tease.is-featured::after { right: 18px; bottom: 150px; width: 16px; height: 16px; }
.price-card.is-featured:hover::before, .price-card.is-featured:hover::after, .tease.is-featured:hover::before, .tease.is-featured:hover::after { animation: twinkle 1.3s ease-in-out infinite; }
.price-card.is-featured:hover::after, .tease.is-featured:hover::after { animation-delay: 0.45s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* ===== Thanh chia sẻ ===== */
.share {
  display: grid; gap: 14px; padding: clamp(16px, 3vw, 24px); border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(55, 226, 255, 0.1), rgba(255, 61, 139, 0.1)), rgba(255, 255, 255, 0.03);
}
.share h2 { margin: 0 0 0.2em; font-size: 1.15rem; }
.share p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; cursor: pointer; text-decoration: none;
  font: 800 0.92rem/1.2 var(--font); color: var(--text); background: rgba(255, 255, 255, 0.07); border: 1.5px solid var(--line);
  transition: transform 0.15s var(--ease), background 0.15s, border-color 0.15s, color 0.15s;
}
.share-btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.45); }
.share-native { color: var(--ink); background: var(--amber); border-color: var(--amber); }
.share-native:hover { background: #ffc552; border-color: #ffc552; }
.share-fb:hover { color: #fff; background: #1877f2; border-color: #1877f2; }
.share-tg:hover { color: #fff; background: #229ed9; border-color: #229ed9; }
.share-copy.is-done { color: #032812; background: #39ff88; border-color: #39ff88; }
.share-status { min-height: 1.2em; font-size: 0.84rem !important; color: var(--cyan) !important; }
.share-status:empty { display: none; }
.share-band { margin-top: clamp(8px, 2vw, 24px); margin-bottom: clamp(24px, 4vw, 48px); }
.detail-gallery .share { margin-top: 22px; }
.pricing .share { margin-top: clamp(24px, 4vw, 40px); }

/* ===== Nút liên hệ nổi + thanh CTA dính đáy ===== */
.fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  display: none; flex-direction: column; align-items: flex-end; gap: 12px; transition: transform 0.3s var(--ease), opacity 0.25s;
}
html.js .fab { display: flex; }
.fab.is-away, .fab.is-typing { opacity: 0; pointer-events: none; transform: translateY(16px); }
.fab-menu { display: none; gap: 10px; justify-items: end; }
.fab.is-open .fab-menu { display: grid; animation: fab-in 0.22s var(--ease); }
.fab-item { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.fab-label {
  padding: 7px 13px; border-radius: 99px; font-size: 0.86rem; font-weight: 800; background: rgba(6, 9, 25, 0.94); border: 1px solid var(--line);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.8);
}
.fab-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.7); transition: transform 0.18s var(--ease); }
.fab-item:hover .fab-ico { transform: scale(1.1); }
.fab-zalo .fab-ico { background: #0068ff; }
.fab-email .fab-ico { background: linear-gradient(135deg, #ff3d8b, #8b5cf6); }
.fab-facebook .fab-ico { background: #1877f2; }
.fab-main {
  position: relative; display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: #0068ff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92), 0 10px 26px -4px rgba(0, 104, 255, 0.75); transition: transform 0.18s var(--ease);
}
.fab-main-other .fab-main { background: linear-gradient(135deg, #ff3d8b, #8b5cf6); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92), 0 10px 26px -4px rgba(255, 61, 139, 0.7); }
.fab-main:hover { transform: scale(1.06); }
.fab-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(0, 104, 255, 0.75); animation: fab-pulse 2.4s ease-out infinite; pointer-events: none; }
.fab-main-other .fab-ring { border-color: rgba(255, 61, 139, 0.75); }
.fab.is-open .fab-ring { animation: none; opacity: 0; }
.fab-shut { display: none; }
.fab.is-open .fab-shut { display: block; }
.fab.is-open .fab-open { display: none; }
@keyframes fab-pulse { 0% { transform: scale(1); opacity: 0.85; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
@keyframes fab-in { from { opacity: 0; transform: translateY(10px); } }

.cta-bar { display: none; }
@media (max-width: 719px) {
  .cta-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 10px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); color: var(--ink);
    background: linear-gradient(90deg, #ffb627, #ff5fa2 55%, #a78bfa); box-shadow: 0 -10px 26px -10px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s var(--ease), opacity 0.25s;
  }
  html.cta-off .cta-bar { display: none; }
  .cta-bar.is-away, .cta-bar.is-typing { opacity: 0; pointer-events: none; transform: translateY(100%); }
  .cta-bar-text { display: grid; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
  .cta-bar-text b { font-size: 0.98rem; font-weight: 900; line-height: 1.2; }
  .cta-bar-text small { font-size: 0.74rem; font-weight: 800; opacity: 0.8; }
  .cta-bar-go { flex: none; padding: 10px 16px; border-radius: 99px; font-size: 0.9rem; font-weight: 900; white-space: nowrap; text-decoration: none; color: #fff; background: var(--ink); }
  body.has-cta .fab { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (min-width: 720px) {
  .share-band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; }
}
@media (max-width: 420px) {
  .promo-btn { padding: 7px 11px; font-size: 0.78rem; }
  .share-btn { padding: 10px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .promo-bar::after, .flag-top::after { display: none; }
  .promo-track { width: auto; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: none; }
  .promo-line[aria-hidden='true'] { display: none; }
  .fab-ring { display: none; }
}

/* ===== Chip lọc theo nhãn ở /games ===== */
.chip-sep { flex: none; align-self: stretch; width: 1.5px; margin: 4px 2px; background: var(--line); }
.chip-badge { font-weight: 900; }
.chip-hot:hover, .chip-hot.is-active { background: linear-gradient(135deg, #ff5a1f, #ffb627); border-color: #ff8a3d; }
.chip-new:hover, .chip-new.is-active { color: #fff; background: linear-gradient(90deg, #e11d74, #a21caf); border-color: #e11d74; }
.chip-free:hover, .chip-free.is-active { background: #39ff88; border-color: #39ff88; color: #032812; }
.chip-new.is-active small { background: rgba(255, 255, 255, 0.22); }
