body:has(.bsb-app) {
  background: #070816;
  background-image: none;
  color: #f8f7ff;
  overflow-x: clip;
}

html { color-scheme: dark; scroll-padding-top: 0; }
body.qk-page { margin: 0; background: #080b0a; color: #f8f7ff; font-family: Manrope, system-ui, sans-serif; }
.qk-skip { position: absolute; z-index: 1000; left: 12px; top: -80px; padding: 12px 16px; background: #ffbfd2; color: #181018; border-radius: 8px; }
.qk-skip:focus { top: 12px; }
.qk-fallback { padding: 60px 24px; text-align: center; }
.bsb-app button { font-family: inherit; cursor: pointer; }
.bsb-app button:focus-visible, .bsb-app canvas:focus-visible { outline: 3px solid #ffb4cd; outline-offset: 4px; }
.bsb-app button:disabled { cursor: default; opacity: .45; }
.qk-toolbar, .qk-pad { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; max-width: 720px; margin: 14px auto; }
.qk-toolbar { position: sticky; top: 8px; z-index: 5; width: fit-content; padding: 6px 8px; border-radius: 16px; background: #101019f2; backdrop-filter: blur(12px); }
.qk-toolbar button, .qk-pad button, .qk-pause button { min-height: 44px; padding: 10px 15px; border: 1px solid #63505d; border-radius: 12px; background: #241d27; color: #fff3f8; font: 700 13px Manrope, system-ui, sans-serif; }
.qk-toolbar button:hover, .qk-pad button:hover, .qk-pause button:hover { border-color: #e4a0b9; }
.qk-score { color: #b8adb9; font-size: 12px; }
.qk-score b { color: #fff; }
.qk-pad { max-width: 420px; }
.qk-pad button { flex: 1; }
.qk-pause { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #080a0beb; border-radius: 24px; color: #fff; }
.qk-pause p { font-size: clamp(22px, 5vw, 34px); font-weight: 800; }
.qk-pause button { background: #ffbfd2; color: #22121c; border-color: #ffbfd2; }
.qk-badge-code { display: block; margin: 20px 0; color: #ffd36a; overflow-wrap: anywhere; }
.bsb-modal { z-index: 1200; }
.bsb-modal > section { max-height: calc(100dvh - 40px); overflow: auto; }
@media (prefers-reduced-motion: reduce) { .bsb-app *, .bsb-app *::before { animation: none !important; transition: none !important; } }

.bsb-app {
  --bsb-text: #f8f7ff;
  --bsb-muted: #aaa5bb;
  --bsb-gold: #ffd36a;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: clamp(34px, 5vw, 72px) 18px 54px;
  overflow: clip;
  background:
    radial-gradient(circle at 50% 0, rgba(226, 100, 143, 0.10), transparent 34%),
    linear-gradient(145deg, #0b091d, #070816 66%, #07101c);
  color: var(--bsb-text);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bsb-app,
.bsb-app * {
  box-sizing: border-box;
}

.bsb-hero {
  width: min(960px, 100%);
  margin: 0 auto 8px;
  text-align: center;
}

.bsb-kicker {
  margin: 0 0 10px;
  color: #b79ff8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.bsb-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 5.3vw, 66px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.03;
  white-space: normal;
}

.bsb-hero h1 em {
  background: linear-gradient(100deg, #f8d779, #c7a7ff 52%, #70d9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
}

.bsb-hero > p {
  max-width: 680px;
  margin: 14px auto 0;
  color: var(--bsb-muted);
  font-size: 14px;
  line-height: 1.65;
}

.bs-play-mode-caption {
  display: block;
  width: min(100%, 420px);
  margin: 12px auto 0;
  color: #aaa6b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.bs-play-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: min(100%, 420px);
  margin: 5px auto 0;
  padding: 4px;
  border: 1px solid rgba(181, 160, 255, 0.28);
  border-radius: 14px;
  background: rgba(7, 8, 24, 0.72);
}

.bs-play-mode [data-play-mode] {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #3b4648;
  border-radius: 10px;
  background: #171d1e;
  color: #f5f6f1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-align: center;
}

.bs-play-mode [data-play-mode][aria-pressed="true"] {
  border-color: #c8ff00;
  background: #c8ff00;
  color: #080a0b;
  box-shadow: 0 0 0 3px rgba(200, 255, 0, 0.08);
}

.bs-play-mode [data-play-mode]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.bs-play-mode[data-locked="true"] {
  grid-template-columns: 1fr;
  width: min(100%, 360px);
  border-color: rgba(114, 228, 201, 0.28);
  background: rgba(9, 20, 31, 0.82);
}

.bs-play-mode[data-locked="true"] [data-play-mode][aria-pressed="false"] {
  display: none;
}

.bs-play-mode[data-locked="true"] [data-play-mode][aria-pressed="true"] {
  cursor: default;
  border-color: transparent;
  background: rgba(114, 228, 201, 0.12);
  color: #9af0dc;
  opacity: 1;
  box-shadow: none;
}

.bs-play-mode[data-locked="true"] [data-play-mode][aria-pressed="true"]::before {
  content: "ĐÃ KHÓA · ";
  font-size: 0.82em;
  letter-spacing: 0.08em;
  opacity: 0.76;
}

.bs-play-mode-note {
  display: block;
  margin: 8px auto 12px;
  color: #aaa6b8;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.bsb-game-shell {
  position: relative;
  display: flex;
  justify-content: center;
  width: min(900px, 100%);
  margin: 0 auto;
}

.bsb-game-shell canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(1120px, calc(100vh - 145px));
  aspect-ratio: 720 / 1280;
  border: 0;
  border-radius: 24px;
  background: #080817;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  scroll-margin-top: 88px;
}

.bsb-seo-copy {
  width: min(760px, 100%);
  margin: 28px auto 0;
  padding: 22px 24px;
  border: 1px solid rgba(177, 150, 244, 0.18);
  border-radius: 18px;
  background: rgba(15, 13, 35, 0.74);
  text-align: center;
}

.bsb-seo-copy h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  line-height: 1.2;
}

.bsb-seo-copy p {
  margin: 0;
  color: #9f9aac;
  font-size: 13px;
  line-height: 1.7;
}

.bs-seo-copy {
  width: min(760px, 100%);
  margin: 22px auto 8px;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid #34413c;
  border-radius: 22px;
  background: linear-gradient(145deg, #111715, #0b100e);
  color: #dce5e1;
}

.bs-seo-copy h2,
.bs-seo-copy h3 {
  color: #f5f8f6;
  letter-spacing: -0.025em;
}

.bs-seo-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 800;
}

.bs-seo-copy h3 {
  margin: 26px 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.bs-seo-copy p,
.bs-seo-copy li {
  color: #bdc8c3;
  font-size: 15px;
  line-height: 1.72;
}

.bs-seo-copy ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.bsb-modal {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.bsb-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 10, 0.82);
  backdrop-filter: blur(10px);
}

.bsb-modal > section {
  position: relative;
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid rgba(184, 157, 255, 0.34);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(119, 75, 226, 0.28), transparent 38%),
    linear-gradient(150deg, #171331, #090a18);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.62);
  text-align: center;
}

.bsb-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(177, 153, 238, 0.2);
  border-radius: 10px;
  background: #111025;
  color: #fff;
  font-size: 22px;
}

.bsb-modal-star {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 13px;
  border: 1px solid rgba(245, 206, 112, 0.34);
  border-radius: 15px;
  background: rgba(245, 206, 112, 0.08);
  color: var(--bsb-gold);
  font-size: 25px;
}

.bsb-modal-kicker {
  margin: 0;
  color: #9e8bd4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.bsb-modal h2 {
  margin: 7px 0 13px;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}

.bsb-modal p {
  margin: 0;
  color: #aaa4b8;
  font-size: 12px;
  line-height: 1.55;
}

.bsb-coupon-step {
  display: flex;
  flex-direction: column;
}

.bsb-forfeit-warning {
  margin: 14px 0 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 104, 126, 0.28);
  border-radius: 10px;
  background: rgba(255, 78, 109, 0.08);
  color: #ffb8c3;
  font-size: 12px;
  line-height: 1.5;
}

.bsb-forfeit-link {
  width: 100%;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 104, 126, 0.4);
  border-radius: 10px;
  background: transparent;
  color: #ff8fa1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.bsb-coupon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  margin-top: 8px;
  padding: 9px 10px 9px 17px;
  border: 1px dashed rgba(244, 206, 112, 0.58);
  border-radius: 13px;
  background: rgba(245, 206, 112, 0.08);
  color: #fff;
}

.bsb-coupon strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-align: left;
}

.bsb-coupon span {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--bsb-gold);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.bsb-coupon + small {
  display: block;
  margin: 10px 0 4px;
  color: #858092;
  font-size: 10px;
}

.bsb-form-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: #d1c2fa;
}

@media (max-width: 680px) {
  .bsb-app {
    padding: 28px 10px 42px;
  }

  .bsb-hero {
    margin-bottom: 4px;
  }

  .bsb-kicker {
    font-size: 9px;
  }

  .bsb-hero h1 {
    font-size: clamp(22px, 7.2vw, 27px);
    letter-spacing: -0.07em;
    white-space: normal;
  }

  .bsb-hero > p {
    display: none;
  }

  .bsb-game-shell {
    width: min(100%, 362px, calc(56.25dvh - 40.75px));
    max-width: 100%;
  }

  .bsb-game-shell canvas {
    width: 100%;
    height: auto;
    border-radius: 18px;
  }

  .bs-play-mode-caption {
    margin-top: 9px;
    font-size: 9px;
  }

  .bs-play-mode {
    margin-top: 4px;
  }

  .bs-play-mode [data-play-mode] {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 10px;
  }

  .bsb-seo-copy {
    margin-top: 20px;
    padding: 18px 15px;
  }

  .bsb-seo-copy::before {
    content: "HƯỚNG DẪN MOBILE · Kéo ngang để di chuyển · Chạm để xoay · Giữ hoặc vuốt xuống để hạ khối";
    display: block;
    margin-bottom: 12px;
    color: #d5c5ff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
  }

  .bs-seo-copy {
    margin-top: 14px;
    padding: 20px 16px;
    border-radius: 16px;
  }

  .bs-seo-copy p,
  .bs-seo-copy li {
    font-size: 14px;
  }
}

@media (min-width: 681px) {
  .bsb-seo-copy::before {
    content: "HƯỚNG DẪN DESKTOP · ← → di chuyển · ↑ xoay · ↓ hạ chậm · Space thả nhanh";
    display: block;
    margin-bottom: 12px;
    color: #d5c5ff;
    font-size: 13px;
    font-weight: 800;
  }
}

