:root {
  --bg: #07080c;
  --header: #121419;
  --side: #14161c;
  --card: #1b1e27;
  --card-2: #242833;
  --line: rgba(255, 255, 255, 0.06);
  --orange: #ff8800;
  --orange-2: #ff9f1a;
  --text: #f2f2f2;
  --muted: #9aa0ab;
  --gold: #f6c453;
  --danger: #ff5a5a;
  --side-w: 228px;
  --header-h: 64px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans Bengali", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 420px at 78% 18%, rgba(255, 120, 0, 0.18), transparent 60%),
    radial-gradient(700px 500px at 20% 80%, rgba(120, 40, 0, 0.18), transparent 55%),
    url("https://www.cv999.bet/img/home-bg.ec8b2a6b.png") center top / cover no-repeat fixed,
    var(--bg);
}
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Global Form Input, Select & Textarea Styling (Dark Casino Theme) */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input:not([type]),
select,
textarea {
  width: 100%;
  height: 44px;
  background: #171922;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #f5f5f5;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
textarea {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  background: #1c202a;
  box-shadow: 0 0 0 3px rgba(255, 136, 0, 0.22);
}
input::placeholder,
textarea::placeholder {
  color: #727885;
}
select option {
  background: #14161f;
  color: #fff;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: var(--header-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 12px;
  background: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}
.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.header-left { flex-shrink: 0; }
.header-right { flex-shrink: 0; }
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
}
.logo { height: 48px; width: auto; display: block; }
.btn-login, .btn-register {
  min-width: 92px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}
.btn-login { background: #fcfcfc; color: #111; }
.btn-register { background: var(--orange); color: #1a1a1c; }

/* User Header Controls (Themed) */
.user-header-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

/* 1. Header Balance Wrap & Refresh */
.header-balance-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}
.header-balance-wrap .bal-currency {
  color: #ff9800;
  font-size: 15px;
  font-weight: 800;
}
.header-balance-wrap .bal-amount {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 15px;
}
.btn-balance-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #ff9800;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.4s ease, color 0.2s;
}
.btn-balance-refresh:hover {
  color: #ffa726;
  transform: rotate(90deg);
}
.btn-balance-refresh.rotating svg {
  animation: spinBalance 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes spinBalance {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 2. Header Deposit Button (Bright Orange Pill) */
.btn-header-deposit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 17px;
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #161922;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 0;
}
.btn-header-deposit:hover {
  color: #000;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 124, 0, 0.65);
}
.btn-header-deposit:active {
  transform: translateY(0);
}

/* Legacy balance chip fallback */
.user-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 6px;
  background: linear-gradient(135deg, #1f232f, #13151c);
  border: 1px solid rgba(255, 136, 0, 0.45);
  border-radius: 18px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.user-balance-chip:hover {
  text-decoration: none;
  border-color: var(--orange);
  box-shadow: 0 0 16px rgba(255, 136, 0, 0.45);
  transform: translateY(-1px);
}
.user-balance-chip .coin {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ff8800);
  color: #2a1500;
  font-size: 13.5px;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.user-balance-chip .bal-amt {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffc247;
  letter-spacing: 0.3px;
}
.user-balance-chip .add-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orange);
  color: #111;
  font-size: 13px;
  font-weight: 900;
  margin-left: 2px;
  transition: transform 0.25s ease;
}
.user-balance-chip:hover .add-icon {
  transform: rotate(90deg);
}

/* 2. User Avatar Button & Dropdown Container */
.user-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, #252936, #151720);
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.user-avatar-btn:hover,
.user-avatar-btn.active {
  border-color: var(--orange);
  box-shadow: 0 0 14px rgba(255, 136, 0, 0.45);
  color: var(--orange);
}
.user-avatar-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}

