/* MOBILE NAVBAR - FUNKY REDESIGN */
:root {
    --navbar-height: 75px;
    --funky-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --funky-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --funky-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --funky-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --funky-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --funky-bg: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --neon-purple: #b74aff;
    --neon-pink: #ff006e;
    --neon-blue: #00d4ff;
    --neon-green: #39ff14;
    --neon-yellow: #ffff00;
    --neon-orange: #ff9500;
    --text-white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.95);
    --funky-shadow: 0 -10px 40px rgba(183, 74, 255, 0.3);
}

/* MOBILE NAVBAR CONTAINER */
#mobileNavbarMain.mobile-navbar-container,
.mobile-navbar-container {
    display: none !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Show only on mobile devices */
@media (max-width: 768px) {
    #mobileNavbarMain.mobile-navbar-container,
    .mobile-navbar-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    html body {
        padding-bottom: calc(var(--navbar-height) + 10px) !important;
    }
}

/* Responsive height adjustments */
@media (max-width: 480px) {
    :root { --navbar-height: 65px; }
}

/* MAIN NAVBAR BAR */
.mobile-bottom-bar {
    background: var(--funky-bg) !important;
    backdrop-filter: blur(30px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(150%) !important;
    border-top: 2px solid transparent !important;
    border-image: linear-gradient(90deg, var(--neon-purple), var(--neon-pink), var(--neon-blue)) 1 !important;
    box-shadow: 
        0 -5px 30px rgba(183, 74, 255, 0.4),
        0 -10px 60px rgba(255, 0, 110, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    height: var(--navbar-height) !important;
    width: 100% !important;
    position: relative !important;
    overflow: visible !important;
}

/* Animated background effect */
.mobile-bottom-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(183, 74, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 0, 110, 0.1) 0%, transparent 50%);
    animation: funkyPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes funkyPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* CONTENT CONTAINER */
.mobile-bar-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100% !important;
    padding: 10px 15px !important;
    gap: 12px !important;
    position: relative !important;
    z-index: 2 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

/* BALANCE CHIP - FUNKY REDESIGN */
.balance-chip {
    flex: 0 1 auto !important;
    height: 52px !important;
    min-width: 145px !important;
    max-width: 165px !important;
    background: linear-gradient(135deg, rgba(183, 74, 255, 0.2), rgba(255, 0, 110, 0.2)) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    padding: 6px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 2px !important;
    position: relative !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 
        0 4px 20px rgba(183, 74, 255, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
}

.balance-chip:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 
        0 6px 30px rgba(183, 74, 255, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.1) !important;
}

/* Balance chip glow effect */
.balance-chip::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Balance rows */
.chip-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 22px !important;
}

/* Balance icons with glow */
.chip-icon {
    width: 18px !important;
    height: 18px !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    filter: drop-shadow(0 0 6px currentColor) !important;
    animation: iconPulse 2s ease-in-out infinite !important;
    flex-shrink: 0 !important;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Balance amounts with better visibility */
.chip-amount {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: var(--text-white) !important;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 0.3px !important;
    flex: 1 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* Locked balance with different color */
.chip-row.muted .chip-amount {
    color: var(--neon-yellow) !important;
    text-shadow: 
        0 0 15px rgba(255, 255, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Balance labels */
.chip-label {
    font-size: 9px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
}

/* PRIMARY CTA BUTTON - DEPOSIT */
.primary-cta.deposit-cta {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border-radius: 16px !important;
    background: var(--funky-gradient-4) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 
        0 4px 20px rgba(67, 233, 123, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.primary-cta.deposit-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
}

.primary-cta.deposit-cta:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.primary-cta.deposit-cta:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 
        0 6px 30px rgba(67, 233, 123, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.3) !important;
}

.primary-cta.deposit-cta i {
    font-size: 24px !important;
    color: var(--text-white) !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
    z-index: 1 !important;
}

/* Floating plus animation */
.primary-cta.deposit-cta i {
    animation: floatIcon 2s ease-in-out infinite !important;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* QUICK ACTIONS */
.quick-actions {
    display: flex !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

/* Quick action buttons with unique gradients */
.qa-btn {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 14px !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

/* Search button */
.qa-btn.search {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    box-shadow: 
        0 4px 15px rgba(118, 75, 162, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
}

.qa-btn.search:hover {
    transform: translateY(-3px) rotate(-5deg) scale(1.1) !important;
    box-shadow: 
        0 6px 25px rgba(118, 75, 162, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.2) !important;
}

/* Jackpot button */
.qa-btn.jackpot {
    background: linear-gradient(135deg, #f093fb, #f5576c) !important;
    box-shadow: 
        0 4px 15px rgba(245, 87, 108, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
}

.qa-btn.jackpot:hover {
    transform: translateY(-3px) rotate(5deg) scale(1.1) !important;
    box-shadow: 
        0 6px 25px rgba(245, 87, 108, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.2) !important;
}

/* Login button */
.qa-btn.login {
    background: linear-gradient(135deg, #fa709a, #fee140) !important;
    box-shadow: 
        0 4px 15px rgba(250, 112, 154, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
}

.qa-btn.login:hover {
    transform: translateY(-3px) rotate(-5deg) scale(1.1) !important;
    box-shadow: 
        0 6px 25px rgba(250, 112, 154, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.2) !important;
}

/* Icons in quick action buttons */
.qa-btn i {
    font-size: 18px !important;
    color: var(--text-white) !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
    z-index: 1 !important;
    margin: 0 !important;
}

/* Ripple effect for buttons */
.qa-btn::after,
.primary-cta::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.qa-btn:active::after,
.primary-cta:active::after {
    width: 300px;
    height: 300px;
}

/* GUEST CHIP */
.guest-chip {
    flex: 1 1 auto !important;
    height: 55px !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2)) !important;
    border: 2px solid transparent !important;
    border-image: linear-gradient(135deg, #667eea, #764ba2) 1 !important;
    border-radius: 20px !important;
    padding: 8px 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.05) !important;
}

.guest-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.guest-avatar i {
    font-size: 20px !important;
    color: var(--text-white) !important;
}

.guest-copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.guest-copy strong {
    font-size: 14px !important;
    color: var(--text-white) !important;
    font-weight: 700 !important;
}

.guest-copy small {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* JACKPOT OVERLAY */
.jackpot-overlay {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999998;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

.jackpot-overlay.active {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
}

.jackpot-overlay-content {
    position: relative;
    width: 100%;
    max-height: 90vh;
    height: auto;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1e 100%);
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    box-shadow: 
        0 -10px 40px rgba(183, 74, 255, 0.4),
        inset 0 0 100px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    animation: slideUp 0.4s ease-out;
    display: block !important;
}

/* Ensure casino container shows */
.jackpot-overlay .casino-container {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    z-index: 1 !important;
    display: block !important;
}

.jackpot-overlay .content-wrapper {
    position: relative !important;
    width: 100% !important;
    background: transparent !important;
    padding: 15px !important;
    max-height: none !important;
    overflow: visible !important;
}

.jackpot-overlay.active {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Ensure overlay content is visible */
.jackpot-overlay.active .jackpot-overlay-content {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Mobile specific overlay fixes */
@media (max-width: 768px) {
    .jackpot-overlay {
        z-index: 999999 !important;
    }
    
    .jackpot-overlay-content {
        max-height: 85vh !important;
        min-height: 50vh !important;
    }
    
    .jackpot-overlay .casino-container {
        min-height: 400px !important;
    }
}

/* Additional layout fixes */
.casino-container {
    padding: 15px !important;
    margin: 0 !important;
}

.content-wrapper {
    padding: 20px !important;
    margin: 0 !important;
}

/* Fix winner and jackpot sections */
.winners-header {
    margin-bottom: 15px !important;
    padding: 10px !important;
}

.jackpot-section {
    text-align: center !important;
    margin-bottom: 15px !important;
}

.jackpot-title {
    font-size: 24px !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

.jackpot-subtitle {
    font-size: 12px !important;
    margin: 0 0 10px 0 !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.counter-container {
    margin: 10px auto !important;
    padding: 10px 15px !important;
    display: inline-block !important;
}

/* Tab improvements */
.main-section-tabs {
    margin: 0 0 15px 0 !important;
    padding: 0 10px !important;
}

.main-section-tab {
    padding: 10px 16px !important;
    margin: 0 !important;
}

/* Winners tabs layout */
.winners-tabs {
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
}

.winners-tab {
    padding: 8px 16px !important;
    margin: 0 !important;
}

/* Ticker improvements */
.winners-ticker {
    margin: 10px 0 !important;
    padding: 10px !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.ticker-track {
    padding: 5px 0 !important;
}

.winner-item {
    margin: 0 20px 0 0 !important;
    padding: 8px 15px !important;
}

/* Jackpot ticker improvements */
.jackpot-ticker-compact {
    margin: 15px 0 !important;
    padding: 10px !important;
    border-radius: 15px !important;
}

.jackpot-ticker-track {
    padding: 10px 0 !important;
}

.jackpot-item-compact {
    margin: 0 20px 0 0 !important;
    padding: 10px 15px !important;
}

/* Stats section */
.compact-section {
    padding: 10px !important;
    margin: 0 !important;
}

.compact-section.active {
    display: block !important;
    animation: fadeIn 0.3s ease !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.jackpot-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 0, 110, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 24px;
    font-weight: bold;
}

.jackpot-close:hover {
    background: rgba(255, 0, 110, 0.3);
    border-color: var(--neon-pink);
    transform: rotate(90deg) scale(1.1);
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 380px) {
    .mobile-bar-content {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    
    .balance-chip {
        height: 48px !important;
        min-width: 125px !important;
        max-width: 150px !important;
        padding: 5px 8px !important;
    }
    
    .chip-amount {
        font-size: 12px !important;
    }
    
    .chip-icon {
        width: 18px !important;
        height: 18px !important;
        font-size: 14px !important;
    }
    
    .primary-cta.deposit-cta {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }
    
    .qa-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }
    
    .qa-btn i {
        font-size: 18px !important;
    }
}

@media (max-width: 360px) {
    :root { --navbar-height: 60px; }
    
    .mobile-bar-content {
        padding: 6px 8px !important;
        gap: 6px !important;
    }
    
    .balance-chip {
        height: 46px !important;
        min-width: 115px !important;
        max-width: 140px !important;
        padding: 4px 7px !important;
    }
    
    .chip-amount {
        font-size: 11px !important;
    }
    
    .chip-label {
        font-size: 8px !important;
    }
    
    .qa-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        border-radius: 12px !important;
    }
    
    .primary-cta.deposit-cta {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }
    
    .primary-cta.deposit-cta i {
        font-size: 20px !important;
    }
    
    .qa-btn i {
        font-size: 16px !important;
    }
}

/* Ensure content doesn't overlap */
body {
    padding-bottom: calc(var(--navbar-height) + 10px) !important;
}

/* Additional animations for enhanced experience */
@keyframes rainbowBorder {
    0% { border-image-source: linear-gradient(90deg, var(--neon-purple), var(--neon-pink)); }
    33% { border-image-source: linear-gradient(90deg, var(--neon-pink), var(--neon-blue)); }
    66% { border-image-source: linear-gradient(90deg, var(--neon-blue), var(--neon-green)); }
    100% { border-image-source: linear-gradient(90deg, var(--neon-green), var(--neon-purple)); }
}

.mobile-bottom-bar {
    animation: rainbowBorder 10s ease-in-out infinite;
}

/* Accessibility improvements */
.qa-btn:focus,
.primary-cta:focus {
    outline: 3px solid var(--neon-blue);
    outline-offset: 2px;
}

/* Loading state for balance */
.chip-amount.loading {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}