/* ===== Variables (BC.GAME 实测值) ===== */
:root {
  --bg-primary: #232626;
  --bg-secondary: #292d2e;
  --bg-card: #323738;
  --bg-hover: #3a3e3f;
  --bg-input: #2a2e2f;
  --accent-green: #24ee89;
  --accent-green-hover: #1fd67a;
  --accent-green-dim: rgba(36, 238, 137, 0.12);
  --accent-blue: #3c52ff;
  --text-primary: #ffffff;
  --text-secondary: #b3b8c1;
  --text-muted: #6b7280;
  --border-color: #3a3e3f;
  --sidebar-width: 304px;
  --sidebar-collapsed: 72px;
  --header-height: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --font: 'Averta Std', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --game-card-w: 156px;
  --game-card-h: 208px;
}

html[data-theme="light"] {
  --bg-primary: #f0f2f2;
  --bg-secondary: #ffffff;
  --bg-card: #f3f4f4;
  --bg-hover: #e8eaea;
  --bg-input: #f0f2f2;
  --text-primary: #171a1a;
  --text-secondary: #5c6363;
  --text-muted: #8b9393;
  --border-color: #e0e3e3;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
img { display: block; max-width: 100%; }
input { font-family: inherit; }

/* ===== Sprite Icons ===== */
.icon-sprite {
  display: inline-block;
  flex-shrink: 0;
  background-repeat: no-repeat;
}
.icon-color {
  background-image: url('../assets/sprites/coloricon.png');
  background-size: 301px 256px;
  width: 32px;
  height: 32px;
}
.icon-menu {
  background-image: url('../assets/sprites/menuicon.png');
  background-size: 352px auto;
  width: 32px;
  height: 32px;
}

.icon-casino { background-position: -32px -96px; }
.icon-sports { background-position: -32px -224px; }
.icon-predict { background-position: -32px -32px; }
.icon-lottery { background-position: -160px -128px; }
.icon-trading { background-position: -160px -224px; }
.icon-promo { background-position: -160px -160px; }
.icon-vip { background-position: 0 -320px; }
.icon-affiliate { background-position: 0 -32px; }
.icon-forum { background-position: -96px -192px; }
.icon-fair { background-position: -192px -96px; }
.icon-account { background-position: 0 0; }
.icon-blog { background-position: 0 -128px; }
.icon-sponsor { background-position: -160px -288px; }
.icon-lang { background-position: -64px -256px; }
.icon-theme { background-position: -128px -256px; }
.icon-help { background-position: -192px -256px; }

/* ===== Layout ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  z-index: 200;
  transition: width var(--transition);
  overflow: hidden;
  border-right: 1px solid var(--border-color);
}
.sidebar-inner {
  display: flex; flex-direction: column;
  height: 100vh; padding: 14px 12px;
  width: var(--sidebar-width);
  overflow: hidden;
}
.sidebar-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  margin-right: -6px; padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.sidebar-top {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 14px; min-height: 32px;
}
.logo-img { height: 28px; width: auto; }
.logo-mini { display: none; height: 32px; }
.sidebar-toggle {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); border-radius: 6px;
  transition: all var(--transition);
}
.sidebar-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-close { display: none; padding: 4px; color: var(--text-secondary); }

.sidebar-promos { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sidebar-promo-card {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 10px 12px; background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition);
  overflow: hidden; min-height: 58px;
}
.sidebar-promo-app { padding-right: 0; }
.promo-card-icon { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; object-fit: contain; }
.promo-card-thumb {
  width: 52px; height: 52px; flex-shrink: 0;
  object-fit: contain; object-position: right center;
  margin-left: auto; align-self: flex-end;
}
.promo-card-body { min-width: 0; flex: 1; }
.promo-card-title-row { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.promo-card-title { font-size: 13px; font-weight: 600; white-space: nowrap; }
.promo-card-desc { font-size: 11px; color: var(--accent-green); font-weight: 600; line-height: 1.3; }
.badge-hot {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 700; line-height: 1.4;
  color: #1a1d1d; background: linear-gradient(135deg, #ffe566, #f5d110);
  flex-shrink: 0;
}
.badge-hot-inline {
  margin-left: auto; flex-shrink: 0;
  font-size: 9px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px;
  color: #1a1d1d;
  background: linear-gradient(135deg, #ffe566, #f5d110);
  line-height: 1.3;
}
.promo-fifa .promo-card-desc { color: #ffd54f; }

.token-widget {
  padding: 10px; background: var(--bg-card);
  border-radius: var(--radius-sm); margin-bottom: 12px;
  overflow: hidden;
}
.token-label { font-size: 11px; color: var(--text-muted); }
.token-price { font-size: 14px; font-weight: 600; }
.token-change { font-size: 12px; }
.token-change.down { color: #ef5350; }
.token-change.up { color: var(--accent-green); }

.sidebar-nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative; white-space: nowrap;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active,
.nav-parent.active {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}
.nav-parent.active .icon-color { filter: none; }
.nav-parent {
  width: 100%; text-align: left;
  border: none; background: none; font-family: inherit;
  cursor: pointer;
}
.nav-chevron {
  margin-left: auto; flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.nav-parent[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-submenu {
  overflow: hidden; max-height: 0;
  transition: max-height var(--transition);
}
.nav-submenu.open { max-height: 720px; }
.nav-submenu-casino { padding: 2px 0 6px; }
.nav-submenu-casino.open { max-height: 960px; }
.nav-subitem {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 10px;
  font-size: 13px; font-weight: 500;
  color: #98a7b5;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  border: none; background: none; width: 100%;
  font-family: inherit; cursor: pointer; text-align: left;
}
.nav-subitem:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-subitem.active { color: var(--accent-green); font-weight: 600; }
.nav-sub-label { flex: 1; min-width: 0; }
.nav-sub-label-only { flex: 1; padding-left: 40px; }
.icon-sub.icon-color { width: 32px; height: 32px; }
.icon-sub-originals { background-position: 0 -64px; }
.icon-sub-exclusive { background-position: -32px -128px; }
.icon-sub-hot { background-position: -64px -160px; }
.icon-sub-slots { background-position: -96px -64px; }
.icon-sub-spin { background-position: -128px -96px; }
.icon-sub-live { background-position: -160px -64px; }
.icon-sub-gameshow { background-position: -32px -192px; }
.icon-sub-new { background-position: -64px -192px; }
.icon-sub-bingo { background-position: -96px -192px; }
.icon-sub-table { background-position: -128px -192px; }
.icon-sub-providers { background-position: -160px -192px; }
.icon-sub-soccer { background-position: -32px -224px; }
.icon-sub-basketball { background-position: -64px -224px; }
.icon-sub-tennis { background-position: -96px -224px; }
.icon-sub-esports { background-position: -128px -224px; }
.icon-sub-cricket { background-position: -160px -224px; }
.icon-sub-nfl { background-position: -192px -224px; }
.nav-sub-chevron {
  margin-left: auto; flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.nav-sub-parent[aria-expanded="true"] .nav-sub-chevron { transform: rotate(90deg); }
.nav-subgroup { margin: 0; }
.nav-subsubmenu {
  display: none;
  overflow: hidden;
  padding: 2px 0 4px 0;
}
.nav-subsubmenu.open { display: block; }
.nav-subsubitem {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 42px;
  font-size: 12px; font-weight: 500;
  color: #8b949e;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
}
.nav-subsubitem:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-subsubitem.active { color: var(--accent-green); font-weight: 600; }
.nav-sub-game-icon {
  width: 22px; height: 22px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0;
}
.nav-sub-game-icon-all {
  background: var(--accent-green-dim);
  border: 1px solid rgba(36,238,137,0.3);
}
.sidebar-token-card { position: relative; }
.sidebar-token-card .promo-card-body { margin-right: 4px; }
.sidebar-token-card .token-inline-price { margin-left: auto; white-space: nowrap; }
.promo-token-icon { border-radius: 50%; }
.token-inline-price { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-left: auto; }
.promo-card-arrow { flex-shrink: 0; color: var(--text-muted); margin-left: 4px; }
.sidebar-promo-card .promo-card-title-row { width: 100%; }
.nav-external .nav-label { flex: 1; }
.nav-external-icon { flex-shrink: 0; color: var(--text-muted); opacity: 0.7; }
.nav-label { transition: opacity var(--transition); flex: 1; min-width: 0; }

.sidebar-divider { height: 1px; background: var(--border-color); margin: 10px 0; }
.sidebar-bottom { flex-shrink: 0; padding-top: 12px; border-top: 1px solid var(--border-color); margin-top: 8px; }

.sidebar-games {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
  padding-bottom: 4px;
}
.sidebar-game {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition);
  text-align: center;
}
.sidebar-game:hover { background: var(--bg-hover); }
.sidebar-game img {
  width: 40px; height: 40px; border-radius: 8px;
  object-fit: cover;
}
.sidebar-game span {
  font-size: 9px; line-height: 1.2;
  color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  max-width: 100%;
}

.live-support {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--bg-card);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  margin-bottom: 8px; transition: background var(--transition);
  overflow: hidden;
}
.live-support:hover { background: var(--bg-hover); }

.sidebar-footer {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
}
.lang-picker { position: relative; flex: 1; width: 100%; }
.lang-picker-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: background var(--transition);
}
.lang-picker-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.lang-picker-btn .icon-sprite { width: 20px; height: 20px; }
.lang-picker-label { flex: 1; text-align: left; white-space: nowrap; }
.lang-chevron { flex-shrink: 0; color: var(--text-muted); transition: transform var(--transition); }
.lang-picker.open .lang-chevron { transform: rotate(180deg); }
.lang-dropdown {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 4px;
  box-shadow: var(--shadow); z-index: 50;
}
.lang-picker.open .lang-dropdown { display: block; }
.lang-option {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px; color: var(--text-secondary);
  transition: background var(--transition);
}
.lang-option:hover { background: var(--bg-hover); color: var(--text-primary); }
.lang-option.active { color: var(--accent-green); font-weight: 600; }

.theme-switcher {
  position: relative;
  display: flex; width: 100%; height: 36px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.theme-opt {
  flex: 1; z-index: 1;
  font-size: 12px; font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color var(--transition), font-weight var(--transition);
}
.theme-opt.active {
  color: var(--text-primary);
  font-weight: 600;
}
.theme-switcher::before {
  content: '';
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px);
  background: var(--bg-hover);
  border-radius: 6px;
  transition: transform var(--transition);
}
html[data-theme="light"] .theme-switcher::before {
  transform: translateX(100%);
}

/* Collapsed sidebar */
.app.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed); }
.app.sidebar-collapsed .sidebar-inner { width: var(--sidebar-collapsed); padding: 14px 8px; }
.app.sidebar-collapsed .logo-full { display: none; }
.app.sidebar-collapsed .logo-mini { display: block; margin: 0 auto; }
.app.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.app.sidebar-collapsed .promo-card-body,
.app.sidebar-collapsed .token-widget,
.app.sidebar-collapsed .nav-label,
.app.sidebar-collapsed .nav-chevron,
.app.sidebar-collapsed .nav-submenu,
.app.sidebar-collapsed .nav-external-icon,
.app.sidebar-collapsed .live-support .nav-label,
.app.sidebar-collapsed .sidebar-divider,
.app.sidebar-collapsed .sidebar-games,
.app.sidebar-collapsed .sidebar-footer,
.app.sidebar-collapsed .theme-switcher { display: none; }
.app.sidebar-collapsed .badge-hot { display: none; }
.app.sidebar-collapsed .sidebar-promo-card { justify-content: center; padding: 8px; }
.app.sidebar-collapsed .promo-card-icon { width: 32px; height: 32px; }
.app.sidebar-collapsed .nav-item,
.app.sidebar-collapsed .nav-parent { justify-content: center; padding: 8px; }
.app.sidebar-collapsed .nav-subitem { display: none; }
.app.sidebar-collapsed .live-support { justify-content: center; padding: 10px 8px; }
.app.sidebar-collapsed .logo-link { display: flex; justify-content: center; width: 100%; }
.app.sidebar-collapsed .sidebar-top { flex-direction: column; gap: 8px; }
.app.sidebar-collapsed .sidebar-toggle { margin: 0 auto; }
.app.sidebar-collapsed .main-wrapper { margin-left: var(--sidebar-collapsed); }

