/* RC13 đợt 8 — Mục Game nổi bật ở cuối trang chủ (mọi giao diện, sáng/tối) */

/* --- Bảng màu theo giao diện (chỉ đặt biến; quy tắc bên dưới dùng lại) --- */
.rc13-game{ /* Xanh dương sáng (mặc định) */
  --gm-bg:linear-gradient(120deg,#e8f0ff 0%,#f5f8ff 55%,#ffffff 100%);
  --gm-bd:#cfdcf7; --gm-ink:#0f1f3d; --gm-mut:#3d4c66; --gm-h:#1748b8; --gm-eye:#1d4fc4;
  --gm-cta:#2058d0; --gm-cta-fg:#fff; --gm-cta-h:#173f9c;
  --gm-blob:#d6e4ff; --gm-pad:#2058d0; --gm-pad2:#ffffff; --gm-a:#ffb020; --gm-b:#ff5d8f; --gm-c:#22c3a6;
  --gm-tile:#ffffff; --gm-tile-bd:#bcd0f5; --gm-tile-fg:#1748b8; --gm-star:#ffb020;
  --gm-feat:#ffffff; --gm-feat-bd:#d7e2f7; --gm-ico:#e6eeff; --gm-ico-fg:#1d4fc4;
  --gm-shadow:0 10px 30px -14px rgba(32,88,208,.45); --gm-r:16px; --gm-bw:1px;
}
html.dark .rc13-game{
  --gm-bg:linear-gradient(120deg,#13254a 0%,#0f1a33 60%,#0c1427 100%);
  --gm-bd:#27406e; --gm-ink:#eef3ff; --gm-mut:#b9c6e0; --gm-h:#9cc2ff; --gm-eye:#9cc2ff;
  --gm-cta:#6aa6ff; --gm-cta-fg:#081226; --gm-cta-h:#93bfff;
  --gm-blob:#1b3160; --gm-pad:#6aa6ff; --gm-pad2:#0f1a33; --gm-tile:#162a52; --gm-tile-bd:#34548d; --gm-tile-fg:#cfe0ff;
  --gm-feat:#111d38; --gm-feat-bd:#27406e; --gm-ico:#1b3160; --gm-ico-fg:#9cc2ff;
  --gm-shadow:0 12px 34px -16px rgba(0,0,0,.7);
}
html[data-u-theme="lime"] .rc13-game{
  --gm-bg:linear-gradient(120deg,#f3fac8 0%,#fbfde9 55%,#ffffff 100%);
  --gm-bd:#dde9a0; --gm-ink:#151a05; --gm-mut:#434a2c; --gm-h:#151a05; --gm-eye:#4f5e00;
  --gm-cta:#151a05; --gm-cta-fg:#d3ed31; --gm-cta-h:#2d3610;
  --gm-blob:#e6f38d; --gm-pad:#151a05; --gm-pad2:#d3ed31; --gm-a:#d3ed31; --gm-b:#ff7a59; --gm-c:#5fb3ff;
  --gm-tile:#ffffff; --gm-tile-bd:#c9db63; --gm-tile-fg:#151a05; --gm-star:#9fbf00;
  --gm-feat:#ffffff; --gm-feat-bd:#e1eba8; --gm-ico:#d3ed31; --gm-ico-fg:#151a05;
  --gm-shadow:0 10px 30px -16px rgba(80,100,0,.45);
}
html.dark[data-u-theme="lime"] .rc13-game{
  --gm-bg:linear-gradient(120deg,#1f2608 0%,#151a09 55%,#111310 100%);
  --gm-bd:#3a4615; --gm-ink:#f2f6e0; --gm-mut:#c2c9a6; --gm-h:#d3ed31; --gm-eye:#d3ed31;
  --gm-cta:#d3ed31; --gm-cta-fg:#121604; --gm-cta-h:#e2f56b;
  --gm-blob:#2a330c; --gm-pad:#d3ed31; --gm-pad2:#151a09; --gm-tile:#20280b; --gm-tile-bd:#4d5c19; --gm-tile-fg:#e6f58f; --gm-star:#d3ed31;
  --gm-feat:#171c0b; --gm-feat-bd:#3a4615; --gm-ico:#2f3a0e; --gm-ico-fg:#d3ed31;
  --gm-shadow:0 12px 34px -16px rgba(0,0,0,.7);
}
html[data-u-theme="pink"] .rc13-game{
  --gm-bg:linear-gradient(120deg,#ffe3ef 0%,#fff2f7 55%,#ffffff 100%);
  --gm-bd:#f8cade; --gm-ink:#3a0f22; --gm-mut:#6b3a50; --gm-h:#b0144f; --gm-eye:#b0144f;
  --gm-cta:#c2185b; --gm-cta-fg:#fff; --gm-cta-h:#99104a;
  --gm-blob:#ffd3e5; --gm-pad:#ff6ea8; --gm-pad2:#ffffff; --gm-a:#ffc94a; --gm-b:#8a5cff; --gm-c:#3cc7b4;
  --gm-tile:#ffffff; --gm-tile-bd:#f6b5cf; --gm-tile-fg:#b0144f; --gm-star:#ff9ac4;
  --gm-feat:#ffffff; --gm-feat-bd:#f8d2e2; --gm-ico:#ffe0ee; --gm-ico-fg:#b0144f;
  --gm-shadow:0 10px 30px -14px rgba(194,24,91,.4);
}
html.u-genz .rc13-game{
  --gm-bg:#ffe14a; --gm-bd:#111; --gm-ink:#111; --gm-mut:#2a2a2a; --gm-h:#111; --gm-eye:#111;
  --gm-cta:#5b4bff; --gm-cta-fg:#fff; --gm-cta-h:#4a3ae6;
  --gm-blob:#fff; --gm-pad:#ff6ec4; --gm-pad2:#111; --gm-a:#49c6ff; --gm-b:#ffe14a; --gm-c:#5b4bff;
  --gm-tile:#fff; --gm-tile-bd:#111; --gm-tile-fg:#111; --gm-star:#111;
  --gm-feat:#fff; --gm-feat-bd:#111; --gm-ico:#ff6ec4; --gm-ico-fg:#111;
  --gm-shadow:4px 4px 0 #111; --gm-r:14px; --gm-bw:2px;
}

/* --- Bố cục --- */
html body #root .rc13-game:not(#rc13a):not(#rc13b){display:grid;gap:12px;margin:0;padding:0;color:var(--gm-ink)!important;font-family:inherit}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__card{
  position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:24px;
  padding:clamp(22px,3vw,40px);border-radius:var(--gm-r);border:var(--gm-bw) solid var(--gm-bd)!important;
  background:var(--gm-bg)!important;box-shadow:var(--gm-shadow)!important}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__txt{display:grid;gap:12px;justify-items:start;min-width:0}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__eye{margin:0;font-size:12px!important;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--gm-eye)!important}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__h{margin:0;font-size:clamp(26px,3.1vw,40px)!important;line-height:1.12!important;font-weight:800!important;letter-spacing:-.02em;color:var(--gm-h)!important;text-wrap:balance}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__p{margin:0;max-width:46ch;font-size:clamp(15px,1.15vw,17px)!important;line-height:1.55;color:var(--gm-mut)!important}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta{
  margin-top:6px;display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:0 24px;border-radius:999px;
  font-size:16px!important;font-weight:800!important;cursor:pointer;
  background:var(--gm-cta)!important;color:var(--gm-cta-fg)!important;border:var(--gm-bw) solid transparent!important;
  box-shadow:0 8px 20px -10px var(--gm-cta)!important;transition:transform .15s,background-color .15s,box-shadow .15s}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta span{transition:transform .15s;color:inherit!important}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta:hover{background:var(--gm-cta-h)!important}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta:hover span{transform:translateX(4px)}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta:active{transform:translateY(1px)}

/* --- Hình minh hoạ --- */
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__art{min-width:0;display:flex;justify-content:center}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__svg{width:100%;max-width:380px;height:auto;display:block;overflow:visible}
.rc13-game__blob{fill:var(--gm-blob)}
.rc13-game__pad{fill:var(--gm-pad)}
.rc13-game__dpad,.rc13-game__mid{fill:var(--gm-pad2)}
.rc13-game__b1{fill:var(--gm-a)}.rc13-game__b2{fill:var(--gm-b)}.rc13-game__b3{fill:var(--gm-c)}.rc13-game__b4{fill:var(--gm-pad2)}
.rc13-game__tile rect{fill:var(--gm-tile);stroke:var(--gm-tile-bd);stroke-width:2}
.rc13-game__tile text{fill:var(--gm-tile-fg);font:700 30px "Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif}
.rc13-game__star{fill:var(--gm-star)}
html.u-genz .rc13-game__pad,html.u-genz .rc13-game__b1,html.u-genz .rc13-game__b2,html.u-genz .rc13-game__b3,html.u-genz .rc13-game__blob{stroke:#111;stroke-width:2.5}
html.u-genz .rc13-game__t1 rect{fill:#49c6ff}html.u-genz .rc13-game__t2 rect{fill:#ff6ec4}html.u-genz .rc13-game__t3 rect{fill:#fff}
html.u-genz .rc13-game__tile rect{stroke-width:2.5;filter:drop-shadow(3px 3px 0 #111)}

/* --- 4 ô tính năng --- */
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__feats{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__feat{
  width:100%;min-height:56px;display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:var(--u-r,8px);cursor:pointer;text-align:left;
  font-size:15px!important;font-weight:700!important;line-height:1.25;
  background:var(--gm-feat)!important;color:var(--gm-ink)!important;border:var(--gm-bw) solid var(--gm-feat-bd)!important;box-shadow:none!important;
  transition:border-color .15s,transform .15s,box-shadow .15s}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__feat span{color:inherit!important}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__ico{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:var(--u-r,8px);background:var(--gm-ico)!important;color:var(--gm-ico-fg)!important}
html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__feat:hover{border-color:var(--gm-cta)!important;transform:translateY(-2px)}

/* Gen Z: viền mực + bóng cứng + màu kẹo */
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__h{font-family:'Unbounded',system-ui,sans-serif!important;font-size:clamp(24px,2.7vw,36px)!important;letter-spacing:-.01em}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__eye{display:inline-block;padding:4px 10px;border:2px solid #111;border-radius:999px;background:#fff!important}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta{border-color:#111!important;box-shadow:4px 4px 0 #111!important}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta:hover{transform:translate(-1px,-1px);box-shadow:5px 5px 0 #111!important}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta:active{transform:translate(3px,3px);box-shadow:1px 1px 0 #111!important}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__feat{box-shadow:4px 4px 0 #111!important}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__feat:hover{border-color:#111!important;transform:translate(-1px,-1px);box-shadow:5px 5px 0 #111!important}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__ico{border:2px solid #111}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__f2 .rc13-game__ico{background:#49c6ff!important}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__f3 .rc13-game__ico{background:#ffe14a!important}
html.u-genz body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__f4 .rc13-game__ico{background:#5b4bff!important;color:#fff!important}

/* Hiệu ứng nổi nhẹ (tắt khi giảm chuyển động) */
@media (prefers-reduced-motion:no-preference){
  .rc13-game__float{animation:rc13-game-bob 4s ease-in-out infinite}
  .rc13-game__t1{animation:rc13-game-bob 5s ease-in-out -1s infinite}
  .rc13-game__t3{animation:rc13-game-bob 5.5s ease-in-out -2.5s infinite}
}
@keyframes rc13-game-bob{50%{translate:0 -6px}}
@media (prefers-reduced-motion:reduce){
  html body #root .rc13-game:not(#rc13a):not(#rc13b) :is(.rc13-game__cta,.rc13-game__cta span,.rc13-game__feat){transition:none;transform:none!important}
}

/* --- Điện thoại / máy tính bảng --- */
@media (max-width:47.99rem){
  html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__card{grid-template-columns:minmax(0,1fr);gap:8px;padding:22px 18px}
  html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__art{order:-1}
  html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__svg{max-width:240px}
  html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__cta{width:100%;justify-content:center;min-height:50px}
  html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__feats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__feat{min-height:56px;padding:10px;gap:10px;font-size:14px!important}
  html body #root .rc13-game:not(#rc13a):not(#rc13b) .rc13-game__ico{width:34px;height:34px}
}

/* ===== Đợt 9 — Sân chơi ===== */
/* Lật thẻ: thẻ đã lật / đã ghép luôn đọc được (lớp màu chung đè nền tối lên mọi thẻ ở Xanh chanh, Hồng, Gen Z) */
html:not([data-u-theme="blue"]) body .mm-c.open:not(#rc13a),html:not([data-u-theme="blue"]) body .mm-c.done:not(#rc13a){background:var(--u-raised,#fff)!important;color:var(--u-tx,#111)!important;border-color:var(--u-line2,#999)!important}
html:not([data-u-theme="blue"]) body .mm-c.open:not(.done):not(#rc13a){background:var(--u-bg,#fff)!important;border-color:var(--u-tx,#111)!important}
html:not([data-u-theme="blue"]) body .mm-c.done.me:not(#rc13a){background:#e3f3e8!important;border-color:#2f6b45!important;color:#10301c!important}
html:not([data-u-theme="blue"]) body .mm-c.done.bot:not(#rc13a){background:#f8e3e0!important;border-color:#9a3b30!important;color:#3d120d!important}
html.dark:not([data-u-theme="blue"]) body .mm-c.done.me:not(#rc13a){background:#173a26!important;border-color:#7cbf93!important;color:#eaf7ef!important}
html.dark:not([data-u-theme="blue"]) body .mm-c.done.bot:not(#rc13a){background:#45201b!important;border-color:#e08b80!important;color:#fdeceb!important}
html.u-genz body .mm-c.open:not(#rc13a),html.u-genz body .mm-c.done:not(#rc13a){border:2px solid #111!important}
html body .mm-c.open span,html body .mm-c.done span{color:inherit}

/* Sao cấp Bot */
.bt-stars{color:#9a5b00;letter-spacing:1px;font-size:.85em;white-space:nowrap}
.bt-stars i{font-style:normal;color:currentColor;opacity:.3}
html.dark .bt-stars{color:#f5c542}
.tg-btn.bt-lv{display:inline-flex;align-items:center;gap:6px}
.tg-btn.bt-lv:not(.ghost) .bt-stars{color:inherit}

/* Màn chọn cấp Bot */
.bt-pick{max-width:720px;margin:0 auto}
.bt-list{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0 6px;text-align:left}
.bt-card{position:relative;width:100%;display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:14px;border:2px solid var(--u-line2,#d4d5cf);background:var(--u-bg,#fff);color:var(--u-tx,#14213d);cursor:pointer;font:inherit;text-align:left;transition:transform .12s,border-color .12s}
.bt-card:hover{transform:translateY(-2px);border-color:var(--u-tx,#14213d)}
.bt-card:focus-visible{outline:3px solid var(--u-acc,#2563eb);outline-offset:2px}
.bt-card.on{border-color:var(--u-tx,#14213d);box-shadow:0 0 0 2px var(--u-acc,#2563eb) inset}
.bt-emo{font-size:34px;line-height:1}
.bt-txt{display:flex;flex-direction:column;gap:3px;min-width:0}
.bt-txt b{font-size:17px}
.bt-name{opacity:.75;font-size:12px}
.bt-desc{font-size:13px;line-height:1.4}
.bt-rec{font-size:12px;font-weight:700;opacity:.8}
.bt-badge{position:absolute;top:-9px;right:10px;font-style:normal;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px;background:var(--u-acc,#2563eb);color:#111}
html[data-u-theme="blue"] .bt-badge:not(.up){background:#1d4ed8;color:#fff}
.bt-badge.up{background:#2f6b45;color:#fff}
.bt-next{margin:8px 0 0;text-align:center}
.bt-row{flex-wrap:wrap}
html.u-genz .bt-card{border-radius:6px;border-color:#111;box-shadow:4px 4px 0 #111}
html.u-genz .bt-card.on{background:#ffe3f3}
html[data-u-theme="blue"] .bt-card{background:#fff;color:#14213d;border-color:#c9d6f2}
html.dark[data-u-theme="blue"] .bt-card{background:#0f172a;color:#e2e8f0;border-color:#334155}
@media (max-width:560px){.bt-list{grid-template-columns:1fr}.bt-emo{font-size:28px}}

/* Đấu trường Online: thẻ ghép trận, đồng hồ chờ, cảm xúc bay */
.on-wait{text-align:center}
.on-wait .on-sec{font-size:30px;font-weight:800;font-variant-numeric:tabular-nums;margin:6px 0}
.on-offer{margin:12px auto 0;max-width:460px;padding:12px 14px;border-radius:12px;border:2px dashed var(--u-line2,#c9d6f2)}
.on-code{font-size:28px;font-weight:800;letter-spacing:4px;font-variant-numeric:tabular-nums;margin:4px 0 8px}
.on-pl{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:10px 0}
.on-pl span{padding:6px 12px;border-radius:999px;border:2px solid var(--u-line2,#c9d6f2);font-weight:700}
.on-pl span.me{border-color:var(--u-tx,#14213d)}
.on-gain{display:inline-block;margin-left:6px;font-weight:800;color:#2f6b45}
html.dark .on-gain{color:#7cbf93}
.on-gain.pop{animation:on-up .6s ease-out}
@keyframes on-up{0%{opacity:0;transform:translateY(8px) scale(.8)}100%{opacity:1;transform:none}}
.on-float{position:fixed;left:50%;bottom:22%;font-size:46px;pointer-events:none;z-index:9999;animation:on-fly 1.6s ease-out forwards}
@keyframes on-fly{0%{opacity:0;transform:translate(-50%,20px) scale(.6)}20%{opacity:1;transform:translate(-50%,0) scale(1.15)}100%{opacity:0;transform:translate(-50%,-160px) scale(1)}}
.tq-dots span.ok{background:#2f6b45!important}
.tq-dots span.no{background:#9a3b30!important}
.tq-dots span.to{background:#6b6b6b!important}
.on-elo{font-size:20px;font-weight:800}
.on-elo.up{color:#2f6b45}.on-elo.down{color:#9a3b30}
html.dark .on-elo.up{color:#7cbf93}html.dark .on-elo.down{color:#e08b80}
.tg-live-list .tg-live-pill{margin:4px 6px 0 0}
@media (prefers-reduced-motion:reduce){.on-float,.on-gain{animation:none;opacity:1}.bt-card{transition:none}}
