[hidden] { display: none !important; }

/* ==========================================================================
   STACK — Premium Desktop UI
   ==========================================================================
   Ultra-premium desktop interface (≥1024px).
   Completely separate architecture — does not touch mobile/tablet CSS.

   Elevation System:
   Base:       #050A10 (viewport background)
   Surface-1:  #0A111A (sidebars, header) + 1px border @rgba(255,255,255,0.05)
   Surface-2:  #111824 (cards, panels, modals) + soft shadows + blur
   Surface-3:  #182030 (elevated dropdowns, tooltips) + stronger shadows

   Typography:
   H1: 28px/800 — Page titles
   H2: 20px/700 — Section headers
   H3: 16px/700 — Widget titles
   Body Large: 16px/400 lh 1.6
   Body: 14px/400 lh 1.6
   Body Small: 13px/400 lh 1.5
   Caption: 11px/600 uppercase
   ========================================================================== */

:root {
  --dt-sidebar-width: 240px;
  --dt-sidebar-width-collapsed: 72px;
}

/* Desktop DOM is opt-in: never occupy the finalized mobile layout. */
.desktop-view { display: none !important; }
.desktop-view[hidden] { display: none !important; }

/* ── Unified Mobile Drawer (top-level: must work below 1024px too) ── */
.dt-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.22, 0.9, 0.24, 1);
}
.dt-mobile-drawer:not([hidden]) {
  opacity: 1;
  visibility: visible;
}
.dt-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.dt-drawer__panel {
  position: relative;
  z-index: 1;
  width: 280px;
  max-width: 85vw;
  height: 100dvh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 10px calc(16px + env(safe-area-inset-bottom, 0px));
}
.dt-mobile-drawer:not([hidden]) .dt-drawer__panel {
  transform: translateX(0);
}
.dt-drawer__sidebar .dt-sidebar__footer {
  margin-top: auto;
}