.app.sidebar-collapsed .nav-item[data-tooltip]:hover::after,
.app.sidebar-collapsed .nav-parent[data-tooltip]:hover::after,
.app.sidebar-collapsed .sidebar-promo-card[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; left: calc(100% + 8px); top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card); color: var(--text-primary);
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; white-space: nowrap;
  box-shadow: var(--shadow); z-index: 300;
  pointer-events: none;
}

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 150;
}

.main-wrapper {
  flex: 1; margin-left: var(--sidebar-width);
  display: flex; flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  height: var(--header-height);
  padding: 0 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}
.hamburger { display: none; padding: 4px; }
.header-logo img { height: 24px; display: none; }

.header-search { flex: 1; max-width: 420px; position: relative; }
.search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-muted);
}
.search-input {
  width: 100%; padding: 10px 14px 10px 40px;
  background: var(--bg-input); border: 1px solid transparent;
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 14px; outline: none; transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--accent-green); }
.search-input::placeholder { color: var(--text-muted); }

.header-actions {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}

.wallet-display {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: var(--bg-card);
  border-radius: var(--radius-sm); font-size: 13px;
  transition: background var(--transition);
}
.wallet-display:hover { background: var(--bg-hover); }
.wallet-coin-icon { width: 18px; height: 18px; }
.wallet-balance { font-weight: 600; font-variant-numeric: tabular-nums; }
.wallet-coin { color: var(--accent-green); font-weight: 600; font-size: 12px; }
.wallet-arrow { color: var(--text-muted); }

