:root {
  --bg: #0e1622;
  --bg-2: #0a121c;
  --panel: #16202e;
  --panel-2: #1c2938;
  --border: #253242;
  --text: #ffffff;
  --muted: #8a97a8;
  --yellow: #f5b83d;
  --yellow-2: #f0a500;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 64px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Social top bar ---------- */
.topbar { background: #0a0f16; border-bottom: 1px solid #1a2431; font-size: 12.5px; }
.topbar-inner {
  max-width: 1600px; margin: 0 auto; padding: 7px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar-social { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-social a { color: #c8d2de; font-weight: 500; }
.topbar-social a:hover { color: var(--yellow); }
.topbar-right { display: flex; align-items: center; gap: 14px; color: #c8d2de; }
.lang-pill { cursor: pointer; }

/* ---------- Stage (hero background behind floating header) ---------- */
.stage { position: relative; width: 100%; background: var(--bg-2); }

/* ---------- Header (floating rounded bar over hero) ---------- */
.header {
  position: absolute; top: 12px; left: 14px; right: 14px; z-index: 30;
  background: #fff; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.header-inner {
  max-width: 100%; margin: 0 auto; padding: 8px 20px;
  display: flex; align-items: center; gap: 20px;
}
.logo img { height: 30px; }
.nav { display: flex; align-items: center; gap: 20px; flex: 1; margin-left: 8px; }
.nav-link {
  color: #10151c; font-weight: 700; font-size: 13.5px; letter-spacing: .3px;
  white-space: nowrap; transition: color .2s;
}
.nav-link:hover { color: var(--yellow-2); }
.menu-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 4px; }
.menu-toggle span { width: 22px; height: 2px; background: #10151c; border-radius: 2px; }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.icon-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 20px; color: #10151c;
}
.icon-btn span { font-size: 9px; font-weight: 700; letter-spacing: .3px; }
.icon-btn.lottery { color: var(--yellow-2); }
.bell { background: none; border: none; cursor: pointer; font-size: 18px; }
.btn-login {
  background: none; border: none; color: #10151c; font-weight: 700; font-size: 14px;
  letter-spacing: .5px; cursor: pointer; font-family: inherit;
}
.btn-join {
  background: var(--yellow); color: #10151c; border: none; font-weight: 700;
  font-size: 14px; letter-spacing: .5px; padding: 11px 22px; border-radius: 6px; cursor: pointer;
  font-family: inherit; transition: background .2s; white-space: nowrap;
}
.btn-join:hover { background: var(--yellow-2); }

/* ---------- Hero (full-bleed background) ---------- */
.hero { position: relative; width: 100%; overflow: hidden; }
.hero-media { position: relative; width: 100%; }
.hero-track {
  position: relative; width: 100%; height: 500px; overflow: hidden; background: var(--bg-2);
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  background-size: cover; background-position: center; pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
/* Overlay removed — banners contain their own text */
.hero-shade { display: none; }
.hero-arrow {
  position: absolute; top: 46%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 24px; line-height: 1;
  display: grid; place-items: center; transition: background .2s;
}
.hero-arrow:hover { background: rgba(0,0,0,.6); }
.hero-arrow.left { left: 20px; }
.hero-arrow.right { right: 20px; }
.hero-dots {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 150px; z-index: 5; display: flex; gap: 8px;
}
.hero-dots button {
  width: 20px; height: 6px; border-radius: 4px; border: none; cursor: pointer;
  background: rgba(255,255,255,.45); transition: .25s;
}
.hero-dots button.active { background: var(--yellow); width: 40px; }

/* Category quick cards overlapping bottom of hero */
.cat-cards {
  position: absolute; left: 30px; right: 30px; bottom: 26px; z-index: 6;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  max-width: 1540px; margin: 0 auto;
}
.cat-card {
  background: rgba(18, 26, 38, .92); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: row; align-items: center; gap: 14px;
  transition: transform .2s, border-color .2s; backdrop-filter: blur(4px);
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--yellow); }
.cat-card img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.cat-text { display: flex; flex-direction: column; gap: 4px; }
.cat-text b { font-weight: 700; font-size: 17px; line-height: 1.1; }
.cat-text i { font-style: normal; font-size: 12.5px; color: var(--yellow); font-weight: 500; }

/* ---------- Sections ---------- */
.section { max-width: 1600px; margin: 34px auto 0; padding: 0 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: rgb(255, 185, 0); }
.sec-emoji { font-size: 22px; }
.section-controls { display: flex; align-items: center; gap: 8px; }
.all-games {
  background: var(--panel-2); border: 1px solid var(--border); color: #fff; font-weight: 700;
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 14px;
}
.all-games:hover { background: var(--border); }
.ctrl {
  width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); color: #fff; cursor: pointer; font-size: 20px; line-height: 1;
}
.ctrl:hover { background: var(--border); }

/* ---------- Games row (horizontal scroll) ---------- */
.games-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 14px) / 6);
  gap: 14px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px;
}
.games-row::-webkit-scrollbar { display: none; }
.game-card {
  position: relative; border-radius: 12px; overflow: hidden; cursor: pointer;
  aspect-ratio: 3/4; background: var(--panel); border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.game-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.game-card img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.game-fav {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; font-size: 14px;
}

/* ---------- Payments ---------- */
.payments { margin-top: 40px; }
.pay-grid {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px;
}
.pay-grid img { height: 26px; width: auto; opacity: .9; filter: brightness(1.05); }

/* ---------- Content ---------- */
.content { color: var(--muted); }
  .content h1 { font-size: 24px; color: rgb(255, 185, 0); margin: 10px 0 12px; font-weight: bold; }
  .content h2 { font-size: 20px; color: rgb(255, 185, 0); margin: 22px 0 10px; font-weight: bold; }
  .content h3 { font-size: 17px; color: rgb(255, 185, 0); margin: 18px 0 8px; font-weight: bold; }
  .content h4 { font-size: 15px; color: rgb(255, 185, 0); margin: 14px 0 6px; font-weight: bold; }
  .content ul { margin: 0 0 14px 20px; list-style-type: disc; }
  .content li { font-size: 14px; margin-bottom: 4px; color: var(--muted); list-style-type: disc; }
.content p { font-size: 14px; margin-bottom: 12px; max-width: 1000px; }

/* ---------- Footer ---------- */
.footer { margin-top: 50px; background: var(--bg-2); border-top: 1px solid var(--border); }
.footer-top {
  max-width: 1600px; margin: 0 auto; padding: 40px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px;
}
.footer-logo { height: 34px; margin-bottom: 18px; }
.footer-col h4 { font-size: 15px; color: rgb(255, 185, 0); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--yellow); }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%; background: var(--panel); border: 1px solid var(--border);
  display: grid; place-items: center; font-weight: 700;
}
.socials a:hover { background: var(--yellow); color: #10151c; }
.lang-select {
  background: var(--panel); border: 1px solid var(--border); color: #fff; padding: 10px;
  border-radius: 8px; font-family: inherit; width: 100%; margin-bottom: 14px;
}
.age-badge {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--yellow); color: var(--yellow);
  display: grid; place-items: center; font-weight: 900; font-size: 13px;
}
.footer-legal {
  max-width: 1600px; margin: 0 auto; padding: 22px 30px; border-top: 1px solid var(--border);
  color: #5f6c7d; font-size: 12px;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 1px solid #e2e6ea; height: 64px;
  display: flex; justify-content: space-around; align-items: center;
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #4a5563; font-size: 10px; font-weight: 700; letter-spacing: .3px; flex: 1;
}
.bn-ico { font-size: 20px; }
.bn-menu .bn-ico { color: var(--yellow-2); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(3,7,12,.8); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 18px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 400px; padding: 28px; position: relative;
}
.modal-logo { height: 30px; margin: 0 auto 20px; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--muted); font-size: 26px; cursor: pointer; }
.modal-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--bg); padding: 5px; border-radius: 10px; }
.modal-tab { flex: 1; padding: 10px; border: none; background: none; color: var(--muted); font-family: inherit; font-weight: 700; border-radius: 7px; cursor: pointer; }
.modal-tab.active { background: var(--yellow); color: #10151c; }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-form input {
  background: var(--bg); border: 1px solid var(--border); color: #fff;
  padding: 13px 14px; border-radius: 8px; font-family: inherit; font-size: 14px;
}
.modal-form input:focus { outline: none; border-color: var(--yellow); }
.reg-only { display: none; }
.modal.show-register .reg-only { display: block; }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (min-width: 761px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
}
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .games-row { grid-auto-columns: calc((100% - 3 * 12px) / 4); }
}
@media (max-width: 980px) {
  .nav, .icon-btn { display: none; }
  .menu-toggle { display: flex; }
  .header { left: 8px; right: 8px; top: 8px; }
  .hero-track { height: 480px; }
  .nav.open {
    display: flex; position: fixed; top: 0; left: 0; height: 100vh; width: 76%; max-width: 300px;
    flex-direction: column; align-items: flex-start; gap: 4px; background: #fff; padding: 70px 20px 20px;
    z-index: 70; box-shadow: 4px 0 20px rgba(0,0,0,.25); border-radius: 0;
  }
  .nav.open .nav-link { padding: 12px 0; font-size: 16px; width: 100%; border-bottom: 1px solid #eef1f4; }
}
@media (max-width: 760px) {
  .topbar { display: none; }
  .header-actions .btn-login, .bell { display: none; }
  .header {
    position: sticky; top: 0; left: 0; right: 0; border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
  }
  .hero-track { height: 300px; aspect-ratio: auto; }
  .hero-slide { background-size: cover; background-position: center; }
  .hero-arrow { top: 50%; width: 34px; height: 34px; font-size: 20px; }
  .hero-dots { top: auto; bottom: 8px; }
  .cat-cards {
    position: static; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin: 12px 12px 0; left: auto; right: auto; bottom: auto; max-width: none;
  }
  .cat-card { flex-direction: column; align-items: center; text-align: center; padding: 14px 6px; gap: 10px; }
  .cat-card img { width: 40px; height: 40px; }
  .cat-text { align-items: center; }
  .cat-text b { font-size: 13px; line-height: 1.2; }
  .cat-text i { display: none; }
  .games-row { grid-auto-columns: calc((100% - 2 * 10px) / 3); gap: 10px; }
  .section-title { font-size: 18px; }
  .section { padding: 0 12px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .all-games { padding: 8px 12px; font-size: 13px; }
  .topbar-right span:first-child { display: none; }
}