/* 3. Themed Dropdown Menu */
.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: linear-gradient(180deg, #181b24, #101218);
  border: 1px solid rgba(255, 136, 0, 0.35);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 8px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: fadeInDown 0.18s ease;
}
.user-menu[hidden] {
  display: none !important;
}
.user-menu-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}
.user-menu-username {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-tier {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  background: rgba(246, 196, 83, 0.12);
  border: 1px solid rgba(246, 196, 83, 0.25);
  padding: 1px 7px;
  border-radius: 10px;
}
.user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: #ddd;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.user-menu a svg {
  color: var(--orange);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.user-menu a:hover {
  text-decoration: none;
  background: rgba(255, 136, 0, 0.12);
  color: #fff;
}
.user-menu a:hover svg {
  transform: scale(1.15);
}
.user-menu a.logout-link {
  color: #ff6b6b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  padding-top: 10px;
}
.user-menu a.logout-link svg {
  color: #ff6b6b;
}
.user-menu a.logout-link:hover {
  background: rgba(255, 90, 90, 0.12);
  color: #ff8888;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--side-w);
  z-index: 30;
  overflow: auto;
  padding: 14px 12px 24px;
  background: linear-gradient(180deg, rgba(16, 17, 22, 0.96), rgba(10, 11, 14, 0.96));
  border-right: 1px solid var(--line);
}
.sidebar::-webkit-scrollbar { width: 0; }
body.nav-collapsed .sidebar { transform: translateX(-100%); }
body.nav-collapsed .main { margin-left: 0; }
.side-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 6px;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #b7b7b7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px 8px;
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.nav-item:hover {
  text-decoration: none;
  color: #f0f0f0;
}
.nav-item.wide { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 10px; padding-left: 18px; }
.nav-ico {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #e7b15a;
}
.nav-item.active { color: var(--orange); }
.nav-item.active .home-ico,
.nav-item.active .nav-ico {
  background: var(--orange);
  color: #1a1208;
  border-radius: 14px;
}
.nav-item.active.wide .nav-ico { background: transparent; color: var(--orange); }

.promo-banner {
  width: 100%;
  margin-top: 10px;
  height: 54px;
  border: 0;
  border-radius: 10px;
  color: #5a3b12;
  font-weight: 800;
  font-size: 14px;
  text-align: left;
  padding: 0 14px;
  display: flex;
  align-items: center;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}
.promo-banner:hover {
  text-decoration: none;
  opacity: 0.95;
}
.promo-banner.vip {
  background:
    linear-gradient(90deg, rgba(90, 50, 10, 0.15), rgba(255, 220, 140, 0.2)),
    linear-gradient(100deg, #f8e7b0, #e2b45a 45%, #fff1c4);
}
.promo-banner.invite {
  color: #6a4a16;
  background:
    linear-gradient(90deg, rgba(80, 40, 10, 0.12), transparent),
    linear-gradient(100deg, #f3d48a, #c9843a);
}
.contact-menu { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.contact-menu button, .contact-menu a {
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #2a2e38;
  color: #ffb24a;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}
.contact-menu a:hover, .contact-menu button:hover {
  text-decoration: none;
  background: #333844;
}

.main {
  margin-left: var(--side-w);
  padding: calc(var(--header-h) + 16px) 28px 40px;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.marquee {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f0d7a2;
  height: 28px;
  overflow: hidden;
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.speaker { color: var(--orange); flex: 0 0 auto; display: grid; }
.marquee-track { overflow: hidden; flex: 1; min-width: 0; }
.marquee-track p {
  margin: 0;
  white-space: nowrap;
  animation: tick 28s linear infinite;
  font-size: 13px;
}
@keyframes tick {
  from { transform: translateX(20%); }
  to { transform: translateX(-100%); }
}

.view {
  display: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.view.active { display: block; }

.hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  overflow: hidden;
  background: #1a120c;
  aspect-ratio: 1024 / 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 22px;
}
.hero-nav.prev { left: 10px; }
.hero-nav.next { right: 10px; }
.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.dots button {
  width: 18px;
  height: 4px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
  padding: 0;
}
.dots button.on { background: var(--orange); width: 26px; }

.block {
  margin-top: 22px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  gap: 8px;
}
.block-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.more {
  border: 0;
  background: transparent;
  color: #c9c9c9;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
.arrows { display: flex; gap: 8px; flex-shrink: 0; }
.arrows button, .row-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: #2c303a;
  color: #fff;
  flex-shrink: 0;
}

.scroller {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.scroller::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}

button.card,
a.card,
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 154px;
  width: 154px;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  box-sizing: border-box;
}
.grid .card { width: 100%; flex: none; }
.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
  flex-shrink: 0;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.card:hover .thumb img {
  transform: scale(1.05);
}
.thumb .badge,
.game-hero .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 2px 6px;
  z-index: 2;
  pointer-events: none;
}

/* Status Pills (Transactions, Support, Profile) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: capitalize;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-pill.status-pending,
.badge-pending {
  background: rgba(255, 136, 0, 0.16) !important;
  border: 1px solid rgba(255, 136, 0, 0.45) !important;
  color: #ffaa00 !important;
}
.status-pill.status-pending .status-dot {
  background: #ffaa00;
  box-shadow: 0 0 6px #ffaa00;
}
.status-pill.status-completed,
.badge-completed {
  background: rgba(46, 125, 50, 0.18) !important;
  border: 1px solid rgba(76, 175, 80, 0.45) !important;
  color: #4caf50 !important;
}
.status-pill.status-completed .status-dot {
  background: #4caf50;
  box-shadow: 0 0 6px #4caf50;
}
.status-pill.status-failed,
.badge-failed {
  background: rgba(239, 83, 80, 0.18) !important;
  border: 1px solid rgba(239, 83, 80, 0.45) !important;
  color: #ef5350 !important;
}
.status-pill.status-failed .status-dot {
  background: #ef5350;
  box-shadow: 0 0 6px #ef5350;
}
.heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  z-index: 2;
}
.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 3;
}
.card:hover .play, .card:focus-visible .play { opacity: 1; }
.meta {
  display: flex;
  flex-direction: column;
  padding: 8px 4px 4px;
  width: 100%;
  box-sizing: border-box;
}
.name {
  display: block;
  width: 100%;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: #f2f2f2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amt {
  display: block;
  width: 100%;
  color: var(--orange);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 20px;
}
.board {
  background: rgba(22, 24, 31, 0.94);
  border: 1px solid rgba(255, 166, 0, 0.28);
  border-radius: 18px;
  padding: 18px 20px;
  min-height: auto;
  height: auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.board-winners,
.board-jackpots {
  min-height: auto;
  height: auto;
}
.board h3 {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
}
.board-jackpots h3 {
  color: var(--gold);
}
.winner-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}
.winner {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(18, 20, 27, 0.85) 100%);
  border: 1px solid rgba(255, 136, 0, 0.2);
  border-radius: 14px;
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  box-sizing: border-box;
  transition: all 0.25s ease;
}
.winner:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 136, 0, 0.6);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 136, 0, 0.22);
  background: linear-gradient(180deg, rgba(255, 136, 0, 0.08) 0%, rgba(22, 25, 34, 0.95) 100%);
}
.winner .avatar {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  background: linear-gradient(135deg, #2b1b08, #14161f);
  border: 1.5px solid rgba(255, 200, 60, 0.45);
  color: #ffc83b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}
.winner .rank-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}
.winner .winner-name {
  font-size: 13px;
  font-weight: 600;
  color: #ddd;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.winner .win-amt {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.2px;
}
#jackpotGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}
#jackpotGrid .card {
  width: 100%;
  flex: none;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1100px) and (min-width: 641px) {
  .winner-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  #jackpotGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

.page-title {
  margin: 6px 0 16px;
  font-size: 26px;
}
.section-title {
  margin: 26px 0 14px;
  font-size: 20px;
}
.lead { color: var(--muted); margin-top: -8px; }

.promo-grid, .vip-grid, .match-list, .download-grid {
  display: grid;
  gap: 14px;
}
.promo-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.promo-card {
  border: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #15171d;
  color: inherit;
  text-align: left;
}
.promo-card img { height: 150px; width: 100%; object-fit: cover; display: block; }
.promo-card p { margin: 0; padding: 10px 12px 12px; font-weight: 600; }

.vip-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.vip-card {
  background: linear-gradient(180deg, #2a2418, #15171c);
  border: 1px solid rgba(246, 196, 83, 0.35);
  border-radius: 16px;
  padding: 16px;
}
.vip-card strong { display: block; color: var(--gold); font-size: 18px; }
.vip-card span { color: var(--muted); font-size: 13px; }

.panel {
  background: rgba(20, 22, 28, 0.9);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.invite-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.code {
  background: #111;
  border-radius: 10px;
  padding: 10px 14px;
  letter-spacing: 2px;
  font-weight: 800;
}
.copy, .store {
  border: 0;
  background: var(--orange);
  color: #1a1a1c;
  font-weight: 800;
  border-radius: 10px;
  height: 42px;
  padding: 0 16px;
}
.download-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.store { width: 100%; font-size: 16px; }
.store.ghost { background: #2c303a; color: #fff; }

.match {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 8px;
  align-items: center;
  background: rgba(20, 22, 28, 0.92);
  border-radius: 12px;
  padding: 12px;
}
.match.two { grid-template-columns: 1.4fr repeat(2, 1fr); }
.match b { font-weight: 700; }
.odd {
  border: 0;
  background: #2a2e38;
  color: #fff;
  border-radius: 8px;
  height: 42px;
}
.odd small { display: block; color: var(--muted); font-size: 11px; }
.odd em { font-style: normal; color: var(--orange); font-weight: 800; }

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}
.bubble {
  background: #242833;
  border-radius: 14px;
  padding: 12px 14px;
  max-width: 80%;
}
.bubble.me { margin-left: auto; background: #3a2a14; }
.chat-form { display: flex; gap: 8px; max-width: 640px; }
.chat-form input {
  flex: 1;
  background: #17191f;
  border: 1px solid #333;
  color: #fff;
  border-radius: 10px;
  height: 44px;
  padding: 0 12px;
}

.footer { margin-top: 36px; color: var(--muted); }
.providers { display: flex; flex-wrap: wrap; gap: 8px; }
.providers span {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}
.footer-copy { font-size: 12px; }

.float-tools {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.float-x, .to-top {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.float-x { background: #3a3a3a; font-size: 20px; }
.to-top {
  background: var(--orange);
  color: #1a1a1c;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.float-telegram {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0088cc, #00a2f3);
  border: 2px solid rgba(255, 180, 0, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 136, 204, 0.55), 0 0 10px rgba(255, 136, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.float-telegram:hover {
  text-decoration: none;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 136, 204, 0.75), 0 0 16px rgba(255, 136, 0, 0.5);
}
.float-telegram svg {
  width: 28px;
  height: 28px;
  display: block;
}
.float-telegram .live-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border: 2px solid #111;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
  animation: pulseGreen 1.8s infinite;
}
.float-telegram .tg-badge {
  position: absolute;
  bottom: -4px;
  background: linear-gradient(135deg, #ffd700, #ff8800);
  color: #1a1a1c;
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 8px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
@keyframes pulseGreen {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* Floating contact buttons (CS, Telegram, WhatsApp) */
.float-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.float-btn:hover {
  transform: scale(1.08);
  text-decoration: none;
}
.float-cs {
  background: linear-gradient(135deg, #222634, #161822);
  border: 2px solid #ff9800;
  color: #ff9800;
}
.float-cs:hover {
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.45);
  color: #ffa726;
}
.float-cs .live-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background: #22c55e;
  border: 2px solid #14161f;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  animation: pulseGreen 1.8s infinite;
}
.float-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  border: 2px solid rgba(255, 180, 0, 0.7);
  color: #fff;
}
.float-whatsapp:hover {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}
.float-whatsapp svg,
.float-cs svg {
  width: 26px;
  height: 26px;
  display: block;
}

/* Mobile Category Quick-Nav & Mobile Bottom Nav (Desktop Hidden Defaults) */
.mobile-cat-nav {
  display: none;
}
.mobile-bottom-nav {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}
.overlay-close {
  position: fixed;
  left: 28px;
  bottom: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #3a3a3a;
  color: #fff;
  font-size: 26px;
}
.announce {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}
.announce-list, .auth-modal {
  background: #2b2d31;
  border-radius: 18px;
  padding: 22px 18px 16px;
}
.announce-list h2 { margin: 0 0 16px; text-align: center; color: var(--orange); font-size: 28px; }
.announce-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.announce-list li button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #ddd;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}
.announce-list li.on button { color: var(--orange); }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #777;
  display: inline-block;
  margin-right: 8px;
}
li.on .dot { background: var(--orange); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; }
.pager button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--orange);
  color: #1a1a1c;
  font-size: 18px;
}
.announce-art {
  background: #2b2d31;
  border-radius: 18px;
  overflow: hidden;
  min-height: 360px;
}
.announce-hello {
  margin: 0;
  padding: 16px 16px 8px;
  color: var(--orange);
  font-weight: 800;
  font-size: 20px;
}
.announce-art img { width: 100%; height: 340px; object-fit: cover; display: block; }

