/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --bg-primary: #0a0a0a;
    --bg-secondary: #101010;
    --bg-tertiary: #1a1a1a;
    --bg-hover: #242424;
    --bg-active: #2a2a2a;
    
    /* Macau Green Metallic Gradient */
    --macau-green-start: #00A86B;
    --macau-green-mid: #00C87E;
    --macau-green-end: #00E691;
    --macau-green-dark: #008050;
    --macau-green-light: #33FFAA;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #606060;
    
    /* Borders */
    --border-color: #1f1f1f;
    --border-hover: #2a2a2a;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    /* Metallic Green Gradient */
    --gradient-metallic: linear-gradient(135deg, 
        #00A86B 0%, 
        #00C87E 25%, 
        #00E691 50%, 
        #00C87E 75%, 
        #00A86B 100%
    );
    
    --gradient-metallic-hover: linear-gradient(135deg, 
        #00C87E 0%, 
        #00E691 25%, 
        #33FFAA 50%, 
        #00E691 75%, 
        #00C87E 100%
    );
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    font-size: 14px;
}

/* Sidebar Header (logo + toggle, inside the sidebar) */
.sidebar-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.25rem 0.25rem 1rem;
    margin-bottom: 0.5rem;
}

.sidebar-header-logo {
    height: 52px;
    width: auto;
    display: block;
}

/* Show full logo expanded, icon when collapsed */
.sidebar-header-logo.logo-icon {
    display: none;
}

body.sidebar-collapsed .sidebar-header-logo.logo-full {
    display: none;
}

body.sidebar-collapsed .sidebar-header-logo.logo-icon {
    display: block;
}

/* Sidebar (stuck to the left edge, top to bottom) */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    z-index: 1002;
    overflow: hidden;
    border: none;
    transition: width 0.3s ease;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

/* Sidebar Banner */
.sidebar-banner {
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-banner img {
    display: block;
    width: 100%;
    height: auto;
}

/* Sidebar Separator (partial width, not full left-to-right) */
.sidebar-separator {
    height: 1px;
    background-color: #1f1f1f;
    margin: 0.625rem 0.25rem;
    flex-shrink: 0;
}

/* Sidebar Support (pinned to bottom) */
.sidebar-support {
    margin-top: auto;
    flex-shrink: 0;
}

.support-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    color: #b0b0b0;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.support-btn:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

.support-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b0b0;
    flex-shrink: 0;
}

.support-btn:hover .support-icon {
    color: #ffffff;
}

.support-label {
    flex: 1;
    text-align: left;
}

.support-badge {
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #00A86B 0%, #00C87E 100%);
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #04150d;
    flex-shrink: 0;
}

/* Sidebar Logo */
.sidebar-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.25rem 0.25rem 1rem;
    margin-bottom: 0.5rem;
}

.sidebar-logo img {
    height: 56px;
    width: auto;
    display: block;
}

