/* ===========================================================
   SetZeroBet HOME — Dark premium theme (navy-black + gold)
   Theme tokens
   =========================================================== */
:root {
  --bk-orange: #ff8a00;
  --bk-orange-dark: #f57c00;
  --bk-gold: #f5c518;
  --bk-ink: #eef1f8;             /* ตัวอักษรหลัก (สว่างบนพื้นมืด) */
  --bk-muted: #8b95a9;
  --bk-line: rgba(148, 163, 184, .14);
  --bk-bg: #0a0d16;              /* พื้นหลัก */
  --bk-soft: #121724;            /* พื้นรอง */
  --bk-card: #161c2c;            /* การ์ด */
  --bk-radius: 16px;
  --bk-shadow: 0 8px 26px rgba(0, 0, 0, .35);
  --bk-grad: linear-gradient(135deg, #ffc84a, var(--bk-orange) 60%, #ff6a00);
  --bk-glow: 0 8px 24px rgba(255, 152, 26, .35);
}

* { box-sizing: border-box; }

body {
  font-family: 'Kanit', 'SukhumvitSet', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--bk-ink);
  background:
    radial-gradient(1100px 420px at 50% -140px, rgba(255, 138, 0, .12), transparent 62%),
    radial-gradient(900px 480px at 88% 8%, rgba(64, 106, 255, .08), transparent 60%),
    var(--bk-bg);
  font-size: 15px;
  font-weight: 300;
}

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-grad);
  border: none;
  color: #221302;
  font-weight: 600;
  border-radius: 999px;
  padding: 9px 24px;
  box-shadow: var(--bk-glow);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-bk:hover { color: #221302; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 152, 26, .5); filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--bk-line);
  color: var(--bk-ink);
  font-weight: 500;
  border-radius: 999px;
  padding: 8px 20px;
}
.btn-ghost:hover { border-color: var(--bk-orange); color: var(--bk-orange); }

/* Header auth buttons */
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bk-grad);
  border: none;
  color: #221302;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  border-radius: 999px;
  padding: 10px 22px;
  white-space: nowrap;
  box-shadow: var(--bk-glow);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-login i { font-size: 1.05em; }
.btn-login:hover {
  color: #221302;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 152, 26, .5);
  filter: brightness(1.06);
}
.btn-login:active { transform: translateY(0); box-shadow: var(--bk-glow); }
.btn-register {
  background: var(--bk-grad);
  border: none;
  color: #221302;
  font-weight: 600;
  font-size: 16px;
  border-radius: 8px;
  padding: 6px 16px;
  white-space: nowrap;
  animation: bk-pulse 2s infinite;
}
.btn-register:hover { color: #221302; filter: brightness(1.06); }

/* ---------- Account widget (header, หลัง login) ---------- */
.acct {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 18px 4px 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 168, 26, .14), rgba(255, 138, 0, .04));
  border: 1px solid rgba(255, 168, 26, .3);
  transition: border-color .2s;
}
.acct:hover { border-color: rgba(255, 168, 26, .55); }
.acct .avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bk-grad);
  color: #221302;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(255, 152, 26, .4);
}
.acct .acct-meta { display: flex; flex-direction: column; line-height: 1.25; }
.acct .acct-name { font-weight: 600; font-size: 13px; color: var(--bk-ink); white-space: nowrap; }
.acct .acct-bal { font-weight: 700; font-size: 13px; color: var(--bk-gold); white-space: nowrap; }
.btn-logout {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(148, 163, 184, .08);
  border: 1px solid var(--bk-line);
  color: var(--bk-muted);
  font-size: 18px;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.btn-logout:hover, .btn-logout.active { color: #221302; background: var(--bk-grad); border-color: transparent; }

/* ---------- 404 / not found ---------- */
.nf-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 48px 16px;
}
.nf-code {
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
  background: var(--bk-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nf-msg { color: var(--bk-muted); font-size: 17px; margin: 0; }

@keyframes bk-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 168, 26, .55); }
  70%  { box-shadow: 0 0 0 15px rgba(255, 168, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 168, 26, 0); }
}

