/* ===========================================================
   BK8 Thailand — Bootstrap 5 clone
   Theme tokens
   =========================================================== */
:root {
  --bk-orange: #ff8a00;
  --bk-orange-dark: #f57c00;
  --bk-ink: #0f161f;
  --bk-muted: #6b7785;
  --bk-line: #e7eaee;
  --bk-bg: #ffffff;
  --bk-soft: #f4f6f8;
  --bk-radius: 14px;
  --bk-shadow: 0 6px 22px rgba(15, 22, 31, .08);
}

* { box-sizing: border-box; }

body {
  font-family: 'Sarabun', 'SukhumvitSet', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--bk-ink);
  background: var(--bk-bg);
  font-size: 15px;
}

a { text-decoration: none; }
img { max-width: 100%; }

.container-bk { max-width: 1180px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* ---------- Buttons ---------- */
.btn-bk {
  background: var(--bk-orange);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 22px;
  transition: background .2s, transform .15s;
}
.btn-bk:hover { background: var(--bk-orange-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--bk-line);
  color: var(--bk-ink);
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 20px;
}
.btn-ghost:hover { border-color: var(--bk-orange); color: var(--bk-orange); }

/* Header auth buttons — match original */
.btn-login {
  background: transparent;
  border: none;
  color: var(--bk-ink);
  font-weight: 400;
  font-size: 16px;
  padding: 4px 8px;
  white-space: nowrap;
}
.btn-login:hover { color: var(--bk-orange); }
.btn-register {
  background: var(--bk-orange);
  border: none;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  border-radius: 5px;
  padding: 6px 16px;
  white-space: nowrap;
  animation: bk-pulse 2s infinite;
}
.btn-register:hover { background: var(--bk-orange-dark); color: #fff; }
@keyframes bk-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 138, 0, .55); }
  70%  { box-shadow: 0 0 0 15px rgba(255, 138, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 138, 0, 0); }
}

/* ===========================================================
   Header / Navbar
   =========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--bk-line);
}
.site-header .top-strip {
  background: var(--bk-ink);
  color: #cfd6de;
  font-size: 12px;
  text-align: right;
}
.brand-logo { height: 40px; width: auto; }
.brand-crest { height: 34px; width: auto; }
.hamburger {
  border: none; background: transparent; color: var(--bk-orange);
  font-size: 22px; line-height: 1; padding: 4px 8px; cursor: pointer;
}
.main-nav .nav-link {
  color: var(--bk-ink);
  font-weight: 600;
  padding: .55rem .7rem;
  position: relative;
  white-space: nowrap;
}
.main-nav .nav-link:hover { color: var(--bk-orange); }
.nav-badge {
  position: absolute; top: 0; right: -2px;
  background: #e53935; color: #fff; font-size: 9px;
  border-radius: 6px; padding: 1px 4px; font-weight: 700;
}

/* ---------- Mega menu ---------- */
.main-nav .nav-item.has-mega { position: static; }
.mega-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  top: 100%;
  width: min(1140px, 96vw);
  background: #fff;
  border: 1px solid var(--bk-line);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 22, 31, .16);
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1035;
}
.main-nav .nav-item.has-mega:hover > .nav-link { color: var(--bk-orange); }
.main-nav .nav-item.has-mega:hover .mega-panel {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.mega-title { font-weight: 700; font-size: 15px; margin: 0 0 12px; color: var(--bk-ink); }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}
.mega-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bk-soft);
  aspect-ratio: 244 / 307;
  box-shadow: var(--bk-shadow);
  transition: transform .2s;
}
.mega-card:hover { transform: translateY(-3px); }
.mega-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mega-card .badge-tag {
  position: absolute; top: 6px; left: 6px;
  background: #e53935; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 5px; padding: 1px 7px;
}
@media (max-width: 1100px) { .mega-grid { grid-template-columns: repeat(5, 1fr); } }
.lang-flag { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; }

/* ===========================================================
   Hero + announcement
   =========================================================== */
.hero { position: relative; }
.hero img.hero-img { width: 100%; display: block; border-radius: 0; }
.announce-bar {
  background: var(--bk-orange);
  color: #fff;
}
.announce-bar .ann-text { font-weight: 600; font-size: clamp(14px, 1.6vw, 20px); }
.announce-bar .btn {
  background: #1565ff; color: #fff; border-radius: 999px; font-weight: 600;
  padding: 6px 24px; border: none; white-space: nowrap;
}