/* Navigation Items (flat list) */
.nav-card {
    background-color: transparent;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.nav-card:hover {
    background-color: var(--bg-hover);
}

.nav-card-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-card:hover .nav-card-header {
    color: var(--text-primary);
}

.nav-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.nav-card-title svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-card:hover .nav-card-title svg {
    color: var(--macau-green-end);
}

.nav-card-title span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-card-arrow {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-arrow {
    color: var(--text-secondary);
}

/* Expandable nav sections (Casino / Sports) */
.nav-section-toggle {
    width: 100%;
}

.nav-section-chev {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: transform 0.3s ease, color 0.2s ease;
}

.nav-section.open .nav-section-chev {
    transform: rotate(180deg);
}

.nav-sub {
    display: none;
    flex-direction: column;
    gap: 0.0625rem;
    padding: 0.125rem 0 0.25rem 0.5rem;
}

.nav-section.open .nav-sub {
    display: flex;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-sub-item svg {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.nav-sub-item:hover {
    background-color: #1a1a1a;
    color: var(--text-primary);
}

.nav-sub-item:hover svg {
    color: var(--text-primary);
}

.nav-sub-item.active {
    color: var(--accent-green);
}

.nav-sub-item.active svg {
    color: var(--accent-green);
}

.nav-badge {
    padding: 0.125rem 0.375rem;
    background: var(--gradient-metallic);
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    color: white;
    margin-left: auto;
}

.lang-flag {
    display: inline-flex;
    flex-shrink: 0;
    width: 22px;
    height: 16px;
    border-radius: 3px;
    overflow: hidden;
}

.lang-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.lang-chev {
    color: #606060;
    flex-shrink: 0;
}

.vip-text {
    background: var(--gradient-metallic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.info-icon {
    margin-left: auto;
    opacity: 0.5;
}

/* Collapsed sidebar state */
body.sidebar-collapsed .sidebar {
    width: 76px;
}

body.sidebar-collapsed .sidebar-header-logo {
    height: 34px;
    width: auto;
}

body.sidebar-collapsed .topbar {
    left: 76px;
}

body.sidebar-collapsed .sidebar-banner {
    display: none;
}

body.sidebar-collapsed .nav-card-title span,
body.sidebar-collapsed .nav-card-arrow,
body.sidebar-collapsed .nav-badge {
    display: none;
}

body.sidebar-collapsed .nav-card-header {
    justify-content: center;
    padding: 0.625rem 0;
}

body.sidebar-collapsed .nav-card-title {
    justify-content: center;
    gap: 0;
}

body.sidebar-collapsed .main-wrapper {
    margin-left: calc(76px + 0.75rem);
}

/* Main Wrapper */
.main-wrapper {
    margin-left: calc(260px + 0.75rem);
    margin-top: calc(80px + 0.75rem);
    margin-right: 0.75rem;
    margin-bottom: 0.75rem;
    min-height: calc(100vh - 80px - 1.5rem);
    background-color: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    transition: margin-left 0.3s ease;
}

/* Content Container - Centered with max width */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Sportsbook embedded view */
.sportsbook-view {
    height: calc(100vh - 80px - 1.5rem);
    margin: 0;
    padding: 0;
}

.sportsbook-view[hidden] { display: none; }

/* Lottery view */
.lottery-view[hidden] { display: none; }

.lottery-header {
    margin-bottom: 1.5rem;
}

.lottery-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
}

.lottery-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

/* Providers popup */
.providers-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.providers-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.providers-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.providers-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.providers-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.providers-modal-close:hover {
    color: var(--text-primary);
}

.providers-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    padding: 1.25rem;
    overflow-y: auto;
}

.provider-select-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 1rem 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.provider-select-card:hover {
    border-color: var(--macau-green-light);
    transform: translateY(-2px);
}

.provider-select-card .provider-count {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Deposit popup */
.deposit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.deposit-modal {
    background: var(--bg-secondary);
    border: none;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.deposit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.deposit-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.deposit-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.deposit-modal-close:hover {
    color: var(--text-primary);
}

.deposit-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.75rem 1.25rem 0;
    padding: 0.6rem 1rem;
    background: var(--bg-primary);
    border: none;
    border-radius: 10px;
}

.deposit-balance-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.deposit-balance-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--macau-green-light);
}

.deposit-section-label {
    margin: 0.9rem 1.25rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.deposit-methods {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    padding: 0 1.25rem;
}

.deposit-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0.45rem 0.3rem;
    background: var(--bg-primary);
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.deposit-method img {
    height: 20px;
    max-width: 100%;
    object-fit: contain;
}

.deposit-method:hover {
    background: rgba(255, 255, 255, 0.06);
}

.deposit-method.active {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px var(--macau-green-light);
}

.deposit-amount-display {
    margin: 0 1.25rem 0.35rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
}

.deposit-amount-slider {
    width: calc(100% - 2.5rem);
    margin: 0 1.25rem;
    accent-color: var(--macau-green-light);
    cursor: pointer;
}

.deposit-quick-amounts {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.4rem;
    margin: 0.75rem 1.25rem 0;
}

.quick-amount {
    padding: 0.4rem 0;
    background: var(--bg-primary);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.quick-amount:hover {
    background: rgba(255, 255, 255, 0.06);
}

.quick-amount.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--macau-green-light);
}

.deposit-submit {
    display: block;
    width: calc(100% - 2.5rem);
    margin: 0.9rem 1.25rem 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--macau-green-light), var(--macau-green-dark));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.deposit-submit:hover {
    opacity: 0.9;
}

.sportsbook-view iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background-color: #0A0A0B;
}

/* Top Bar */
.topbar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    background-color: var(--bg-primary);
    padding: 0.75rem;
    z-index: 1001;
    height: 80px;
    transition: left 0.3s ease;
}

