
/* GLOBAL CHAT DRAWER DESKTOP PERSISTENCE */
@media (min-width: 1025px) {
    :root {
        --chat-drawer-width: 80px;
    }
    html.chat-drawer-open {
        --chat-drawer-width: 360px;
    }
}
@media (max-width: 1024px) {
    :root {
        --chat-drawer-width: 0px;
    }
}
/* Base Global Resets */
html, body {
    background-color: #06080c !important;
    overflow-y: auto !important;
    max-width: 100vw !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-layout {
    padding-right: 24px;
    box-sizing: border-box;
    margin-top: 72px;
  }

  
  /* Restored structural layout so the Left Sidebar pushes content */
.utility-topbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1600px;
  padding: 0 36px;
}
.utility-left, .utility-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.utility-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 16px;
}
.util-domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 183, 3, 0.05);
  border: 1px solid rgba(255, 183, 3, 0.2);
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
  letter-spacing: 0.2px;
  user-select: none;
}
.util-domain-badge i {
  font-size: 13px;
  color: #FFB703;
}
.util-domain-badge .domain-curr {
  color: #FFFFFF;
  font-weight: 800;
}
.util-domain-badge .domain-next {
  color: #FFB703;
  font-weight: 800;
}
.util-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  user-select: none;
}
.util-link i {
  font-size: 13px;
  transition: transform 0.2s ease;
}
.util-link:hover {
  color: #FFFFFF;
}
.util-link:hover i {
  transform: none;
}
.util-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
}
.util-ratv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 183, 3, 0.08);
  border: 1px solid rgba(255, 183, 3, 0.22);
  padding: 2px 8px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s ease;
}
.util-ratv:hover {
  background: rgba(255, 183, 3, 0.16);
  border-color: #FFB703;
  transform: none;
}
.util-ratv i {
  font-size: 13px;
  color: #FFB703;
}
.ratv-title {
  color: #FFFFFF;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.ratv-title span {
  color: #FFB703;
}
.ratv-badge {
  font-size: 8.5px;
  font-weight: 800;
  background: #ef4444;
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}
.ratv-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 5px #ef4444;
  animation: liveDotPulse 1.2s infinite ease-in-out;
}
.util-clock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
  font-variant-numeric: tabular-nums;
}
.util-clock i {
  font-size: 12px;
  color: #64748b;
}
.util-tz {
  font-size: 9.5px;
  color: #64748b;
  font-weight: 700;
}

/* Sidebar - Full Height from Top:0 Over Header on Left */
.sidebar {
  width: var(--sidebar-width, 290px);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  background: #06080c;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-sizing: border-box;
}

/* Promotional Cards */

/* When sidebar is collapsed, shrink the CSS variable so the whole layout adapts */
@media (min-width: 1025px) {
    body.sidebar-collapsed {
        --sidebar-width: 80px;
    }
}

/* ==========================================================================
   EXACT 724BETS SIDEBAR SYSTEM (Pixel-Perfect with Target Screenshot)
   ========================================================================== */

/* Top Header */
.sidebar-top-header {
    height: 62px !important;
    min-height: 62px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 16px !important;
    gap: 12px !important;
    border-bottom: none !important;
    border: none !important;
    background: #06080c !important;
    flex-shrink: 0 !important;
}

.sidebar-hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    margin: 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.sidebar-hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-section-pill {
    display: flex !important;
    align-items: center !important;
    background: #141824 !important;
    border: none !important;
    border-radius: 9px !important;
    padding: 5px 2px !important;
    gap: 2px !important;
    width: 100% !important; max-width: 100% !important;
    margin: 0 !important;
    flex: 1 !important;
}

.sb-sec-tab {
    flex: 1 !important;
    text-align: center !important;
    padding: 9px 4px !important;
    border-radius: 7px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #7e8b9f !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    font-family: inherit !important;
}

