/* 188BET Thailand — premium dark casino theme */
:root {
  --bg: #0a0a0a;
  --bg-2: #121212;
  --panel: #171717;
  --panel-2: #1e1e1e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 114, 0, 0.45);
  --text: #f3f3f3;
  --muted: #a3a3a3;
  --soft: #cfcfcf;
  --gold: #ff7200;
  --gold-2: #ffb347;
  --ink: #0a0a0a;
  --radius: 1.1rem;
  --radius-sm: 0.75rem;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --container: 1440px;
  --container-pad: 1.25rem;
  --header-h: 70px;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Prompt", Tahoma, "Noto Sans Thai", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6rem; font-weight: 800; }
p { margin: 0 0 1rem; color: var(--soft); }

.container {
  width: min(100% - (var(--container-pad) * 2), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 200;
  background: var(--gold);
  color: var(--ink);
  padding: 0.7rem 1rem;
  border-radius: 0.7rem;
  font-weight: 800;
}
.skip-link:focus { top: 1rem; }

.gold { color: var(--gold); }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline-flex; } }

/* Topbar + Header */
.topbar {
  background: #050505;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 34px;
}
.topbar i { color: var(--gold); margin-right: 0.35rem; }
.topbar p { margin: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: var(--header-h);
  padding-inline: 0.15rem;
}
.logo {
  flex: none;
}
.logo img { height: 40px; width: auto; }

.nav-desktop {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 0.1rem;
  min-width: 0;
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.42rem 0.48rem;
  border-radius: 0.55rem;
  color: #c7c7c7;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  transition: 0.2s ease;
  white-space: nowrap;
}
.nav-link i {
  font-size: 0.72rem;
  opacity: 0.9;
}
.nav-link:hover,
.nav-link.active {
  background: rgba(255, 114, 0, 0.12);
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  /* Dorong ke ujung kanan — logo kiri, hamburger/CTA kanan */
  margin-left: auto;
}

/* CTA di header lebih compact biar ga nabrak nav */
.header-actions .btn {
  padding: 0.5rem 0.8rem;
  font-size: 0.78rem;
  border-radius: 0.65rem;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem;
  border-radius: 0.75rem;
  font-size: 0.86rem;
  font-weight: 800;
  transition: 0.2s ease;
  border: 1px solid transparent;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #e85d00);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 114, 0, 0.28);
}
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-outline {
  border-color: rgba(255, 114, 0, 0.5);
  color: var(--gold);
}
.btn-outline:hover { background: rgba(255, 114, 0, 0.1); }
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Hamburger modern: 3 garis animasi ke X */
.menu-toggle {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(255, 114, 0, 0.35);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 114, 0, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.menu-toggle:hover {
  border-color: rgba(255, 114, 0, 0.7);
  background: rgba(255, 114, 0, 0.16);
}
.menu-toggle:active { transform: scale(0.96); }
.menu-toggle .burger {
  position: relative;
  width: 20px;
  height: 14px;
  display: block;
}
.menu-toggle .burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 99px;
  background: #fff;
  transition: transform 0.28s ease, opacity 0.2s ease, top 0.28s ease, width 0.28s ease;
}
.menu-toggle .burger span:nth-child(1) { top: 0; width: 100%; }
.menu-toggle .burger span:nth-child(2) { top: 6px; width: 70%; }
.menu-toggle .burger span:nth-child(3) { top: 12px; width: 88%; }
.menu-toggle[aria-expanded="true"] {
  border-color: var(--gold);
  background: rgba(255, 114, 0, 0.2);
}
.menu-toggle[aria-expanded="true"] .burger span:nth-child(1) {
  top: 6px;
  width: 100%;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .burger span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.menu-toggle[aria-expanded="true"] .burger span:nth-child(3) {
  top: 6px;
  width: 100%;
  transform: rotate(-45deg);
}

/* Mobile: logo kiri ——— hamburger kanan (jauh, bukan nempel logo) */
@media (max-width: 1099px) {
  :root { --container-pad: 1.15rem; }
  .site-header .header-inner {
    width: min(100% - 2.6rem, var(--container));
    justify-content: space-between;
    gap: 0.75rem;
  }
  .logo {
    margin-right: 0;
  }
  .logo img {
    height: 48px;
  }
  .header-actions {
    margin-left: auto !important;
    gap: 0.55rem;
  }
  /* Login/daftar cuma di drawer */
  .header-actions .btn {
    display: none !important;
  }
}

@media (min-width: 1100px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .logo img { height: 42px; }
}

/* Layar lebar: nav & container lebih longgar */
@media (min-width: 1280px) {
  :root { --container: 1480px; }
  .nav-link {
    font-size: 0.82rem;
    padding: 0.48rem 0.58rem;
    gap: 0.35rem;
  }
  .header-actions .btn {
    padding: 0.55rem 0.95rem;
    font-size: 0.82rem;
  }
}

@media (min-width: 1500px) {
  :root { --container: 1560px; }
  .nav-link {
    font-size: 0.86rem;
    padding: 0.52rem 0.7rem;
  }
  .nav-link i { font-size: 0.8rem; }
}

.nav-mobile {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 1rem 0 1.25rem;
}
.nav-mobile[hidden] { display: none !important; }
.mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.mobile-grid a {
  padding: 0.8rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.mobile-grid a.active,
.mobile-grid a:hover { color: var(--gold); background: rgba(255, 114, 0, 0.1); }
.mobile-grid .btn { grid-column: span 1; }

/* Hero */
.hero {
  position: relative;
  padding: 1.25rem 0 0.5rem;
  overflow: hidden;
}
.hero-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.4rem;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.hero-track {
  display: flex;
  transition: transform 0.7s ease;
}
.hero-slide {
  min-width: 100%;
  position: relative;
  aspect-ratio: 16 / 9;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 4rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,.88), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.hero-caption .pill {
  display: inline-flex;
  margin-bottom: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}
.hero-caption h1 {
  font-size: clamp(1.35rem, 3.5vw, 2.4rem);
  max-width: 28rem;
  margin: 0;
}
.hero-dots { display: flex; gap: 0.4rem; flex-shrink: 0; }
.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,.4);
  transition: 0.25s;
}
.hero-dot.active {
  width: 1.7rem;
  background: var(--gold);
}