.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sidebar toggle button */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-logo img {
    display: block;
    height: 68px;
    width: auto;
    object-fit: contain;
}

/* Mobile-only topbar logo (hidden on desktop) */
.topbar-logo-mobile {
    display: none;
}

/* Top Bar Menu */
.topbar-menu {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.25rem;
    margin-left: 1rem;
}

.topbar-menu-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background-color: transparent;
    border: none;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.topbar-menu-item svg {
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.topbar-menu-item:hover {
    color: var(--text-primary);
}

.topbar-menu-item.active {
    background: var(--gradient-metallic);
    color: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 168, 107, 0.35);
}

.topbar-menu-item.active svg {
    color: var(--bg-primary);
}

.search-toggle {
    padding: 0.375rem;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    color: var(--text-primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Balance chip (green gradient) + top-up button */
.balance-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.375rem 0.375rem 0.875rem;
    background: linear-gradient(135deg, #00A86B 0%, #00C87E 50%, #00A86B 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0, 168, 107, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.balance-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 168, 107, 0.5);
}

.balance-amount {
    font-size: 0.875rem;
    font-weight: 700;
    color: #04150d;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.balance-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: rgba(4, 21, 13, 0.25);
    border-radius: 6px;
    color: #04150d;
    flex-shrink: 0;
}

.icon-btn {
    position: relative;
    padding: 0.375rem;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background-color: #ff4444;
    border-radius: 50%;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-primary {
    background: var(--gradient-metallic);
    color: var(--bg-primary);
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--gradient-metallic-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
}

/* Wins Carousel Section */
.wins-carousel-section {
    margin: 1rem 0;
}

.wins-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.wins-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--gradient-metallic);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.wins-tabs {
    display: flex;
    gap: 0.5rem;
}

.wins-tab {
    padding: 0.375rem 0.75rem;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.wins-tab:hover {
    color: var(--text-primary);
}

.wins-tab.active {
    color: var(--macau-green-light);
    border-bottom-color: var(--macau-green-start);
}

.wins-carousel {
    display: flex;
    gap: 0.5rem;
    overflow: hidden;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
    position: relative;
}

.wins-carousel::-webkit-scrollbar {
    display: none;
}

.wins-carousel-track {
    display: flex;
    gap: 0.5rem;
    animation: scrollWins 30s linear infinite;
}

@keyframes scrollWins {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.win-card {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 150px;
    padding: 0.375rem;
    background-color: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.win-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 168, 107, 0.2);
}

.win-game-image {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
    overflow: hidden;
    border-radius: 6px;
}

.win-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.win-info {
    flex: 1;
    min-width: 0;
    padding: 0;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.win-username {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.win-amount {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--macau-green-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* USDT icon (wins + rounds) */
.usdt-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    object-fit: contain;
    flex-shrink: 0;
}

/* Promotional Carousel */
.promo-carousel {
    position: relative;
    background-color: transparent;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

/* Right-side shadow gradient (same as game rows) */
.promo-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to right, transparent, var(--bg-primary));
    pointer-events: none;
    z-index: 1;
}

.carousel-container {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Image-only banner slide (no text overlay) — sized for the loop */
.carousel-slide-image {
    padding: 0;
    min-width: 0;
    flex: 1 1 0;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    aspect-ratio: 2263 / 1160;
}

.promo-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.promo-card {
    flex: 1;
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.promo-card:hover {
    border-color: var(--macau-green-start);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 168, 107, 0.2);
}

.promo-content {
    flex: 1;
}

.promo-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-metallic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.promo-stats {
    display: flex;
    gap: 2rem;
}

.promo-stat {
    display: flex;
    flex-direction: column;
}

.promo-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.promo-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--macau-green-light);
}

.promo-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--macau-green-light);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Search Section */
.search-section {
    padding: 2.5rem 3rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--macau-green-start);
    box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.1);
}