.sb-sec-tab.active {
    background: #3e265b !important;
    color: #d8b4fe !important;
    font-weight: 800 !important;
}

.sb-sec-tab[href="/"].active {
    background: #3e265b !important;
    color: #d8b4fe !important;
}

.sb-sec-tab[href*="bets"].active {
    background: #1e3a5f !important;
    color: #60a5fa !important;
}

.sb-sec-tab[href*="tahmin"].active {
    background: rgba(0, 229, 255, 0.22) !important;
    color: #00e5ff !important;
    box-shadow: none !important;
}

.sb-sec-tab:hover:not(.active) {
    color: #ffffff !important;
}

/* Search Box */
.sidebar-search-row {
    padding: 12px 14px 8px !important;
}
.sidebar-search-field {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #141824 !important;
    border: none !important;
    border-radius: 9px !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}
.sidebar-search-field:hover {
    background: #191f2e !important;
}
.sidebar-search-field svg {
    color: #7e8b9f !important;
    flex-shrink: 0 !important;
}
.sidebar-search-field input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    width: 100% !important;
    cursor: pointer !important;
}
.sidebar-search-field input::placeholder {
    color: #64748b !important;
    font-weight: 600 !important;
}

/* Nav Container */
.sidebar-nav-container {
    padding: 4px 14px 20px 14px !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Promotional Cards */
/* Promotional Cards (724bets 1:1 Screenshot Match) */
.sidebar-promo-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
}

.promo-card {
    border-radius: 12px !important;
    padding: 12px 16px !important;
    min-height: 56px !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: transform 0.2s ease, filter 0.2s ease !important;
    box-sizing: border-box !important;
    width: 100% !important;
}
.promo-card:hover {
    transform: none !important;
    filter: brightness(1.12) !important;
}