@media (min-width: 1024px) {

  /* ==================================================================
     1. DESKTOP VISIBILITY TOGGLE
     Hide mobile DOM, show desktop DOM
     ================================================================== */

  /* Hide mobile shell elements only while the desktop shell is active */
  body.dx-desktop-active .shell > .sidebar-backdrop,
  body.dx-desktop-active .shell > .topbar,
  body.dx-desktop-active .shell > .dashboard-layout,
  body.dx-desktop-active .shell > .bottom-nav {
    display: none !important;
  }

  /* Show desktop view on desktop */
  .desktop-view {
    display: flex !important;
    flex-direction: column;
    min-height: 100dvh;
    width: 100%;
  }

  /* ==================================================================
     2. DESIGN TOKENS (Desktop-Only)
     ================================================================== */

  .desktop-view {
    --dt-bg:           #050A10;
    --dt-surface-1:    #0A111A;
    --dt-surface-2:    #111824;
    --dt-surface-3:    #182030;
    --dt-border-1:     rgba(255, 255, 255, 0.05);
    --dt-border-2:     rgba(255, 255, 255, 0.08);
    --dt-border-3:     rgba(255, 255, 255, 0.12);
    --dt-cta:          #00E701;
    --dt-cta-glow:     rgba(0, 231, 1, 0.4);
    --dt-cta-hover:    #1FFF20;
    --dt-alert:        #FF2A6D;
    --dt-blue:         #1475E1;
    --dt-cyan:         #00A3FF;
    --dt-gold:         #FFC700;
    --dt-text-primary: #FFFFFF;
    --dt-text-secondary: #B1BAD3;
    --dt-text-muted:   #8492A6;
    --dt-text-cta:     #000000;
    --dt-shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.3);
    --dt-shadow-md:    0 8px 24px rgba(0, 0, 0, 0.4);
    --dt-shadow-lg:    0 16px 48px rgba(0, 0, 0, 0.5);
    --dt-shadow-cta:   0 0 20px rgba(0, 231, 1, 0.35);
    --dt-ease:         cubic-bezier(0.22, 0.9, 0.24, 1);
    --dt-r-sm:         8px;
    --dt-r-md:         12px;
    --dt-r-lg:         16px;
    --dt-r-xl:         20px;
    --dt-r-pill:       999px;
    --dt-sidebar-width: 240px;
    --dt-sidebar-width-collapsed: 72px;
    --dt-right-panel-width: 320px;
    --dt-header-height: 60px;
    --dt-container-max: 1200px;
  }

  /* Base background — only when the desktop shell is active */
  body.dx-desktop-active { background: #050A10; }
  body.dx-desktop-active::before {
    background:
      radial-gradient(ellipse 80% 60% at 15% 10%, rgba(0, 163, 255, 0.03) 0%, transparent 70%),
      radial-gradient(ellipse 60% 60% at 85% 80%, rgba(0, 231, 1, 0.02) 0%, transparent 70%);
  }

  /* ==================================================================
     3. CUSTOM SCROLLBARS
     ================================================================== */

  #desktop-shell,
  #desktop-shell * {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  }
  #desktop-shell ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  #desktop-shell ::-webkit-scrollbar-track {
    background: transparent;
  }
  #desktop-shell ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.2s var(--dt-ease);
  }
  #desktop-shell ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
    background-clip: content-box;
  }
  #desktop-shell ::-webkit-scrollbar-corner {
    background: transparent;
  }

  /* ==================================================================
     4. GLOBAL HEADER
     ================================================================== */

   .dt-header {
     position: sticky;
     top: 0;
     z-index: 100;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 16px;
     height: var(--dt-header-height);
     min-height: var(--dt-header-height);
     padding: 0 24px;
     box-sizing: border-box;
     background: var(--dt-surface-1);
    border-bottom: 1px solid var(--dt-border-1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 var(--dt-border-1);
    transition: background-color, border-color, box-shadow 0.3s var(--dt-ease);
  }

  .dt-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }

  .dt-header__center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 32px;
  }

  .dt-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }

  .dt-logo img {
    height: 32px;
    width: auto;
  }

  /* Sidebar Toggle Button */
  .dt-sidebar-toggle {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--dt-r-sm);
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    color: var(--dt-text-secondary);
    font-size: 14px;
    transition: background-color, color, transform 0.2s var(--dt-ease);
    padding: 0;
  }
  .dt-sidebar-toggle:hover {
    background: var(--dt-border-3);
    color: var(--dt-text-primary);
  }
  .dt-sidebar-toggle:active {
    transform: scale(0.95);
  }
  .dt-sidebar-toggle--collapsed {
    transform: rotate(180deg);
  }

  /* Search */
  .dt-search {
    position: relative;
    width: 100%;
    max-width: 480px;
  }
  .dt-search__input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 44px;
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-md);
    color: var(--dt-text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: background-color, border-color, box-shadow 0.25s var(--dt-ease);
    backdrop-filter: blur(10px);
  }
  .dt-search__input:focus {
    border-color: var(--dt-blue);
    box-shadow: 0 0 0 3px rgba(20, 117, 225, 0.2);
  }
  .dt-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dt-text-muted);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s var(--dt-ease);
  }
  .dt-search__input:focus + .dt-search__icon {
    color: var(--dt-blue);
  }

   /* Balance */
   .dt-balance {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     line-height: 1;
     max-height: 36px;
     min-height: 32px;
     font-size: 13px;
     font-weight: 700;
     font-variant-numeric: tabular-nums;
     color: var(--dt-text-primary);
     padding: 6px 14px;
     border-radius: var(--dt-r-md);
     background: var(--dt-surface-2);
     border: 1px solid var(--dt-border-2);
    backdrop-filter: blur(10px);
    white-space: nowrap;
  }

  /* Wallet Button */
  .dt-btn-wallet {
    background: var(--dt-blue);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    min-height: 36px;
    min-width: 100px;
    transition: background-color, color, transform, box-shadow 0.2s var(--dt-ease);
  }
  .dt-btn-wallet:hover {
    background: var(--dt-cta-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(0, 231, 1, 0.3);
  }

  /* Icon Button */
  .iconbtn.dt-iconbtn {
    width: 34px;
    height: 34px;
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    color: var(--dt-text-secondary);
    font-size: 14px;
  }

  /* User Menu */
  .dt-user-menu {
    position: relative;
  }
  .dt-user-trigger {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--dt-r-pill);
    background: var(--dt-blue);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: background-color, transform, box-shadow 0.2s var(--dt-ease);
    padding: 0;
  }
  .dt-user-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 0 16px var(--dt-cta-glow);
  }
  .dt-user-dropdown {
    position: absolute;
    top: 44px;
    right: 0;
    min-width: 180px;
    padding: 8px;
    background: var(--dt-surface-3);
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-lg);
    box-shadow: var(--dt-shadow-lg);
    backdrop-filter: blur(16px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity, visibility, transform 0.25s var(--dt-ease);
  }
  .dt-user-dropdown[hidden] {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
  }
  .dt-user-dropdown:not([hidden]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .dt-dropdown-item {
    display: block;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: var(--dt-r-sm);
    color: var(--dt-text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: background-color, color 0.2s var(--dt-ease);
  }
  .dt-dropdown-item:hover {
    background: var(--dt-surface-2);
    color: var(--dt-text-primary);
  }
  .dt-dropdown-item--danger {
    color: var(--dt-alert);
  }

  /* ==================================================================
      5. DASHBOARD LAYOUT (Content + Right Panel; sidebar is fixed)
      ================================================================== */

  .dt-dashboard {
    margin-left: 240px !important;
    padding-left: 16px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    min-width: 0 !important;
    flex: 1;
    gap: 16px;
    overflow: visible;
    min-height: calc(100dvh - var(--dt-header-height));
    transition: margin-left, grid-template-columns, background-color 0.3s var(--dt-ease);
  }

  #desktop-shell {
    overflow: visible !important;
    height: auto !important;
  }
  #desktop-shell.dx-sidebar-collapsed .dt-dashboard,
  .dt-dashboard.dt-dashboard--sidebar-collapsed {
    margin-left: 72px !important;
  }

  .dt-dashboard.dt-dashboard--right-panel-collapsed {
    grid-template-columns: 1fr 0;
  }

  .dt-dashboard.dt-dashboard--sidebar-collapsed.dt-dashboard--right-panel-collapsed {
    margin-left: var(--dt-sidebar-width-collapsed);
    grid-template-columns: 1fr 0;
  }

  /* ==================================================================
      6. LEFT SIDEBAR (Persistent, Collapsible, Fixed)
      ================================================================== */

   .dt-sidebar,
   #desktop-shell .dt-sidebar,
   .dt-sidebar.dt-sidebar--expanded {
     position: fixed !important;
     top: var(--dt-header-height, 60px) !important;
     left: 0 !important;
     bottom: 0 !important;
     width: 240px !important;
     min-width: 240px !important;
     max-width: 240px !important;
     height: auto !important;
     flex: none !important;
     grid-column: auto !important;
     z-index: 90 !important;
     overflow-x: hidden !important;
     overflow-y: auto !important;
     overscroll-behavior: contain !important;
     -webkit-overflow-scrolling: touch;
     scrollbar-width: thin;
     scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
   }
   .dt-sidebar.dt-sidebar--collapsed,
   #desktop-shell.dx-sidebar-collapsed .dt-sidebar,
   #desktop-shell .dt-sidebar.dt-sidebar--collapsed {
     width: 72px !important;
     min-width: 72px !important;
     max-width: 72px !important;
   }

  /* The global header is `position: sticky; z-index: 100` and spans the FULL
     width, so it paints over the top --dt-header-height of this fixed sidebar
     (z-index: 90). Padding the scroll area by the header height keeps the
     first group label ("Core") and the first nav item fully visible instead of
     hidden underneath it. The sidebar's own surface still bleeds up behind the
     translucent header, which is what the backdrop-blur is for. */
  .dt-nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: clip !important;
    overscroll-behavior-y: contain !important;
    height: auto !important;
    max-height: none !important;
    padding: 16px 12px !important;
  }

  .dt-nav__group {
    margin-bottom: 24px;
  }

  .dt-nav__label {
    padding: 0 12px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dt-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dt-sidebar--collapsed .dt-nav__label { display: none; }

  .dt-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: var(--dt-r-sm);
    color: var(--dt-text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color, color 0.2s var(--dt-ease);
    min-height: 40px;
    position: relative;
  }
  .dt-nav__item:hover {
    background: var(--dt-surface-2);
    color: var(--dt-text-primary);
  }
  .dt-nav__item--active {
    color: var(--dt-text-primary);
    background: rgba(0, 231, 1, 0.08);
    box-shadow: inset 3px 0 0 var(--dt-cta);
  }
  .dt-nav__item--active .dt-nav__icon {
    color: var(--dt-cta);
  }
  .dt-nav__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    font-size: 15px;
  }
  .dt-nav__label-text {
    transition: opacity 0.3s var(--dt-ease);
  }
  .dt-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: var(--dt-r-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
  }
  .dt-badge--hot {
    background: var(--dt-alert);
    color: #fff;
    box-shadow: 0 0 8px var(--dt-alert);
  }
  .dt-badge--free {
    background: var(--dt-cta);
    color: var(--dt-text-cta);
    box-shadow: 0 0 8px var(--dt-cta);
  }

  /* Collapsed sidebar tooltips */
  .dt-sidebar.dt-sidebar--collapsed .dt-nav__label-text,
  .dt-sidebar.dt-sidebar--collapsed .dt-badge {
    display: none;
  }
  .dt-sidebar.dt-sidebar--collapsed .dt-nav__item {
    justify-content: center;
    padding: 10px;
  }

  /* Sidebar Footer */
  .dt-sidebar__footer {
    padding: 16px 12px;
    border-top: 1px solid var(--dt-border-1);
    background: rgba(255, 255, 255, 0.02);
  }

  .dt-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--dt-r-md);
    transition: background-color 0.2s var(--dt-ease);
  }
  .dt-user-card:hover {
    background: var(--dt-surface-2);
  }
  .dt-sidebar.dt-sidebar--collapsed .dt-user-card {
    justify-content: center;
    padding: 12px;
  }
  .dt-sidebar.dt-sidebar--collapsed .dt-user-info {
    display: none;
  }

  .dt-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dt-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
  }
  .dt-user-avatar--lg {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .dt-user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }
  .dt-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dt-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dt-user-email {
    font-size: 11px;
    color: var(--dt-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ==================================================================
     7. MAIN CONTENT AREA
     ================================================================== */

  .dt-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    background: var(--dt-bg);
    height: calc(100dvh - var(--dt-header-height));
    max-height: calc(100dvh - var(--dt-header-height));
  }

  .dt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 48px;
  }

  /* Page Header */
  .dt-page-header {
    margin-bottom: 28px;
  }
  .dt-page-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--dt-text-primary);
    margin: 0 0 6px;
    text-shadow: 0 0 24px rgba(0, 231, 1, 0.1);
  }
  .dt-page-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: var(--dt-text-secondary);
    margin: 0;
    max-width: 720px;
  }

  /* ==================================================================
     8. HERO CAROUSEL (Desktop)
     ================================================================== */

  .dt-hero {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: var(--dt-r-lg);
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--dt-border-2);
    box-shadow: var(--dt-shadow-md);
  }

  .dt-hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 48px 56px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
    background: linear-gradient(135deg, var(--dt-surface-2) 0%, var(--dt-surface-3) 100%);
  }
  .dt-hero__slide.dt-hero__slide--active {
    opacity: 1;
    visibility: visible;
  }
  .dt-hero__content {
    max-width: 520px;
    z-index: 2;
  }
  .dt-hero__title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--dt-text-primary);
    margin: 0 0 12px;
  }
  .dt-hero__subtitle {
    font-size: 17px;
    line-height: 1.6;
    color: var(--dt-text-secondary);
    margin: 0 0 20px;
    max-width: 480px;
  }
  .dt-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--dt-cta);
    color: var(--dt-text-cta);
    border: none;
    border-radius: var(--dt-r-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 20px var(--dt-cta-glow);
    transition: transform, box-shadow, background-color 0.25s var(--dt-ease);
    text-decoration: none;
  }
  .dt-hero__cta:hover {
    background: var(--dt-cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(0, 231, 1, 0.5);
  }

  .dt-hero__pagination {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
  }
  .dt-hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background-color, transform 0.2s var(--dt-ease);
  }
  .dt-hero__dot.dt-hero__dot--active {
    background: var(--dt-cta);
    box-shadow: 0 0 8px var(--dt-cta);
  }

  /* ==================================================================
     9. SECTION HEADERS
     ================================================================== */

  .dt-section {
    margin-bottom: 32px;
  }
  .dt-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
  }
  .dt-section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dt-text-primary);
  }
  .dt-section__link {
    font-size: 12px;
    font-weight: 600;
    color: var(--dt-text-muted);
    text-decoration: none;
    transition: color 0.2s var(--dt-ease);
  }
  .dt-section__link:hover {
    color: var(--dt-text-primary);
  }

  /* ==================================================================
     10. GAME GRID (Desktop)
     ================================================================== */

  .dt-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 140px);
    gap: 16px;
  }

  @media (min-width: 1280px) {
    .dt-game-grid {
      grid-template-columns: repeat(auto-fill, 154px);
      gap: 24px;
    }
  }

  /* Game Card */
  .dt-game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--dt-r-lg);
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    overflow: hidden;
    transition: transform, box-shadow, border-color 0.3s var(--dt-ease);
    text-decoration: none;
    color: var(--dt-text-primary);
    box-shadow: 0 0 0 1px var(--dt-border-2) inset;
  }
  .dt-game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--dt-shadow-md);
    border-color: var(--dt-border-3);
  }

  /* TASK 4: the .dt-game-card__media / --crash / --mines / --plinko /
     --dice,--limbo,--keno and .dt-game-card__badge / --featured rules were
     deleted as dead. games() clones #game-grid .game-card and adds only the
     dt-game-card class, so a cloned card never carries a dt-game-card__media
     or dt-game-card__badge node; the real media box is .game-card__media,
     styled by style.css. Verified: zero references to either modifier class
     in any .html or .js file.

     NOTE: .dt-game-grid and .dt-game-card themselves are NOT dead and were
     deliberately kept -- index.html ships <div class="dt-game-grid"
     id="dt-game-grid"> and desktop.js games() fills it and adds
     dt-game-card to every clone. Removing them would strip the desktop game
     grid of its layout. */

  .dt-game-card__footer {
    padding: 12px 14px;
  }
  .dt-game-card__name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dt-text-primary);
  }
  .dt-game-card__players {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--dt-text-secondary);
  }
  .dt-game-card__player-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dt-cta);
    box-shadow: 0 0 6px var(--dt-cta);
  }

  .dt-game-card__play {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 33, 46, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s var(--dt-ease);
    border-radius: var(--dt-r-lg);
    z-index: 5;
  }
  .dt-game-card:hover .dt-game-card__play {
    opacity: 1;
  }
  .dt-game-card__play-btn {
    padding: 8px 18px;
    background: var(--dt-cta);
    color: var(--dt-text-cta);
    border-radius: var(--dt-r-sm);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 0 12px var(--dt-cta-glow);
  }

  /* ==================================================================
     11. RIGHT PANEL (Contextual, Collapsible)
     ================================================================== */

  .dt-right-panel {
    width: var(--dt-right-panel-width);
    background: var(--dt-surface-1);
    border-left: 1px solid var(--dt-border-1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: width 0.3s var(--dt-ease);
  }

  .dt-right-panel.dt-right-panel--collapsed {
    width: 0;
    border-left: none;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
  }
  .dt-right-panel.dt-right-panel--collapsed * {
    visibility: hidden;
  }

  .dt-right-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--dt-border-1);
    background: var(--dt-surface-2);
    flex-shrink: 0;
  }

  .dt-right-panel__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dt-text-primary);
    margin: 0;
  }

  .dt-panel-toggle {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--dt-r-sm);
    background: var(--dt-surface-3);
    border: 1px solid var(--dt-border-2);
    color: var(--dt-text-secondary);
    font-size: 12px;
    transition: background-color, color 0.2s var(--dt-ease);
    flex-shrink: 0;
  }

  .dt-panel-toggle:hover {
    background: var(--dt-border-3);
    color: var(--dt-text-primary);
  }

  .dt-panel-toggle:active {
    transform: scale(0.95);
  }

  .dt-panel-toggle--collapsed {
    transform: rotate(180deg);
  }

  .dt-right-panel__content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
  }

  .dt-widget {
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-lg);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--dt-shadow-sm);
    transition: background-color, border-color, box-shadow 0.2s var(--dt-ease);
  }
  .dt-widget:hover {
    box-shadow: var(--dt-shadow-md);
  }

  .dt-widget__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dt-text-primary);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--dt-border-2);
  }

  /* Live Players Widget */
  .dt-live-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .dt-live-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--dt-border-2);
  }
  .dt-live-item:last-child {
    border-bottom: none;
  }
  .dt-live-game {
    color: var(--dt-text-primary);
    font-weight: 500;
  }
  .dt-live-count {
    color: var(--dt-text-secondary);
  }

  /* Win List */
  .dt-win-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .dt-win-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--dt-border-2);
  }
  .dt-win-item:last-child {
    border-bottom: none;
  }
  .dt-win-user {
    color: var(--dt-text-secondary);
  }
  .dt-win-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .dt-win-amount--big {
    color: var(--dt-cta);
    text-shadow: 0 0 8px var(--dt-cta-glow);
  }
  .dt-win-amount--med {
    color: var(--dt-gold);
  }

  /* Bet Feed */
  .dt-bet-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .dt-bet-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: var(--dt-bg);
    border-radius: var(--dt-r-sm);
    border: 1px solid var(--dt-border-2);
    font-size: 12px;
  }
  .dt-bet-user {
    font-weight: 600;
    color: var(--dt-text-primary);
  }
  .dt-bet-amount {
    color: var(--dt-text-secondary);
  }
  .dt-bet-cashout {
    color: var(--dt-cta);
  }

  .dt-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--dt-bg);
    border-radius: var(--dt-r-sm);
    border: 1px solid var(--dt-border-2);
  }
  .dt-stat__label {
    font-size: 11px;
    color: var(--dt-text-muted);
    font-weight: 600;
  }
  .dt-stat__value {
    font-size: 14px;
    font-weight: 700;
    color: var(--dt-text-primary);
    font-variant-numeric: tabular-nums;
  }
  .dt-stat__value--green {
    color: var(--dt-cta);
  }

  /* Tables */
  .dt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  .dt-table th,
  .dt-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--dt-border-2);
    font-variant-numeric: tabular-nums;
  }
  .dt-table th {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dt-text-muted);
    padding-bottom: 10px;
  }
  .dt-table__right {
    text-align: right;
  }
  .dt-table__accent {
    color: var(--dt-cta);
    font-weight: 700;
  }
  .dt-table--compact td {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* VIP Progress */
  .dt-vip-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .dt-vip-level {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
  }
  .dt-vip-label {
    color: var(--dt-text-primary);
    font-weight: 600;
  }
  .dt-vip-target {
    color: var(--dt-text-muted);
  }
  .dt-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--dt-border-2);
    border-radius: var(--dt-r-pill);
    overflow: hidden;
  }
  .dt-progress-fill {
    height: 100%;
    background: var(--dt-cta);
    border-radius: var(--dt-r-pill);
    transition: width 0.5s var(--dt-ease);
    box-shadow: 0 0 8px var(--dt-cta-glow);
  }
  .dt-vip-rewards {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
  }
  .dt-vip-reward {
    padding: 4px 8px;
    background: var(--dt-bg);
    border-radius: 4px;
    border: 1px solid var(--dt-border-2);
  }
  .dt-vip-reward--next {
    color: var(--dt-text-muted);
    border-style: dashed;
  }

  /* Security */
  .dt-security-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .dt-security-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: var(--dt-bg);
    border-radius: var(--dt-r-sm);
    border: 1px solid var(--dt-border-2);
    font-size: 13px;
  }
  .dt-security-label {
    color: var(--dt-text-secondary);
  }
  .dt-security-status {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: var(--dt-r-pill);
    border: 1px solid var(--dt-border-2);
  }
  .dt-security-status--enabled {
    color: var(--dt-cta);
    border-color: var(--dt-cta-glow);
    background: rgba(0, 231, 1, 0.08);
  }

  /* Sessions */
  .dt-session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .dt-session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--dt-bg);
    border-radius: var(--dt-r-sm);
    border: 1px solid var(--dt-border-2);
    font-size: 13px;
  }
  .dt-session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .dt-session-location {
    color: var(--dt-text-primary);
    font-weight: 500;
  }
  .dt-session-time {
    font-size: 11px;
    color: var(--dt-text-secondary);
  }
  .dt-session-status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dt-text-muted);
    padding: 2px 8px;
    border-radius: var(--dt-r-pill);
    background: var(--dt-border-2);
  }
  .dt-session-status--current {
    color: var(--dt-cta);
    background: rgba(0, 231, 1, 0.12);
    border: 1px solid var(--dt-cta-glow);
  }

  /* ==================================================================
     12. CRASH PAGE (Desktop 3-Pane)
     ================================================================== */

  .dt-crash-layout {
    display: flex;
    gap: 24px;
    align-items: stretch;
  }

  .dt-crash__chart {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .dt-crash__bets {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  #desktop-shell .stage {
    min-height: 500px;
    height: 100%;
  }

  /* ==================================================================
     13. BONUS GRID
     ================================================================== */

  .dt-bonus-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 32px;
  }
  @media (min-width: 1280px) {
    .dt-bonus-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  .dt-bonus-card {
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform, box-shadow, border-color 0.3s var(--dt-ease);
  }
  .dt-bonus-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--dt-shadow-md);
    border-color: var(--dt-border-3);
  }
  .dt-bonus-card h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--dt-text-primary);
  }
  .dt-bonus-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dt-text-secondary);
  }
  .dt-bonus-cta {
    align-self: flex-start;
  }

  /* ==================================================================
     14. REFERRAL BOX
     ================================================================== */

  .dt-referral-box {
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-lg);
    padding: 20px;
    margin-bottom: 24px;
  }
  .dt-referral-box label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dt-text-muted);
    margin-bottom: 8px;
  }
  .dt-ref-link-row {
    display: flex;
    gap: 10px;
  }
  .dt-ref-link {
    flex: 1;
    padding: 12px 16px;
    background: var(--dt-surface-1);
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-md);
    color: var(--dt-text-primary);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s var(--dt-ease);
    min-width: 240px;
  }
  .dt-ref-link:focus {
    border-color: var(--dt-blue);
  }
  .dt-copy-btn {
    background: var(--dt-blue);
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--dt-r-md);
  }
  .dt-copy-btn:hover {
    opacity: 0.9;
  }

  /* Stats Grid */
  .dt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
  }

  .dt-stat-card {
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-lg);
    padding: 20px;
    text-align: center;
    transition: background-color, border-color, box-shadow 0.3s var(--dt-ease);
  }
  .dt-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--dt-shadow-md);
  }
  .dt-stat-card__label {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dt-text-muted);
  }
  .dt-stat-card__value {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--dt-cta);
    font-variant-numeric: tabular-nums;
  }

  /* Tree */
  .dt-tree {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .dt-tree__node {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--dt-bg);
    border-radius: var(--dt-r-sm);
    border: 1px solid var(--dt-border-2);
    font-size: 13px;
  }
  .dt-tree__node--root {
    border-color: var(--dt-cta-glow);
    background: rgba(0, 231, 1, 0.08);
  }
  .dt-tree__name {
    font-weight: 600;
    color: var(--dt-text-primary);
  }
  .dt-tree__earnings {
    color: var(--dt-cta);
    font-size: 11px;
  }
  .dt-tree__status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--dt-r-pill);
    background: var(--dt-border-2);
  }
  .dt-tree__status--active {
    color: var(--dt-cta);
    background: rgba(0, 231, 1, 0.12);
  }

  /* ==================================================================
     15. PROFILE LAYOUT (Desktop Two-Column)
     ================================================================== */

  .dt-dashboard__profile-wrapper {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
  }

  .dt-profile-card {
    flex: 1;
    min-width: 320px;
    background: var(--dt-surface-2);
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-lg);
    overflow: hidden;
    transition: background-color, border-color, box-shadow 0.3s var(--dt-ease);
  }
  .dt-profile-card:hover {
    box-shadow: var(--dt-shadow-md);
  }

  /* ---- BUG: profile page text alignment (desktop) ------------------------
     The hero row (.dt-profile-header) is a flex row: avatar | .dt-profile-info.
     The name/meta rules were written as DESCENDANT selectors
     (".dt-profile-info h1") so they styled the text but left the container's
     own alignment to the inherited default, while the balance card below
     forces text-align:center. Result: the user's name sat on an undeclared
     baseline next to the avatar, then the balance jumped to a centred axis
     and every menu row used yet another inset -- the page looked hand-placed.

     Fix: one shared horizontal rhythm for the whole desktop profile card.
     The card is the gutter; children align to a single inset. */
  .dt-profile-card {
    text-align: left;
  }
  .dt-profile-header {
    /* align the avatar and the text block on one shared line */
    align-items: center;
    text-align: left;
  }
  .dt-profile-info {
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
  }
  .dt-profile-info h1,
  .dt-profile-info p {
    text-align: left;
  }
  .dt-profile-menu-item > span {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
  }
  .dt-profile-menu-item > i:last-child,
  .dt-profile-menu-item > svg:last-child {
    flex: 0 0 auto;
    margin-left: 12px;
  }

  .dt-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, var(--dt-surface-2) 0%, var(--dt-surface-3) 100%);
    border-bottom: 1px solid var(--dt-border-2);
  }
  .dt-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--dt-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
  }
  .dt-profile-info h1 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--dt-text-primary);
  }
  .dt-profile-info p {
    margin: 0;
    font-size: 13px;
    color: var(--dt-text-secondary);
  }

  .dt-profile-balance-card {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--dt-border-2);
  }
  .dt-profile-balance {
    margin: 0 0 4px;
    font-size: 32px;
    font-weight: 800;
    color: var(--dt-cta);
    font-variant-numeric: tabular-nums;
  }
  .dt-profile-balance-label {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dt-text-muted);
  }

  .dt-profile-menu {
    padding: 8px;
  }
  .dt-profile-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin: 4px 8px;
    border-radius: var(--dt-r-sm);
    color: var(--dt-text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: background-color, border-color, color 0.2s var(--dt-ease);
    min-height: 44px;
  }
  .dt-profile-menu-item:hover {
    background: var(--dt-surface-1);
  }
  .dt-profile-menu-item i:first-child,
  .dt-profile-menu-item svg:first-child {
    color: var(--dt-blue);
    margin-right: 12px;
    width: 18px;
    text-align: center;
  }
  .dt-profile-menu-item i:last-child,
  .dt-profile-menu-item svg:last-child {
    color: var(--dt-text-muted);
  }
  .dt-profile-menu-item--danger {
    color: var(--dt-alert);
  }
  .dt-profile-menu-item--danger i:first-child,
  .dt-profile-menu-item--danger svg:first-child {
    color: var(--dt-alert);
  }

  /* ==================================================================
     16. BUTTONS (Desktop Override)
     ================================================================== */

  #desktop-shell .btn--cta {
    background: var(--dt-cta);
    color: var(--dt-text-cta);
    box-shadow: 0 0 16px var(--dt-cta-glow);
  }
  #desktop-shell .btn--cta:hover:not(:active) {
    background: var(--dt-cta-hover);
    box-shadow: 0 0 24px rgba(0, 231, 1, 0.5);
  }

  #desktop-shell .btn--ghost {
    background: var(--dt-surface-2);
    color: var(--dt-text-primary);
    border: 1px solid var(--dt-border-2);
  }
  #desktop-shell .btn--ghost:hover:not(:active) {
    background: var(--dt-border-3);
  }

  /* ==================================================================
     17. REDUCED MOTION
     ================================================================== */

  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
    }
  }

  /* ==================================================================
     18. UTILITY CLASSES
     ================================================================== */

  .dt-hidden { display: none !important; }
  .dt-flex { display: flex; }
  .dt-grid { display: grid; }
  .dt-flex-center { justify-content: center; align-items: center; }
  .dt-text-center { text-align: center; }
  .dt-mb-16 { margin-bottom: 16px; }
  .dt-mb-24 { margin-bottom: 24px; }
  .dt-mt-16 { margin-top: 16px; }
  .dt-mt-24 { margin-top: 24px; }


  .dt-live-item--empty { color: var(--dt-text-muted); font-style: italic; }
  .dt-table td[colspan] { color: var(--dt-text-muted); text-align: center; padding: 18px; }
  .dt-pin-dialog {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
  }
  .dt-pin-dialog[hidden] { display: none; }
  .dt-pin-dialog__card {
    position: relative;
    width: min(100%, 390px);
    padding: 28px;
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-xl);
    background: var(--dt-surface-2);
    box-shadow: var(--dt-shadow-lg);
    text-align: center;
  }
  .dt-pin-dialog__card h2 { margin: 0 0 8px; font-size: 22px; }
  .dt-pin-dialog__card p { color: var(--dt-text-secondary); font-size: 13px; line-height: 1.6; }
  .dt-pin-dialog__card input {
    width: 100%;
    margin: 18px 0 10px;
    padding: 12px;
    border: 1px solid var(--dt-border-2);
    border-radius: var(--dt-r-md);
    background: var(--dt-bg);
    color: var(--dt-text-primary);
    text-align: center;
    letter-spacing: .35em;
    font-size: 20px;
  }
  .dt-pin-dialog__error { min-height: 20px; color: var(--dt-alert); }
  .dt-pin-dialog__close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: var(--dt-text-muted);
    font-size: 24px;
    cursor: pointer;
  }

  /* End of Desktop UI */
}