.search-bar svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 2rem 3rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-tab:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.category-tab.active {
    background: var(--gradient-metallic);
    color: var(--bg-primary);
    border-color: transparent;
    font-weight: 600;
}

/* Filters Section */
.filters-section {
    display: flex;
    gap: 0.5rem;
    padding: 2rem 3rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

.filters-section::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.filter-btn.active {
    background: var(--gradient-metallic);
    color: var(--bg-primary);
    border-color: transparent;
}

/* Games Header Section */
.games-header-section {
    margin-bottom: 1.25rem;
}

/* Games menu row: tabs left, search right */
.games-menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.games-menu-row .games-category-tabs {
    flex: 0 1 auto;
    min-width: 0;
    padding-bottom: 0;
}

.games-menu-row .games-search-bar {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.games-search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.games-search-bar:focus-within {
    border-color: var(--macau-green-start);
    box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.1);
}

.games-search-bar svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.games-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.games-search-input::placeholder {
    color: var(--text-tertiary);
}

/* Games Category Tabs */
.games-category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.games-category-tabs::-webkit-scrollbar {
    display: none;
}

.game-category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.game-category-tab:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.game-category-tab.active {
    background-color: var(--bg-active);
    border-color: var(--macau-green-start);
    color: var(--macau-green-light);
}

.game-category-tab svg {
    flex-shrink: 0;
}

/* Games Section */
.games-section {
    padding: 0;
}

/* Game Providers Row */
.providers-section {
    margin-bottom: 1.5rem;
}

.providers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.providers-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.providers-row {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.providers-row::-webkit-scrollbar {
    display: none;
}

.provider-card {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 56px;
    padding: 0.5rem;
    background-color: #101010;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.provider-card:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
}

.provider-card img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Game Category Sections */
.game-category-section {
    margin-bottom: 1.5rem;
    position: relative;
}

.game-category-section:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.see-all-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.see-all-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--macau-green-start);
    color: var(--macau-green-light);
}

.see-all-btn svg {
    transition: transform 0.3s ease;
}

.see-all-btn:hover svg {
    transform: translateX(2px);
}

/* Games Carousel Container */
.games-carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.games-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to right, transparent, var(--bg-primary));
    pointer-events: none;
    z-index: 1;
}

.games-grid {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.games-grid::-webkit-scrollbar {
    display: none;
}

.games-grid .game-card {
    flex-shrink: 0;
    width: 152px;
}

.game-card-fallback {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    text-align: center;
    border-radius: 8px;
    box-sizing: border-box;
}

.game-card-fallback .fallback-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.game-card-fallback .fallback-provider {
    font-size: 0.6875rem;
    color: var(--macau-green-start);
    font-weight: 500;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-count {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.game-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 1;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--macau-green-start);
    box-shadow: 0 8px 24px rgba(0, 168, 107, 0.2);
}

.game-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.game-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--gradient-metallic);
    color: var(--bg-primary);
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
}

/* Latest Round & Race Widget */
.latest-rounds-section {
    margin-top: 2.5rem;
}

.latest-rounds-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.latest-rounds-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.latest-rounds-tabs {
    display: flex;
    gap: 0.25rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
}

