/* =========================================================================
   X-DMAIC games.css — Game Marketing /gamification/ và chi tiết minigame /gamification/{slug}/.
   Màu thẻ giải pháp theo khối game của trang chủ: lime = vòng quay, xanh = quiz, ink viền đứt = cào thẻ.
   Nội dung bài dùng .xd-prose của post.css; chip lọc dùng .xd-bcats của blog.css.
   ========================================================================= */

/* ---------- Hero ---------- */
.xd-ghero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,380px);gap:48px;align-items:center;padding-top:56px}
.xd-ghero__copy,.xd-gdhero__copy{display:flex;flex-direction:column;gap:22px}
.xd-ghero__h{font-size:var(--xd-t-h1);font-weight:800;line-height:1.06;letter-spacing:-.04em}
.xd-ghero__h em{font-style:normal;color:var(--xd-lime)}
.xd-ghero .xd-lead,.xd-gdhero .xd-lead{color:rgba(255,255,255,.92);max-width:620px}
.xd-ghero__kex img{width:100%;max-width:380px;height:auto;margin:0 auto}

/* ---------- Khung chung ---------- */
.xd-games-page{padding-bottom:var(--xd-section-y)}
.xd-gsec{padding-top:var(--xd-section-y);scroll-margin-top:24px}
.xd-gh2{font-size:clamp(32px,4vw,56px);font-weight:800;line-height:1.1;letter-spacing:-.035em}
.xd-gh2--sm{font-size:clamp(26px,2.8vw,38px)}
.xd-gdek{font-size:var(--xd-t-lead);line-height:1.65;color:var(--xd-sub-2);max-width:760px}
.xd-games-page .xd-sec-head>div{max-width:880px}