.btn {
  padding: 9px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; transition: all var(--transition);
}
.btn-primary { background: var(--accent-green); color: #000; }
.btn-primary:hover { background: var(--accent-green-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-sm { padding: 6px 16px; font-size: 13px; }

.btn-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.btn-icon:hover { background: var(--bg-hover); }
.lang-icon { width: 22px; height: 22px; object-fit: contain; }

/* ===== Content ===== */
.content {
  flex: 1; padding: 16px 24px 40px;
  width: 100%;
}
.section { margin-bottom: 24px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 10px;
}
.section-title-group { display: flex; align-items: center; gap: 8px; }
.section-title {
  font-size: 16px; font-weight: 800;
  letter-spacing: 0.02em;
}

.live-dot {
  width: 8px; height: 8px; background: var(--accent-green);
  border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(36,238,137,0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(36,238,137,0); }
}

.link-all {
  font-size: 13px; color: var(--text-secondary);
  padding: 5px 14px; background: var(--bg-card);
  border-radius: var(--radius-sm); transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 4px;
}
.link-all-count {
  color: var(--text-muted); font-weight: 500; font-size: 12px;
}
.link-all:hover { color: var(--accent-green); background: var(--bg-hover); }
.link-all:hover .link-all-count { color: var(--accent-green); }

/* Tabs */
.tabs { display: flex; gap: 2px; }
.tab {
  padding: 6px 14px; font-size: 13px;
  color: var(--text-muted); position: relative;
  transition: color var(--transition);
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--text-primary); font-weight: 600; }
.tab.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 2px; background: var(--accent-green); border-radius: 1px;
}

/* ===== Banner Stack ===== */
.banner-stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.banner-hero {
  position: relative; height: 220px;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #1a1d20, #2a2d33);
}
.banner-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.banner-hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; text-align: center;
}
.banner-hero-logo { height: 36px; margin-bottom: 10px; }
.banner-hero-title {
  font-size: 26px; font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.banner-hero-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.banner-hero-alt {
  font-size: 12px; color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
}
.banner-hero-social { display: flex; align-items: center; gap: 12px; }
.banner-social {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform var(--transition);
}
.banner-social:hover { transform: scale(1.1); }
.banner-social img { width: 22px; height: 22px; }

.banner-fifa {
  position: relative; height: 110px;
  border-radius: var(--radius); overflow: hidden;
  background: var(--accent-blue);
  display: flex; align-items: center;
  padding: 0 20px; cursor: pointer;
}
.banner-fifa-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-fifa-cup { position: relative; z-index: 2; height: 80px; margin-right: 16px; flex-shrink: 0; }
.banner-fifa-text { position: relative; z-index: 2; flex: 1; }
.banner-fifa-title { font-size: 20px; font-weight: 800; margin-bottom: 2px; }
.banner-fifa-sub { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; opacity: 0.9; }
.banner-fifa-car { position: relative; z-index: 2; height: 90px; margin: 0 16px; flex-shrink: 0; }
.banner-fifa .btn-primary { position: relative; z-index: 2; flex-shrink: 0; }

/* ===== Big Wins ===== */
.big-wins-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.big-wins-track {
  display: flex; gap: 8px;
  width: max-content;
  animation: bigWinsMarquee 55s linear infinite;
  padding-bottom: 6px;
}
.big-wins-marquee:hover .big-wins-track { animation-play-state: paused; }
@keyframes bigWinsMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.big-wins-scroll {
  display: flex; gap: 8px;
  overflow-x: auto; padding-bottom: 6px;
  scroll-behavior: smooth;
  -ms-overflow-style: none; scrollbar-width: none;
}
.big-wins-scroll::-webkit-scrollbar { display: none; }

.big-win-card {
  flex-shrink: 0; width: 80px;
  text-align: center; cursor: pointer;
  transition: transform var(--transition);
}
.big-win-card:hover { transform: translateY(-3px); }
.big-win-img-wrap {
  position: relative; width: 80px; height: 106px;
  border-radius: var(--radius-sm); overflow: hidden;
  margin-bottom: 6px; background: var(--bg-card);
}
.big-win-img { width: 100%; height: 100%; object-fit: cover; }
.big-win-player {
  font-size: 10px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.big-win-player.is-hidden { color: var(--text-muted); font-style: italic; opacity: 0.7; }
.big-win-amount {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--accent-green);
}
.big-win-coin { font-size: 10px; font-weight: 600; color: var(--text-secondary); }

/* ===== Category Cards ===== */
.category-main { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.category-sub { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.category-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-color);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(36,238,137,0.25);
}
.category-card.large {
  display: flex; align-items: center;
  min-height: 150px; padding: 22px;
}
.category-info { flex: 1; z-index: 2; }
.category-title {
  font-size: 22px; font-weight: 800;
  margin-bottom: 6px; letter-spacing: 0.03em;
}
.category-desc {
  font-size: 13px; color: var(--text-secondary);
  max-width: 210px; line-height: 1.4;
}
.category-img {
  position: absolute; right: 0; bottom: 0;
  height: 130px; pointer-events: none;
}
.category-card.small { min-height: 96px; padding: 14px; }
.category-title-sm { font-size: 16px; font-weight: 800; z-index: 2; letter-spacing: 0.02em; }
.category-img-sm {
  position: absolute; right: -4px; bottom: -4px;
  height: 64px; pointer-events: none;
}

/* ===== Game Sections ===== */
.game-section { margin-bottom: 22px; }
.game-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.game-section-title { font-size: 16px; font-weight: 800; }
.game-section-controls { display: flex; align-items: center; gap: 8px; }

.scroll-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border-radius: 50%;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}
.scroll-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.scroll-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.game-scroll {
  display: flex; gap: 10px;
  overflow-x: auto; scroll-behavior: smooth;
  padding-bottom: 4px; cursor: grab;
  -ms-overflow-style: none; scrollbar-width: none;
}
.game-scroll::-webkit-scrollbar { display: none; }
.game-scroll.dragging { cursor: grabbing; user-select: none; }