/* ===========================================================
   Header / Navbar
   =========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(10, 13, 22, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--bk-line);
}
.site-header .top-strip {
  background: rgba(0, 0, 0, .35);
  color: var(--bk-muted);
  font-size: 12px;
  text-align: right;
  letter-spacing: .4px;
}
.brand-logo { height: 40px; width: auto; border-radius: 8px; }
.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;
}
/* เมนูหลักอยู่บรรทัดเดียวเสมอ — ไม่ตกบรรทัดไปเบียดความสูง header */
.main-nav .nav { flex-wrap: nowrap; }
.main-nav .nav-link {
  color: #c6cede;
  font-weight: 500;
  padding: .55rem .7rem;
  position: relative;
  white-space: nowrap;
  transition: color .15s;
}
/* จอ 992–1400px: บีบระยะห่างเมนูลงแทนการตัดเมนูทิ้ง (ขีดใต้เมนู active ย่อตาม) */
@media (max-width: 1400px) {
  .main-nav .nav-link { padding: .55rem .5rem; font-size: 14.5px; }
  .main-nav .nav-link.active::after { left: .5rem; right: .5rem; }
}
@media (max-width: 1200px) {
  .main-nav .nav-link { padding: .55rem .38rem; font-size: 13.5px; }
  .main-nav .nav-link.active::after { left: .38rem; right: .38rem; }
}
.main-nav .nav-link:hover { color: var(--bk-gold); }
.main-nav .nav-link.active { color: var(--bk-gold); }
.main-nav .nav-link.active::after {
  content: '';
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: var(--bk-grad);
}
.nav-badge {
  position: absolute; top: 0; right: -2px;
  background: #ff3b47; color: #fff; font-size: 9px;
  border-radius: 6px; padding: 1px 4px; font-weight: 600;
}

/* ---------- 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: var(--bk-card);
  border: 1px solid var(--bk-line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  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-gold); }
.main-nav .nav-item.has-mega:hover .mega-panel {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.mega-title { font-weight: 600; 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: #ff3b47; color: #fff; font-size: 10px; font-weight: 600;
  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 — การ์ดมนใน container + glow
   =========================================================== */