/* News ticker */
.news-ticker {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  color: var(--bk-ink); font-size: 14px;
}
.news-ticker .tag {
  background: #1565ff; color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 6px; white-space: nowrap;
}
.news-ticker .more { color: var(--bk-orange); font-weight: 600; white-space: nowrap; margin-left: auto; }

/* ===========================================================
   Generic section
   =========================================================== */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: clamp(18px, 2.2vw, 24px); font-weight: 700; color: var(--bk-ink); margin: 0; }
.see-all { color: var(--bk-muted); font-weight: 600; font-size: 14px; }
.see-all:hover { color: var(--bk-orange); }

/* Horizontal scroller for promos & games */
.h-scroll {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.h-scroll > * { scroll-snap-align: start; flex: 0 0 auto; }
.h-scroll::-webkit-scrollbar { height: 6px; }
.h-scroll::-webkit-scrollbar-thumb { background: #d4dae0; border-radius: 999px; }

/* Promo cards */
.promo-card { width: 290px; border-radius: var(--bk-radius); overflow: hidden; box-shadow: var(--bk-shadow); }
.promo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===========================================================
   Hot match
   =========================================================== */
.pill-tabs { display: flex; gap: 8px; }
.pill-tabs .pill {
  border: none; background: var(--bk-soft); color: var(--bk-muted);
  font-weight: 600; border-radius: 999px; padding: 6px 20px; cursor: pointer;
}
.pill-tabs .pill.active { background: var(--bk-orange); color: #fff; }
.match-panel { background: var(--bk-soft); border-radius: var(--bk-radius); padding: 22px; }
.video-thumb { position: relative; border-radius: var(--bk-radius); overflow: hidden; }
.video-thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.video-thumb .play span {
  width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.85);
  display: grid; place-items: center; color: var(--bk-orange); font-size: 22px;
}
.match-card { background: #fff; border-radius: 12px; box-shadow: var(--bk-shadow); overflow: hidden; min-width: 250px; }
.match-card .mc-head {
  background: linear-gradient(90deg, #6a1b9a, #4527a0); color: #fff;
  font-size: 12px; padding: 8px 12px; display: flex; justify-content: space-between;
}
.match-card .mc-team { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.match-card .mc-team img { width: 22px; height: 22px; object-fit: contain; }
.badge-letter { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.badge-h { background: #2e7d32; } .badge-a { background: #c62828; }

/* ===========================================================
   Register guide
   =========================================================== */
.reg-section { text-align: center; }
.reg-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.reg-step {
  border: 2px solid; border-radius: var(--bk-radius); padding: 22px 16px;
  font-size: 14px; color: var(--bk-ink); background: #fff; min-height: 96px;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.reg-step.c1 { border-color: #e53935; }
.reg-step.c2 { border-color: #26c6a8; }
.reg-step.c3 { border-color: #7e57c2; }
.reg-step.c4 { border-color: var(--bk-orange); }
.reg-progress { height: 6px; border-radius: 999px; margin: 26px 0 14px;
  background: linear-gradient(90deg, #e53935, #26c6a8 35%, #7e57c2 68%, var(--bk-orange)); }
.reg-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; font-weight: 700; }
.reg-labels .l1 { color: #e53935; } .reg-labels .l2 { color: #26c6a8; }
.reg-labels .l3 { color: #7e57c2; } .reg-labels .l4 { color: var(--bk-orange); }

/* ===========================================================
   Game cards
   =========================================================== */
.game-card { width: 184px; text-align: left; }
.game-thumb {
  position: relative; border-radius: 12px; overflow: hidden; box-shadow: var(--bk-shadow);
  aspect-ratio: 1 / 1; background: var(--bk-soft);
}
.game-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.game-card:hover .game-thumb img { transform: scale(1.05); }
.tag-hot, .tag-new {
  position: absolute; top: 8px; left: 8px; color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 8px;
}
.tag-hot { background: #e53935; }
.tag-new { background: #e53935; }
.game-name { font-weight: 600; font-size: 14px; margin: 10px 0 2px; color: var(--bk-ink); }
.game-provider { color: var(--bk-muted); font-size: 12px; }
.rtp-badge {
  display: inline-block; margin-top: 6px; background: #1565ff; color: #fff;
  font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 8px;
}
.instant-thumb { aspect-ratio: 1/1; border-radius: 12px; box-shadow: var(--bk-shadow); overflow: hidden; }
.instant-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ===========================================================
   App download
   =========================================================== */
.app-section { background: #fff; }
.app-title { font-size: clamp(22px, 3vw, 34px); font-weight: 700; line-height: 1.25; }
.app-icon { width: 56px; height: 56px; border-radius: 14px; vertical-align: middle; }
.qr-box { width: 110px; height: 110px; border: 1px solid var(--bk-line); border-radius: 10px; display: grid; place-items: center; color: var(--bk-muted); font-size: 12px; background: var(--bk-soft); }
.store-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--bk-ink); color: #fff; border-radius: 999px; padding: 8px 18px; font-size: 13px; font-weight: 600; }
.app-feature {
  border-radius: var(--bk-radius); overflow: hidden; min-height: 150px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px;
  background-size: cover; background-position: center; box-shadow: var(--bk-shadow);
}
.app-feature h6 { font-weight: 700; margin: 0 0 4px; }
.app-feature p { margin: 0; font-size: 13px; opacity: .92; }
.phone-mockup { max-width: 320px; margin: 0 auto; display: block; }

/* Why choose us */
.why-card { text-align: center; padding: 18px; }
.why-card h5 { font-weight: 700; }
.why-card .stars { color: var(--bk-orange); font-size: 18px; letter-spacing: 2px; }
.why-card p { color: var(--bk-muted); font-size: 14px; }

/* Partners */
.partner-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.partner-cell {
  flex: 1 1 130px; min-width: 130px; height: 78px; border: 1px solid var(--bk-line);
  border-radius: 12px; display: grid; place-items: center; padding: 14px; background: #fff;
}
.partner-cell img { max-height: 36px; max-width: 100%; object-fit: contain; }

/* News cards */
.news-card { background: #fff; border-radius: var(--bk-radius); box-shadow: var(--bk-shadow); overflow: hidden; width: 280px; }
.news-card .nc-img { aspect-ratio: 16/10; background: var(--bk-soft); overflow: hidden; }
.news-card .nc-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .nc-body { padding: 16px; }
.news-card h6 { font-weight: 700; }
.news-card p { color: var(--bk-muted); font-size: 13px; }
.news-card .date { color: #9aa4af; font-size: 12px; }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer { background: var(--bk-soft); color: var(--bk-ink); padding-top: 36px; margin-top: 10px; border-top: 1px solid var(--bk-line); }
.footer-sponsors { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; text-align: center; }
.footer-sponsors .sp-group { font-size: 12px; color: var(--bk-muted); }
.footer-sponsors .sp-group .sp-imgs { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.footer-sponsors img { height: 38px; width: auto; object-fit: contain; }
.prev-sponsors img { height: 30px; opacity: .85; }
.award-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; align-items: center; }
.award-row img { height: 56px; width: auto; object-fit: contain; }
.license-text { color: var(--bk-muted); font-size: 12.5px; line-height: 1.7; max-width: 980px; margin: 0 auto; text-align: center; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.footer-cols h6 { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.footer-cols a { display: block; color: var(--bk-muted); font-size: 13px; padding: 4px 0; }
.footer-cols a:hover { color: var(--bk-orange); }
.icon-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.icon-row img { height: 26px; width: auto; object-fit: contain; }
.pay-row img { height: 24px; background: #fff; border-radius: 6px; padding: 2px 6px; border: 1px solid var(--bk-line); }
.social-row img { height: 30px; }
.copyright { text-align: center; color: var(--bk-muted); font-size: 13px; padding: 22px 0; border-top: 1px solid var(--bk-line); margin-top: 26px; }

/* Floating chat button */
.fab-chat {
  position: fixed; right: 22px; bottom: 22px; z-index: 1040;
  width: 56px; height: 56px; border-radius: 50%; background: var(--bk-orange);
  color: #fff; display: grid; place-items: center; font-size: 22px; box-shadow: 0 8px 24px rgba(255,138,0,.45);
  border: none; cursor: pointer;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 991px) {
  .reg-steps, .reg-labels { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none !important; }
}
@media (max-width: 575px) {
  .reg-steps, .reg-labels { grid-template-columns: 1fr; }
  .game-card { width: 150px; }
  .promo-card { width: 240px; }
}
