:root {
  --bg: #000;
  --panel: #141414;
  --line: #2b2b2b;
  --gold: #ffb000;
  --gold-soft: #f7c948;
  --text: #fff;
  --muted: #b5b5b5;
  --app-width: 500px;
  --nav-height: 66px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: #0d0d0d;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; height: auto; }

.app {
  display: block;
  max-width: var(--app-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  min-height: 62px;
  background: #000;
}
.logo { margin-right: auto; }
.logo img { height: 50px; width: auto; }
.hbtn { padding: 8px 12px; border: 2px solid var(--gold); border-radius: 8px; color: var(--gold); font-size: 14px; font-weight: 800; white-space: nowrap; }
.hbtn.solid { background: var(--gold); color: #000; }
.menu-btn { display: grid; gap: 5px; padding: 6px 2px 6px 6px; }
.menu-btn span { display: block; width: 26px; height: 4px; border-radius: 2px; background: var(--gold); }

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; aspect-ratio: 1198 / 475; overflow: hidden; }
.slide img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.carousel-dots { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; flex-wrap: wrap; }
/* Small dot, but a 24px tap area around it. */
.carousel-dots button { width: 24px; height: 24px; padding: 8.5px; border-radius: 50%; background-color: rgba(255, 255, 255, .45); background-clip: content-box; }
.carousel-dots button.active { background-color: var(--gold); }

/* ---------- Marquee ---------- */
.marquee { background: var(--gold); color: #fff; overflow: hidden; white-space: nowrap; font-size: 13px; font-weight: 700; padding: 3px 0; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.marquee span { display: inline-block; padding-left: 40%; animation: marquee 45s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Quick links ---------- */
.promo-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 8px; scrollbar-width: none; }
.promo-row::-webkit-scrollbar { display: none; }
.promo-card { flex: 0 0 188px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15); }
.promo-card img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.promo-card b { display: block; font-size: 15px; line-height: 1.1; }
.promo-card b.spaced { letter-spacing: .5px; }
.promo-card small { display: block; font-size: 11px; line-height: 1.2; opacity: .95; }

/* ---------- Referral bar ---------- */
.referral { display: flex; margin: 4px 0 0; background: #111; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ref-title { flex: 0 0 30%; display: flex; flex-direction: column; justify-content: center; padding: 10px 12px; background: linear-gradient(135deg, #ffcc33, #f39b00); color: #fff; border-radius: 0 24px 24px 0; }
.ref-title b { font-size: 17px; letter-spacing: .5px; }
.ref-title small { font-size: 11px; font-weight: 700; }
.ref-actions { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); }
.ref-actions > * { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 2px; font-size: 10.5px; white-space: nowrap; font-weight: 700; color: #ddd; border-left: 1px solid var(--line); }
.ref-actions svg { width: 24px; height: 24px; fill: var(--gold); }
.ref-actions > :hover { background: #1c1c1c; }

/* ---------- Game sections ---------- */
.block { margin-top: 18px; }
.block-title { display: flex; align-items: center; gap: 8px; padding: 0 10px 10px; font-size: 18px; font-weight: 700; color: var(--gold); }
.block-title img { height: 34px; width: auto; }
.top-badge { background: linear-gradient(180deg, #ffcc00, #ff4a00); color: #fff; font-size: 16px; font-style: italic; font-weight: 900; padding: 1px 6px; border-radius: 6px; transform: rotate(-6deg); text-shadow: 0 1px 0 #a00; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 0 10px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hot { flex: 0 0 24%; scroll-snap-align: start; }

.providers { display: flex; gap: 6px; padding-right: 8px; }
.cat-list { flex: 0 0 78px; display: grid; align-content: start; gap: 2px; border-right: 1px solid var(--line); }
.cat { display: block; padding: 4px 6px; opacity: .85; }
.cat.on { opacity: 1; background: #1a1a1a; border-left: 3px solid var(--gold); }
.cat img { width: 100%; height: auto; }
.provider-main { flex: 1; min-width: 0; }
.deposit-note { margin-bottom: 10px; padding: 8px 12px; border: 1px solid #8a6a1f; border-radius: 4px; background: linear-gradient(90deg, #2a2a2a, #111); font-size: 14px; font-weight: 800; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.game { display: block; }
.game img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; }
.play { display: block; margin-top: 6px; padding: 6px 0; border: 2px solid var(--gold-soft); border-radius: 14px; background: linear-gradient(180deg, #3a3a3a, #111); text-align: center; font-size: 14px; font-weight: 800; }
.hot, .cat, .game, .promo-card { transition: transform .1s, filter .15s; }
.hot:hover, .game:hover, .promo-card:hover { filter: brightness(1.12); }
.game:active, .promo-card:active { transform: scale(.97); }

/* ---------- Keyword text ---------- */
.seo { margin: 24px 10px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); font-size: 14px; line-height: 1.6; }
.seo h1 { font-size: 19px; margin-bottom: 8px; color: var(--gold); }
.seo h2 { font-size: 16px; color: var(--gold-soft); margin: 18px 0 6px; }
.seo a { color: var(--gold); text-decoration: underline; }
.seo ol, .seo ul { padding-left: 20px; }
.seo ul { list-style: disc; }
.seo li { margin-bottom: 6px; }
.guide { margin-top: 14px; }
.guide .crumbs { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.guide .crumbs a { color: var(--muted); }
.guide-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.guide-btns .hbtn { text-align: center; padding: 12px; text-decoration: none; }
.guide-btns .hbtn.solid { color: #000; }

/* Long sections fold to a preview; collapse.js adds the toggle button. */
.collapsible { position: relative; max-height: 320px; overflow: hidden; }
.collapsible:not(.open)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(rgba(20, 20, 20, 0), var(--panel)); pointer-events: none; }
.collapsible.open { max-height: none; }
.toggle-btn { display: block; margin: 10px auto 0; padding: 8px 22px; border: 1px solid var(--gold); border-radius: 20px; color: var(--gold); font-size: 14px; font-weight: 700; }
.toggle-btn:hover { background: rgba(255, 176, 0, .1); }

/* ---------- Footer ---------- */
.footer { padding: 26px 12px 20px; }
.footer h3 { font-size: 17px; font-weight: 800; margin: 18px 0 10px; }
.footer-cols { display: grid; grid-template-columns: 1fr 1.5fr; gap: 14px; }
.footer-cols h3:first-child { margin-top: 0; }
.footer-cols .resp { max-width: 120px; }
.icons { display: flex; flex-wrap: wrap; gap: 6px; }
.icons img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.follow-row { grid-template-columns: 1.8fr 1fr; margin-top: 10px; }
.app-btns { display: flex; gap: 6px; }
.app-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; }
.app-btn svg { width: 26px; height: 26px; fill: #fff; }
.app-btn.android { background: #8bb016; }
.app-btn.ios { background: #000; border: 1px solid #333; }
.copyright { margin-top: 28px; padding-top: 18px; border-top: 2px solid var(--gold); text-align: center; font-size: 14px; color: var(--muted); font-weight: 700; }
.tagline { margin-top: 16px; text-align: center; font-size: 15px; font-weight: 800; color: var(--gold); }
.links { margin-top: 14px; text-align: center; font-size: 15px; font-weight: 800; color: var(--gold); }
.links a { padding: 4px 6px; }
.footer-note { margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- Floating side tabs ---------- */
.side-tabs { position: fixed; right: max(0px, calc(50% - var(--app-width) / 2)); top: 45%; transform: translateY(-50%); z-index: 20; display: grid; gap: 8px; }
.side-tabs img { width: 30px; height: auto; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 40;
  width: 100%;
  max-width: var(--app-width);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #000 url("assets/footer-bg.png") center top / 100% var(--nav-height) no-repeat;
  border-top: 2px solid #3a2f12;
}
.bottom-nav a { display: grid; place-items: center; height: var(--nav-height); transition: filter .15s, transform .1s; }
.bottom-nav img { height: calc(var(--nav-height) - 6px); width: auto; }
.bottom-nav a:active { transform: scale(.95); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-height) + 24px); transform: translateX(-50%); z-index: 50; background: rgba(40, 40, 40, .95); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }

@media (max-width: 380px) {
  .hbtn { padding: 7px 8px; font-size: 13px; }
  .logo img { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee span { animation: none; padding-left: 12px; }
}