.promo-card-purple {
    background: linear-gradient(90deg, #4d1c7c 0%, #300f50 100%) !important;
    box-shadow: 0 4px 16px rgba(77, 28, 124, 0.35) !important;
    border: 1px solid rgba(168, 85, 247, 0.2) !important;
}
.promo-card-green {
    background: linear-gradient(90deg, #0e5a32 0%, #083c20 100%) !important;
    box-shadow: 0 4px 16px rgba(14, 90, 50, 0.35) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}
.promo-card-blue {
    background: linear-gradient(90deg, #134e84 0%, #0b3257 100%) !important;
    box-shadow: 0 4px 16px rgba(19, 78, 132, 0.35) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

.promo-content {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    z-index: 2 !important;
}

.promo-card i:not(.promo-bg-icon) {
    font-size: 24px !important;
    color: #ffffff !important;
}

.promo-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.promo-title {
    color: #ffffff !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
}

.promo-sub {
    color: #00e676 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
}

.promo-box-img {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: none !important;
    width: 46px !important;
    height: 46px !important;
    object-fit: contain !important;
    pointer-events: none !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)) !important;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    z-index: 1 !important;
}
.promo-card:hover .promo-box-img {
    transform: none scale(1.1) rotate(3deg) !important;
}

/* Collapsed Mini-Sidebar Rail View for Promo Cards */
body.sidebar-collapsed .sidebar-promo-cards {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    padding: 0 !important;
}
body.sidebar-collapsed .promo-card {
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-width: 52px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 auto !important;
}
body.sidebar-collapsed .promo-content {
    display: none !important;
}
body.sidebar-collapsed .promo-box-img {
    position: static !important;
    transform: none !important;
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: contain !important;
    display: block !important;
    margin: auto !important;
}
body.sidebar-collapsed .promo-card:hover .promo-box-img {
    transform: scale(1.15) !important;
}

/* Main & Bottom Nav Items (724bets 1:1 Screenshot Match) */
.sidebar-main-nav, .sidebar-bottom-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.nav-item {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 14px 18px !important;
    min-height: 48px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    color: #7e8b9f !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    position: relative !important;
    transition: background-color 0.18s ease, color 0.18s ease !important;
    user-select: none !important;
}

.nav-item i {
    font-size: 21px !important;
    color: #7e8b9f !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.18s ease !important;
    flex-shrink: 0 !important;
    width: 24px !important;
}

.nav-label {
    font-size: 14.5px !important;
    font-weight: 600 !important;
    color: inherit !important;
    letter-spacing: -0.01em !important;
    transition: color 0.18s ease !important;
    white-space: nowrap !important;
}

/* Hover State (1:1 with Screenshot "Canlı Casino" hover) */
.nav-item:hover:not(.active) {
    background: #181f2c !important;
    color: #ffffff !important;
    transform: none !important;
}

.nav-item:hover:not(.active) i {
    color: #ffffff !important;
}

.nav-item:hover:not(.active) .nav-label {
    color: #ffffff !important;
}

/* Active State (Clean Flat Active State) */
.nav-item.active {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

.nav-item.active i {
    color: #00e5ff !important;
    filter: none !important;
}

.nav-item.active .nav-label {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Sidebar Divider (1:1 Screenshot Match) */
.sidebar-divider {
    display: block !important;
    height: 1px !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    margin: 14px 0 10px 0 !important;
}



/* ==========================================================================
   UNIFIED APP SHELL ALIGNMENT & COLORS (HARDCODED EXACT PITCH BLACK)
   ========================================================================== */
.sidebar,
.topbar,
.community-chat-drawer,
.utility-topbar,
.sidebar-top-header,
.chat-drawer-header {
    background-color: #06080c !important;
    background: #06080c !important;
}

.sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.community-chat-drawer {
    border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Align all top headers to exactly 72px to form a perfect continuous horizontal line */
.sidebar-top-header,
.chat-drawer-header {
    height: 72px !important;
    min-height: 72px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    height: 72px !important;
    min-height: 72px !important;
}

/* Fix heights for scroll areas below the new 72px headers */
.sidebar-scroll {
    height: calc(100% - 72px) !important;
}
.community-chat-messages {
    height: calc(100% - 134px) !important; /* 72px + 62px input */
}

/* Make sure collapsed sidebar header stays taller so hamburger and pill stack correctly */

body.sidebar-collapsed .sidebar-scroll {
    height: auto !important;
    flex: 1 !important;
}
body.sidebar-collapsed .sidebar-top-header {
    flex-direction: column !important;
    padding: 16px 0 !important;
    gap: 16px !important;
    height: auto !important;
    min-height: auto !important;
    border-bottom: none !important;
}


/* Removed 1200px hiding rules to show all buttons */

/* ==========================================================================
   RAINBET EXACT HEADER BUTTON GROUP
   ========================================================================== */
.rb-hdr-btn {
    height: 40px !important;
    border-radius: 8px !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background-color: #2a3245 !important;
}
.rb-hdr-btn:hover {
    background-color: #353f54 !important;
}
.rb-hdr-btn.icon-only {
    width: 40px !important;
    color: #cbd5e1 !important;
    font-size: 24px !important;
}
.rb-hdr-btn.icon-only:hover {
    color: #ffffff !important;
}
.rb-hdr-btn.text-btn {
    padding: 0 16px !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}
.rb-hdr-btn.text-btn:hover {
    color: #ffffff !important;
}
.rb-hdr-btn.btn-kaydol {
    background: linear-gradient(135deg, #00e5ff 0%, #00b3ff 100%) !important;
    color: #020617 !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.rb-hdr-btn.btn-kaydol:hover {
    box-shadow: none !important;
    transform: none;
}

/* Force Color Payment Icons */
.fb-payment-grid .pay-btc i { color: #f7931a !important; filter: drop-shadow(0 0 4px rgba(247,147,26,0.5)); }
.fb-payment-grid .pay-bank i { color: #38bdf8 !important; filter: drop-shadow(0 0 4px rgba(56,189,248,0.5)); }
.fb-payment-grid .pay-cc i { color: #fbbf24 !important; filter: drop-shadow(0 0 4px rgba(251,191,36,0.5)); }
.fb-payment-grid .pay-eur i { color: #a78bfa !important; filter: drop-shadow(0 0 4px rgba(167,139,250,0.5)); }
.fb-payment-grid .pay-apple i { color: #f1f5f9 !important; filter: drop-shadow(0 0 4px rgba(241,245,249,0.5)); }
.fb-payment-grid .pay-try i { color: #00e5ff !important; filter: drop-shadow(0 0 4px rgba(0,229,255,0.5)); }

/* ========================================================
   MODERN SOFT 3D CLAYMORPHISM - COLLAPSED SIDEBAR FIX
   ======================================================== */

body.sidebar-collapsed .sidebar {
    background: #06080c !important;
    border-right: 1px solid rgba(255,255,255,0.03) !important;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5) !important;
}

/* Top Pill (Casino / Spor) */

body:not(.sidebar-collapsed) .pill-icon {
    display: none !important;
}
body.sidebar-collapsed .pill-icon {
    display: block !important;
}
body.sidebar-collapsed .sidebar-section-pill {
    flex-direction: column !important;
    width: 64px !important;
    max-width: 64px !important;
    height: auto !important;
    margin: 16px auto !important;
    padding: 6px !important;
    gap: 8px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}


body.sidebar-collapsed .sb-sec-tab {
    width: 52px !important;
    height: 52px !important;
    border-radius: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    border: 1px solid transparent !important;
}

body.sidebar-collapsed .sb-sec-tab:hover {
    background: rgba(255,255,255,0.05) !important;
}

body.sidebar-collapsed .sb-sec-tab.active {
    background: rgba(0, 229, 255, 0.1) !important;
    border: 1px solid rgba(0, 229, 255, 0.25) !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .pill-icon {
    font-size: 24px !important;
    color: #64748b !important;
    transition: all 0.3s ease !important;
}

body.sidebar-collapsed .sb-sec-tab.active .pill-icon {
    color: #00e5ff !important;
    filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.5)) !important;
}

body.sidebar-collapsed .sidebar-header-text,
body.sidebar-collapsed .pill-text {
    display: none !important;
}

/* Nav Items (Anasayfa, Tahminler vb.) */
body.sidebar-collapsed .sidebar-nav-container {
    padding: 10px 0 !important;
}

body.sidebar-collapsed .sidebar-main-nav,
body.sidebar-collapsed .sidebar-bottom-nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
}

body.sidebar-collapsed .nav-item {
    width: 56px !important;
    height: 56px !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .nav-item:hover {
    background: #1e293b !important;
    border: 1px solid transparent !important;
    transform: scale(1.05) !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .nav-item i {
    font-size: 24px !important;
    color: #94a3b8 !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
}

body.sidebar-collapsed .nav-item:hover i {
    color: #ffffff !important;
    filter: none !important;
}

body.sidebar-collapsed .nav-item span {
    display: none !important;
}

/* Hide broken promo cards container when collapsed */
body.sidebar-collapsed #sidebarPromoCardsContainer {
    display: none !important;
}

body.sidebar-collapsed .nav-item.active {
    background: #1e293b !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
body.sidebar-collapsed .nav-item.active i {
    color: #ffffff !important;
    filter: none !important;
    text-shadow: none !important;
}



/* --- KILL NEON BARS --- */
.nav-item::before,
.nav-item.active::before,
.nav-item:hover::before,
.sb-sec-tab::before,
.sb-sec-tab.active::before,
.sidebar-main-nav a::before,
.nav-item::after,
.nav-item.active::after,
.nav-item:hover::after,
.sb-sec-tab::after,
.sb-sec-tab.active::after,
.sidebar-main-nav a::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: 0 !important;
}


/* --- HERO BANNER ALIGNMENT IMPROVEMENTS --- */
.hero-slide-content {
    padding-left: 40px !important;
}
.hero-slider-nav {
    left: 40px !important;
}
/* --- BETSLIP UNIFIED DRAWER COMPLETE STYLES --- */
.sp-drawer-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sp-slip-card {
    background: #1a1e29;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
}
.sp-slip-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}
.sp-slip-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    line-height: 1.4;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.sp-drawer-close-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ef4444;
}
.sp-slip-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: #64748b;
}
.sp-slip-card-bottom strong {
    color: #ffffff;
    font-weight: 800;
}
.sp-slip-odd-tag {
    background: #0f1524;
    color: #00e5ff;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

/* Betslip Footer / Stake Input */
.sp-drawer-footer {
    padding: 20px 16px;
    background: #06080c;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    margin-top: auto;
}
.sp-calc-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}
.sp-calc-line .val {
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}
.sp-calc-line.total {
    color: #00e5ff;
    font-size: 14px;
    margin-bottom: 16px;
}
.sp-calc-line.total .val {
    color: #00e5ff;
    font-size: 16px;
    font-weight: 900;
}
.sp-stake-input-box {
    display: flex;
    align-items: center;
    background: #151922;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0 16px;
    margin-bottom: 16px;
    height: 48px;
    transition: all 0.2s;
}
.sp-stake-input-box:focus-within {
    border-color: #00e5ff;
    box-shadow: none !important;
}
.sp-stake-input-box span {
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
    margin-right: 8px;
}
.sp-stake-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    outline: none;
    height: 100%;
}
.sp-btn-submit-coupon {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    background: #00e5ff;
    color: #000;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.sp-btn-submit-coupon:hover {
    background: #33e9ff;
    transform: none;
    box-shadow: none !important;
}


@media (max-width: 1400px) {
    .topbar, html.chat-drawer-open .topbar, body.chat-drawer-open .topbar {
        padding: 0 12px !important;
    }
    .topbar-right-actions {
        gap: 4px !important;
    }
    .rb-hdr-btn.text-btn {
        padding: 0 8px !important;
        font-size: 13px !important;
    }
    .rb-hdr-btn.icon-only {
        width: 32px !important;
        height: 32px !important;
        font-size: 18px !important;
    }
    .topbar-left-wrap {
        gap: 8px !important;
    }
}


@media (min-width: 769px) {

  .sidebar {
    top: 0 !important;
    height: 100vh !important;
    z-index: 1020 !important;
  }
  
  .topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    margin-left: var(--sidebar-width, 290px) !important;
    width: calc(100vw - var(--sidebar-width, 290px) - var(--chat-drawer-width, 0px)) !important;
    height: 72px !important;
    z-index: 999999 !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  html.chat-drawer-open .topbar {
    width: calc(100vw - var(--sidebar-width, 290px) - var(--chat-drawer-width, 360px)) !important;
  }


  /* APP SHELL: INDEPENDENT SCROLLING FOR MAIN CONTENT */
  .app-layout {
    padding-right: 24px;
    box-sizing: border-box;
    margin-top: 72px !important;
    margin-left: var(--sidebar-width, 290px) !important;
    width: calc(100vw - var(--sidebar-width, 290px) - var(--chat-drawer-width, 0px)) !important;
    height: calc(100vh - 72px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    /* overflow-x: hidden removed to fix position sticky */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Custom scrollbar for app-layout to look sleek */
  .app-layout::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
  
  
  

  html.chat-drawer-open .app-layout {
    padding-right: 24px;
    box-sizing: border-box;
    width: calc(100vw - var(--sidebar-width, 290px) - var(--chat-drawer-width, 360px)) !important;
  }

}

@media (min-width: 1025px) { .btn-close-sidebar-mobile { display: none !important; } }

.sb-nav-item.active {
    background: rgba(0, 229, 255, 0.05);
    color: #fff !important;
    border-left: 3px solid #00e5ff;
}
.sb-nav-item.active i {
    color: #00e5ff !important;
}

body::-webkit-scrollbar { display: none !important; width: 0 !important; }

html, body {
    background-color: #06080c !important; scrollbar-width: none !important; -ms-overflow-style: none !important; }

/* FLASHY PROMO CARDS CSS */
.premium-promo-card {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, rgba(0,229,255,0.05) 0%, rgba(15,23,42,0.8) 100%);
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: 8px;
    padding: 8px 2px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: block;
}
.premium-promo-card:hover {
    transform: none;
    border-color: rgba(0,229,255,0.5);
    box-shadow: none !important;
    background: linear-gradient(135deg, rgba(0,229,255,0.12) 0%, rgba(15,23,42,0.9) 100%);
}
.premium-promo-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,229,255,0.15) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.premium-promo-card:hover::before { opacity: 1; }

.ppc-icon {
    font-size: 16px; color: #00e5ff; margin-bottom: 2px;
    filter: drop-shadow(0 0 6px rgba(0,229,255,0.6));
}
.ppc-title {
    color: rgba(255,255,255,0.5); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; z-index: 1; position: relative;
}
.ppc-amount {
    color: #fff; font-size: 14px; font-weight: 900; margin-top: 1px; font-family: 'Outfit', sans-serif; z-index: 1; position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.ppc-amount span { color: #00e5ff; }

/* GOLD MODIFIER */
.ppc-gold { border-color: rgba(251,191,36,0.15); background: linear-gradient(135deg, rgba(251,191,36,0.05) 0%, rgba(15,23,42,0.8) 100%); }
.ppc-gold:hover { border-color: rgba(251,191,36,0.5); box-shadow: none !important; background: linear-gradient(135deg, rgba(251,191,36,0.12) 0%, rgba(15,23,42,0.9) 100%); }
.ppc-gold::before { background: radial-gradient(circle, rgba(251,191,36,0.15) 0%, transparent 60%); }
.ppc-gold .ppc-icon { color: #fbbf24; filter: drop-shadow(0 0 6px rgba(251,191,36,0.6)); }
.ppc-gold .ppc-amount span { color: #fbbf24; }

/* PURPLE MODIFIER */
.ppc-purple { border-color: rgba(168,85,247,0.15); background: linear-gradient(135deg, rgba(168,85,247,0.05) 0%, rgba(15,23,42,0.8) 100%); }
.ppc-purple:hover { border-color: rgba(168,85,247,0.5); box-shadow: 0 6px 16px rgba(168,85,247,0.2); background: linear-gradient(135deg, rgba(168,85,247,0.12) 0%, rgba(15,23,42,0.9) 100%); }
.ppc-purple::before { background: radial-gradient(circle, rgba(168,85,247,0.15) 0%, transparent 60%); }
.ppc-purple .ppc-icon { color: #a855f7; filter: drop-shadow(0 0 6px rgba(168,85,247,0.6)); }
.ppc-purple .ppc-amount span { color: #a855f7; }


/* ========================================================
   MOBILE SIDEBAR FIX
   ======================================================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease;
        z-index: 9999999 !important; /* over everything */
        width: 280px !important;
    }
    .sidebar.mobile-open { transform: translateX(0) !important;
        transform: translateX(0);
    }
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.7);
        z-index: 9999998 !important;
        display: none;
        backdrop-filter: blur(4px);
    }
    .sidebar-overlay.active {
        display: block;
    }
    .pjax-container {
        padding-left: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 70px !important;
    }
    .mobile-bottom-navigation-bar {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .sidebar-toggle-btn {
        display: none !important;
    }
    /* Let's also hide the big Chat toggle button on topbar if there is one on mobile */
    .topbar .cv2-toggle-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-chat-toggle {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .app-layout, html.chat-drawer-open .app-layout, body.chat-drawer-open .app-layout {
        margin-left: 0 !important;
        width: 100% !important;
        padding-right: 0 !important;
    }
    .topbar {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 1024px) {
    html.chat-drawer-open .app-layout, body.chat-drawer-open .app-layout,
    html:not(.chat-drawer-open) .app-layout, body:not(.chat-drawer-open) .app-layout {
        margin-left: 0 !important;
        width: 100vw !important;
        padding-right: 0 !important;
    }
    html.chat-drawer-open .topbar, body.chat-drawer-open .topbar,
    html:not(.chat-drawer-open) .topbar, body:not(.chat-drawer-open) .topbar {
        margin-left: 0 !important;
        width: 100vw !important;
    }
}

@media (max-width: 480px) {
    .hdr-wallet-box {
        padding: 2px 4px 2px 6px !important;
        gap: 4px !important;
    }
    .hdr-balance-amount {
        font-size: 11.5px !important;
    }
    .hdr-btn-wallet-action {
        display: none !important; /* Hide the plus icon next to balance on tiny screens to save space */
    }
}

@media (max-width: 1024px) {
    .app-layout {
        height: auto !important;
        overflow-y: visible !important;
        padding-bottom: 90px !important; /* space for bottom nav */
    }
}

@media (max-width: 1024px) {
    .topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 999999 !important; /* Above sidebar overlay? No, below sidebar overlay if it's 1050. Sidebar overlay is 1040, so let's put topbar below overlay -> 1000 */
    }
    .app-layout {
        margin-top: calc(64px + env(safe-area-inset-top, 0px)) !important; /* prevent content hiding behind topbar */
    }
}

/* --- LATEST WINS SECTION (GLOBAL / PJAX SAFE) --- */
.latest-wins-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0px auto 16px auto !important;
    padding: 0 16px !important;
    position: relative;
    box-sizing: border-box;
}
.latest-wins-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 12px;
}
.latest-wins-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.latest-wins-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}
.latest-wins-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
}
.lw-tab {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    padding-bottom: 4px;
    position: relative;
    transition: color 0.2s ease;
}
.lw-tab:hover {
    color: #fff;
}
.lw-tab.active {
    color: var(--theme-color, #00e5ff);
}
.lw-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--theme-color, #00e5ff);
    border-radius: 2px;
}
.latest-wins-track-wrapper {
    width: 100%;
    overflow: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.latest-wins-track-wrapper::-webkit-scrollbar {
    display: none;
}
.latest-wins-track {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
    width: max-content;
    animation: marquee-right 40s linear infinite;
}
@keyframes marquee-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}
.latest-wins-track:hover {
    animation-play-state: paused;
}
.lw2-card {
    display: flex;
    flex-direction: column;
    width: 84px;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
}
.lw2-card:hover .lw2-thumb-wrap {
    transform: none;
    border-color: rgba(0, 229, 255, 0.4);
}
.lw2-thumb-wrap {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 6px;
    overflow: hidden;
    background: #0f1523;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 6px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.lw2-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lw2-info {
    display: flex;
    flex-direction: column;
    gap: 0px;
}
.lw2-user-row {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lw2-user-row i {
    font-size: 9px;
    color: #94a3b8;
}
.lw2-user-name {
    font-size: 9px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lw2-win-amount {
    font-size: 9px;
    font-weight: 800;
    color: #10b981;
}

/* --- PREMIUM SIDEBAR PROMO CARDS (GLOBAL / PJAX SAFE) --- */
.home-promo-cards-grid {
    margin: 0;
    margin-top: 0px;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(4, 1fr) !important;
    gap: 12px;
    width: 100%;
    height: 100%;
    align-content: stretch;
}
.sidebar-premium-promo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    border-radius: 18px;
    padding: 0 24px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: pointer;
    background: #1a1f2c;
    border: none;
    width: 100%;
    height: 72px;
}

.spp-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #94a3b8;
}
.spp-text-wrap {
    display: flex;
    flex-direction: column;
}
.spp-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}