.game-card {
  flex-shrink: 0; width: var(--game-card-w);
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-card);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.game-card:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px rgba(36,238,137,0.3);
}
.game-card img {
  width: var(--game-card-w); height: var(--game-card-h);
  object-fit: cover;
}
.game-card-name {
  padding: 6px 8px; font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* BC Originals specialty cards */
.game-scroll-originals { gap: 8px; }
.original-card {
  flex-shrink: 0;
  width: 108px; height: 132px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  padding: 10px 8px 8px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative; overflow: hidden;
}
.original-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.original-card:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.original-card-img {
  width: 52px; height: 52px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 6px;
  position: relative; z-index: 1;
}
.original-card-name {
  font-size: 11px; font-weight: 700;
  text-align: center; line-height: 1.25;
  margin-bottom: auto;
  position: relative; z-index: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.original-card-online {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.9);
  position: relative; z-index: 1;
  margin-top: 6px;
}
.online-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  flex-shrink: 0;
}

/* ===== Bets Table ===== */
.bets-table-wrap {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border-color);
  max-height: 420px; overflow-y: auto;
  scroll-behavior: smooth;
}
.bets-table-wrap::-webkit-scrollbar { width: 4px; }
.bets-table-wrap::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.bets-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bets-table th {
  text-align: left; padding: 11px 16px;
  color: var(--text-muted); font-weight: 500; font-size: 12px;
  background: var(--bg-card); border-bottom: 1px solid var(--border-color);
}
.bets-table td {
  padding: 9px 16px;
  border-bottom: 1px solid rgba(58,62,63,0.6);
  font-variant-numeric: tabular-nums;
}
.bets-table tr:last-child td { border-bottom: none; }
.bets-table tr:hover td { background: var(--bg-hover); }