.trust-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.9rem;
}
.trust-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 23, 23, 0.9);
}
.trust-card i {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: rgba(255, 114, 0, 0.12);
  color: var(--gold);
  flex-shrink: 0;
}
.trust-card strong { display: block; font-size: 0.9rem; }
.trust-card span { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }

/* Sections */
.section { padding: 3rem 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 0.35rem;
}
.section-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }
.section-head > a {
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.grid-4 {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--panel);
  transition: 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.card img { width: 100%; object-fit: cover; }
.card-body { padding: 1.1rem; }
.card-body .tag {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
}
.card-body h3 { font-size: 1.02rem; margin-top: 0.4rem; }
.card-body p { font-size: 0.86rem; margin-bottom: 0; color: var(--muted); }
.card-body a.more {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
}
/* Section กีฬา / feature cards: biar height ikut rasio asli */
.feature-card img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.article-card img { aspect-ratio: 16 / 9; }
.game-card img { aspect-ratio: 4 / 3; }
.game-card .card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem;
}
.game-card h3 {
  margin: 0;
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  flex: none;
  border-radius: 999px;
  background: rgba(255, 114, 0, 0.12);
  color: var(--gold);
  padding: 0.22rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 800;
}

/* Promo band */
.promo {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 114, 0, 0.25);
  border-radius: 1.4rem;
  background: var(--panel);
}
.promo img {
  width: 100%;
  min-height: 220px;
  height: 100%;
  object-fit: cover;
}
.promo-body { padding: 1.6rem; }
.promo-body h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
.promo-body p { max-width: 36rem; }

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(255,114,0,.18), transparent 55%),
    linear-gradient(180deg, #141414, var(--bg));
}
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 18ch; }
.page-hero p { max-width: 46rem; font-size: 1.02rem; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }

/* Content */
.content-wrap { padding: 2.5rem 0 3.5rem; }
.prose {
  max-width: 820px;
}
.prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
  color: #fff;
}
.prose h3 { margin-top: 1.4rem; font-size: 1.1rem; }
.prose ul, .prose ol {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
  color: var(--soft);
}
.prose li { margin-bottom: 0.4rem; list-style: disc; }
.prose ol li { list-style: decimal; }
.prose a { color: var(--gold); }
.prose strong { color: #fff; }
.prose blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--gold);
  background: var(--panel);
  border-radius: 0 0.8rem 0.8rem 0;
  color: var(--soft);
}

.two-col {
  display: grid;
  gap: 1.25rem;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--panel);
  padding: 1.4rem;
}
.panel.gold-border { border-color: rgba(255,114,0,.28); }

.step-list { display: grid; gap: 1rem; }
.step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.step > b {
  flex: none;
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background: var(--gold);
  color: #fff;
  font-size: 0.85rem;
}
.step h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.step p { margin: 0; font-size: 0.9rem; color: var(--muted); }

.faq details {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--panel);
  padding: 1rem 1.1rem;
  margin-bottom: 0.6rem;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 800;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { transition: 0.2s; color: var(--muted); }
.faq details[open] summary i { transform: rotate(45deg); color: var(--gold); }
.faq p { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--muted); }

.cta-band {
  margin: 2rem 0;
  padding: 1.6rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(255,114,0,.3);
  background: linear-gradient(135deg, #1c1208, #121212 55%, #171717);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cta-band h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.cta-band p { margin: 0; max-width: 34rem; }

.safe-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.safe-pill {
  border: 1px solid rgba(255,114,0,.25);
  border-radius: 999px;
  background: rgba(255,114,0,.08);
  padding: 0.4rem 0.75rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #050505;
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding: 2.8rem 0 2rem;
}
.footer-brand p { font-size: 0.9rem; max-width: 28rem; }
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1rem;
  opacity: 0.85;
}
.footer-badges img { height: 36px; width: auto; }
.footer-title {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-title::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--gold);
  margin-top: 0.5rem;
}
.footer-links { display: grid; gap: 0.65rem; }
.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-links a:hover { color: var(--gold); }
.partner-logos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  align-items: center;
  opacity: 0.8;
}
.partner-logos img { max-height: 48px; width: auto; margin: 0 auto; }
.footer-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-note i { color: var(--gold); margin-right: 0.3rem; }
.footer-bottom {
  border-top: 1px solid var(--line);
}
.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-bottom p { margin: 0; }

.back-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  background: var(--gold);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.25s;
}
.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.back-top[hidden] { display: none; }

/* Responsive */
@media (min-width: 640px) {
  .trust-row { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .hero-slide { aspect-ratio: 16 / 6.5; }
  .hero-caption { padding: 5rem 1.6rem 1.5rem; }
  .footer-bottom-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .promo { grid-template-columns: 0.9fr 1.1fr; }
  .promo-body { align-self: center; padding: 2.2rem; }
  .two-col { grid-template-columns: 1.15fr 0.85fr; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .section { padding: 3.8rem 0; }
  .hero-slide { aspect-ratio: 16 / 5.2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