.hero { position: relative; padding-top: 18px; }
.hero-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--bk-line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 168, 26, .06);
  background: var(--bk-card);
}
.hero img.hero-img { width: 100%; display: block; }
.announce-bar {
  background: linear-gradient(90deg, rgba(255, 138, 0, .16), rgba(255, 200, 74, .07) 55%, transparent);
  border-top: 1px solid rgba(255, 168, 26, .22);
  color: var(--bk-ink);
  padding: 12px 20px;
}
.announce-bar .ann-text { font-weight: 500; font-size: clamp(14px, 1.6vw, 18px); }
.announce-bar .ann-text::before {
  content: '🏆';
  margin-right: 8px;
}
.announce-bar .btn {
  background: var(--bk-grad); color: #221302; border-radius: 999px; font-weight: 700;
  padding: 7px 26px; border: none; white-space: nowrap; box-shadow: var(--bk-glow);
  transition: transform .15s ease, filter .2s ease;
}
.announce-bar .btn:hover { transform: translateY(-1px); filter: brightness(1.06); color: #221302; }

/* 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: var(--bk-grad); color: #221302; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 6px; white-space: nowrap;
}
.news-ticker .more { color: var(--bk-gold); font-weight: 500; 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: 600;
  color: var(--bk-ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 5px;
  height: 1.15em;
  border-radius: 999px;
  background: var(--bk-grad);
  box-shadow: 0 0 12px rgba(255, 152, 26, .55);
  flex: 0 0 auto;
}
.see-all { color: var(--bk-muted); font-weight: 500; font-size: 14px; transition: color .15s; }
.see-all:hover { color: var(--bk-gold); }

/* 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;
  scrollbar-color: rgba(148, 163, 184, .28) transparent;
}
.h-scroll > * { scroll-snap-align: start; flex: 0 0 auto; }
.h-scroll::-webkit-scrollbar { height: 6px; }
.h-scroll::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .28); border-radius: 999px; }

/* Promo cards */
.promo-card {
  width: 290px; border-radius: var(--bk-radius); overflow: hidden;
  border: 1px solid var(--bk-line); box-shadow: var(--bk-shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.promo-card:hover { transform: translateY(-4px); border-color: rgba(255, 168, 26, .4); }
.promo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===========================================================
   Hot match
   =========================================================== */
.pill-tabs { display: flex; gap: 8px; }
.pill-tabs .pill {
  border: 1px solid var(--bk-line); background: var(--bk-soft); color: var(--bk-muted);
  font-weight: 500; border-radius: 999px; padding: 6px 20px; cursor: pointer;
}
.pill-tabs .pill.active { background: var(--bk-grad); border-color: transparent; color: #221302; font-weight: 600; }
.match-panel { background: var(--bk-soft); border: 1px solid var(--bk-line); 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,.9);
  display: grid; place-items: center; color: var(--bk-orange); font-size: 22px;
}
.match-card { background: var(--bk-card); border: 1px solid var(--bk-line); 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: 600; }
.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: var(--bk-card); min-height: 96px;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.reg-step.c1 { border-color: #ff5252; }
.reg-step.c2 { border-color: #26c6a8; }
.reg-step.c3 { border-color: #9575e8; }
.reg-step.c4 { border-color: var(--bk-orange); }
.reg-progress { height: 6px; border-radius: 999px; margin: 26px 0 14px;
  background: linear-gradient(90deg, #ff5252, #26c6a8 35%, #9575e8 68%, var(--bk-orange)); }
.reg-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; font-weight: 600; }
.reg-labels .l1 { color: #ff5252; } .reg-labels .l2 { color: #26c6a8; }
.reg-labels .l3 { color: #9575e8; } .reg-labels .l4 { color: var(--bk-orange); }

/* ===========================================================
   Game cards
   =========================================================== */
.game-card { width: 184px; text-align: left; }
.game-thumb {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--bk-line); box-shadow: var(--bk-shadow);
  aspect-ratio: 1 / 1; background: var(--bk-soft);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.game-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.game-card:hover .game-thumb { border-color: rgba(255, 168, 26, .45); box-shadow: 0 12px 30px rgba(255, 152, 26, .18); }
.game-card:hover .game-thumb img { transform: scale(1.06); }
.tag-hot, .tag-new {
  position: absolute; top: 8px; left: 8px; color: #fff;
  font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 8px;
}
.tag-hot { background: linear-gradient(135deg, #ff6a00, #e53935); }
.tag-new { background: linear-gradient(135deg, #ff6a00, #e53935); }
.game-name { font-weight: 500; 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: rgba(64, 106, 255, .2); color: #9db4ff;
  font-size: 11px; font-weight: 500; 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: var(--bk-soft); }
.app-title { font-size: clamp(22px, 3vw, 34px); font-weight: 600; 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-card); }
.store-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--bk-card); border: 1px solid var(--bk-line); color: var(--bk-ink); border-radius: 999px; padding: 8px 18px; font-size: 13px; font-weight: 500; }
.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: 600; 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: 600; }
.why-card .stars { color: var(--bk-gold); font-size: 18px; letter-spacing: 2px; }
.why-card p { color: var(--bk-muted); font-size: 14px; }

/* Partners — โลโก้พาร์ทเนอร์หลากสี วางบน chip ขาวนวลให้อ่านชัดบนพื้นมืด */
.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: 14px; display: grid; place-items: center; padding: 14px;
  background: #f4f6fa;
  transition: transform .18s ease, box-shadow .18s ease;
}
.partner-cell:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.partner-cell img { max-height: 36px; max-width: 100%; object-fit: contain; }

/* News cards */
.news-card { background: var(--bk-card); border: 1px solid var(--bk-line); 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: 600; }
.news-card p { color: var(--bk-muted); font-size: 13px; }
.news-card .date { color: var(--bk-muted); font-size: 12px; }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer {
  background: #080b12;
  color: var(--bk-ink);
  padding-top: 36px;
  margin-top: 26px;
  border-top: 1px solid var(--bk-line);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 168, 26, .55), transparent);
}
.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: 600; font-size: 14px; margin-bottom: 12px; color: var(--bk-gold); }
.footer-cols a { display: block; color: var(--bk-muted); font-size: 13px; padding: 4px 0; transition: color .15s; }
.footer-cols a:hover { color: var(--bk-gold); }
.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: #f4f6fa; 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; }

/* Modal backdrop — มืด + เบลอฉากหลัง */
.modal-backdrop.show {
  background: rgba(4, 6, 11, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
}

/* Floating chat button */
.fab-chat {
  position: fixed; right: 22px; bottom: 22px; z-index: 1040;
  width: 56px; height: 56px; border-radius: 50%; background: var(--bk-grad);
  color: #221302; display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 8px 24px rgba(255, 152, 26, .45);
  border: none; cursor: pointer;
  transition: transform .15s ease;
}
.fab-chat:hover { transform: translateY(-3px) scale(1.04); color: #221302; }

/* ===========================================================
   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; }
}