.game-cell-inner {
  display: flex; align-items: center; gap: 8px; font-weight: 500;
}
.game-cell-inner img {
  width: 28px; height: 36px;
  border-radius: 4px; object-fit: cover;
}
.bet-coin-cell {
  display: flex; align-items: center; gap: 4px;
}
.bet-coin-cell img { width: 14px; height: 14px; }
.bet-coin-cell .fiat-icon { width: 18px; height: 12px; object-fit: contain; border-radius: 2px; }
.bet-coin-cell .fiat-symbol { font-size: 11px; font-weight: 700; color: var(--text-secondary); min-width: 14px; }
.profit-win { color: var(--accent-green); font-weight: 600; }
.profit-loss { color: #ef5350; font-weight: 600; }
.player-cell { color: var(--text-secondary); }
.bet-row-new { animation: fadeIn 0.4s ease; }
@keyframes fadeIn {
  from { opacity: 0; background: rgba(36,238,137,0.08); }
  to { opacity: 1; background: transparent; }
}

/* ===== Lottery ===== */
.lottery-grid {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 4px;
  scroll-behavior: smooth;
  -ms-overflow-style: none; scrollbar-width: none;
}
.lottery-grid::-webkit-scrollbar { display: none; }
.lottery-card {
  flex-shrink: 0; min-width: 340px;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.lottery-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 160px; }
.lottery-icon { width: 48px; height: 48px; object-fit: contain; }
.lottery-name { font-size: 15px; font-weight: 700; }
.lottery-prize { font-size: 13px; color: var(--accent-green); font-weight: 600; }
.lottery-countdown { display: flex; align-items: center; gap: 3px; }
.countdown-item { text-align: center; }
.countdown-val {
  display: block; font-size: 22px; font-weight: 800;
  font-variant-numeric: tabular-nums; line-height: 1;
  min-width: 40px; padding: 6px 8px;
  background: var(--bg-card); border-radius: 6px;
}
.countdown-label { font-size: 10px; color: var(--text-muted); margin-top: 3px; display: block; }
.countdown-sep { font-size: 20px; font-weight: 700; color: var(--text-muted); padding-bottom: 14px; }

/* ===== Payment Bars (footer) ===== */
.footer-payments-bar {
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}
.footer-payments-title {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.footer-payments-bar .coin-bar { margin-bottom: 16px; }
.footer-payments-bar .coin-bar:last-child { margin-bottom: 0; }

/* legacy payment-section (unused) */
.payment-section { margin-top: 8px; }
.payment-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 10px;
}
.coin-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 20px;
}
.coin-bar img {
  width: 32px; height: 32px;
  opacity: 0.75; transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}