/* End of Desktop UI */
/* ==========================================================================
   STACK — Premium Light Desktop (v2)
   Scoped to #desktop-shell. Mobile CSS is untouched.
   ========================================================================== */
@media (min-width: 1024px) {
   #desktop-shell {
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
    background: #050A10;
    color: #1F2937;
    font-family: 'Inter', Roboto, system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow: visible;      /* was hidden — this clipped the sidebar scroll */
    height: auto;
  }
  #desktop-shell[hidden] { display: none !important; }
     #desktop-shell .dt-dashboard {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px; gap: 16px;
      margin-left: 240px !important;
      padding-left: 16px !important;
      min-height: calc(100vh - 60px);
      background: #050A10;
      transition: margin-left, grid-template-columns, background-color 0.3s ease;
    }
     #desktop-shell.dx-sidebar-collapsed .dt-dashboard {
      margin-left: 72px !important;
    }
    #desktop-shell.dx-right-panel-collapsed .dt-dashboard {
     grid-template-columns: 1fr 0;
   }
   #desktop-shell .dt-header {
    position: sticky; top: 0; z-index: 100;
    height: 60px; padding: 0 24px;
    display: flex; align-items: center; gap: 16px;
    background: #0A111A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
  }
  #desktop-shell .dt-header__center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 32px;
  }
  #desktop-shell .dt-logo img { height: 30px; }
   #desktop-shell .dt-search { width: 100%; max-width: 520px; position: relative; }
   #desktop-shell .dt-search__input {
    width: 100%; height: 40px; padding: 0 16px 0 42px;
    border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px;
    background: rgba(0, 0, 0, 0.25); color: #F8FAFC; outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', Roboto, system-ui, sans-serif;
  }
   #desktop-shell .dt-search__input:focus {
    border-color: #00E701; box-shadow: 0 0 0 3px rgba(0, 231, 1, 0.15);
  }
   #desktop-shell .dt-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8492A6; }
   #desktop-shell .dt-balance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px !important;
    max-height: 36px !important;
    min-height: 32px !important;
    line-height: 1 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
  }
   #desktop-shell .dt-btn-wallet {
    background: #00E701; color: #000000; border: none;
    min-height: 38px; padding: 8px 16px; border-radius: 10px; font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: 'Inter', Roboto, system-ui, sans-serif;
  }
   #desktop-shell .dt-btn-wallet:hover { background: #1FFF20; transform: translateY(-1px); }
   #desktop-shell .dt-iconbtn, #desktop-shell .dt-sidebar-toggle {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
    color: #B1BAD3;
  }
   #desktop-shell .dt-iconbtn:hover, #desktop-shell .dt-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.15); color: #FFFFFF;
  }
   #desktop-shell .dt-user-trigger { background: #00E701; color: #000000; }
   #desktop-shell .dt-user-dropdown {
    background: #111824; border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  }
   #desktop-shell .dt-dropdown-item { color: #B1BAD3; }
   #desktop-shell .dt-dropdown-item:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
   #desktop-shell .dt-dropdown-item--danger { color: #FF2A6D; }
    #desktop-shell .dt-sidebar {
     background: #0A111A; border-right: 1px solid rgba(255, 255, 255, 0.05);
     width: 240px !important; max-width: 240px !important; padding: 8px 0;
   }
    #desktop-shell.dx-sidebar-collapsed .dt-sidebar {
     width: 72px !important;
     max-width: 72px !important;
   }
   #desktop-shell .dt-nav { padding: 8px; }
   #desktop-shell .dt-nav__label { color: #8492A6; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
   #desktop-shell .dt-nav__item {
    color: #9CA3AF; border-radius: 10px; font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 10px 14px; margin: 4px 8px; min-height: 40px;
  }
   #desktop-shell .dt-nav__item:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
   #desktop-shell .dt-nav__item--active { background: rgba(0, 231, 1, 0.12); color: #00E701; box-shadow: inset 3px 0 0 #00E701; }
   #desktop-shell .dt-nav__item--active .dt-nav__icon { color: #00E701; }
   #desktop-shell .dt-user-card, #desktop-shell .dt-sidebar__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05); background: #0A111A;
  }
   #desktop-shell .dt-user-name { color: #FFFFFF; }
   #desktop-shell .dt-user-email { color: #8492A6; }
    #desktop-shell .dt-main {
     background: #050A10; overflow-y: auto;
     min-width: 0;
     min-height: calc(100vh - var(--dt-header-height));
   }
    #desktop-shell .dt-container { max-width: 1440px; margin: 0 auto; padding: 24px; }
   #desktop-shell .dt-page-title {
    font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
    color: #FFFFFF; margin: 0 0 6px;
  }
   #desktop-shell .dt-page-subtitle { font-size: 15px; line-height: 1.6; color: #8492A6; margin: 0; max-width: 720px; }
   #desktop-shell .dt-section__title, #desktop-shell .dt-widget__title { color: #FFFFFF; }
   #desktop-shell .dt-section__link { color: #8492A6; }
   #desktop-shell .dt-widget {
    background: #111824; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
    padding: 20px; margin-bottom: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
   #desktop-shell .dt-widget:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.4);
  }
   #desktop-shell .dt-widget__title {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 12px; color: #FFFFFF;
  }
   #desktop-shell .dt-right-panel {
    background: #0A111A; border-left: 1px solid rgba(255, 255, 255, 0.05);
    width: 320px;
  }
   #desktop-shell .dt-right-panel__content { padding: 16px; }
  #desktop-shell .dt-game-grid { display: grid; grid-template-columns: repeat(auto-fill, 147px); gap: 16px; }
   #desktop-shell .dt-game-card, #desktop-shell .game-card {
    background: #111824; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3); overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
   #desktop-shell .dt-game-card:hover, #desktop-shell .game-card:hover {
    transform: translateY(-3px); box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.4);
  }
   #desktop-shell .game-card__name { color: #FFFFFF; }
   #desktop-shell .game-card__players { color: #8492A6; }
  #desktop-shell .card-overlay { background: rgba(31, 41, 55, 0.72); }
   #desktop-shell .btn-play { background: #00E701; color: #000000; }
  #desktop-shell .dt-crash-layout {
    display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 24px; align-items: start;
  }
  #desktop-shell .dt-crash__chart, #desktop-shell .dt-crash__bets {
    background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 12px;
    padding: 24px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  #desktop-shell .dt-crash__bets { display: flex; flex-direction: column; gap: 16px; }
  #desktop-shell .stage {
    min-height: 480px; height: 480px; border-radius: 12px;
    background: #0F212E; border: 1px solid #1F2937;
  }
  #desktop-shell .stage__mult { font-size: 64px; }
  #desktop-shell .betcard { background: transparent; border: none; box-shadow: none; padding: 0; }
  #desktop-shell .betrow__label { color: #6B7280; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
  #desktop-shell .betrow__controls { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 10px; }
  #desktop-shell .betinput { color: #1F2937; background: transparent; font-weight: 700; }
  #desktop-shell .betstep { color: #4B5563; }
   #desktop-shell .betstep:hover { background: rgba(0, 231, 1, 0.1); color: #00E701; }
  #desktop-shell .betquick__btn { background: #F3F4F6; border: 1px solid #E5E7EB; color: #4B5563; border-radius: 8px; }
   #desktop-shell .betquick__btn:hover { background: rgba(0, 231, 1, 0.1); color: #00E701; border-color: rgba(0, 231, 1, 0.3); }
  #desktop-shell .betcard__hint { color: #6B7280; }
  #desktop-shell .play {
    border: none; border-radius: 12px; font-weight: 700;
    transition: transform 0.2s ease, filter 0.2s ease;
  }
   #desktop-shell .play--bet, #desktop-shell .play--cash {
    background: #00E701; color: #000000;
    box-shadow: 0 4px 12px rgba(0, 231, 1, 0.35);
  }
   #desktop-shell .play--bet:hover, #desktop-shell .play--cash:hover {
    filter: brightness(1.08); transform: translateY(-1px);
  }
   #desktop-shell .play--queued {
    background: rgba(0, 231, 1, 0.1); color: #00E701;
    box-shadow: inset 0 0 0 1px rgba(0, 231, 1, 0.3);
  }
  #desktop-shell .play--lost { background: #F3F4F6; color: #6B7280; box-shadow: none; }
  #desktop-shell .history { gap: 8px; padding: 16px 0 0; }
  #desktop-shell .history__item {
    background: #F3F4F6; color: #4B5563; box-shadow: none; animation: none;
    border-radius: 999px; font-size: 12px; padding: 5px 12px;
  }
  #desktop-shell .history__item--high { background: #ECFDF5; color: #047857; box-shadow: none; }
  #desktop-shell .history__item--low { background: #FEF2F2; color: #B91C1C; box-shadow: none; }
  #desktop-shell .fineprint { color: #6B7280; margin-top: 12px; text-align: left; }

   #desktop-shell .dt-table { background: transparent; }
   #desktop-shell .dt-table th { color: #8492A6; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
   #desktop-shell .dt-table td { color: #B1BAD3; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
   #desktop-shell .dt-table__accent { color: #00E701; }
   #desktop-shell .dt-live-item, #desktop-shell .dt-win-item, #desktop-shell .dt-stat, #desktop-shell .dt-session-item {
    color: #B1BAD3; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
   #desktop-shell .dt-live-game, #desktop-shell .dt-win-user { color: #9CA3AF; }
   #desktop-shell .dt-win-amount--big { color: #00E701; text-shadow: none; }
   #desktop-shell .dt-win-amount--med { color: #F59E0B; }
   #desktop-shell .dt-stat__label, #desktop-shell .dx-stat__label { color: #8492A6; }
   #desktop-shell .dt-stat__value, #desktop-shell .dx-stat__value {
    color: #FFFFFF; font-variant-numeric: tabular-nums;
  }
   #desktop-shell .dt-bonus-card, #desktop-shell .dt-profile-card, #desktop-shell .dt-stat-card {
    background: #111824; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  }
   #desktop-shell .dt-bonus-card h2, #desktop-shell .dt-profile-info h1 { color: #FFFFFF; }
   #desktop-shell .dt-bonus-card p, #desktop-shell .dt-profile-info p { color: #8492A6; }
   #desktop-shell .dt-ref-link {
    background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.12);
    color: #F8FAFC; border-radius: 10px;
  }
   #desktop-shell .dt-copy-btn { background: #00E701; color: #000000; border-radius: 10px; }
   #desktop-shell .dt-stat-card__value { color: #00E701; }
   #desktop-shell .dt-empty, #desktop-shell .dx-empty { color: #8492A6; font-style: italic; margin: 0; padding: 8px 0; }
   #desktop-shell .dx-feed__row {
    display: flex; justify-content: space-between; padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: #B1BAD3;
  }
   #desktop-shell .dx-feed__row strong { color: #FFFFFF; font-variant-numeric: tabular-nums; }
   #desktop-shell .dt-pin-dialog { background: rgba(0, 9, 18, 0.65); }
   #desktop-shell .dt-pin-dialog__card {
    background: #111824; border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }
   #desktop-shell .dt-pin-dialog__card h2 { color: #FFFFFF; }
   #desktop-shell .dt-pin-dialog__card p { color: #8492A6; }
   #desktop-shell .dt-pin-dialog__card input {
    background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.12);
    color: #F8FAFC;
  }
   #desktop-shell .dt-pin-dialog__error { color: #FF2A6D; }
   #desktop-shell .dt-pin-dialog__close { color: #8492A6; }
   #desktop-shell .btn--cta { background: #00E701; color: #000000; box-shadow: 0 0 16px rgba(0, 231, 1, 0.3); }
   #desktop-shell .btn--cta:hover:not(:active) {
    background: #1FFF20; box-shadow: 0 0 24px rgba(0, 231, 1, 0.5);
  }
   #desktop-shell .btn--ghost {
    background: rgba(255, 255, 255, 0.05); color: #B1BAD3;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
   #desktop-shell .btn--ghost:hover:not(:active) { background: rgba(255, 255, 255, 0.1); }
   #desktop-shell ::-webkit-scrollbar { width: 10px; height: 10px; }
   #desktop-shell ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15); border-radius: 999px;
    border: 2px solid transparent; background-clip: content-box;
  }
   #desktop-shell ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25); background-clip: content-box;
  }
   @media (prefers-reduced-motion: reduce) {
    #desktop-shell * {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
    }
  }
   @media (max-width: 1279px) {
    #desktop-shell .dt-dashboard { grid-template-columns: 72px minmax(0, 1fr); }
    #desktop-shell .dt-right-panel { display: none; }
    #desktop-shell .dt-sidebar {
      width: var(--dt-sidebar-width-collapsed);
      max-width: var(--dt-sidebar-width-collapsed);
    }
    #desktop-shell .dt-nav__label-text, #desktop-shell .dt-badge { display: none; }
    #desktop-shell .dt-nav__item { justify-content: center; padding: 12px; }
  }

  /* Hide the mobile shell's CONTENTS while the desktop shell is active.

     #shell is a structural wrapper that also CONTAINS #desktop-shell, so the
     wrapper itself must stay laid out. Hiding it wholesale collapsed the whole
     desktop view to 0x0 and left a blank page. */
   body.dx-desktop-active #shell {
     display: block !important;
     min-height: 100dvh;
   }
   body.dx-desktop-active #shell > *:not(#desktop-shell) {
     display: none !important;
   }

    /* Hide the drawer's sidebar wrapper on desktop — we use the real sidebar. */
    #desktop-shell .dt-drawer__sidebar {
      display: none;
     }
     #desktop-shell .dt-drawer__sidebar {
       display: none;
     }
   }

/* Mobile-only toggle inside the desktop header, visible at <1024px
   for the fallback case where the desktop shell is briefly shown. */
.dt-header__mobile-toggle {
  display: none;
}
@media (max-width: 1023px) {
  /* Hide desktop shell entirely on mobile — bottom nav handles navigation */
  #desktop-shell,
  .desktop-view,
  .hidden-on-mobile.dt-desktop-active {
    display: none !important;
  }
  .dt-header__mobile-toggle {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #B1BAD3;
    font-size: 14px;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease,
                color 0.2s ease,
                transform 0.2s ease;
  }
}

/* Desktop-only mobile drawer (outside the dark-theme media query,
   since #dtMobileDrawer can exist before desktop.js runs). */