.latest-rounds-tab {
    padding: 0.375rem 0.875rem;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.latest-rounds-tab:hover {
    color: var(--text-primary);
}

.latest-rounds-tab.active {
    background-color: var(--bg-active);
    color: var(--text-primary);
}

.latest-rounds-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.round-row {
    display: grid;
    grid-template-columns: 1.4fr 1.4fr 1.2fr 0.8fr 1.2fr;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.round-row:hover {
    background-color: var(--bg-hover);
}

.round-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    align-items: center;
    text-align: center;
}

.round-label {
    font-size: 0.625rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.round-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    max-width: 100%;
}

.round-game {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.round-game-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
}

.round-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.round-game-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.round-amount,
.round-profit {
    font-variant-numeric: tabular-nums;
}

.round-profit.positive {
    color: var(--macau-green-light);
}

.round-profit.negative {
    color: var(--text-secondary);
}

.currency-badge {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 800;
    flex-shrink: 0;
    color: #0a0a0a;
}

.currency-badge.usdt { background: #26A17B; color: #fff; }
.currency-badge.btc { background: #F7931A; color: #fff; }
.currency-badge.eth { background: #627EEA; color: #fff; }
.currency-badge.idr { background: #E11D48; color: #fff; }
.currency-badge.inr { background: #F97316; color: #fff; }
.currency-badge.mxn { background: #10B981; color: #fff; }
.currency-badge.brl { background: #16A34A; color: #fff; }
.currency-badge.trx { background: #EF0027; color: #fff; }

/* Responsive Design */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .carousel-slide {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar .nav-item span,
    .sidebar .nav-section-title {
        display: none;
    }
    
    .main-wrapper {
        margin-left: calc(60px + 0.5rem);
        margin-top: calc(80px + 0.5rem);
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        min-height: calc(100vh - 80px - 1rem);
    }
    
    .content-container {
        padding: 1rem;
    }
    
    .games-grid .game-card {
        width: 100px;
    }
    
    .games-grid {
        gap: 0.75rem;
    }
    
    .win-card {
        width: 140px;
    }
    
    .carousel-slide {
        padding: 1.5rem;
    }
    
    .promo-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .content-container {
        padding: 0.75rem;
    }
    
    .games-grid .game-card {
        width: 80px;
    }
    
    .games-grid {
        gap: 0.5rem;
    }
    
    .win-card {
        width: 132px;
    }
    
    .carousel-slide {
        padding: 1rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--macau-green-dark);
}

/* ===== Footer ===== */
.site-footer {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    height: 40px;
    width: auto;
    display: block;
    margin-bottom: 1rem;
}

.footer-desc {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
}

.footer-license {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    background-color: var(--bg-secondary);
    border: none;
    border-radius: 10px;
}

.footer-license-badge {
    height: 34px;
    width: auto;
    display: block;
}

.footer-license-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-heading {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-link {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.625rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-green);
}

.footer-payments {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-payments img {
    height: 28px;
    width: auto;
    display: block;
    padding: 0.375rem 0.625rem;
    background-color: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: 0.85;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.footer-payments img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.footer-bottom {
    padding: 1.5rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-disclaimer {
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-tertiary);
    margin: 0 0 0.75rem;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 0;
}

@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
}

/* ============================================================ */
/* ===== Mobile Bottom Navigation (hidden on desktop) ===== */
.bottom-nav {
    display: none;
}

.sidebar-overlay {
    display: none;
}

/* ============================================================ */
/* ===== MOBILE STYLES (<= 900px) ===== */
@media (max-width: 900px) {

    /* ---------- Layout: remove sidebar offset ---------- */
    .main-wrapper {
        margin-left: 0 !important;
        margin-top: calc(60px + 0.5rem);
    }

    .topbar {
        left: 0 !important;
        height: 60px;
        padding: 0.5rem 0.75rem;
    }

    /* ---------- Sidebar becomes off-canvas drawer ---------- */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        max-width: 84vw;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1200;
        border-radius: 0;
    }

    body.mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    /* hide the in-sidebar collapse toggle on mobile (use overlay/Menu) */
    .sidebar .sidebar-toggle {
        display: none;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1100;
    }

    body.mobile-nav-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    /* ---------- Topbar condense ---------- */
    .topbar-inner {
        padding: 0;
        gap: 0.5rem;
    }

    .topbar-left {
        min-width: 0;
    }

    /* show the logo top-left on mobile */
    .topbar-logo-mobile {
        display: flex;
    }

    .topbar-logo-mobile img {
        height: 40px;
    }

    /* hide the Casino/Sports/Lottery pill (bottom nav handles it) */
    .topbar-menu {
        display: none;
    }

    .topbar-actions {
        margin-left: auto;
        gap: 0.5rem;
    }

    .topbar-actions .btn-secondary {
        display: none;
    }

    .topbar-actions .btn-primary {
        padding: 0.4rem 0.9rem;
        font-size: 0.8125rem;
    }

    .balance-chip {
        padding: 0.35rem 0.6rem;
        font-size: 0.8125rem;
    }

    /* ---------- Content spacing + room for bottom nav ---------- */
    .content-container {
        padding: 0.75rem 0.75rem calc(76px + env(safe-area-inset-bottom));
        max-width: 100%;
    }

    .sportsbook-view {
        max-width: 100%;
        padding: 0;
        height: calc(100vh - 60px - 64px - env(safe-area-inset-bottom));
    }

    /* ---------- Bottom nav ---------- */
    .bottom-nav {
        display: grid;
        grid-template-columns: 1fr auto 1fr; /* side | center deposit | side */
        align-items: stretch;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(64px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        z-index: 1150;
    }

    /* left/right groups flanking the center deposit button */
    .bottom-nav-side {
        display: flex;
        align-items: stretch;
        min-width: 0;
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 0.625rem;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        transition: color 0.2s ease;
        position: relative;
        min-width: 0;
    }

    .bottom-nav-item svg {
        display: block;
    }

    .bottom-nav-item.active {
        color: var(--macau-green-light);
    }

    /* center deposit button: sits in the middle grid track, always dead-center */
    .bottom-nav-deposit {
        flex: 0 0 auto;
        width: 64px;
    }

    .bottom-nav-deposit-circle {
        width: 48px;
        height: 48px;
        margin-top: -22px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        background: linear-gradient(135deg, var(--macau-green-light), var(--macau-green-dark));
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), 0 0 0 5px var(--bg-secondary);
    }

    /* ---------- Casino area responsive ---------- */
    .promo-carousel {
        border-radius: 12px;
    }

    .carousel-slide-image {
        flex: 0 0 92%;
        aspect-ratio: 2263 / 1160;
        padding: 0;
    }

    /* let banners scroll horizontally on small screens */
    .carousel-container {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .carousel-container::-webkit-scrollbar { display: none; }

    .carousel-slide-image { scroll-snap-align: start; }

    /* hide right fade since it scrolls now */
    .promo-carousel::after {
        width: 40px;
    }

    .games-grid .game-card {
        width: 128px;
    }

    .provider-card {
        width: 92px;
        height: 48px;
    }

    .game-category-tab span {
        font-size: 0.8125rem;
    }

    /* stack search bar above the category tabs */
    .games-menu-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
    }

    .games-menu-row .games-search-bar {
        order: -1;
        width: 100%;
        flex: none;
        margin-bottom: 0;
    }

    .games-menu-row .games-category-tabs {
        width: 100%;
    }

    /* Latest round rows: allow horizontal scroll */
    .latest-rounds-list {
        overflow-x: auto;
    }

    /* footer already handled above */
}

/* smaller phones */
@media (max-width: 480px) {
    .games-grid .game-card {
        width: 116px;
    }

    .topbar-actions .btn-primary {
        padding: 0.35rem 0.7rem;
    }
}

/* ============================================================
   Game Launch Modal (Huidu API Launcher)
   ============================================================ */
.game-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.game-modal-container {
    width: 100%;
    max-width: 1100px;
    height: 85vh;
    background: #10131d;
    border: 1px solid #22293a;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.game-modal-header {
    height: 52px;
    background: #181d2a;
    border-bottom: 1px solid #262e40;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-modal-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-modal-badge {
    background: linear-gradient(135deg, var(--macau-green-start), var(--macau-green-end));
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.game-modal-provider {
    font-size: 13px;
    color: var(--text-secondary);
}

.game-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-modal-btn {
    background: #222a3d;
    border: 1px solid #313c54;
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.game-modal-btn:hover {
    background: #2d3854;
    color: var(--macau-green-end);
}

.game-modal-btn.close-btn:hover {
    background: #e53935;
    border-color: #e53935;
    color: #fff;
}

.game-modal-body {
    flex: 1;
    position: relative;
    background: #090b12;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-modal-loader {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    z-index: 10;
}

.game-modal-loader .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 230, 145, 0.2);
    border-top-color: var(--macau-green-end);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.game-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    z-index: 20;
    background: transparent;
}

/* ===== Auth (Sign in / Join) ===== */
.auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3200;
    padding: 1rem;
}

.auth-modal {
    background: var(--bg-secondary);
    border: none;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    padding-bottom: 1.25rem;
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
}

.auth-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
}

.auth-tab.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.auth-modal-close,
.feature-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
}

.auth-form {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 1.25rem 0;
}

.auth-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0.6rem 0 0.3rem;
}

.auth-input {
    background: var(--bg-primary);
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 0.7rem 0.9rem;
    outline: none;
}

.auth-input:focus {
    box-shadow: inset 0 0 0 1px var(--macau-green-light);
}

.auth-error {
    margin-top: 0.7rem;
    color: #ff6b6b;
    font-size: 0.82rem;
}

.auth-submit {
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--macau-green-start), var(--macau-green-end));
    border: none;
    border-radius: 10px;
    color: #04150d;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.75rem;
    cursor: pointer;
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* User chip (logged-in state) */
.user-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 999px;
    padding: 0.3rem 0.6rem 0.3rem 0.3rem;
}

.user-chip-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--macau-green-start), var(--macau-green-end));
    color: #04150d;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.user-chip-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-logout-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    padding: 0.15rem;
}