.coin-bar img:hover { opacity: 1; transform: scale(1.1); }
.fiat-bar img { width: 40px; height: 28px; object-fit: contain; }

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 36px 24px 24px; margin-top: 16px;
}

.footer-seo {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}
.footer-seo p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.footer-seo p:last-child { margin-bottom: 0; }
.footer-seo a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.footer-seo a:hover { color: var(--accent-green); }
.footer-seo-responsible {
  font-size: 10px !important;
  color: #6b7280 !important;
}

.footer-top {
  display: grid; grid-template-columns: 1fr 2.2fr;
  gap: 36px; max-width: 100%; margin: 0 auto 28px;
}
.footer-logo { height: 30px; margin-bottom: 12px; }
.footer-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; max-width: 300px; }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.social-link {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border-radius: 50%;
  transition: all var(--transition);
}
.social-link img {
  width: 16px; height: 16px;
  filter: brightness(0) invert(0.72);
  transition: filter var(--transition);
}
.social-link:hover {
  background: var(--accent-green);
}
.social-link:hover img { filter: brightness(0); }

.footer-links { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.footer-col a {
  display: block; font-size: 13px; color: var(--text-secondary);
  padding: 3px 0; transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent-green); }

.footer-sponsors { text-align: center; margin-bottom: 24px; }
.footer-sponsors h4 { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; font-weight: 600; }
.sponsor-logos {
  display: flex; align-items: center; justify-content: center;
  gap: 28px; flex-wrap: wrap;
}
.sponsor-logos img {
  height: 40px; width: auto; opacity: 0.65;
  filter: grayscale(30%);
  transition: opacity var(--transition);
}
.sponsor-logos img:hover { opacity: 1; filter: none; }

