/* MOBILE JACKPOT POPUP - FUNKY DESIGN */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Russo+One&display=swap');

:root {
    --popup-bg: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    --neon-cyan: #00ffff;
    --neon-magenta: #ff00ff;
    --neon-yellow: #ffff00;
    --neon-lime: #00ff00;
    --glass-white: rgba(255, 255, 255, 0.1);
    --text-glow: #ffffff;
}

/* JACKPOT OVERLAY POPUP */
.mobile-jackpot-popup {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999997;
    overflow: hidden;
    animation: popupFadeIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-jackpot-popup.active {
    display: block;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* POPUP CONTAINER */
.popup-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: var(--popup-bg);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    overflow: hidden;
    box-shadow: 
        0 -20px 60px rgba(0, 255, 255, 0.3),
        0 -10px 40px rgba(255, 0, 255, 0.2),
        inset 0 0 100px rgba(0, 0, 0, 0.5);
    animation: slideUpBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUpBounce {
    0% {
        transform: translateY(100%);
    }
    60% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* ANIMATED BACKGROUND PATTERN */
.popup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 255, 255, 0.03) 10px,
            rgba(0, 255, 255, 0.03) 20px
        );
    animation: patternMove 20s linear infinite;
    pointer-events: none;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* CLOSE BUTTON */
.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff006e, #ff4500);
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.4);
}

.popup-close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 0, 110, 0.6);
}

/* HEADER SECTION */
.popup-header {
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.popup-title {
    font-family: 'Russo One', sans-serif;
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: titlePulse 2s ease-in-out infinite;
    margin: 10px 0;
}

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

.popup-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* TAB NAVIGATION */
.popup-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.popup-tab {
    flex: 1;
    padding: 12px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.popup-tab:hover::before {
    width: 150%;
    height: 150%;
}

.popup-tab.active {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    color: white;
    border-color: var(--neon-cyan);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
}

/* CONTENT SECTIONS */
.popup-content {
    padding: 0 20px 20px;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
}

.popup-section {
    display: none;
    animation: sectionFadeIn 0.5s ease;
}

.popup-section.active {
    display: block;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* JACKPOT COUNTER */
.jackpot-total-display {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta)) 1;
}

.jackpot-total-display::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmerEffect 3s infinite;
}

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

.jackpot-total-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.jackpot-total-amount {
    font-family: 'Russo One', sans-serif;
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(90deg, var(--neon-yellow), var(--neon-lime));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 0, 0.5);
    animation: amountGlow 2s ease-in-out infinite;
}

@keyframes amountGlow {
    0%, 100% { 
        filter: brightness(1) drop-shadow(0 0 20px rgba(255, 255, 0, 0.5)); 
    }
    50% { 
        filter: brightness(1.2) drop-shadow(0 0 30px rgba(255, 255, 0, 0.8)); 
    }
}

/* JACKPOT LEVELS */
.jackpot-levels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.jackpot-level-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.jackpot-level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--level-color, #fff) 0%, transparent 50%);
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.jackpot-level-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--level-color, #fff);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.jackpot-level-card:hover::before {
    opacity: 0.2;
}

.jackpot-level-icon {
    font-size: 28px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 10px var(--level-color, #fff));
    animation: iconFloat 3s ease-in-out infinite;
    animation-delay: calc(var(--level-index) * 0.2s);
}

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

.jackpot-level-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.jackpot-level-amount {
    font-family: 'Russo One', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: var(--level-color, #fff);
    text-shadow: 0 0 15px var(--level-color, #fff);
}

/* WINNERS TICKER */
.winners-ticker-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

.winners-ticker-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--neon-cyan);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.winners-ticker-track {
    display: flex;
    animation: tickerScroll 30s linear infinite;
    gap: 20px;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.winner-card {
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.winner-card:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
}

.winner-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.winner-info {
    flex: 1;
}

.winner-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.winner-amount {
    font-family: 'Russo One', sans-serif;
    font-size: 14px;
    font-weight: 900;
    color: var(--neon-lime);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta), var(--neon-yellow));
    border-radius: 12px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after {
    opacity: 0.5;
}

.stat-value {
    font-family: 'Russo One', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 0 0 15px rgba(255, 255, 0, 0.5);
    margin-bottom: 5px;
}

.stat-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

/* SCROLLBAR STYLING */
.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--neon-magenta), var(--neon-cyan));
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 480px) {
    .popup-container {
        max-height: 90vh;
    }
    
    .popup-title {
        font-size: 24px;
    }
    
    .jackpot-total-amount {
        font-size: 28px;
    }
    
    .jackpot-levels {
        grid-template-columns: 1fr;
    }
    
    .popup-tabs {
        gap: 5px;
    }
    
    .popup-tab {
        padding: 10px 15px;
        font-size: 11px;
    }
    
    .winner-card {
        min-width: 180px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* LOADING ANIMATION */
.popup-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PARTICLE EFFECTS */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: particleFloat 10s infinite linear;
    box-shadow: 0 0 10px var(--neon-cyan);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}