.user-logout-btn:hover {
    color: #ff6b6b;
}

/* Notifications dropdown */
.topbar-actions {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 3100;
    overflow: hidden;
}

.notif-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notif-item-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

/* ===== Feature modal (Promotions / VIP / Referral / Support / Info) ===== */
.feature-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3200;
    padding: 1rem;
}

.feature-modal {
    background: var(--bg-secondary);
    border: none;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.feature-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
}

.feature-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.feature-modal-body {
    padding: 0 1.25rem 1.25rem;
    overflow-y: auto;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.feature-modal-body p {
    margin: 0 0 0.75rem;
}

.promo-card {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.9rem;
    background: var(--bg-primary);
}

.promo-card img {
    width: 100%;
    display: block;
}

.promo-card-body {
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.promo-card-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.promo-claim-btn {
    background: linear-gradient(135deg, var(--macau-green-start), var(--macau-green-end));
    border: none;
    border-radius: 8px;
    color: #04150d;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.promo-claim-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.vip-tier {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 0.9rem;
    background: var(--bg-primary);
    border-radius: 10px;
    margin-bottom: 0.6rem;
}

.vip-tier-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #04150d;
    flex-shrink: 0;
}

.vip-tier-name {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.vip-tier-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.referral-link-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.referral-link-input {
    flex: 1;
    background: var(--bg-primary);
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 0.65rem 0.9rem;
    outline: none;
    min-width: 0;
}

.referral-copy-btn {
    background: linear-gradient(135deg, var(--macau-green-start), var(--macau-green-end));
    border: none;
    border-radius: 10px;
    color: #04150d;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0 1rem;
    cursor: pointer;
    white-space: nowrap;
}

/* Language dropdown */
.lang-wrap {
    position: relative;
}

.lang-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    z-index: 3100;
}

.lang-option {
    display: flex;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    text-align: left;
}

.lang-option:hover {
    background: var(--bg-hover);
}

.lang-option .lang-soon {
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.lang-option.active-lang {
    color: var(--macau-green-light);
}

@media (max-width: 768px) {
    .notif-dropdown {
        position: fixed;
        top: 60px;
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .user-chip-name {
        max-width: 70px;
    }
}