.footer-payments {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 20px;
}
.footer-payments img { height: 28px; opacity: 0.7; transition: opacity var(--transition); }
.footer-payments img:hover { opacity: 1; }

.footer-licenses {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  margin-bottom: 4px;
}
.license-seal { display: block; flex-shrink: 0; }
.license-img {
  height: 48px; width: auto;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.license-seal:hover .license-img { opacity: 1; }
.license-text {
  flex: 1; min-width: 240px; max-width: 520px;
}
.license-text p {
  font-size: 11px; line-height: 1.6;
  color: var(--text-muted); margin-bottom: 4px;
}
.license-text p:last-child { margin-bottom: 0; }
.license-text strong { color: var(--text-secondary); font-weight: 600; }

.footer-deco-strip {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 12px;
  padding: 20px 0 8px;
  opacity: 0.85;
}
.footer-deco-strip img {
  height: 28px; width: auto; object-fit: contain;
  filter: grayscale(0.2);
  transition: opacity var(--transition);
}
.footer-deco-strip img:hover { opacity: 1; }

.footer-badges {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap;
  padding: 18px 0; border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.badge-img { height: 34px; opacity: 0.7; transition: opacity var(--transition); }
.badge-img:hover { opacity: 1; }

.footer-bottom { text-align: center; padding-top: 18px; }
.footer-bottom p { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.6; }
.footer-legal-links {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 4px 8px;
  margin-bottom: 12px;
}
.footer-legal-links a {
  font-size: 12px; color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-legal-links a:hover { color: var(--accent-green); }
.footer-legal-sep { color: var(--border-color); font-size: 12px; user-select: none; }
.footer-operator {
  max-width: 820px; margin: 0 auto 8px !important;
  font-size: 11px !important; line-height: 1.7 !important;
}
.footer-demo-note { font-size: 11px !important; opacity: 0.75; }
.footer-warning { color: #ef5350 !important; margin-top: 8px !important; }

/* ===== Float Chat ===== */
.float-chat {
  position: fixed; bottom: 24px; right: 24px;
  width: 52px; height: 52px;
  background: var(--accent-green); color: #000;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(36,238,137,0.4);
  z-index: 250;
  transition: transform var(--transition), box-shadow var(--transition);
}
.float-chat:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(36,238,137,0.5);
}

/* ===== Cookie & Toast ===== */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; z-index: 300;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 420px; font-size: 12px; color: var(--text-secondary);
}
.cookie-banner.hidden { display: none; }
.cookie-icon { width: 32px; height: 32px; flex-shrink: 0; }

.toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--accent-green);
  color: var(--text-primary); padding: 10px 24px;
  border-radius: var(--radius-sm); font-size: 13px;
  z-index: 400; opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .category-sub { grid-template-columns: repeat(3, 1fr); }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
  .footer-licenses { flex-direction: column; text-align: center; }
  .license-text { max-width: 100%; }
}

@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-toggle { display: none; }
  .sidebar-overlay.show { display: block; }
  .main-wrapper { margin-left: 0 !important; }
  .hamburger { display: block; }
  .header-logo img { display: block; }
  .header-search { display: none; }
  .wallet-display { display: none; }
  .category-main { grid-template-columns: 1fr; }
  .category-sub { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-legal-links { gap: 2px 6px; }
  .footer-legal-sep { display: none; }
  .app.sidebar-collapsed .main-wrapper { margin-left: 0 !important; }
}

@media (max-width: 576px) {
  .content { padding: 12px; }
  .header { padding: 0 12px; }
  .header-actions .btn-ghost { display: none; }
  .banner-fifa-car { display: none; }
  .banner-hero { height: 180px; }
  .banner-hero-title { font-size: 20px; }
  .lottery-card { min-width: 280px; }
  .footer-links { grid-template-columns: 1fr; }
  .float-chat { bottom: 16px; right: 16px; }
}