.auth-modal { width: min(420px, 100%); position: relative; padding: 28px 26px 22px; }
.modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--orange);
  font-size: 22px;
}
.auth-tabs { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.tab {
  border: 0;
  background: var(--orange);
  color: #1a1a1c;
  font-weight: 800;
  border-radius: 8px;
  height: 34px;
  padding: 0 14px;
}
.tab.ghost { background: transparent; color: #cfcfcf; padding: 0; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input[type="text"],
.auth-form input[type="password"] {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #1a1c20;
  color: #fff;
  padding: 0 12px;
}
.pw-wrap { position: relative; }
.eye {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #aaa;
}
.auth-row, .check { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #ddd; font-size: 13px; }
.check.age { align-items: flex-start; justify-content: flex-start; }
.link { border: 0; background: transparent; color: var(--orange); font-size: 13px; padding: 0; }
.phone { display: flex; align-items: center; gap: 8px; }
.phone span {
  background: #1a1c20;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: #ddd;
}
.submit {
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: #1a1a1c;
  font-weight: 800;
  font-size: 16px;
}
.form-note { margin: 0; color: #ffd7a8; font-size: 13px; }
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #aaa;
  font-size: 13px;
}
.divider::before, .divider::after { content: ""; height: 1px; background: #555; flex: 1; }
.google { border: 0; background: transparent; align-self: center; }

/* =========================================================================
   Mobile & Responsive Styles
   ========================================================================= */

@media (max-width: 980px) {
  :root {
    --side-w: 0px;
  }
  .sidebar {
    width: 250px;
    max-width: 80vw;
    transform: translateX(-100%);
    transition: transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.7);
    z-index: 50;
    visibility: hidden;
    pointer-events: none;
  }
  body.nav-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  body.nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .main {
    margin-left: 0;
    padding-left: 14px;
    padding-right: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .announce, .match {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 54px;
  }
  .header {
    height: 54px;
    padding: 0 10px;
    gap: 6px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .header-left {
    gap: 6px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
  }
  .icon-btn#menuToggle {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .icon-btn#menuToggle svg {
    width: 20px;
    height: 20px;
  }
  .logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }
  .logo {
    height: 30px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
  }
  .header-right {
    gap: 6px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
  }
  .btn-login, .btn-register {
    min-width: unset;
    height: 32px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  /* Logged-in Header Controls on Mobile */
  .user-header-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
  }
  .user-balance-chip {
    height: 34px;
    padding: 0 10px 0 6px;
    gap: 6px;
    border-radius: 18px;
    font-size: 11.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  .user-balance-chip .coin {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .user-balance-chip .bal-amt {
    font-size: 12px;
    max-width: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .user-balance-chip .add-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
    margin-left: 1px;
  }
  .user-avatar-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .user-avatar-btn svg {
    width: 18px;
    height: 18px;
  }
  .user-menu {
    right: 0;
    width: 220px;
    max-width: calc(100vw - 20px);
  }
  .main {
    padding: calc(var(--header-h) + 8px) 8px 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .marquee {
    height: 26px;
    margin-bottom: 10px;
    padding: 0 8px;
    font-size: 11.5px;
  }
  .marquee-track p {
    font-size: 11.5px;
  }

  /* Banners on mobile - maintain full 1024x200 aspect ratio without cropping */
  .hero {
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
  }
  .hero-nav {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
  .hero-nav.prev { left: 4px; }
  .hero-nav.next { right: 4px; }
  .dots {
    bottom: 4px;
    gap: 3px;
  }
  .dots button {
    width: 8px;
    height: 3px;
  }
  .dots button.on {
    width: 14px;
  }

  /* Section headers */
  .block {
    margin-top: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .block-head {
    margin-bottom: 6px;
    width: 100%;
    gap: 6px;
  }
  .block-head h2 {
    font-size: 14px;
    gap: 4px;
  }
  .more {
    font-size: 11.5px;
  }
  .arrows button, .row-arrow {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  /* Game cards in scroller on mobile */
  .scroller {
    gap: 8px;
    padding-bottom: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  button.card,
  a.card,
  .card {
    flex: 0 0 108px;
    width: 108px;
    font-family: inherit;
    box-sizing: border-box;
  }
  .thumb {
    border-radius: 10px;
  }
  .thumb .badge,
  .game-hero .badge {
    top: 4px;
    left: 4px;
    font-size: 8.5px;
    padding: 1px 3px;
    border-radius: 3px;
  }
  .heart {
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .meta {
    padding: 5px 2px 2px;
  }
  .name {
    font-size: 11.5px;
    line-height: 1.35;
  }
  .amt {
    font-size: 10.5px;
    line-height: 1.3;
    margin-top: 2px;
  }

  /* Grid (Category pages, search, jackpot grid) on mobile */
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .grid .card {
    width: 100%;
    flex: none;
  }

  /* Boards (winners, jackpots) */
  .boards {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .board {
    border-radius: 14px !important;
    padding: 12px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    height: auto !important;
    align-self: stretch !important;
    overflow: hidden !important;
  }
  .board h3 {
    font-size: 13.5px !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  /* 1. Winners Section on Mobile */
  .board-winners {
    min-height: auto !important;
    height: auto !important;
  }
  .winner-row {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 2px 0 4px !important;
    margin: 0 !important;
  }
  .winner-row::-webkit-scrollbar {
    display: none !important;
  }
  .winner {
    flex: 0 0 calc((100% - 24px) / 4) !important;
    min-width: 62px !important;
    max-width: 76px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .winner .avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    margin: 0 auto 4px !important;
    background: linear-gradient(135deg, #322112, #171820) !important;
    border: 1px solid rgba(255, 136, 0, 0.45) !important;
    color: var(--gold) !important;
    display: grid !important;
    place-items: center !important;
    position: relative !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  }
  .winner .rank-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }
  .winner .winner-name,
  .winner div:nth-child(2) {
    font-size: 10.5px !important;
    color: #ccc !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
    width: 100% !important;
    display: block !important;
  }
  .winner .win-amt {
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #ffc247 !important;
    margin-top: 1px !important;
    white-space: nowrap !important;
  }

  /* 2. Jackpot Section on Mobile */
  .board-jackpots {
    min-height: auto !important;
    height: auto !important;
  }
  #jackpotGrid,
  .board #jackpotGrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #jackpotGrid .card,
  #jackpotGrid a.card,
  #jackpotGrid button.card,
  .board #jackpotGrid .card,
  .board #jackpotGrid a.card,
  .board #jackpotGrid button.card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #jackpotGrid .thumb,
  .board #jackpotGrid .thumb {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    display: block !important;
  }
  #jackpotGrid .thumb img,
  .board #jackpotGrid .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  #jackpotGrid .meta,
  .board #jackpotGrid .meta {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 5px 2px 2px !important;
    overflow: hidden !important;
  }
  #jackpotGrid .name,
  .board #jackpotGrid .name {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    width: 100% !important;
  }
  #jackpotGrid .amt,
  .board #jackpotGrid .amt {
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    margin-top: 2px !important;
    color: var(--orange) !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    width: 100% !important;
  }

  /* Floating tools on mobile */
  .float-tools {
    right: 8px;
    left: auto;
    bottom: 10px;
    gap: 4px;
    z-index: 35;
  }
  .float-x, .to-top {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .float-telegram {
    width: 42px;
    height: 42px;
  }
  .float-telegram svg {
    width: 22px;
    height: 22px;
  }
  .float-telegram .live-dot {
    width: 10px;
    height: 10px;
  }
  .float-telegram .tg-badge {
    font-size: 7.5px;
    padding: 0 3px;
    bottom: -3px;
  }

  /* Modals on mobile */
  .overlay {
    padding: 10px;
  }
  .auth-modal {
    padding: 20px 14px 16px;
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
  }
  .announce-art {
    display: none;
  }
  .announce {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }
  .announce-list h2 {
    font-size: 18px;
  }

  /* Match list on mobile */
  .match {
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  .match.two {
    grid-template-columns: 1fr;
  }

  /* Other pages on mobile */
  .promo-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }
  .vip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }
  .download-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }
  .panel {
    padding: 12px;
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .table-wrap,
  div[style*="overflow-x:auto"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 520px) {
  .user-balance-chip .bal-amt {
    max-width: 70px;
  }
}

@media (max-width: 380px) {
  :root {
    --header-h: 50px;
  }
  .header {
    height: 50px;
    padding: 0 6px;
    gap: 4px;
  }
  .header-left {
    gap: 4px;
  }
  .icon-btn#menuToggle {
    width: 30px;
    height: 30px;
  }
  .icon-btn#menuToggle svg {
    width: 18px;
    height: 18px;
  }
  .logo {
    height: 26px;
    max-width: 58px;
  }
  .header-right {
    gap: 4px;
  }
  .user-header-controls {
    gap: 4px;
  }
  .user-balance-chip {
    height: 30px;
    padding: 0 6px 0 5px;
    gap: 4px;
  }
  .user-balance-chip .coin {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .user-balance-chip .bal-amt {
    font-size: 11px;
    max-width: 65px;
  }
  .user-balance-chip .add-icon {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }
  .user-avatar-btn {
    width: 30px;
    height: 30px;
  }
  .user-avatar-btn svg {
    width: 15px;
    height: 15px;
  }
  .btn-login, .btn-register {
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
    border-radius: 5px;
  }
  .main {
    padding: calc(var(--header-h) + 6px) 6px 24px;
  }
  .board {
    padding: 10px 8px !important;
    border-radius: 12px !important;
  }
  .winner-row {
    gap: 6px !important;
  }
  .winner {
    flex: 0 0 calc((100% - 18px) / 4) !important;
    min-width: 58px !important;
  }
  .winner .avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 10px !important;
    border-radius: 8px !important;
  }
  .winner .winner-name,
  .winner div:nth-child(2) {
    font-size: 9.5px !important;
  }
  .winner .win-amt {
    font-size: 9.5px !important;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  #jackpotGrid,
  .board #jackpotGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .scroller .card,
  .scroller a.card,
  .scroller button.card {
    flex: 0 0 96px;
    width: 96px;
  }
  .grid .card,
  .grid a.card,
  .grid button.card,
  #jackpotGrid .card,
  #jackpotGrid a.card,
  #jackpotGrid button.card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  .vip-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 325px) {
  :root {
    --header-h: 46px;
  }
  .header {
    height: 46px;
    padding: 0 4px;
    gap: 3px;
  }
  .icon-btn#menuToggle {
    width: 26px;
    height: 26px;
  }
  .logo {
    height: 22px;
    max-width: 48px;
  }
  .header-right {
    gap: 3px;
  }
  .user-balance-chip {
    height: 28px;
    padding: 0 5px 0 4px;
    gap: 3px;
  }
  .user-balance-chip .bal-amt {
    max-width: 55px;
    font-size: 10px;
  }
  .user-avatar-btn {
    width: 28px;
    height: 28px;
  }
  .btn-login, .btn-register {
    height: 28px;
    padding: 0 5px;
    font-size: 10px;
  }
  .board {
    padding: 8px 6px !important;
  }
  .winner-row {
    gap: 4px !important;
  }
  .winner {
    flex: 0 0 calc((100% - 12px) / 4) !important;
    min-width: 52px !important;
  }
  .winner .avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 9px !important;
  }
  #jackpotGrid,
  .board #jackpotGrid {
    gap: 5px !important;
  }
  .scroller .card,
  .scroller a.card,
  .scroller button.card {
    flex: 0 0 88px;
    width: 88px;
  }
  .grid .card,
  .grid a.card,
  .grid button.card,
  #jackpotGrid .card,
  #jackpotGrid a.card,
  #jackpotGrid button.card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
}

/* =========================================================================
   Mobile View Enhancements (Screens <= 992px)
   Matching Official CV999 App / Mobile Layout
   ========================================================================= */
@media (max-width: 992px) {
  body {
    padding-bottom: 74px !important;
  }

  /* -----------------------------------------------------------------------
   * 1. Top Mobile Header Controls
   * --------------------------------------------------------------------- */
  .header-balance-wrap {
    gap: 4px;
    font-size: 14px;
  }
  .header-balance-wrap .bal-currency {
    font-size: 14px;
  }
  .header-balance-wrap .bal-amount {
    font-size: 14px;
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .btn-header-deposit {
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: 16px;
    letter-spacing: 0.2px;
  }
  .user-avatar-btn {
    width: 32px;
    height: 32px;
  }

  /* -----------------------------------------------------------------------
   * 2. Horizontal Category Quick-Nav (Red Box 2)
   * --------------------------------------------------------------------- */
  .mobile-cat-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 12px 0 16px 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
  }
  .cat-nav-btn {
    width: 22px;
    height: 58px;
    background: #171a25;
    border: 1px solid rgba(255, 152, 0, 0.25);
    border-radius: 6px;
    color: #ff9800;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    z-index: 2;
  }
  .cat-nav-btn:hover {
    background: #222634;
    color: #ffb74d;
  }
  .cat-nav-btn:active {
    transform: scale(0.94);
  }
  .cat-nav-scroller {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    padding: 2px 0;
  }
  .cat-nav-scroller::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  .cat-chip {
    flex: 0 0 68px;
    min-width: 68px;
    height: 60px;
    background: #1a1d29;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #9299a8;
    box-sizing: border-box;
    padding: 6px 4px;
    transition: all 0.2s ease;
    user-select: none;
  }
  .cat-chip:hover {
    text-decoration: none;
    background: #222636;
    color: #ff9800;
    border-color: rgba(255, 152, 0, 0.4);
  }
  .cat-chip.active {
    background: linear-gradient(180deg, #24293a 0%, #171a25 100%);
    border-color: #ff9800;
    color: #ff9800;
    box-shadow: 0 2px 10px rgba(255, 152, 0, 0.28);
  }
  .cat-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #ff9800;
    transition: transform 0.2s;
  }
  .cat-chip-icon svg {
    width: 22px;
    height: 22px;
    display: block;
  }
  .cat-chip.active .cat-chip-icon {
    transform: scale(1.08);
  }
  .cat-chip-title {
    font-size: 11px;
    font-weight: 600;
    color: #c4c8d4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.1;
    text-align: center;
  }
  .cat-chip.active .cat-chip-title {
    color: #ff9800;
    font-weight: 700;
  }

  /* -----------------------------------------------------------------------
   * 3. Fixed Mobile Bottom Navigation Bar (Red Box 3)
   * --------------------------------------------------------------------- */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 58px;
    background: #14161f;
    border-top: 1px solid rgba(255, 152, 0, 0.3);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 999;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.7);
    padding: 0 4px;
    box-sizing: border-box;
  }
  .mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #9aa1b2;
    background: transparent;
    border: 0;
    padding: 4px 2px 6px;
    margin: 0;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
    min-width: 0;
    position: relative;
  }
  .mob-nav-item:hover {
    text-decoration: none;
    color: #ff9800;
  }
  .mob-nav-item.active {
    color: #ff9800;
  }
  .mob-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
  }
  .mob-nav-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    color: inherit;
  }
  .mob-nav-label {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    text-align: center;
  }
  .mob-nav-item.active .mob-nav-label {
    color: #ff9800;
    font-weight: 700;
  }

  /* Center Elevated Glowing Disc (আমন্ত্রণ) */
  .mob-nav-center {
    position: relative;
    overflow: visible;
  }
  .mob-nav-center .center-disc {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb300 0%, #f57c00 100%);
    border: 3.5px solid #14161f;
    box-shadow: 0 4px 16px rgba(245, 124, 0, 0.65), 0 0 10px rgba(255, 179, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1c;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 2;
  }
  .mob-nav-center:hover .center-disc,
  .mob-nav-center:active .center-disc {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 6px 22px rgba(245, 124, 0, 0.85);
  }
  .mob-nav-center .center-disc svg {
    width: 26px;
    height: 26px;
  }
  .mob-nav-center .mob-nav-label {
    margin-top: 28px;
    color: #ff9800;
    font-weight: 700;
  }

  /* -----------------------------------------------------------------------
   * 4. Floating Tools on Mobile (Above Bottom Bar)
   * --------------------------------------------------------------------- */
  .float-tools {
    bottom: 74px !important;
    right: 12px !important;
    gap: 6px !important;
    z-index: 998 !important;
  }
  .float-btn, .float-telegram {
    width: 44px !important;
    height: 44px !important;
  }
  .float-btn svg, .float-telegram svg {
    width: 22px !important;
    height: 22px !important;
  }
}

@media (max-width: 640px) {
  .header-balance-wrap {
    gap: 3px;
    font-size: 13px;
  }
  .header-balance-wrap .bal-currency {
    font-size: 13px;
  }
  .header-balance-wrap .bal-amount {
    font-size: 13px;
    max-width: 72px;
  }
  .btn-header-deposit {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 15px;
  }
  .user-avatar-btn {
    width: 30px;
    height: 30px;
  }
  .user-avatar-btn svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 380px) {
  .header-balance-wrap {
    gap: 2px;
    font-size: 11.5px;
  }
  .header-balance-wrap .bal-currency {
    font-size: 11.5px;
  }
  .header-balance-wrap .bal-amount {
    font-size: 11.5px;
    max-width: 55px;
  }
  .btn-header-deposit {
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
    border-radius: 14px;
  }
  .user-avatar-btn {
    width: 28px;
    height: 28px;
  }
  .user-avatar-btn svg {
    width: 15px;
    height: 15px;
  }
  .cat-chip {
    flex: 0 0 62px;
    min-width: 62px;
    height: 56px;
  }
  .cat-chip-icon svg {
    width: 20px;
    height: 20px;
  }
  .cat-chip-title {
    font-size: 10px;
  }
  .mob-nav-label {
    font-size: 9.5px;
  }
}