/* ---------- Giải pháp chủ lực ---------- */
.xd-gfeat{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.xd-gf{position:relative;min-height:400px;display:flex;flex-direction:column;gap:14px;padding:30px;border-radius:var(--xd-r-lg);overflow:hidden}
.xd-gf>*{position:relative;z-index:1}
.xd-gf__t{font-size:clamp(26px,2.4vw,34px);font-weight:800;line-height:1.12;letter-spacing:-.02em;max-width:300px}
.xd-gf__t a{text-decoration:none}
.xd-gf__t a::after{content:"";position:absolute;inset:0;z-index:2}
.xd-gf:hover .xd-gf__t a{text-decoration:underline;text-underline-offset:4px}
.xd-gf ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:15px;line-height:1.5;max-width:260px}
.xd-gf li::before{content:"— "}
.xd-gf .xb{margin-top:auto;align-self:flex-start}
.xd-gf--wheel{background:var(--xd-lime);color:var(--xd-ink)}
.xd-gf--quiz{background:var(--xd-blue);color:#fff}
.xd-gf--scratch{background:var(--xd-ink);color:#fff;border:2px dashed rgba(255,255,255,.4)}
.xd-gf__motif{position:absolute!important;z-index:0!important;pointer-events:none}
.xd-gf__wheel{right:-60px;bottom:-60px;width:240px;height:240px;opacity:.9}
@media (prefers-reduced-motion:no-preference){.xd-gf:hover .xd-gf__wheel{transform:rotate(45deg);transition:transform 1.2s var(--xd-ease)}}
.xd-gf__quiz{right:22px;bottom:26px;display:flex;flex-direction:column;gap:8px}
.xd-gf__quiz b{display:flex;align-items:center;justify-content:center;width:52px;height:40px;border-radius:12px;border:2px solid rgba(255,255,255,.5);font-weight:800}
.xd-gf__quiz b.is-on{background:var(--xd-lime);border-color:var(--xd-lime);color:var(--xd-ink)}
.xd-gf__prize{right:24px;bottom:30px;padding:8px 14px;background:var(--xd-lime);color:var(--xd-ink);font-size:30px;font-weight:800;transform:rotate(8deg)}

/* ---------- Kho game ---------- */
.xd-gfilter{margin-bottom:24px}
.xd-gfilter .xd-chip{display:inline-flex;align-items:center;gap:6px}
.xd-gfilter .xd-chip small{font-size:12px;opacity:.65;font-variant-numeric:tabular-nums}
.xd-glib{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}
.xd-glib li[hidden]{display:none}
.xd-gc{height:100%;display:flex;flex-direction:column;border-radius:var(--xd-r-lg);overflow:hidden;background:#fff;border:1px solid var(--xd-line);transition:box-shadow var(--xd-fast),transform var(--xd-fast)}
.xd-gc:hover{box-shadow:var(--xd-shadow-1);transform:translateY(-2px)}
.xd-gc__thumb{aspect-ratio:4/3;background:var(--xd-paper);overflow:hidden}
.xd-gc__thumb img{width:100%;height:100%;object-fit:cover}
.xd-gc__ph{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#fff;
  background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);background-size:24px 24px}
.xd-gc__ph b{font-size:52px;font-weight:800;letter-spacing:-.04em;line-height:1}
.xd-gc__ph small{padding:3px 10px;border-radius:99px;background:rgba(0,0,0,.25);font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.xd-gc__ph--lead{background-color:var(--xd-blue)}
.xd-gc__ph--voucher{background-color:var(--xd-ink)}
.xd-gc__ph--voucher b{color:var(--xd-lime)}
.xd-gc__ph--engage{background-color:var(--xd-ink-2)}
.xd-gc__ph--product{background-color:var(--xd-blue-700)}
.xd-gc__body{flex:1;display:flex;flex-direction:column;gap:8px;padding:18px 20px 20px}
.xd-gc__tags{display:flex;flex-wrap:wrap;gap:6px}
.xd-gc__tags span{padding:2px 8px;border-radius:6px;background:var(--xd-blue-50);color:var(--xd-blue-700);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.xd-gc h3{font-size:18px;font-weight:800;line-height:1.3}
.xd-gc__desc{flex:1;font-size:14px;line-height:1.55;color:var(--xd-sub-2)}
.xd-gc__note{font-size:12.5px;color:var(--xd-sub)}
.xd-gc__act{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.xd-gc__act .xb-line{color:var(--xd-ink)}

/* Popup chơi thử */
.xd-gmodal{width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:0;background:none;overflow:visible}
.xd-gmodal::backdrop{background:rgba(11,18,32,.85)}
.xd-gmodal[open]{display:flex;flex-direction:column;gap:12px}
.xd-gmodal__x{align-self:flex-end;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:99px;background:#fff;color:var(--xd-ink);cursor:pointer}
.xd-gmodal__frame{width:100%;aspect-ratio:9/16;max-height:calc(100dvh - 190px);border-radius:20px;overflow:hidden;background:#000}
.xd-gmodal__frame iframe{width:100%;height:100%;border:0}
.xd-gmodal__cta{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--xd-r-md);background:#fff;color:var(--xd-ink)}
.xd-gmodal__cta p{flex:1;font-size:14px;line-height:1.45}

/* ---------- Nội dung SEO + FAQ ---------- */
.xd-gseo{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:64px;align-items:start}
.xd-gseo .xd-prose{max-width:none}
.xd-gsteps{counter-reset:s;list-style:none;padding-left:0!important}
.xd-gsteps li{counter-increment:s;position:relative;padding-left:48px!important}
.xd-gsteps li::before{content:counter(s)!important;position:absolute;left:0;top:0;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:99px;background:var(--xd-ink)!important;color:var(--xd-lime);font-weight:800;font-size:15px}
.xd-gfaq{position:sticky;top:24px}
.xd-gfaq__head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;padding-bottom:14px;border-bottom:2px solid var(--xd-ink)}
.xd-gfaq__head h2{font-size:clamp(24px,2.2vw,30px);font-weight:800;letter-spacing:-.02em}
.xd-gfaq__head img{width:72px;height:auto}
.xd-gfaq__i{border-bottom:1px solid var(--xd-line)}
.xd-gfaq__i summary{position:relative;display:block;padding:16px 36px 16px 0;cursor:pointer;list-style:none}
.xd-gfaq__i summary::-webkit-details-marker{display:none}
.xd-gfaq__i summary::after{content:"";position:absolute;right:6px;top:22px;width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform var(--xd-fast)}
.xd-gfaq__i[open] summary::after{transform:rotate(-135deg);top:26px}
.xd-gfaq__i h3{font-size:16.5px;font-weight:700;line-height:1.45}
.xd-gfaq__i summary:hover h3{color:var(--xd-blue)}
.xd-gfaq__i p{padding-bottom:18px;font-size:15px;line-height:1.65;color:var(--xd-sub-2)}


/* ---------- Chi tiết minigame ---------- */
.xd-gdhero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,360px);gap:56px;align-items:start;padding-top:56px}
.xd-gdspec{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding-top:20px;border-top:1px solid rgba(255,255,255,.35)}
.xd-gdspec .xd-eyebrow{margin-bottom:10px;color:rgba(255,255,255,.88)}
.xd-gdspec ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.xd-gdspec li{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border-radius:99px;background:rgba(11,18,32,.35);font-size:13.5px;font-weight:600}
.xd-gdspec .is-plat svg{color:var(--xd-lime)}
.xd-phone{display:flex;flex-direction:column;align-items:center;gap:16px}
.xd-phone__screen{position:relative;width:100%;max-width:340px;aspect-ratio:9/16;padding:12px;border-radius:44px;background:var(--xd-ink);box-shadow:var(--xd-shadow-2)}
.xd-phone__screen::before{content:"";position:absolute;left:50%;top:22px;z-index:2;width:76px;height:20px;border-radius:99px;background:#000;transform:translateX(-50%)}
.xd-phone__screen iframe{width:100%;height:100%;border:0;border-radius:32px;background:#000}
.xd-phone__play,.xd-phone__cta{position:absolute;inset:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;border-radius:32px;text-align:center}
.xd-phone__play{border:0;background:var(--xd-ink-2);color:#fff;font-size:16px;font-weight:700;cursor:pointer;
  background-image:linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px);background-size:28px 28px}
.xd-phone__play span{display:inline-flex;align-items:center;justify-content:center;width:84px;height:84px;border-radius:99px;background:var(--xd-lime);color:var(--xd-ink)}
.xd-phone__play:hover span{transform:scale(1.06);transition:transform var(--xd-fast)}
.xd-phone__cta{padding:28px;background:var(--xd-ink-2);color:#fff}
.xd-phone__cta b{font-size:22px;font-weight:800;line-height:1.2}
.xd-phone__cta span{font-size:14.5px;line-height:1.55;color:var(--xd-on-dark-2)}
.xd-phone__cta img{width:96px;height:auto}
.xd-gdbody{max-width:820px}
.xd-gdroi{display:flex;gap:20px;align-items:flex-start;margin-top:40px;padding:24px;border-radius:var(--xd-r-lg);background:#fff;border:1px solid var(--xd-line)}
.xd-gdroi img{width:72px;height:auto;flex:none}
.xd-gdroi h2{margin-bottom:6px;font-size:18px;font-weight:800}
.xd-gdroi p{font-size:15px;line-height:1.6;color:var(--xd-sub-2)}
.xd-grel{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.xd-grel a{position:relative;height:100%;display:flex;flex-direction:column;gap:8px;padding:22px 56px 22px 22px;border-radius:var(--xd-r-lg);background:#fff;border:1px solid var(--xd-line);text-decoration:none;transition:border-color var(--xd-fast)}
.xd-grel a:hover{border-color:var(--xd-ink)}
.xd-grel b{font-size:17px;font-weight:800;line-height:1.3}
.xd-grel span{font-size:14px;line-height:1.55;color:var(--xd-sub-2)}
.xd-grel svg{position:absolute;right:20px;top:22px}
.xd-grel a.is-all{background:var(--xd-ink);border-color:var(--xd-ink);color:#fff}
.xd-grel a.is-all span{color:var(--xd-on-dark-2)}
.xd-grel a.is-all svg{color:var(--xd-lime)}

@media (max-width:960px){
  .xd-ghero,.xd-gdhero,.xd-gseo,.xd-gfeat{grid-template-columns:minmax(0,1fr)}
  .xd-ghero,.xd-gdhero{padding-top:32px;gap:32px}
  .xd-ghero__kex{display:none}
  .xd-gf{min-height:300px}
  .xd-gfaq{position:static}
  .xd-gseo{gap:40px}
}
@media (max-width:640px){
  .xd-glib{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .xd-gc__body{padding:14px}
  .xd-gc__desc{display:none}
  .xd-gc h3{font-size:15.5px}
  .xd-gc__tags span:nth-child(n+2){display:none}
  .xd-gc__ph b{font-size:38px}
  .xd-gc__act .xb{flex:1 1 100%}
  .xd-gdspec{grid-template-columns:minmax(0,1fr)}
  .xd-phone__screen{max-width:270px;border-radius:38px}
}
